2020-05-15 08:41:09 +10:00
|
|
|
0xbf00 CONSTANT RS_ADDR
|
2020-05-12 11:08:24 +10:00
|
|
|
0xbffa CONSTANT PS_ADDR
|
2021-01-03 06:20:50 +11:00
|
|
|
RS_ADDR 0xb0 - CONSTANT SYSVARS
|
2020-06-29 09:45:28 +10:00
|
|
|
0x8000 CONSTANT HERESTART
|
2021-01-03 06:20:50 +11:00
|
|
|
SYSVARS 0xa0 + CONSTANT LCD_MEM
|
|
|
|
SYSVARS 0xa2 + CONSTANT GRID_MEM
|
|
|
|
SYSVARS 0xa5 + CONSTANT KBD_MEM
|
2020-05-10 01:55:58 +10:00
|
|
|
0x01 CONSTANT KBD_PORT
|
2020-09-22 07:51:08 +10:00
|
|
|
5 LOAD ( z80 assembler )
|
2020-05-08 20:50:34 +10:00
|
|
|
262 LOAD ( xcomp )
|
2020-05-08 23:07:44 +10:00
|
|
|
522 LOAD ( font compiler )
|
2020-06-27 11:41:17 +10:00
|
|
|
282 LOAD ( boot.z80.decl )
|
2020-05-14 03:33:24 +10:00
|
|
|
270 LOAD ( xcomp overrides )
|
2020-05-08 20:50:34 +10:00
|
|
|
|
2020-05-11 04:06:01 +10:00
|
|
|
( TI-84+ requires specific code at specific offsets which
|
|
|
|
come in conflict with Collapse OS' stable ABI. We thus
|
|
|
|
offset the binary by 0x100, which is our minimum possible
|
|
|
|
increment and fill the TI stuff with the code below. )
|
|
|
|
|
2020-12-08 12:08:45 +11:00
|
|
|
0x5a JP, 0x15 ALLOT0 ( 0x18 )
|
|
|
|
0x5a JP, ( reboot ) 0x1d ALLOT0 ( 0x38 )
|
2020-05-11 04:06:01 +10:00
|
|
|
( handleInterrupt )
|
|
|
|
DI,
|
2020-09-20 11:03:18 +10:00
|
|
|
AF PUSH,
|
2020-05-11 04:06:01 +10:00
|
|
|
( did we push the ON button? )
|
2020-09-20 11:03:18 +10:00
|
|
|
0x04 ( PORT_INT_TRIG ) INAi,
|
|
|
|
0 ( INT_TRIG_ON ) A BIT,
|
2020-05-11 04:06:01 +10:00
|
|
|
IFNZ,
|
|
|
|
( yes? acknowledge and boot )
|
2020-09-20 11:03:18 +10:00
|
|
|
0x03 ( PORT_INT_MASK ) INAi,
|
|
|
|
0x00 ( INT_MASK_ON ) A RES, ( ack interrupt )
|
|
|
|
0x03 ( PORT_INT_MASK ) OUTiA,
|
2020-05-11 04:06:01 +10:00
|
|
|
AF POPqq,
|
|
|
|
EI,
|
2020-09-20 11:03:18 +10:00
|
|
|
0x100 JP,
|
2020-05-11 04:06:01 +10:00
|
|
|
THEN,
|
2020-09-20 11:03:18 +10:00
|
|
|
AF POP,
|
2020-05-11 04:06:01 +10:00
|
|
|
EI,
|
|
|
|
RETI,
|
|
|
|
|
2020-12-08 12:08:45 +11:00
|
|
|
0x03 ALLOT0 ( 0x53 )
|
Make KEY non-blocking
... and rename it to KEY?. Then, add KEY from KEY? for its blocking
version.
I need this for an upcoming Remote Shell feature. If a Collapse OS
system remotely controls another shell, it needs to be able to poll
both the remote system and the local keyboard at the same time. A
blocking KEY is incompatible with this.
In some places, the polling mechanism doesn't make sense, so this
new KEY? always returns a character. In some places, I just haven't
implemented the mechanism yet, so I kept the old blocking code and
added a "always 1" flag as a temporary shim.
I have probably broken something, but in emulators, Collapse OS runs
fine. It's an important reminder of what will be lost with the new
"dogfooding" approach (see recent mailing list message): without
emulators, it's much harder to to sweeping changes like this without
breaking stuff.
It's fine, I don't expect many more of these core changes to the
system. It's nearly feature-complete.
2021-01-02 00:05:29 +11:00
|
|
|
0x5a JP, ( 0x56 ) 0xff C, 0xa5 C, 0xff C, ( 0x5a )
|
2020-05-11 04:33:35 +10:00
|
|
|
( boot )
|
|
|
|
DI,
|
2020-09-20 11:03:18 +10:00
|
|
|
IM1,
|
2020-05-11 04:33:35 +10:00
|
|
|
( enable the ON key interrupt )
|
2020-09-20 11:03:18 +10:00
|
|
|
0x03 ( PORT_INT_MASK ) INAi,
|
|
|
|
0x00 ( INT_MASK_ON ) A SET,
|
|
|
|
0x03 ( PORT_INT_MASK ) OUTiA,
|
|
|
|
A 0x80 LDri,
|
|
|
|
0x07 ( PORT_BANKB ) OUTiA,
|
2020-05-11 04:33:35 +10:00
|
|
|
EI,
|
|
|
|
( LCD off )
|
2020-09-20 11:03:18 +10:00
|
|
|
A 0x02 ( LCD_CMD_DISABLE ) LDri,
|
|
|
|
0x10 ( LCD_PORT_CMD ) OUTiA,
|
2020-05-11 04:33:35 +10:00
|
|
|
HALT,
|
|
|
|
|
2020-12-08 12:08:45 +11:00
|
|
|
0x95 ALLOT0 ( 0x100 )
|
2020-05-11 04:06:01 +10:00
|
|
|
( All set, carry on! )
|
|
|
|
|
2020-05-08 20:50:34 +10:00
|
|
|
CURRENT @ XCURRENT !
|
|
|
|
|
2020-05-11 04:06:01 +10:00
|
|
|
0x100 BIN( !
|
2020-06-27 11:41:17 +10:00
|
|
|
283 335 LOADR ( boot.z80 )
|
2020-05-16 12:44:49 +10:00
|
|
|
353 LOAD ( xcomp core low )
|
2020-05-13 02:41:47 +10:00
|
|
|
CREATE ~FNT CPFNT3x5
|
2020-11-11 12:30:37 +11:00
|
|
|
605 609 LOADR ( LCD low )
|
|
|
|
402 403 LOADR ( Grid )
|
2020-09-21 10:24:09 +10:00
|
|
|
616 620 LOADR ( KBD low )
|
2020-10-29 09:06:58 +11:00
|
|
|
390 LOAD ( xcomp core high )
|
2020-05-08 20:50:34 +10:00
|
|
|
(entry) _
|
|
|
|
( Update LATEST )
|
|
|
|
PC ORG @ 8 + !
|
2020-11-15 14:35:08 +11:00
|
|
|
," LCD$ KBD$ GRID$ " EOT,
|
2020-12-08 12:08:45 +11:00
|
|
|
ORG @ 0x100 - |M 2 PC! 2 PC!
|
|
|
|
H@ |M 2 PC! 2 PC!
|