Skip to main content

A compiler targeting the Commodore 64

Project description

jeff65

Build Status AppVeyor Coverage Status Requirements Status

jeff65 is a compiler for the Commodore 64 (and perhaps in the future, other 6502-based computers). It is implemented in Python 3 and produces .prg files which can be loaded directly in VICE, or combined into .d64 disk images, written to a floppy disk, and run on real hardware.

note: this project is currently in its early stages. Features discussed below are largely the product of wishful thinking and may change at any time.

jeff65 compiles languages using gold syntax, producing blum files as intermediate files. gold syntax provides an imperative systems language for 6502-series processors.

Primary invocation:

usage: jeff65 compile [-h] [-v] file

positional arguments:
  file           the file to compile

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  show the output of each pass

Licensing

The jeff65 compiler itself is provided under the GPLv3 license; if you distribute a modified version of the compiler, you must also make the source code for your modified version available, as described in the license terms. A copy of the GPLv3 license is included in LICENSE.txt in the source distribution.

The standard library units and runtime library, whenever they get written, will probably be provided either using the GPL with a linking exception, or under a non-copyleft license.

Gold-syntax

Gold-syntax provides an imperative systems programming language for 6502-series processors. Features of the processor are exposed in a friendly-but-powerful way; it should be possible to understand what code will be generated by looking directly at the source file.

Gold-syntax is not associated with the Gold parser framework or the gold LLVM linker.

Here is an example file which puts a light red heart to the top-left corner of the screen, which actually works with the compiler in its current, very unfinished, state:

use mem

constant screen-corner: &u8 = mem.as-pointer(0x0400)
constant screen-corner-color: &u8 = mem.as-pointer(0xd800)

fun main()
  @screen-corner = 0x53      /* screencode for <3 */
  @screen-corner-color = 10  /* light red */
endfun

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jeff65-0.0.1.tar.gz (34.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jeff65-0.0.1-py3-none-any.whl (48.1 kB view details)

Uploaded Python 3

File details

Details for the file jeff65-0.0.1.tar.gz.

File metadata

  • Download URL: jeff65-0.0.1.tar.gz
  • Upload date:
  • Size: 34.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for jeff65-0.0.1.tar.gz
Algorithm Hash digest
SHA256 fb689f1a06a113d0d67925a61325426142449f73e1c262f0eef6f18913f4f770
MD5 f06a6b6f736d5513a8641caa6d72d081
BLAKE2b-256 7aabf9147dbf8ca1078a8a6868ba2b9c51199add1280a5d266c93604f14ec9bd

See more details on using hashes here.

File details

Details for the file jeff65-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: jeff65-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 48.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for jeff65-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0ff5312928ca0f325a2a5f2cd5788f097eb20818612e365443e3cd2555733ae6
MD5 e01bcadf7ff2c416f736aa783e16d9c2
BLAKE2b-256 89e49bcb4864cece85e98b52e6bbed0deed8ce2c1d0239535c4f4a1649cd1348

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page