Parcourir la source

forth: rename "LITS" to "LIT<"

pull/95/head
Virgil Dupras il y a 4 ans
Parent
révision
145fdd8e05
3 fichiers modifiés avec 9 ajouts et 14 suppressions
  1. +1
    -1
      forth/core.fs
  2. +2
    -1
      forth/dictionary.txt
  3. +6
    -12
      forth/forth.asm

+ 1
- 1
forth/core.fs Voir le fichier

@@ -5,7 +5,7 @@
: BEGIN H ; IMMEDIATE
: AGAIN COMPILE (bbr) H -^ C, ; IMMEDIATE
: UNTIL COMPILE SKIP? COMPILE (bbr) H -^ C, ; IMMEDIATE
: ( BEGIN LITS ) WORD SCMP NOT UNTIL ; IMMEDIATE
: ( BEGIN LIT< ) WORD SCMP NOT UNTIL ; IMMEDIATE
( Hello, hello, krkrkrkr... do you hear me?
Ah, voice at last! Some lines above need comments
BTW: Forth lines limited to 64 cols because of default


+ 2
- 1
forth/dictionary.txt Voir le fichier

@@ -143,7 +143,8 @@ CMP n1 n2 -- n Compare n1 and n2 and set n to -1, 0, or 1.
NOT f -- f Push the logical opposite of f

*** Strings ***
LITS x -- a Read following LIT and push its addr to a
LIT< x -- Read following word and write to HERE as a string
literal.
SCMP a1 a2 -- n Compare strings a1 and a2. See CMP
SLEN a -- n Push length of str at a.



+ 6
- 12
forth/forth.asm Voir le fichier

@@ -988,25 +988,19 @@ LITN:
ld (HERE), hl
jp next

.db "LITS"
.db "LIT<"
.fill 3
.dw LITN
.db 1 ; IMMEDIATE
LITS:
LITRD:
.dw compiledWord
.dw .wrLIT
.dw NUMBER
.dw LIT
.dw WR
.dw WORD
.dw .scpy
.dw EXIT

.wrLIT:
.dw nativeWord
ld hl, (HERE)
ld de, LIT
call DEinHL
ld (HERE), hl
jp next

.scpy:
.dw nativeWord
pop hl
@@ -1018,7 +1012,7 @@ LITS:

.db "(find)"
.fill 1
.dw LITS
.dw LITRD
.db 0
FIND_:
.dw nativeWord


Chargement…
Annuler
Enregistrer