1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-23 15:48:05 +11:00
collapseos/blk/051
Virgil Dupras de7cb4a80f Add word A,
This would be useful, for example, to allow the assembler to write
straight to an AT28 EEPROM without going to RAM. This would be a
life saver in machines with tight RAM such as the SMS.
2020-10-28 20:45:50 -04:00

11 lines
272 B
Plaintext

VARIABLE ORG
VARIABLE L1 VARIABLE L2 VARIABLE L3 VARIABLE L4
: SPLITB
256 /MOD SWAP
;
( We divide by 2 because each PC represents a word. )
: PC H@ ORG @ - 1 RSHIFT ;
( A, spits an assembled byte, A,, spits an assembled word
Both increase PC. )
: A,, SPLITB A, A, ;