Bladeren bron

Add words "'S" and "S0"

pull/102/head
Virgil Dupras 4 jaren geleden
bovenliggende
commit
446ce574cd
4 gewijzigde bestanden met toevoegingen van 23 en 5 verwijderingen
  1. +5
    -5
      blk/046
  2. +7
    -0
      blk/047
  3. BIN
      emul/forth/z80c.bin
  4. +11
    -0
      forth/boot.z80

+ 5
- 5
blk/046 Bestand weergeven

@@ -9,8 +9,8 @@ SWAP a b -- b a
2DUP a b -- a b a b
2OVER a b c d -- a b c d a b
2SWAP a b c d -- c d a b
PICK Pick nth item from stack. "0 PICK" = DUP,
"1 PICK" = OVER.
ROLL Rotate PSP over n items. "1 ROLL" = SWAP,
"2 ROLL" = ROT. 0 is noop.
'S Returns current stack pointer, not counting the
push it's making right now.
S0 Returns address of PSP TOS. When PSP is empty,
'S == S0
(cont.)

+ 7
- 0
blk/047 Bestand weergeven

@@ -0,0 +1,7 @@
(cont.)
PICK Pick nth item from stack. "0 PICK" = DUP,
"1 PICK" = OVER.
ROLL Rotate PSP over n items. "1 ROLL" = SWAP,
"2 ROLL" = ROT. 0 is noop.



BIN
emul/forth/z80c.bin Bestand weergeven


+ 11
- 0
forth/boot.z80 Bestand weergeven

@@ -433,6 +433,17 @@ CODE 2DROP
chkPS,
;CODE

CODE S0
RAMSTART LDHL(nn), ( RAM+00 == INITIAL_SP )
HL PUSHqq,
;CODE

CODE 'S
HL 0 LDddnn,
SP ADDHLss,
HL PUSHqq,
;CODE

CODE AND
HL POPqq,
DE POPqq,


Laden…
Annuleren
Opslaan