Browse Source

zasm: can assemble zasm/tok.asm!

pull/10/head
Virgil Dupras 5 years ago
parent
commit
9f6ebf538d
3 changed files with 18 additions and 9 deletions
  1. +2
    -1
      apps/zasm/main.asm
  2. +8
    -8
      apps/zasm/tok.asm
  3. +8
    -0
      tools/tests/zasm/test7.asm

+ 2
- 1
apps/zasm/main.asm 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"


+ 8
- 8
apps/zasm/tok.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



+ 8
- 0
tools/tests/zasm/test7.asm 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

Loading…
Cancel
Save