- Notifications
You must be signed in to change notification settings - Fork2
Compiles Batari Basic source files from a JS environment.
License
haroldo-ok/batari-basic-js
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Compiles Batari Basic source files from a JS environment.
npm install batari-basic
constbBasic=require('batari-basic');constfs=require('fs');constHELLO_WORLD=` rem Hello World playfield:......................................X.X.XXX.X...X...XXX.............X.X.X...X...X...X.X.............XXX.XX..X...X...X.X.............X.X.X...X...X...X.X.............X.X.XXX.XXX.XXX.XXX............................................X...X.XXX.XX..X...XX............X...X.X.X.X.X.X...X.X...........X.X.X.X.X.XX..X...X.X...........XX.XX.XXX.X.X.XXX.XX.......end COLUPF = 22 COLUBK = 2mainloop drawscreen score = score + 1 goto mainloop`;constbinaries=bBasic(HELLO_WORLD);fs.writeFileSync('example.bin',Buffer.from(binaries.output));
ThebBasic(code) function receives, as a parameter, a string containing the source code to compile, and returns an object three keys:
outputis the compiled Atari 2600 ROM, as aUint8Arraycontaining its bytes.listingsis an string containing the generated ASM listings;symbolmapis an string mapping addresses to symbols, often used by debugging emulators.
npm runtest👤Haroldo O. Pinheiro
- Website:http://www.haroldo-ok.com/
- Twitter:@Haroldo0k
- Github:@haroldo-ok
- LinkedIn:@haroldo-ok
Contributions, issues and feature requests are welcome!
Feel free to checkissues page. You can also take a look at thecontributing guide.
Give a ⭐️ if this project helped you!
Copyright © 2021Haroldo O. Pinheiro.
This project isGPL--3.0 licensed.
This README was generated with ❤️ byreadme-md-generator
About
Compiles Batari Basic source files from a JS environment.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.