-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the JSC64 wiki!
A nonprofessional hobbyist attempting to write a compiler in Javascript for the NMOS 6502/6510 processor and the Commodore 64.
I am not a professional coder in any way and to be honest I don't really know what I am doing.
Everything here is for personal use and educational purposes only. Everything is absolutely without warranty.
If something does not work or causes damage, I take no responsibility in any way (see LICENSE).
This project fulfills 2 learning goals for me personally:
- To take first steps in javascript (I just started learning javascript a week before starting this toy compiler project)
- To develop a small toy compiler
I'm more of a C person, Basic person and Pascal person, so I don't have much knowledge about all the neat OOP features of Javascript and I think I'm going to program Javascript more C style and less the way JS should probably be programmed. So I am using all that stuff like procedures/functions, global variables and more nasty things.
But I have to stand by that, OOP style was never mine and I could never figure out what it was all about. Maybe it's my age, I'm from the C64 era and learned to code like that (as a hobbyist, mind you).
Just start <main.html> in a browser, and the rest of it should be pretty self-explanatory.
You can compile the testfile or type something yourself (or copy and paste) in the left text field.
If you want to run the generated assembly code (it is kind of ACME style), then I recommend to copy and paste it into C64Studio. From there you can build the binary code and run it directly with e.g. the C64 emulator VICE. Both can be found with a few mouse clicks via google.
Better follow the quick start tutorial.
C64Studio is a Commodore development system for Windows on the PC.
VICE ("Versatile Commodore Emulator", for Windows also WinVICE) is a program that can execute programs for Commodore's 8-bit computers, e.g. the C64, the PET, VIC20 and much more.
ACME is a free crossassembler. It supports NMOS 6502 and more processors. The ACME project and its documentation can be found on github. There is also a German-language page that explains the ACME syntax very well. The corresponding google translation to english works quite well.
English is not my native language, I use translation software along with my own not so bad English skills. Nevertheless, I'm afraid some wording may be strange (from time to time).