mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-24 14:38:05 +11:00
core: define H@ a bit sooner
This commit is contained in:
parent
bd38d80f9c
commit
863540f7c6
6
blk/353
6
blk/353
@ -3,10 +3,8 @@
|
||||
: HERE 0x04 RAM+ ;
|
||||
: CURRENT* 0x51 RAM+ ;
|
||||
: CURRENT CURRENT* @ ;
|
||||
|
||||
( w -- a f )
|
||||
: FIND CURRENT @ SWAP _find ;
|
||||
|
||||
: H@ HERE @ ;
|
||||
: FIND ( w -- a f ) CURRENT @ SWAP _find ;
|
||||
: QUIT
|
||||
(resRS)
|
||||
0 0x08 RAM+ ! ( 08 == C<* override )
|
||||
|
4
blk/364
4
blk/364
@ -4,8 +4,8 @@
|
||||
DUP NOT IF DROP 0x0c RAM+ @ THEN ( 0c == C<* )
|
||||
EXECUTE
|
||||
;
|
||||
: , HERE @ ! HERE @ 2+ HERE ! ;
|
||||
: C, HERE @ C! HERE @ 1+ HERE ! ;
|
||||
: , H@ ! H@ 2+ HERE ! ;
|
||||
: C, H@ C! H@ 1+ HERE ! ;
|
||||
: BIT@ ( bit addr -- f ) C@ SWAP RSHIFT 0x01 AND ;
|
||||
: BIT! ( f bit addr -- )
|
||||
SWAP 0x01 SWAP LSHIFT ROT ( addr mask f )
|
||||
|
11
blk/368
11
blk/368
@ -1,11 +1,10 @@
|
||||
: [entry]
|
||||
HERE @ ( w h )
|
||||
SWAP SCPY ( h )
|
||||
HERE @ SWAP - ( sz )
|
||||
: [entry] ( w -- )
|
||||
H@ SWAP SCPY ( h )
|
||||
H@ SWAP - ( sz )
|
||||
( write prev value )
|
||||
HERE @ CURRENT @ - ,
|
||||
H@ CURRENT @ - ,
|
||||
C, ( write size )
|
||||
HERE @ CURRENT !
|
||||
H@ CURRENT !
|
||||
;
|
||||
|
||||
: (entry) WORD [entry] ;
|
||||
|
1
blk/369
1
blk/369
@ -1,7 +1,6 @@
|
||||
( Words here until the end of the low part, unlike words
|
||||
preceeding them, aren't immediately needed for boot. But its
|
||||
better to have as many words as possible in the xcomp part. )
|
||||
: H@ HERE @ ;
|
||||
: IMMEDIATE
|
||||
CURRENT @ 1-
|
||||
DUP C@ 128 OR SWAP C! ;
|
||||
|
BIN
emul/forth.bin
BIN
emul/forth.bin
Binary file not shown.
Loading…
Reference in New Issue
Block a user