mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-27 17:18:05 +11:00
1a467efae1
Unless I misunderstood, this is supposed to set CS. This would make all SREG have the same value. This allows us to remove BIN( offset from os.bin. I've tried booting to offset 0, but it didn't seem to work. Let's settle for 0x8000. 512kb of system RAM is way more than we need anyways.
14 lines
568 B
Plaintext
14 lines
568 B
Plaintext
: OP1 CREATE C, DOES> C@ A, ;
|
|
0xac OP1 LODSB, 0xfa OP1 CLI, 0xfb OP1 STI,
|
|
0xf4 OP1 HLT, 0xfc OP1 CLD, 0xfd OP1 STD,
|
|
( no argument, jumps with relative addrs are special )
|
|
0xeb OP1 JMPs, 0xe9 OP1 JMPn, 0x74 OP1 JZ,
|
|
: MOVri, SWAP 0xb0 OR A, A, ;
|
|
: MOVxi, SWAP 0xb8 OR A, SPLITB A, A, ;
|
|
: MOVsx, 0x8e A, SWAP 3 LSHIFT OR 0xc0 OR A, ;
|
|
: INT, 0xcd A, A, ;
|
|
: JMPr, 0xff A, 7 AND 0xe0 OR A, ;
|
|
: JMPf, ( seg off ) 0xea A, SPLITB A, A, SPLITB A, A, ;
|
|
: OPrr CREATE C, DOES> C@ A, 3 LSHIFT OR 0xc0 OR A, ;
|
|
0x31 OPrr XORxx, 0x08 OPrr ORrr,
|