From 282fa7725993c9b0b0d2bb0977c124f11abea1fd Mon Sep 17 00:00:00 2001 From: Ian C Date: Tue, 8 Mar 2016 13:51:57 +0000 Subject: Wildcard for args, EX changes and CP/M test. + Added '*' wildcard for macro arguments + Allow 'EX' with parameters reversed on the Z80 + Added simple CP/M example test. + Added some files to gitignore --- src/test/cpm.1 | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/test/z80.1 | 5 +++++ 2 files changed, 49 insertions(+) create mode 100644 src/test/cpm.1 (limited to 'src/test') diff --git a/src/test/cpm.1 b/src/test/cpm.1 new file mode 100644 index 0000000..60ec8c2 --- /dev/null +++ b/src/test/cpm.1 @@ -0,0 +1,44 @@ + ; + ; CP/M example (macro test) + ; + cpu z80 + option output-file,x.com + +BDOS: equ 5 +CONOUT: eq 9 + +strout: macro addr + ld de,@addr + ld c,CONOUT + call BDOS + endm + +strout1:macro + ld de,str + ld a,'$' + ld c,CONOUT +.loop + ex de,hl + cp (hl) + ex hl,de + jr z,end_str + call BDOS + inc de + jr loop + +.str defb \*,0 +.end_str + + endm + + + ; Main code + ; + org $100 + + strout str + strout1 "Bye world", 13, 10, '$' + + ret + +str: defb "Hello World",13,10,'$' diff --git a/src/test/z80.1 b/src/test/z80.1 index d41828e..732d1cb 100644 --- a/src/test/z80.1 +++ b/src/test/z80.1 @@ -221,6 +221,11 @@ exchange: ex (sp),hl ex (sp),ix ex (sp),iy + ex hl,de + ex af',af + ex hl,(sp) + ex ix,(sp) + ex iy,(sp) ldi ldir ldd -- cgit v1.2.3