Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Compiles Batari Basic source files from a JS environment.

License

NotificationsYou must be signed in to change notification settings

haroldo-ok/batari-basic-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VersionDocumentationMaintenanceLicense: GPL--3.0Twitter: Haroldo0k

Compiles Batari Basic source files from a JS environment.

Install

npm install batari-basic

Usage

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:

  • output is the compiled Atari 2600 ROM, as aUint8Array containing its bytes.
  • listings is an string containing the generated ASM listings;
  • symbolmap is an string mapping addresses to symbols, often used by debugging emulators.

Run tests

npm runtest

Author

👤Haroldo O. Pinheiro

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to checkissues page. You can also take a look at thecontributing guide.

Show your support

Give a ⭐️ if this project helped you!

📝 License

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp