- BASM-3
- 26 Dec 2019 03:28:08 pm Permalink
- Last edited by beckadamtheinventor on 09 Jan 2020 12:29:13 pm; edited 3 times in total
BASM-3 is an on-calc assembler for the TI-84+CE line of graphing calculators, written in C.
This project is going smoothly so far now that I've decided to hardcode the opcodes rather than using some weird table of values.
Includes will be implemented, of course.
The style of BASM is similar to fasmg, but uses a lot of implied first arguments, such as "xor" and "or".
Code:
All of the opcodes and defines are and will be case-insensitive.
"DL" emits a "Long" 3 byte number,
"DW" emits a "Word" 2 byte number.
"DB" emits a byte.
labels are marked with a trailing colon. ":"
Number bases are marked by a "." followed by a "B" for binary, an "X" for hex, a "D" for decimal, or an "O" for octal.
In BASM, labels and undefined words are calculated and written after the file has been assembled.
Once this is done, I will be uploading it to the archives, and the source is on GitHub.
This project is going smoothly so far now that I've decided to hardcode the opcodes rather than using some weird table of values.
Includes will be implemented, of course.
Code:
format asm "OUTBIN"
xor a,a
sbc hl,hl
ld (labelIdk),hl
ret
labelIdk:
DL 0
DW 0
DB 0
All of the opcodes and defines are and will be case-insensitive.
"DL" emits a "Long" 3 byte number,
"DW" emits a "Word" 2 byte number.
"DB" emits a byte.
labels are marked with a trailing colon. ":"
Number bases are marked by a "." followed by a "B" for binary, an "X" for hex, a "D" for decimal, or an "O" for octal.
In BASM, labels and undefined words are calculated and written after the file has been assembled.
Once this is done, I will be uploading it to the archives, and the source is on GitHub.