diff --git a/apps/zasm/directive.asm b/apps/zasm/directive.asm index e4b65ba..9c42901 100644 --- a/apps/zasm/directive.asm +++ b/apps/zasm/directive.asm @@ -4,7 +4,8 @@ .equ D_DW 0x01 .equ D_EQU 0x02 .equ D_ORG 0x03 -.equ D_INC 0x04 +.equ D_FIL 0x04 +.equ D_INC 0x05 .equ D_BAD 0xff ; *** Variables *** @@ -18,6 +19,7 @@ directiveNames: .db ".DW", 0 .db ".EQU" .db ".ORG" + .db ".FIL" .db "#inc" ; This is a list of handlers corresponding to indexes in directiveNames @@ -26,6 +28,7 @@ directiveHandlers: .dw handleDW .dw handleEQU .dw handleORG + .dw handleFIL .dw handleINC handleDB: @@ -103,6 +106,19 @@ handleORG: push ix \ pop hl jp zasmSetOrg +handleFIL: + call readWord + call parseExpr + ret nz + push bc + push ix \ pop bc + xor a + ld b, c +.loop: + call ioPutC + djnz .loop + pop bc + handleINC: call readWord jr nz, .end diff --git a/tools/emul/Makefile b/tools/emul/Makefile index 9ba7e2c..0cfcf8a 100644 --- a/tools/emul/Makefile +++ b/tools/emul/Makefile @@ -33,11 +33,11 @@ shell/shell: shell/shell.c libz80/libz80.o shell/kernel.h $(CFSPACK) $(ZASMBIN): zasm/zasm.c libz80/libz80.o zasm/kernel.h zasm/user.h zasm/includes.h runbin/runbin: runbin/runbin.c libz80/libz80.o $(TARGETS): - cc $< libz80/libz80.o -o $@ + $(CC) $< libz80/libz80.o -o $@ libz80/libz80.o: libz80/z80.c make -C libz80/codegen opcodes - gcc -Wall -ansi -g -c -o libz80/libz80.o libz80/z80.c + $(CC) -Wall -ansi -g -c -o libz80/libz80.o libz80/z80.c $(CFSPACK): make -C ../cfspack diff --git a/tools/emul/zasm/zasm.bin b/tools/emul/zasm/zasm.bin index 2ed59ed..f6c9b9a 100644 Binary files a/tools/emul/zasm/zasm.bin and b/tools/emul/zasm/zasm.bin differ diff --git a/tools/tests/zasm/test1.asm b/tools/tests/zasm/test1.asm index 25b905c..da2fcb9 100644 --- a/tools/tests/zasm/test1.asm +++ b/tools/tests/zasm/test1.asm @@ -27,3 +27,4 @@ label2: .dw 0x42 rlc c cp '-' sbc hl, de +.fill 0x10