mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-05 20:10:55 +11:00
f6ded7712e
This is the first commit I do entirely in VE. It's a habit I'm planning on taking as it helps a lot to find usability issues.
17 lines
547 B
Plaintext
17 lines
547 B
Plaintext
( a -- k7, absolute addr a, relative to PC in a k7 addr )
|
|
: _r3fc DUP 0x3f > IF _oor THEN ;
|
|
: _raddr7
|
|
PC - DUP 0< IF 0x40 + _r3fc 0x40 OR ELSE _r3fc THEN ;
|
|
: _brbx ( a b op -- a ) OR SWAP _raddr7 3 LSHIFT OR ;
|
|
: BRBC 0xf400 _brbx ; : BRBS 0xf000 _brbx ; : BRCC 0 BRBC ;
|
|
: BRCS 0 BRBS ; : BREQ 1 BRBS ; : BRNE 1 BRBC ; : BRGE 4 BRBC ;
|
|
: BRHC 5 BRBC ; : BRHS 5 BRBS ; : BRID 7 BRBC ; : BRIE 7 BRBS ;
|
|
: BRLO BRCS ; : BRLT 4 BRBS ; : BRMI 2 BRBS ; : BRPL 2 BRBC ;
|
|
: BRSH BRCC ; : BRTC 6 BRBC ; : BRTS 6 BRBS ; : BRVC 3 BRBC ;
|
|
: BRVS 3 BRBS ;
|
|
|
|
|
|
|
|
|
|
|