anh / buttonz

Exercise that parsing Zedshaw's ButtonMachine code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Practice LJSTHW: parse Zedshaw's ButtonMachine code

Write button code

See sample button file at buttons/sqrt2.btn. It has simple format:

OPERATION DATA ;INLINE COMMENT

Whole line comments also start with ;

Load a button file and get Button Machine run it

$ node src/index.js 'your-button-file'

Run sample button file buttons/sqrt2.btn

$ npm run sqrt2

Verify its result in BX register

Test

Only one test, I'm still learning ava.

$ npm install
$ npm test

License

buttons.js is copyrighted by Zedshaw

https://git.learnjsthehardway.com/learn-javascript-the-hard-way/buttons-computer/

About

Exercise that parsing Zedshaw's ButtonMachine code

License:MIT License


Languages

Language:JavaScript 100.0%