mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-02 08:30:55 +11:00
Compare commits
No commits in common. "afc2327770704a6fa79ec3d894952d74cb0770f0" and "ffdc58739a531e3dee7611b8bc25daaec159c938" have entirely different histories.
afc2327770
...
ffdc58739a
10
blk/392
10
blk/392
@ -4,12 +4,4 @@ and other defining words. So, in other words, when compiling
|
|||||||
icore, ":" doesn't means what you think it means, go look in
|
icore, ":" doesn't means what you think it means, go look in
|
||||||
B260.
|
B260.
|
||||||
|
|
||||||
This is loaded in two "low" and "high" parts. The low part is
|
To load, run "393 LOAD".
|
||||||
the biggest chunk and has the most definitions. The high part
|
|
||||||
is the "sensitive" chunk and contains "LITN", ":" and ";"
|
|
||||||
definitions which, once defined, kind of make any more defs
|
|
||||||
impossible.
|
|
||||||
|
|
||||||
The gap between these 2 parts is the ideal place to put device
|
|
||||||
driver code. Load the low part with "393 LOAD", the high part
|
|
||||||
with "415 LOAD"
|
|
||||||
|
2
blk/393
2
blk/393
@ -12,4 +12,4 @@
|
|||||||
0 0x08 RAM+ ! ( 08 == C<* override )
|
0 0x08 RAM+ ! ( 08 == C<* override )
|
||||||
LIT< INTERPRET (find) DROP EXECUTE
|
LIT< INTERPRET (find) DROP EXECUTE
|
||||||
;
|
;
|
||||||
1 19 LOADR+
|
1 20 LOADR+
|
||||||
|
22
blk/412
22
blk/412
@ -1,8 +1,14 @@
|
|||||||
: H@ HERE @ ;
|
( LITN has to be defined after the last immediate usage of
|
||||||
: IMMEDIATE
|
it to avoid bootstrapping issues )
|
||||||
CURRENT @ 1-
|
: LITN 32 , , ( 32 == NUMBER ) ;
|
||||||
DUP C@ 128 OR SWAP C!
|
|
||||||
;
|
: IMMED? 1- C@ 0x80 AND ;
|
||||||
: +! SWAP OVER @ + SWAP ! ;
|
|
||||||
: -^ SWAP - ;
|
( ';' can't have its name right away because, when created, it
|
||||||
: ALLOT HERE +! ;
|
is not an IMMEDIATE yet and will not be treated properly by
|
||||||
|
xcomp. )
|
||||||
|
: _
|
||||||
|
['] EXIT ,
|
||||||
|
R> DROP ( exit : )
|
||||||
|
; IMMEDIATE
|
||||||
|
|
||||||
|
14
blk/416
14
blk/416
@ -1,14 +0,0 @@
|
|||||||
( LITN has to be defined after the last immediate usage of
|
|
||||||
it to avoid bootstrapping issues )
|
|
||||||
: LITN 32 , , ( 32 == NUMBER ) ;
|
|
||||||
|
|
||||||
: IMMED? 1- C@ 0x80 AND ;
|
|
||||||
|
|
||||||
( ';' can't have its name right away because, when created, it
|
|
||||||
is not an IMMEDIATE yet and will not be treated properly by
|
|
||||||
xcomp. )
|
|
||||||
: _
|
|
||||||
['] EXIT ,
|
|
||||||
R> DROP ( exit : )
|
|
||||||
; IMMEDIATE
|
|
||||||
|
|
5
blk/422
5
blk/422
@ -1,3 +1,8 @@
|
|||||||
|
: H@ HERE @ ;
|
||||||
|
: IMMEDIATE
|
||||||
|
CURRENT @ 1-
|
||||||
|
DUP C@ 128 OR SWAP C!
|
||||||
|
;
|
||||||
: [ INTERPRET ; IMMEDIATE
|
: [ INTERPRET ; IMMEDIATE
|
||||||
: ] R> DROP ;
|
: ] R> DROP ;
|
||||||
: LITS 34 , SCPY ;
|
: LITS 34 , SCPY ;
|
||||||
|
4
blk/425
4
blk/425
@ -1,3 +1,7 @@
|
|||||||
|
: +! SWAP OVER @ + SWAP ! ;
|
||||||
|
: -^ SWAP - ;
|
||||||
|
: ALLOT HERE +! ;
|
||||||
|
|
||||||
: IF ( -- a | a: br cell addr )
|
: IF ( -- a | a: br cell addr )
|
||||||
COMPILE (?br)
|
COMPILE (?br)
|
||||||
H@ ( push a )
|
H@ ( push a )
|
||||||
|
BIN
emul/forth.bin
BIN
emul/forth.bin
Binary file not shown.
@ -10,14 +10,12 @@
|
|||||||
CURRENT @ XCURRENT !
|
CURRENT @ XCURRENT !
|
||||||
|
|
||||||
282 LOAD ( boot.z80 )
|
282 LOAD ( boot.z80 )
|
||||||
393 LOAD ( icore low )
|
393 LOAD ( icore )
|
||||||
: (emit) 0 PC! ;
|
|
||||||
: (key) 0 PC@ ;
|
|
||||||
415 LOAD ( icore high )
|
|
||||||
(entry) _
|
(entry) _
|
||||||
( Update LATEST )
|
( Update LATEST )
|
||||||
PC ORG @ 8 + !
|
PC ORG @ 8 + !
|
||||||
," CURRENT @ HERE ! "
|
," CURRENT @ HERE ! "
|
||||||
|
," : (emit) 0 PC! ; : (key) 0 PC@ ; "
|
||||||
422 459 XPACKR
|
422 459 XPACKR
|
||||||
," ' (key) 12 RAM+ ! "
|
," ' (key) 12 RAM+ ! "
|
||||||
ORG @ 256 /MOD 2 PC! 2 PC!
|
ORG @ 256 /MOD 2 PC! 2 PC!
|
||||||
|
@ -18,8 +18,7 @@ CURRENT @ XCURRENT !
|
|||||||
282 LOAD ( boot.z80 )
|
282 LOAD ( boot.z80 )
|
||||||
352 LOAD ( acia.z80 )
|
352 LOAD ( acia.z80 )
|
||||||
372 LOAD ( sdc.z80 )
|
372 LOAD ( sdc.z80 )
|
||||||
393 LOAD ( icore low )
|
393 LOAD ( icore )
|
||||||
415 LOAD ( icore high )
|
|
||||||
(entry) _
|
(entry) _
|
||||||
( Update LATEST )
|
( Update LATEST )
|
||||||
PC ORG @ 8 + !
|
PC ORG @ 8 + !
|
||||||
|
@ -13,8 +13,7 @@ CURRENT @ XCURRENT !
|
|||||||
|
|
||||||
282 LOAD ( boot.z80 )
|
282 LOAD ( boot.z80 )
|
||||||
555 LOAD ( ti.z80 )
|
555 LOAD ( ti.z80 )
|
||||||
393 LOAD ( icore low )
|
393 LOAD ( icore )
|
||||||
415 LOAD ( icore high )
|
|
||||||
(entry) ~FNT CPFNT3x5
|
(entry) ~FNT CPFNT3x5
|
||||||
(entry) _
|
(entry) _
|
||||||
( Update LATEST )
|
( Update LATEST )
|
||||||
|
@ -12,8 +12,7 @@ CURRENT @ XCURRENT !
|
|||||||
0x3000 BIN( !
|
0x3000 BIN( !
|
||||||
282 LOAD ( boot.z80 )
|
282 LOAD ( boot.z80 )
|
||||||
492 LOAD ( trs80.z80 )
|
492 LOAD ( trs80.z80 )
|
||||||
393 LOAD ( icore low )
|
393 LOAD ( icore )
|
||||||
415 LOAD ( icore high )
|
|
||||||
(entry) _
|
(entry) _
|
||||||
( Update LATEST )
|
( Update LATEST )
|
||||||
PC ORG @ 8 + !
|
PC ORG @ 8 + !
|
||||||
|
Loading…
Reference in New Issue
Block a user