.include "atari.inc" .include "xex.inc" .bss .org $80 old_sdlstl: .res 1 old_sdlsth: .res 1 old_color2: .res 1 old_color1: .res 1 .code loadaddr = $3000 xex_org loadaddr screendata: .incbin "about.dat" .if ((* - screendata) <> 960) .error .sprintf("%c*** about.dat is %d bytes (should be 960)", 10, * - screendata) .endif dlist: .byte DL_BLK8, DL_BLK8, DL_BLK8 .byte DL_CHR40x8x1 | DL_LMS .word screendata .repeat 23 .byte DL_CHR40x8x1 .endrep .byte DL_JVB .word dlist main: ; fix things so the Reset key doesn't do a coldstart, see ; BOOT? and COLDST in Mapping. lda #0 sta COLDST lda #1 sta BOOTQ lda SDLSTL sta old_sdlstl lda SDLSTH sta old_sdlsth lda COLOR1 sta old_color1 lda COLOR2 sta old_color2 lda #$90 sta COLOR2 lda #$0e sta COLOR1 lda #dlist sta SDLSTH loop: ldx CH cpx #$ff beq loop lda #$ff sta CH lda old_sdlstl sta SDLSTL lda old_sdlsth sta SDLSTH lda old_color1 sta COLOR1 lda old_color2 sta COLOR2 cpx #KEY_1 bne not_1 ldy #0 beq setup_iocb not_1: cpx #KEY_2 bne not_2 ldy #1 bne setup_iocb not_2: ; 3, or actually any other key rts setup_iocb: ldx #$10 lda #$28 ; MyDOS XIO 40 sta ICCOM,x lda fntab_l,y sta ICBAL,x lda fntab_h,y sta ICBAH,x lda fnlentab,y sta ICBLL,x lda #0 sta ICBLH,x jsr CIOV ; CIOV should never return on success, so if we get here, give up. lda #0 sta COLOR2 hang: jmp hang rts dla_filename: .byte "D:DLA.XEX" dla_fn_len = * - dla_filename csv_filename: .byte "D:DLA2CSV.XEX" csv_fn_len = * - csv_filename fntab_l: .byte dla_filename, >csv_filename fnlentab: .byte dla_fn_len, csv_fn_len xex_run main