Преглед изворни кода

forth: rename "LITS" to "LIT<"

pull/95/head
Virgil Dupras пре 4 година
родитељ
комит
145fdd8e05
3 измењених фајлова са 9 додато и 14 уклоњено
  1. +1
    -1
      forth/core.fs
  2. +2
    -1
      forth/dictionary.txt
  3. +6
    -12
      forth/forth.asm

+ 1
- 1
forth/core.fs Прегледај датотеку

@@ -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 Прегледај датотеку

@@ -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 Прегледај датотеку

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


Loading…
Откажи
Сачувај