Update CPC port to SDCC 4.2.0
This version of SDCC introduces a new calling convention where some
values can be passed in registers. Adjust the assembler code
accordingly, making it smaller and faster.
Some things are not working quirte right yet:
- The routine to clear a rectangle isn't working correctly
- The keyboard input also does not seem to work completely
diff --git a/contiki-cpc/loader/dir.s b/contiki-cpc/loader/dir.s
index e1f5ee9..e2b97fa 100644
--- a/contiki-cpc/loader/dir.s
+++ b/contiki-cpc/loader/dir.s
@@ -26,6 +26,8 @@
;; find BIOS SET MESSAGE command
;; this is used to disable disc messages.
;; this is compatible with other DOSs that also provide this command
+;; void _readdir(void*)
+;; Input: pointer to buffer in HL
__readdir::
;ld hl,#cmd_bios_set_message
@@ -43,11 +45,7 @@
;;------------------------------------------------------------------
;; do CAT
-ld hl,#2
-add hl,sp
-ld e,(hl)
-inc hl
-ld d,(hl)
+EX DE,HL ;; Put pointer to buffer in DE instead
;;------------------------------------------------------------------
;; display files from data generated by CAS CATALOG function