zasm: can assemble zasm/tok.asm!

This commit is contained in:
Virgil Dupras 2019-05-18 20:31:52 -04:00
parent fd11941867
commit 9f6ebf538d
3 changed files with 18 additions and 9 deletions

View File

@ -59,11 +59,12 @@ jp zasmMain
#include "zasm/util.asm"
.equ IO_RAMSTART ZASM_RAMEND
#include "zasm/io.asm"
.equ TOK_RAMSTART IO_RAMEND
#include "zasm/tok.asm"
#include "zasm/parse.asm"
#include "zasm/expr.asm"
#include "zasm/instr.asm"
.equ DIREC_RAMSTART IO_RAMEND
.equ DIREC_RAMSTART TOK_RAMEND
#include "zasm/directive.asm"
.equ SYM_RAMSTART DIREC_RAMEND
#include "zasm/symbol.asm"

View File

@ -1,20 +1,20 @@
; *** Consts ***
TOK_INSTR .equ 0x01
TOK_DIRECTIVE .equ 0x02
TOK_LABEL .equ 0x03
TOK_EOF .equ 0xfe ; end of file
TOK_BAD .equ 0xff
.equ TOK_INSTR 0x01
.equ TOK_DIRECTIVE 0x02
.equ TOK_LABEL 0x03
.equ TOK_EOF 0xfe ; end of file
.equ TOK_BAD 0xff
.equ SCRATCHPAD_SIZE 0x40
; *** Variables ***
scratchpad:
.fill SCRATCHPAD_SIZE
.equ scratchpad TOK_RAMSTART
.equ TOK_RAMEND scratchpad+SCRATCHPAD_SIZE
; *** Code ***
; Sets Z is A is ';' or null.
isLineEndOrComment:
cp ';'
cp 0x3b ; ';'
ret z
; continue to isLineEnd

View File

@ -20,9 +20,17 @@
.equ SYM_RAMSTART IO_RAMEND
#include "zasm/symbol.asm"
#include "zasm/parse.asm"
.equ TOK_RAMSTART SYM_RAMEND
#include "zasm/tok.asm"
zasmIsFirstPass:
nop
zasmIsLocalPass:
nop
getInstID:
nop
getDirectiveID:
nop