From 2ea3ebe4b05b1229dab44bd7d19038cbc12bf374 Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Mon, 8 Feb 2021 18:52:14 +0100 Subject: [PATCH] code size optimization --- Makefile | 2 +- .../{dos_acptr_ciout.s => dos_acptr.s} | 34 +++---------------- src/dos_m65/dos_ciout.s | 12 +++++++ src/dos_m65/dos_imports.s | 10 ++++++ 4 files changed, 28 insertions(+), 30 deletions(-) rename src/dos_m65/{dos_acptr_ciout.s => dos_acptr.s} (81%) create mode 100644 src/dos_m65/dos_ciout.s create mode 100644 src/dos_m65/dos_imports.s diff --git a/Makefile b/Makefile index c2c1040a..39316abc 100644 --- a/Makefile +++ b/Makefile @@ -394,7 +394,7 @@ $(DIR_M65)/kernal.seg_C $(DIR_M65)/KERNAL_C_combined.vs $(DIR_M65)/KERNAL_C_comb $(DIR_M65)/kernal.seg_1 $(DIR_M65)/KERNAL_1_combined.vs $(DIR_M65)/KERNAL_1_combined.sym: \ $(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_M65) $(GEN_STR_M65) $(DIR_M65)/KERNAL_0_combined.sym $(DIR_M65)/dos.seg_1 $(DIR_M65)/DOS_1_combined.vs $(DIR_M65)/DOS_1_combined.sym: \ - $(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_DOS_M65) $(CFG_M65) + $(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_DOS_M65) $(CFG_M65) $(DIR_M65)/KERNAL_0_combined.sym $(DIR_M65)/mon.seg_1 $(DIR_M65)/MON_1_combined.vs $(DIR_M65)/MON_1_combined.sym: \ $(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_MON_M65) $(CFG_M65) $(DIR_M65)/KERNAL_0_combined.sym $(DIR_M65)/BASIC_1_combined.sym $(DIR_M65)/zvm.seg_1 $(DIR_M65)/ZVM_1_combined.vs $(DIR_M65)/ZVM_1_combined.sym: \ diff --git a/src/dos_m65/dos_acptr_ciout.s b/src/dos_m65/dos_acptr.s similarity index 81% rename from src/dos_m65/dos_acptr_ciout.s rename to src/dos_m65/dos_acptr.s index bee74e56..f5a0a630 100644 --- a/src/dos_m65/dos_acptr_ciout.s +++ b/src/dos_m65/dos_acptr.s @@ -1,7 +1,6 @@ ; -; Implementation of ACPTR/CIOUT commands. -; For detailed description see 'm65dos_bridge.s' file. +; Implementation of ACPTR command. For detailed description see 'm65dos_bridge.s' file. ; @@ -54,6 +53,10 @@ dos_ACPTR_eoi: clc rts + + +; Retrieving bytes from the status string + dos_ACPTR_getsts_SD: ; get next byte of status - SD card ldx SD_STATUS_IDX @@ -75,35 +78,8 @@ dos_ACPTR_getsts_RD: ; get next byte of status - ram disk lda RD_STATUS_STR,x rts - dos_ACPTR_getsts_table: !word dos_ACPTR_getsts_SD !word dos_ACPTR_getsts_FD !word dos_ACPTR_getsts_RD - - - - - - - - - -dos_CIOUT: - - ; XXX provide implementation - - sec - rts - - - -kernalstatus_EOI: - - ; XXX reuse original code instead - - lda IOSTATUS - ora #K_STS_EOI - sta IOSTATUS - rts diff --git a/src/dos_m65/dos_ciout.s b/src/dos_m65/dos_ciout.s new file mode 100644 index 00000000..179b046f --- /dev/null +++ b/src/dos_m65/dos_ciout.s @@ -0,0 +1,12 @@ + +; +; Implementation of ACPTR command. For detailed description see 'm65dos_bridge.s' file. +; + + +dos_CIOUT: + + ; XXX provide implementation + + sec + rts diff --git a/src/dos_m65/dos_imports.s b/src/dos_m65/dos_imports.s new file mode 100644 index 00000000..6c427057 --- /dev/null +++ b/src/dos_m65/dos_imports.s @@ -0,0 +1,10 @@ + +;; #IMPORT# KERNAL_0 = KERNAL_0_combined.sym + +; +; Definitions for calling MEGA65 segment KERNAL_0 routines from DOS_1 +; + +;; #ALIAS# kernalstatus_EOI = KERNAL_0.kernalstatus_EOI +;; #ALIAS# kernalstatus_DEVICE_NOT_FOUND = KERNAL_0.kernalstatus_DEVICE_NOT_FOUND +