started compiler words
[rrq/rrqforth.git] / rrqforth.asm
index ba41cbe39021df277ccc6e3343ece77f2cb8e188..16dc7d6ddba4d651702868d72ea62f264464c286 100644 (file)
@@ -119,6 +119,7 @@ include 'memory.asm'
 include 'stack.asm'
 include 'math.asm'
 include 'stdio.asm'
+include 'compile.asm'
 
        WORD p_program_version,'PROGRAM_VERSION',dostring
        STRING 'RRQ Forth version 0.1 - 2021-05-13',10
@@ -142,12 +143,17 @@ main:
        pop qword [p_stdin_DFA]
 
        ;; Initial blurb
-       push qword 1                    ; stdout
-       DOFORTH p_program_version       ; version string => ( s n )
-       DOFORTH sys_write               ; printout
-       pop rax                         ; ignore errors
-
-       DOFORTH p_words
+       FORTH
+       dq p_program_version
+       dq p_tell
+       dq p_stdin
+       dq p_read_word
+       dq p_tell
+       dq p_nl
+       dq p_emit
+       ENDFORTH
+       
+       ;; DOFORTH p_words
        
        push 0
        DOFORTH sys_exit
@@ -160,3 +166,6 @@ include 'syscalls.asm'
 last_word:
        
 heap_start:
+       rb 1048576              ; +1 Mb heap
+       rb 1048576              ; +1 Mb heap
+       rb 1048576              ; +1 Mb heap