From bdd220fe5f4b0603b547a4370250a376f2e94c03 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 16 Nov 2022 19:03:37 -0500 Subject: dla2csv.xex: stop using atexit(), it crashes under MyDOS. --- autorun.s | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'autorun.s') diff --git a/autorun.s b/autorun.s index 8f75ac3..af3b1d9 100644 --- a/autorun.s +++ b/autorun.s @@ -135,6 +135,18 @@ keytabloop: ; load and run the file (Y is index into filename table) load_file: + ; first print a "Loading D1:whatever" message. + sty keycode + lda #loadingmsg + jsr printmsg + ldy keycode + lda fntab_l,y + ldx fntab_h,y + jsr printmsg + ldy keycode + + ; now we can set up the IOCB and call CIO to load the file. ldx #$10 ; IOCB #1 lda #$28 ; MyDOS, Sparta 3.2, and SDX all support this XIO sta ICCOM,x @@ -178,9 +190,11 @@ exit: ; a good reason... dla_filename: .byte "D1:DLA.XEX" dla_fn_len = * - dla_filename + .byte 0 ; null terminate for printmsg csv_filename: .byte "D1:DLA2CSV.XEX" csv_fn_len = * - csv_filename + .byte 0 ; these tables only have 2 entries, but could have many more if ; we ever need them (up to 255). @@ -194,5 +208,6 @@ keytab: .byte KEY_1, KEY_2, KEY_NONE diskerrmsg: .byte "I/O Error ",0 presskeymsg: .byte $9b,"Press any key...",0 +loadingmsg: .byte "Loading ",0 xex_run main -- cgit v1.2.3