core: define H@ a bit sooner

This commit is contained in:
Virgil Dupras 2020-05-15 22:59:38 -04:00
parent bd38d80f9c
commit 863540f7c6
5 changed files with 9 additions and 13 deletions

View File

@ -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 )

View File

@ -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
View File

@ -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] ;

View File

@ -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! ;

Binary file not shown.