From 607668671eb6d10e7ca036df81b3f288bce57339 Mon Sep 17 00:00:00 2001 From: Ian C Date: Sat, 20 Nov 2021 10:01:52 +0000 Subject: Added Intel HEX output handler --- src/example/emucpm.z80 | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/example/emucpm.z80 (limited to 'src/example/emucpm.z80') diff --git a/src/example/emucpm.z80 b/src/example/emucpm.z80 new file mode 100644 index 0000000..0920a86 --- /dev/null +++ b/src/example/emucpm.z80 @@ -0,0 +1,40 @@ +; +; Quick hack to emulate some CPM bdos calls (well, enough to make it work) +; + option output-file, hex.hex + option output-format, hex + + org 0 + halt + + org 5 + jp cpm + + org $f000 +cpm: + push af + push bc + push de + push hl + ld a,9 + cp c + call z,print_string + ld a,2 + cp c + call z,print_char + pop hl + pop de + pop bc + pop af + ret + +print_string: + ld bc,$0082 + out (c),a + ret + +print_char: + ld a,e + ld bc,$0080 + out (c),a + ret -- cgit v1.2.3