Il sito funziona meglio con JavaScript.
Home
Esplora
lain.church
Aiuto
Registrati
Accedi
izaya
/
collapseos
mirror da
https://github.com/hsoft/collapseos.git
Segui
1
Vota
1
Forka
0
Codice
Problemi
0
Rilasci
0
Wiki
Attività
Sfoglia il codice sorgente
forth: add word "."
pull/94/head
Virgil Dupras
4 anni fa
parent
49228e418c
commit
391ddb9984
4 ha cambiato i file
con
17 aggiunte
e
3 eliminazioni
Visualizzazione separata
Diff Options
Show Stats
Download Patch File
Download Diff File
+12
-0
apps/forth/dict.asm
+2
-0
apps/forth/glue.asm
+1
-1
apps/forth/main.asm
+2
-2
apps/forth/util.asm
+ 12
- 0
apps/forth/dict.asm
Vedi File
@@ -108,3 +108,15 @@ INTERPRET:
jp exit
.msg:
.db "not found", 0
; ( n -- )
DOT:
.db "."
.fill 7
.dw INTERPRET
.dw nativeWord
pop de
call pad
call fmtDecimalS
call printstr
jp exit
+ 2
- 0
apps/forth/glue.asm
Vedi File
@@ -2,6 +2,8 @@
jp forthMain
.inc "core.asm"
.inc "lib/ari.asm"
.inc "lib/fmt.asm"
.equ FORTH_RAMSTART RAMSTART
.inc "forth/main.asm"
.inc "forth/util.asm"
+ 1
- 1
apps/forth/main.asm
Vedi File
@@ -27,7 +27,7 @@ ENDPGM:
forthMain:
ld (INITIAL_SP), sp
ld hl,
INTERPRET
; last entry in hardcoded dict
ld hl,
DOT
; last entry in hardcoded dict
ld (CURRENT), hl
ld hl, FORTH_RAMEND
ld (HERE), hl
+ 2
- 2
apps/forth/util.asm
Vedi File
@@ -1,8 +1,8 @@
; Return address of scratchpad in HL
pad:
ld hl, (HERE)
ld
de
, PADDING
add hl, de
ld
a
, PADDING
call addHL
ret
; Read word from (INPUTPOS) and return, in HL, a null-terminated word.
Write
Preview
Loading…
Annulla
Salva