From 0607529df280c3440eb0245fefb88891d8dda950 Mon Sep 17 00:00:00 2001 From: David Given Date: Tue, 11 Jun 2019 21:33:57 +0200 Subject: [PATCH] Miscellaneous bugfixed and renamings. --- plat/cpm/boot.s | 6 +++++- plat/cpm/include/cpm.h | 2 +- plat/cpm/libsys/_bdos.s | 3 +-- plat/cpm/libsys/build.lua | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/plat/cpm/boot.s b/plat/cpm/boot.s index 1330e8309..4b33dbfab 100644 --- a/plat/cpm/boot.s +++ b/plat/cpm/boot.s @@ -148,8 +148,9 @@ _cpm_warmboot = 0 ! Special CP/M stuff. -.define _cpm_fcb +.define _cpm_fcb, _cpm_fcb2 _cpm_fcb = 0x005c +_cpm_fcb2 = 0x006c .define _cpm_ramtop .comm _cpm_ramtop, 2 @@ -157,6 +158,9 @@ _cpm_fcb = 0x005c .define _cpm_default_dma _cpm_default_dma = 0x0080 +.define _cpm_iobyte +_cpm_iobyte = 3 + .define _cpm_cmdlinelen, _cpm_cmdline _cpm_cmdlinelen = 0x0080 _cpm_cmdline = 0x0081 diff --git a/plat/cpm/include/cpm.h b/plat/cpm/include/cpm.h index 81dfa5dab..197ef3b10 100644 --- a/plat/cpm/include/cpm.h +++ b/plat/cpm/include/cpm.h @@ -88,7 +88,7 @@ extern void cpm_overwrite_ccp(void); /* 11 */ extern uint8_t cpm_const(void); /* 12 */ extern uint16_t cpm_get_version(void); /* 13 */ extern void cpm_reset_disk_system(void); -/* 14 */ extern void cpm_select_disk(uint8_t disk); +/* 14 */ extern void cpm_select_drive(uint8_t disk); /* 15 */ extern uint8_t cpm_open_file(FCB* fcb); /* 16 */ extern uint8_t cpm_close_file(FCB* fcb); /* 17 */ extern uint8_t cpm_findfirst(FCB* fcb); diff --git a/plat/cpm/libsys/_bdos.s b/plat/cpm/libsys/_bdos.s index 9e136925e..fd6b53de5 100644 --- a/plat/cpm/libsys/_bdos.s +++ b/plat/cpm/libsys/_bdos.s @@ -16,6 +16,5 @@ call_bdos: call 0x0005 pop b ! restore FP - mov d, h - mov e, l + xchg ! DE = HL ret \ No newline at end of file diff --git a/plat/cpm/libsys/build.lua b/plat/cpm/libsys/build.lua index f9cd9a96e..9091a6917 100644 --- a/plat/cpm/libsys/build.lua +++ b/plat/cpm/libsys/build.lua @@ -18,7 +18,7 @@ local bdos_calls = { [11] = "cpm_const", [12] = "cpm_get_version", [13] = "cpm_reset_disk_system", - [14] = "cpm_select_disk", + [14] = "cpm_select_drive", [15] = "cpm_open_file", [16] = "cpm_close_file", [17] = "cpm_findfirst",