summaryrefslogtreecommitdiff
path: root/emucpm.z80
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2006-08-20 17:39:42 +0000
committerIan C <ianc@noddybox.co.uk>2006-08-20 17:39:42 +0000
commit87ace20633ba711243e336630e2c9a8546516598 (patch)
treea9c624a08ae8ccc16086781fb009a6709b7a2913 /emucpm.z80
parent2a5a38a8bd0295b841343062baec242d40267d93 (diff)
This commit was generated by cvs2svn to compensate for changes in r2,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'emucpm.z80')
-rw-r--r--emucpm.z8029
1 files changed, 29 insertions, 0 deletions
diff --git a/emucpm.z80 b/emucpm.z80
new file mode 100644
index 0000000..befecee
--- /dev/null
+++ b/emucpm.z80
@@ -0,0 +1,29 @@
+;
+; Quick hack to emulate some CPM bdos calls (well, enough to make it work)
+;
+ org 0
+ halt
+
+ org 5
+ jp cpm
+
+ org $ff00
+cpm:
+ ld a,9
+ cp c
+ jr z,print_string
+ ld a,2
+ cp c
+ jr z,print_char
+ ret
+
+print_string:
+ ld bc,$0082
+ out (c),a
+ ret
+
+print_char:
+ ld a,e
+ ld bc,$0080
+ out (c),a
+ ret