2020-04-20 10:36:13 +10:00
|
|
|
( Splits word into msb/lsb, lsb being on TOS )
|
|
|
|
: SPLITB
|
|
|
|
256 /MOD SWAP
|
|
|
|
;
|
2020-04-28 05:04:37 +10:00
|
|
|
: PC H@ ORG @ - BIN( @ + ;
|
2020-04-20 10:36:13 +10:00
|
|
|
( A, spits an assembled byte, A,, spits an assembled word
|
2020-10-29 11:45:50 +11:00
|
|
|
Both increase PC. )
|
|
|
|
: A,, SPLITB A, A, ;
|
2020-05-08 05:40:10 +10:00
|
|
|
: <<3 3 LSHIFT ; : <<4 4 LSHIFT ;
|
2020-04-20 10:36:13 +10:00
|
|
|
( As a general rule, IX and IY are equivalent to spitting an
|
|
|
|
extra 0xdd / 0xfd and then spit the equivalent of HL )
|
|
|
|
: IX 0xdd A, HL ; : IY 0xfd A, HL ;
|
|
|
|
: _ix+- 0xff AND 0xdd A, (HL) ;
|
|
|
|
: _iy+- 0xff AND 0xfd A, (HL) ;
|
|
|
|
: IX+ _ix+- ; : IX- 0 -^ _ix+- ;
|
|
|
|
: IY+ _iy+- ; : IY- 0 -^ _iy+- ;
|