; ; This is the disassembled code from the SGT1 STEbus graphics board. ; It assembles online at www.asm80.com ; and generates the same bytes as the original ROM. ; ; There seems to be an error with the CTRL code table ; The pointer to the CTRL-P funtion seems in the wrong place. ; Conditional assembly corrects this if you change the issue to be greater than 3. ; ; .cpu 6800 ; ; The 6803 is the 6800 with several new instructions: ; ; TABLE 1 - NEW INSTRUCTIONS ; ; instruction Description ; ABX Unsigned addition of accumulator B to index register ; ADDD Adds (without carry) the double accumulator to memory and leaves the sum in the double accumulator ; ASLD or LSLD Shifts the double accumulator left (towards MSB) one bit; the LSE is cleared and the MSB is shifted into the C bit ; BHS Branch if higher or same, unsigned conditional branch (same as BCC) ; BLO Branch if lower, unsigned conditional branch (same as BCS) ; BRN Branch never ; JSR Additional addressing mode: direct ; LDD Loads double accumulator from memory ; LSL Shifts memory or accumulator left (towards MSB) one bit; the LSB is cleared and the MSB is shifted into the C bit (same as ASL) ; LSRD Shifts the double accumulator right (towards LSB) one bit, the MSB is cleared and the LSB is shifted into the C bit ; MULU Unsigned multiply, multiplies the two accumulators and leaves the product in the double accumulator ; PSHX Pushes the index register to stack ; PULX Pulls the index register from stack ; STD Stores the double accumulator to memory ; SUBD Subtracts memory from the double accumulator and leaves the difference in the double accumulator ; CPX Internal processing modified to permit its use with any conditional branch instruction ; ; ASM80 does not have them, so implement them as macros: .macro abx DB $3A ; opcode .endm .macro ADDD_ZP DB $D3 ; opcode DB %%1 ; the 16-bit value .endm .macro ADDD DB $F3 ; opcode DW %%1 ; the 16-bit value .endm .macro ADDD_IM DB $C3 ; opcode DW %%1 ; the 16-bit value .endm .macro ASLD DB $05 ; opcode .endm ; .macro LSLD ; nop ; .endm ; .macro BHS ; nop ; nop ; .endm ; .macro BLO ; nop ; nop ; .endm ; .macro BRN ; nop ; nop ; .endm ; .macro JSR ; nop ; DW %%1 ; the 16-bit value ; .endm .macro LDD_ZP DB $DC ; opcode Db %%1 ; the 16-bit value .endm .macro LDD DB $FC ; opcode DW %%1 ; the 16-bit value .endm .macro LDD_IM DB $CC ; opcode DW %%1 ; the 16-bit value .endm .macro LDD_IX DB $EC ; opcode DB %%1 ; the 8-bit value .endm .macro LDX_IX DB $EE ; opcode DB %%1 ; the 8-bit value .endm .macro LDX_ZP DB $DE ; opcode DB %%1 ; the 8-bit value .endm ; .macro LSL ; nop ; .endm .macro LSRD DB $04 .endm .macro MUL DB $3D ; opcode .endm ; .macro MULU ; nop ; .endm .macro PSHX DB $3C .endm .macro PULX DB $38 .endm .macro STD_IX DB $ED ; opcode DB %%1 ; the 8-bit value .endm .macro STD_ZP DB $DD ; opcode DB %%1 ; the 8-bit value .endm .macro STD DB $FD ; opcode DW %%1 ; the 16-bit value .endm .macro SUBD DB $93 ; opcode DB %%1 ; the 8-bit value .endm .macro SUBD_IX DB $A3 ; opcode DB %%1 ; the 8-bit value .endm .macro SUBD_IM DB $83 ; opcode DW %%1 ; the 16-bit value .endm ; .macro CPX ; .endm .macro BGND DB $0 ; opcode .endm ; ; These are probably not legit ; .macro idiv DB $02 ; opcode .endm .macro fdiv DB $03 ; opcode .endm .macro tsy DB $18,$30 ; opcode .endm .macro puly DB $18,$38 ; opcode .endm .macro bset DB $1C,$3c ; opcode DB %%1 .endm .macro pshy DB $66,$66 ; opcode .endm .macro staa DB $97 ; opcode DB %%1 .endm .macro ldaa_ix DB $A6 ; opcode DB %%1 .endm .macro staa_ix DB $A7 ; opcode DB %%1 .endm ; ; ; .macro ldd_std ldd %%1 std %%2 .endm .macro ldd_zp_std_zp ldd_zp %%1 std_zp %%2 .endm .macro ldaa_staa ldaa %%1 staa %%2 .endm .macro ldab_stab ldab %%1 stab %%2 .endm .macro ldaa_jsr ldaa %%1 jsr %%2 .endm .macro ldaa_jmp ldaa %%1 jmp %%2 .endm .macro ldab_jsr ldab %%1 jsr %%2 .endm .macro ldab_jmp ldab %%1 jmp %%2 .endm .macro jsr_staa jsr %%1 staa %%2 .endm .macro jsr_stab jsr %%1 stab %%2 .endm .macro pula_pulb pula pulb .endm .macro pula_pulb_std_ix pula pulb std_ix %%1,x .endm .macro suba_staa suba %%1 staa %%2 .endm .macro ldaa_mul ldaa %%1 mul .endm .macro ldab_mul ldab %%1 mul .endm .macro asla_thrice asla asla asla .endm .macro aslb_thrice aslb aslb aslb .endm .macro asld_thrice asld asld asld .endm .macro lsrd_thrice lsrd lsrd lsrd .endm .macro asra_rorb asra rorb .endm .macro ldd_im_std_zp ldd_im %%1 std_zp %%2 .endm .macro asrb_asld asrb asld .endm .macro ldx_stx ldx %%1 stx %%2 .endm .macro dec_bne dec %%1 bne %%2 .endm .macro ldd_zp_addd_zp_std_zp ldd_zp %%1 addd_zp %%2 std_zp %%3 .endm .macro addd_zp_std_zp addd_zp %%1 std_zp %%2 .endm ; ; constants: ; CR EQU $0D LF EQU $0A SP EQU $20 bits_per_byte EQU 8 mask_bit_0_set equ %00000001 mask_bit_1_set equ %00000010 mask_bit_2_set equ %00000100 mask_bit_3_set equ %00001000 mask_bit_4_set equ %00010000 mask_bit_5_set equ %00100000 mask_bit_6_set equ %01000000 mask_bit_7_set equ %10000000 mask_bit_0_clr equ %11111110 mask_bit_1_clr equ %11111101 mask_bit_2_clr equ %11111011 mask_bit_3_clr equ %11110111 mask_bit_4_clr equ %11101111 mask_bit_5_clr equ %11011111 mask_bit_6_clr equ %10111111 mask_bit_7_clr equ %01111111 ; ; variables used ; Port_1_Data_Direction_Register EQU $0 Port_2_Data_Direction_Register EQU $1 Port_1_Data_Register EQU $2 Port_2_Data_Register EQU $3 External_Memory_4 EQU $4 External_Memory_5 EQU $5 External_Memory_7 EQU $7 Timer_and_Control_Status_Register EQU $8 Counter_high_byte EQU $9 Counter_low_byte EQU $a Output_Compare_Register_high_byte EQU $b Output_Compare_Register_low_byte EQU $c Input_Capture_Register_high_byte EQU $d Input_Capture_Register_low_byte EQU $e External_Memory_f EQU $f Rate_and_Mode_Control_Register_low_byte EQU $10 Tx_and_Rx_Control_and_Status_Register EQU $11 Receive_Data_Register EQU $12 Transmit_Data_Register EQU $13 RAM_Control_Register EQU $14 var_2e EQU $2e var_58 EQU $58 var_7f EQU $7f var_9c EQU $9c VERS EQU 1 ISSUE EQU 3 ; ; The software determines this byte, not vice versa ; One byte giving the characteristics of the software ; bits 7,6,5: Configured emulation ; 0 0 0: Ampex210 ; bit 4: 1 = Write test display at power-up ; 0 = Disable test display TYPE EQU $10 ESC EQU $1B EPRM_BAS EQU $E000 VID_BAS EQU $2000 SETWID EQU 160 SETLEN EQU 32 ; ; RAM usage for data structures ; .if 1 STAK_TOP EQU $1fff TBL_END EQU STAK_TOP - 1FFh ; $1E00 CHAR_TBL EQU TBL_END - (128 * 8) ; Default character font $1A00 ESC_TBL EQU CHAR_TBL - 256 ; Table of ESC routines $1900 CTRL_TBL EQU ESC_TBL - 64 ; Table of CTRL code routines $18c0 CHAR_BUF EQU CTRL_TBL - 64 ; Buffer for character input $1880 PALT_TBL EQU CHAR_BUF - 16 ; Copy of palette RAM $1870 INT_TBL EQU PALT_TBL - 24 ; Interrupt vector table $1858 PKT_Q EQU INT_TBL - 24 ; Packet queue $1840 ; ; RAM usage ; The following defines zero page RAM usage. ; RAM is assigned from the top downwards. ; PAGE0 EQU 256 WORK EQU PAGE0 - 32 ; Workspace Y_COORD EQU WORK - 1 ; Position of text cursor X_COORD EQU Y_COORD - 1 ; Position of text cursor COORDS EQU X_COORD ; Word pointer to load X and Y ; together CH_COUNT EQU X_COORD - 1 ; Number of chars in buffer CH_START EQU CH_COUNT - 1 ; First character in buffer GRAPH_ON EQU CH_START - 1 ; Graphic characters HIN_ON EQU GRAPH_ON - 1 ; Half intensity CTRL_ON EQU HIN_ON - 1 ; Print control chars INVIS_ON EQU CTRL_ON - 1 ; Invisible mode FLASH_ON EQU INVIS_ON - 1 ; Flashing mode RVRSE_ON EQU FLASH_ON - 1 ; Reverse video mode UDLIN_ON EQU RVRSE_ON - 1 ; Underline mode on CUR_OFF EQU UDLIN_ON - 1 ; Cursor off * CUR_CNT EQU CUR_OFF - 1 ; Number of VSYNCs to cursor ; flash, = 0 if not flashing CUR_ON EQU CUR_CNT - 1 ; =$FF cursor displayed CUR_POS EQU CUR_ON - 2 ; Absolute address giving * ; location of first byte of RAM ; for text cursor MODE EQU CUR_POS - 1 ; Byte indicating current mode: * ; 1 represents 1 ; 2 represents 2 ; 4 represents 4 PORT1 EQU MODE - 1 ; Copy of bits of port 1 PORT2 EQU PORT1 - 1 ; Copy of bits of port 2 PLOT_MOD EQU PORT2 - 1 ; Plotting mode for lines and * ; points Y_PLOT EQU PLOT_MOD - 2 ; Y coord for line plotting * X_PLOT EQU Y_PLOT - 2 ; X coord for line plotting PLOT_COL EQU X_PLOT - 1 ; Plot colour. Aliased * ; throughout byte SCR_WID EQU PLOT_COL - 1 ; 2 * Number of chars wide on * ; mode 2 SCR_LEN EQU SCR_WID - 1 ; Number of text rows * SCR_END EQU SCR_LEN - 2 ; First RAM address after * ; refresh RAS CHAR_WID EQU SCR_END - 1 ; Number of character columns DISP_BAS EQU CHAR_WID - 2 ; Refresh RAM base address DASH_MOD EQU DISP_BAS - 2 ; Description of dashed lines CHAR_MOD EQU DASH_MOD - 1 ; =2 for modes 1,2 * ; =4 for mode 4 CHAR_COL EQU CHAR_MOD - 1 ; Colour to print chars in * ; AVOCET SYSTEMS 6800 CROSS-ASSEMBLER - VERSION 2.13 ; SGT1 FIRMWARE ; RAM usage CHAR_BAC EQU CHAR_COL - 1 ; Backoround colour for chars * SUB_PTR EQU CHAR_BAC - 2 ; Pointer to Submit data * SUB_CNT EQU SUB_PTR - 1 ; Count of Submit data * CLOCK EQU SUB_CNT - 2 ; Count of number of VSYNCs * PKT_CNT EQU CLOCK - 1 ; Number of packets on queue HOS_MODE EQU PKT_CNT - 1 ; = $F PALT_FLG EQU HOS_MODE - 1 ; =$FF when palette has changed STLI_ON EQU PALT_FLG - 1 ; =0 when status line is off * TEX_END EQU STLI_ON - 2 ; Bottom of text. ( Above status ; line) * PLOT_POS EQU TEX_END - 2 ; Graphics cursor position * PLOT_WID EQU PLOT_POS - 2 ; Number of logical pixels wide * PLOT_LEN EQU PLOT_WID - 2 ; Number of logical pixels high * .else PLOT_LEN EQU $aa PLOT_WID EQU $ac PLOT_POS EQU $ae TEX_END EQU $b0 STLI_ON EQU $b2 PALT_FLG EQU $b3 HOS_MODE EQU $b4 PKT_CNT EQU $b5 CLOCK EQU $b6 SUB_CNT EQU $b8 SUB_PTR EQU $b9 CHAR_BAC EQU $bb CHAR_COL EQU $bc CHAR_MOD EQU $bd DASH_MOD EQU $be DISP_BAS EQU $c0 CHAR_WID EQU $c2 SCR_END EQU $c3 SCR_LEN EQU $c5 SCR_WID EQU $c6 PLOT_COL EQU $c7 X_PLOT EQU $c8 Y_PLOT EQU $ca PLOT_MOD EQU $cc PORT2 EQU $cd ; Port_2_Data_Register_memory PORT1 EQU $ce ; Port_1_Data_Register_memory MODE EQU $cf CUR_POS EQU $d0 CUR_POS EQU $d0 CUR_ON EQU $d2 CUR_CNT EQU $d3 CUR_OFF EQU $d4 UDLIN_ON EQU $d5 RVRSE_ON EQU $d6 FLASH_ON EQU $d7 INVIS_ON EQU $d8 CTRL_ON EQU $d9 GRAPH_ON EQU $db CH_START EQU $dc CH_COUNT EQU $dd X_COORD EQU $de Y_COORD EQU $df WORK EQU $e0 .endif ; ; words used ; ; var_0000 EQU $0000 ; ; start of external memory space: ; THE_6845_REG_SEL EQU $0400 THE_6845_DATA EQU $0401 STEBUS_IO EQU $0800 PALETTE EQU $0c00 var_10f3 EQU $10f3 PKT_Q EQU $1840 INT_TBL_SCI EQU $1858 var_185b_TOF EQU $185b var_185e_OCF EQU $185e var_1861_ICF EQU $1861 var_1864_IRQ1 EQU $1864 var_1867_SWI EQU $1867 PALT_TBL EQU $1870 CHAR_BUF EQU $1880 CTRL_TBL EQU $18c0 ESC_TBL EQU $1900 CHAR_TBL EQU $1a00 TBL_END EQU $1e00 STAK_TOP EQU $1fff VID_BAS EQU $2000 var_2008 EQU $2008 L_e008 EQU $e008 L_ffff EQU $ffff org EPRM_BAS ; EPROM data ; ; ; L_e000: DB VERS ; Version number DB ISSUE ; Issue number ; L_e002: DB TYPE ; Function information ; Patch bit 4 of the type byte ( set to 0) to disable ; the test screen after reset. ; Table of routines in EPROM ; 1st element stored at EPRM.BAS + 3 L_e003: jmp START ; Cold start * L_e006: jmp WARM ; Warm start L_e009: jmp MAIN ; Main routine L_e00c: jmp ESCAPE ; Escape handler * ; OR or AND Reg A with PORT2 ; Use this for all modifications to PORT2 ; Modifies WORK+14, WORK+15 L_e00f: jmp ORP2 ;* L_e012: jmp ANDP2 ;* ; Send byte to host ; Sends a byte to the host. Will not put the next byte until ; the last one has been read L_e015: jmp PUTIT ;* L_e018: jmp ERROR ; Send error byte to host ; ; Get a byte from the input stream. ; Value returned in A. Regs B and X preserved. ; See also READ and READHX L_e01b: jmp GETCH ; Get char from input stream * L_e01e: jmp WRCH ; Write char to screen * L_e021: jmp PRCH ; Print char without updating cursor * ; ; AVOCET SYSTEMS 6800 CROSS-ASSEMBLER - VERSION 2.13 ; SGT1 FIRMWARE PAGE 4 ; RAM usage ; ; Move a block of data from address in WORK+2 to address in WORK ; Number of bytes to copy in Reg D. ; UMOVE copies from given addresses upwards through memory and DMOVE ; downwards. L_e024: jmp UMOVE L_e027: jmp DMOVE ;Calculates useful addresses ;Calculates CUR_POS from DISP_BAS, X_COORD and Y_COORD, returned in WORK ;Address of first character in row returned in WORK+2 ;WORK+4 to WORK+15 may be used for other values L_e02a: jmp SCREEN ; Calculate CUR.POS, return in WORK * ; Deletes any text cursor at CUR_POS, recalculates CUR_POS from X_COORD, ; Y_COORD and handles scrolling, cursor going off the screen etc. ; Redraws new cursor if enabled L_e02d: jmp CURSOR L_e030: jmp SCROLL ; Scroll text up one line * L_e033: jmp SCR_LIM ; Ensure text cursor is on screen * L_e036: jmp ERA_SCR ; Clear screen to palette colour 0 * ; READ reads (Req B) bytes of data from the input stream and reads them ; into WORK+16 upwards. B (= 16. ; READHX reads two bytes from the input stream and treats them as two ; ASCII hex digits to be converted into one byte value. ; Value returned in A. ; Undefined if two bytes are not hex digits. L_e039: jmp READ L_e03c: jmp READHX ; ; Convert ASCII hex digit to a nibble L_e03f: jmp HEXBIN L_e042: jmp GSX ; Handle GSX functions L_e045: jmp LINE_INS ; Insert line * L_e048: jmp CHAR_INS ; Insert char * L_e04b: jmp LINE_DEL ; Delete line * L_e04e: jmp CHAR_DEL ; Delete char * L_e051: jmp CUR_UP ; Cursor up * L_e054: jmp CUR_DOWN ; Cursor down * L_e057: jmp CUR_LEFT ; Cursor left * L_e05a: jmp CUR_RITE ; Cursor right * L_e05d: jmp TAB ; Tabulate * L_e060: jmp LINEFEED ; Linefeed * L_e063: jmp RETURN ; Carriage return * L_e066: jmp HOME ; Cursor home * L_e069: jmp NEWLINE ; Carriage return, linefeed * ; Unsigned multiplies Reg A by value in (WORK+2, WORK+3) ; Returned in WORK, WORK+ ; AVOCET SYSTEMS 6800 CROSS-ASSEMBLER - VERSION 2.13 ; SGT1 FIRMWARE PAGE 5 ; RAM usage L_e06c: jmp MULT16 ; 16-bit multiplication L_e06f: jmp DIV16 ; 16-bit division L_e072: jmp SET_PALT ; Update palette L_e075: jmp SET_REG ; Set 6845 reg. Reg no in A, Value in B. L_e078: jmp PLOT ; Plot point at ((WORK+12), (WORK+14)) * L_e07b: jmp PNT_MSK ; Plot point at ((WORK+20), (WORK+22)), * ; Clipped and dashed ; Plots a line from graphics cursor to point whose X coord is passed ; in WORK#12, Y coord in WORK#14 (double bytes) L_e07e: jmp LINE L_e081: jmp ARC L_e084: jmp CHK_LIM ; Check ((WORK+20), (WORK+22)) is on screen * L_e087: jmp PNT_LOC ; Memory location of pixel * ; ((WORK+20) , (WORK+22)) ; returned in WORK+O L_e08a: jmp PNT_MSK L_e08d: jmp ANDP1 ; AND PORT1 with Reo A. { Uses WORK + 14 * L_e090: jmp ORP1 ; OR PORT1 with Reg A. { and WORK + 15 * L_e093: jmp DEL_RITE ; Erase to end of line * L_e096: jmp PAGE_DEL L_e099: jmp DMOVE8 ; As DMOVE but move COUNT*8 bytes L_e09c: jmp UMOVE8 ; As UMOVE but move COUNT*8 bytes * L_e09f: jmp LEFSCR ; Scroll whole screen left * L_e0a2: jmp RIGSCR ; Scroll whole screen right * ; Scroll part of one line. ; Offset from base of display in WORK+6, ; Number of bytes to scroll in WORK+18. ( Both values 2 bytes ) L_e0a5: jmp BULEFT L_e0a8: jmp BLRIGT ; Routines used in ESC 90 command to step graphics cursor one place ; and draw point in mode 4 in XOR plotting. L_e0ab: jmp PLOT_INC L_e0ae: jmp INC_PLOT ; XOR plot at cursor * L_e0b1: jmp INC_1 ; Move up and right and plot * L_e0b4: jmp X_INC ; Move right * L_e0b7: jmp INC_3 ; Move down and right * L_e0ba: jmp Y_DEC ; Move down * L_e0bd: jmp INC_5 ; Move down and left * L_e0c0: jmp X_DEC ; Move left * L_e0c3: jmp INC_7 ; Move up and left * L_e0c6: jmp Y_INC ; Move left * ; Fill area of screen in plotting colour. ; Two corners of rectangle given by (X.PLOT,Y.PLOT) and (WORK+#12, WORK+14) L_e0c9: jmp FILL L_e0cc: jmp QLINE ; Read palette colour of pixel at coords (WORK + 12, WORK + 14) ; Value sent back to host L_e0cf: jmp RD_PNT ; ; End of listing in the manual ; START: ; Cold start ; reset WARM: ; Warm start ;START 0f sei ; interrupt flag ;L_e0d3 86 fd ldaa_staa #%11111101, Port_1_Data_Direction_Register ldaa_staa #%11110111, Port_2_Data_Direction_Register ldaa_staa #%11111111, PORT1 staa Port_1_Data_Register ldaa_staa #%11111111, PORT2 staa Port_2_Data_Register ;L_e0e7 ce 1f ff ldx #STAK_TOP txs ;L_e0eb 86 0f ldaa #15 ;L_e0ed ce 18 7f ldx #PALT_TBL+15 ; point to last byte in the table ; ; ; Loop_e0f0: staa 0,x dex deca bge Loop_e0f0 ; jsr SET_PALT ; ldx #$0100 ldaa #$80 ; ; ; Loop_e0fe: dex clr 0,x deca bne Loop_e0fe ; ldaa_staa #$ff,PORT1 staa Port_1_Data_Register ; ldaa_staa #$ff,PORT2 staa Port_2_Data_Register ldaa_staa #$40, CUR_CNT ; ldd_im_std_zp VID_BAS, DISP_BAS ldaa_staa #2, PLOT_MOD ; ldaa_staa #$ff, HOS_MODE staa PLOT_COL ; ldab_stab #SETWID, SCR_WID ; 160 ldab_stab #SETLEN, SCR_LEN ; ldd_im_std_zp $0400, PLOT_LEN ldd_im_std_zp $0500, PLOT_WID ; ldab_stab #40, CHAR_WID ; ldd_im_std_zp $9b07, PLOT_POS ldd_im_std_zp $c000, SCR_END std_zp TEX_END ; ldab_stab #$ff, CHAR_COL ldab_stab #0, CHAR_BAC ldab_stab #4, CHAR_MOD stab MODE ; ldd_im_std_zp $ffff, DASH_MOD ldd_im_std_zp L_f9a3, WORK+2 ldd_im_std_zp INT_TBL_SCI, WORK ; ldd_im 3 ; jsr UMOVE8 ; ; Copy tables and font from ROM to RAM: ; CTRL_TBL EQU $18c0 $F461 64 bytes = 32 words ; ESC_TBL EQU $1900 $F421 256 bytes = 128 words ; CHAR_TBL EQU $1a00 1024 bytes = 128 characters * 8 bytes per character ; TBL_END EQU $1e00 ; FONT_END EQU $f9a2 ; $f9a2 - $540 - 1 = $F461 ;L_e168 ldd_im TBL_END-CTRL_TBL ; $0540 ; ldx_stx #FONT_END, WORK+2 ; source ldx_stx #TBL_END, WORK ; destination ; jsr DMOVE ; ldx #table_f0b6 ; table data[x++] to WORK ldaa 0,x ; to Accumulator inx staa WORK ; first entry is number of entries in table ; Loop_e180: ldd_ix 0,x ; D = word from table inx ; X+=2 inx ; jsr SET_REG ; ; dec_bne WORK, Loop_e180 ; jsr ERA_SCR ; ldaa_staa #4, MODE ; ldd_zp_std_zp DISP_BAS, CUR_POS ; ldaa L_e002 ; look at this magic number anda #$10 ; is bit 4 set ? beq skip_e1a1 jsr ESC_86_Display_test_pattern ; yes, call this routine first skip_e1a1: jsr L_e441 ; ; ; MAIN: jsr GETCH tab cmpb #$20 ; compare B with $20 blt control_chars ; jsr WRCH bra MAIN ; control_chars: aslb clra ; A is zero addd_im CTRL_TBL std_zp WORK ; ldx WORK ldx 0,x ; fetch routine address jsr 0,x ; call the routine at X ; bra MAIN ; ; ; ESCAPE: jsr GETCH ;L_e1c3 tab aslb ; double B ;L_e1c5 clra ; msb of D is zero addd_im ESC_TBL std_zp WORK ;L_e1cb ldx WORK ;L_e1cd ldx_ix 0,x ;L_e1cf jmp 0,x ; ; ; DMOVE8: sei ; interrupt flag ;L_e1d2 std_zp WORK+6 ;L_e1d4 tstb bne L_e1da dec WORK+6 ; ; ; L_e1da: sts WORK+4 ; save stack pointer lds WORK ; des ; ldx WORK+2 ; ; ; Loop_e1e1: ldab #$f8 abx stx WORK+8 dec WORK+8 ; ldx_zp WORK+8 ldd_ix 6,x ; pshb psha ; ldd_ix 4,x ; pshb psha ; ldd_ix 2,x ; pshb psha ; ldd_ix 0,x ; pshb psha ; dec WORK+7 bne Loop_e1e1 ; ldaa WORK+6 ; decrement WORK+6 suba_staa #1, WORK+6 ; bcc Loop_e1e1 ; ins ; sts WORK stx WORK+2 lds WORK+4 ; rts ; ; ; UMOVE8: sei ; std_zp WORK+6 ; tstb bne skip_e219 dec WORK+6 skip_e219: ; stab WORK+7 sts WORK+4 ; save stack pointer ldx WORK lds WORK+2 ; des loop_e222: pula_pulb_std_ix 0 pula_pulb_std_ix 2 pula_pulb_std_ix 4 pula_pulb_std_ix 6 ; ldab #bits_per_byte ; abx ; dec WORK+7 bne loop_e222 ; ldaa WORK+6 suba_staa #1, WORK+6 ; bcc loop_e222 ; stx WORK ; ins ; sts WORK+2 ; lds WORK+4 ; rts ; ; DMOVE uses ; X as the source pointer, ; S as the destination pointer, ; D as the counter. ; DMOVE: sei ; staa WORK+6 ; tstb bne skip_e253 dec WORK+6 skip_e253: ; sts WORK+4 ; save stack pointer ; lds WORK des ; ldx WORK+2 loop_e25a: dex ldaa 0,x psha ; decb bne loop_e25a ; inner loop moves 256 bytes? ; ldaa WORK+6 suba_staa #1, WORK+6 bcc loop_e25a ; outer loop ; ins sts WORK stx WORK+2 lds WORK+4 ; restore stack pointer rts ; ; ; UMOVE: sei ; staa WORK+6 ; tstb bne skip_e27a ; dec WORK+6 skip_e27a: sts WORK+4 ; save stack pointer ldx WORK lds WORK+2 ; des ; ; ; L_e281: pula staa 0,x ; inx ; decb bne L_e281 ; ldaa WORK+6 suba_staa #1, WORK+6 ; bcc L_e281 ; stx WORK ; ins ; sts WORK+2 lds WORK+4 rts ; ; ; GETCH: pshb pshx ; ldab SUB_CNT beq L_e2bd ; ldx SUB_PTR ; ldaa 0,x inx ; decb stab SUB_CNT ; stx SUB_PTR ; pulx pulb ; rts ; ; ; L_e2ab: ldaa #$fe anda PORT2 staa Port_2_Data_Register staa PORT2 ; ldab PORT1 tba orab #mask_bit_2_set anda #mask_bit_2_clr ; bit 2 = 0 staa Port_1_Data_Register ; wai ; L_e2bd: ldaa CH_COUNT beq L_e2ab ; ldaa #1 oraa PORT2 staa Port_2_Data_Register staa PORT2 ; sei ; ldab CH_START andb #$3f ; ldx #CHAR_BUF abx ; dec CH_COUNT inc CH_START ; ldab 0,x ; tba ; pulx pulb ; rts ; ; ; L_e2de: jsr GETCH loop_e2e1: psha ldaa_jsr #$fe, ANDP2 ; ldab PORT1 ; tba ; orab #mask_bit_2_set anda #mask_bit_2_clr ; bit 2 = 0 staa Port_1_Data_Register ; wai ; pula deca bne loop_e2e1 ; ldaa_jsr #1, ORP2 ; optimise to jmp rts ; ; ; ; interrupt handler? ; L_e2fb_NMI: ; NMI vector? ldaa STEBUS_IO ; stab Port_1_Data_Register stab PORT1 ; ldab Port_1_Data_Register andb #2 bne L_E318_SET_PORT_2_BIT_2 ; ldab CH_COUNT addb CH_START andb #$3f ; ldx #CHAR_BUF ; abx ; inc CH_COUNT ; staa 0,x ; drop into rti ; ; ; L_e317_rti: rti ; ; ; L_E318_SET_PORT_2_BIT_2: ldaa PORT2 oraa #mask_bit_2_set staa PORT2 staa Port_2_Data_Register ; bra L_e317_rti ; ; ; ERROR: psha ldaa_jsr #mask_bit_7_clr, ANDP1 pula ; jsr PUTIT ldaa_jsr #mask_bit_7_set, ANDP1 ; rts ; ; ; PUTIT: staa STEBUS_IO ; ; ; Loop_e335: ldaa #$fa jsr ANDP2 ; ldab PORT1 tba orab #mask_bit_2_set anda #mask_bit_2_clr staa Port_1_Data_Register wai ; ldaa PORT2 anda #mask_bit_2_set beq Loop_e335 ; rts ; ; ; ORP2: staa WORK+15 ; ldaa PORT2 oraa #mask_bit_0_set staa Port_2_Data_Register ; ldaa PORT2 staa WORK+14 ; oraa WORK+15 staa PORT2 staa Port_2_Data_Register ; rts ; ; ; ANDP2: staa WORK+15 ldaa PORT2 oraa #mask_bit_0_set staa Port_2_Data_Register ; ldaa_staa PORT2, WORK+14 anda WORK+15 staa PORT2 staa Port_2_Data_Register ; rts ; ; ; ORP1: staa WORK+15 ; ldaa PORT2 oraa #mask_bit_0_set staa Port_2_Data_Register ; ldaa PORT1 staa WORK+14 ; oraa WORK+15 staa Port_1_Data_Register staa PORT1 ; ldaa PORT2 staa Port_2_Data_Register ; rts ; ; ; ANDP1: staa WORK+15 ; ldaa PORT2 oraa #mask_bit_0_set staa Port_2_Data_Register ; ldaa PORT1 staa WORK+14 ; anda WORK+15 staa Port_1_Data_Register staa PORT1 ; ldaa $cd staa Port_2_Data_Register ; rts ; ; ; WRCH: jsr L_e43a jsr PRCH ; clra ldab CHAR_MOD ; aslb_thrice addd_zp_std_zp CUR_POS, CUR_POS ; ldaa X_COORD inca staa X_COORD ; cmpa CHAR_WID blt skip_e3c7 ; clr X_COORD ; ldab Y_COORD incb stab Y_COORD ; cmpb SCR_LEN blt skip_e3c7 jmp CURSOR ; skip_e3c7: jmp L_e441 rts ; optimise out? ; ; ; SCREEN: ldab SCR_WID ldaa_mul Y_COORD ; asld_thrice ; addd_zp_std_zp DISP_BAS, WORK+2 ; ldaa X_COORD ldab_mul CHAR_MOD ; asld_thrice ; addd_zp_std_zp WORK+2, WORK ; rts ; ; ; SCR_LIM: ldaa X_COORD bge skip_e3f2 ; dec Y_COORD blt L_e410 ; ldaa CHAR_WID deca staa X_COORD skip_e3f2: cmpa CHAR_WID blt skip_e3fc ; clr X_COORD inc Y_COORD skip_e3fc: ldab Y_COORD bge skip_e403 clrb stab Y_COORD skip_e403: cmpb SCR_LEN bge skip_e408 rts skip_e408: ldab SCR_LEN decb stab Y_COORD ; jmp SCROLL ; ; ; L_e410: clr Y_COORD clr X_COORD rts ; ; CURSOR: ; used 21 times jsr L_e43a jsr SCR_LIM jsr SCREEN ; ldd_zp_std_zp WORK, CUR_POS ; tst CH_COUNT ; bne skip_e42c jsr L_e441 skip_e42c: ; ldd_zp CUR_POS ; psha ldaa_jsr #14, SET_REG; ; pulb ldaa_jmp #15, SET_REG; ; ; ; L_e43a: sei tst CUR_ON bne skip_e44d rts ; ; ; L_e441: ; mentioned 10 times sei ; tst CUR_OFF bne skip_e44c ; tst CUR_ON beq skip_e44d ; skip_e44c: rts ; ; ; skip_e44d: ldab CHAR_MOD ; aslb_thrice ; ldx CUR_POS ; sei Loop_e455: com 0,x inx ; decb bne Loop_e455 ; com CUR_ON rts ; ; ; L_e45f: ldaa STLI_ON bne skip_e464 rts ; skip_e464: coma ; staa STLI_ON ; inc SCR_LEN ; ldd_zp PLOT_WID ; ldx SCR_END stx TEX_END Loop_e470: dex ; psha ; ldaa CHAR_BAC staa 0,x ; pula ; subd_im 1 bne Loop_e470 ; rts ; ; ; L_e47d: ldaa STLI_ON beq L_e482 rts ; return if not zero ; ; ; L_e482: coma staa STLI_ON dec SCR_LEN ; ; ; L_e488: ldd_zp PLOT_WID ldx SCR_END ; Loop_e48c: dex ; psha ; ldaa CHAR_COL staa 0,x ; pula subd_im 1 bne Loop_e48c ; stx TEX_END rts ; ; ; L_e49b: ldaa STLI_ON beq Loop_e4de ; jsr L_e488 ; ldx X_COORD pshx ; ldx CUR_POS pshx ; ldd_zp_std_zp TEX_END, CUR_POS ; com RVRSE_ON ; ldaa CHAR_WID deca ; ldab CHAR_MOD ; aslb_thrice Loop_e4b7: pshb ; psha ; jsr GETCH ; cmpa #CR beq L_e4d3 ; cmpa #LF beq L_e4d3 ; jsr PRCH ; ldx CUR_POS ; pula_pulb ; abx stx CUR_POS ; deca bne Loop_e4b7 ; bra L_e4d4 ; ; ; L_e4d3: pulx ; ; ; L_e4d4: com RVRSE_ON ; pulx stx CUR_POS ; pulx stx X_COORD ; rts ; ; ; Loop_e4de: ldaa CHAR_WID deca ; Loop_e4e1: pshb psha ; jsr GETCH ; cmpa #$d beq L_e4f5_pulx_rts ; cmpa #$a beq L_e4f5_pulx_rts ; pula_pulb ; deca bne Loop_e4e1 ; bra L_e4f6_rts ; ; ; L_e4f5_pulx_rts: pulx ; ; ; L_e4f6_rts: rts ; ; ; PRCH: ldab CHAR_MOD ; aslb ; negb ; ldx #$e437 abx stx WORK+5 ; tab ; clra asld_thrice addd_im CHAR_TBL std_zp WORK+20 ; ldab_stab #7, WORK+7 ; ; ; L_e50f: ldab_stab #bits_per_byte, WORK+4 ; ldab WORK+7 ; ldx CUR_POS abx stx WORK ; ldx WORK+20 abx ldab 0,x ; ldaa #$1 ; sei ; ; ; Loop_e522: pshb ldx WORK+5 jmp 0,x ; ; ; L_e527: asrb_asld asrb_asld asrb_asld asrb_asld asrb_asld asrb_asld asrb_asld asrb_asld ; bcc skip_e551 ; ldx WORK eora RVRSE_ON tab andb CHAR_COL stab WORK+9 ; tab ; comb ; andb CHAR_BAC orab WORK+9 stab 0,x ; ldab #bits_per_byte abx stx WORK ; ldaa #$1 ; skip_e551: pulb rolb ; dec WORK+4 bgt Loop_e522 ; dec WORK+7 bge L_e50f ; rts ; ; ; SCROLL: jsr SCREEN ; ldd_zp_addd_zp_std_zp SCR_END, PLOT_WID, SCR_END ; subd_im EPRM_BAS bgt L_e5a5 ; ldd_zp_addd_zp_std_zp TEX_END, PLOT_WID, TEX_END ldd_zp_addd_zp_std_zp DISP_BAS, PLOT_WID, DISP_BAS L_e578: ldaa STLI_ON beq L_e58a ; ldd_zp_std_zp TEX_END, WORK subd PLOT_WID std_zp WORK+2 ; ldab SCR_WID ; clra ; jsr UMOVE8 ; ; ; L_e58a: ldd_zp DISP_BAS lsrd_thrice ; psha ; ldaa_jsr #$d, SET_REG; ; pulb ; ldaa_jsr #$c, SET_REG; ; ldaa X_COORD ; psha ; jsr L_e9bb ; pula staa X_COORD ; rts ; ; ; L_e5a5: ldd_zp SCR_END ; subd DISP_BAS subd PLOT_WID std_zp WORK+6 ; addd_im VID_BAS std_zp SCR_END ; ldd_zp TEX_END subd DISP_BAS addd_im VID_BAS std_zp TEX_END ; ldd_im_std_zp VID_BAS, WORK ; ldd_zp_addd_zp_std_zp DISP_BAS, PLOT_WID, WORK+2 ; ldd_zp WORK+6 lsrd_thrice ; jsr UMOVE8 ; ldd_im_std_zp VID_BAS, DISP_BAS ; bra L_e578 ; ; ; LEFSCR: jsr L_e43a ; ldd_zp SCR_END addd_im 8 std_zp SCR_END ; subd_im EPRM_BAS bgt L_e628 ; ldd_zp TEX_END addd_im 8 std_zp TEX_END ; ldd_zp DISP_BAS addd_im 8 std_zp DISP_BAS ; ; ; L_e5f2: lsrd_thrice psha ; ldaa_jsr #$d, SET_REG; ; pulb ; ldaa_jsr #$c, SET_REG; ; ldx SCR_END ; ldab_stab SCR_LEN, WORK ; bra L_e613 ; ; ; Loop_e609: stx WORK+2 ; ldd_zp WORK+2 subd PLOT_WID std_zp WORK+2 ; ldx WORK+2 ; ; ; L_e613: ldab CHAR_BAC ldaa CHAR_BAC ; std_ix 0,x std_ix 2,x std_ix 4,x std_ix 6,x ; dec WORK bne Loop_e609 ; jsr CURSOR ;L_e627 rts ; ; ; L_e628: ldd_zp SCR_END subd DISP_BAS subd_im $10 std_zp WORK+6 ; addd_im $2008 std_zp SCR_END ; ldd_zp TEX_END subd DISP_BAS addd_im $1ff8 std_zp TEX_END ; ldd_im_std_zp VID_BAS, WORK ; ldd_zp DISP_BAS addd_im 8 std_zp WORK+2 ; ldd_zp WORK+6 lsrd_thrice jsr UMOVE8 ; ldd_im_std_zp VID_BAS, DISP_BAS bra L_e5f2 ; ; ; RIGSCR: ; jsr L_e43a ; ldd_zp DISP_BAS subd_im 8 std_zp DISP_BAS ; subd_im VID_BAS blt L_e6af ; ldd_zp SCR_END ; subd_im 8 std_zp SCR_END ; ldd_zp TEX_END subd_im 8 std_zp TEX_END ; ; ; L_e677: ldd_zp DISP_BAS lsrd_thrice ; psha ; ldaa_jsr #$d, SET_REG; ; pulb ; ldaa_jsr #$c, SET_REG; ; ldx DISP_BAS ; ldab_stab SCR_LEN, WORK ; bra L_e69a ; ; ; L_e690: stx WORK+2 ; ldd_zp_addd_zp_std_zp WORK+2, PLOT_WID, WORK+2 ; ldx WORK+2 ; ; ; L_e69a: ldab CHAR_BAC ldaa CHAR_BAC ; std_ix 0,x std_ix 2,x std_ix 4,x std_ix 6,x ; dec WORK bne L_e690 ; jsr CURSOR ; jmp would save time rts ; ; ; L_e6af: ldd_zp SCR_END subd DISP_BAS subd_im $10 std_zp WORK+6 ldd_im_std_zp EPRM_BAS, WORK ;L_e6bd subd SCR_END addd_zp DISP_BAS addd_im 8 std_zp DISP_BAS ;L_e6c6 ldd_im L_e008 subd SCR_END addd_zp_std_zp TEX_END, TEX_END ;L_e6cf ldd_zp SCR_END subd_im 8 std_zp WORK+2 ;L_e6d6 ldd_zp WORK+6 lsrd_thrice jsr DMOVE8 ;L_e6de ldd_im_std_zp EPRM_BAS, SCR_END ;L_e6e3 bra L_e677 ; ; ; L_e6e5: jsr L_e43a ;L_e6e8 ldab #$4 ;L_e6ea jsr READ ; ; ; BULEFT: ldd_zp_addd_zp_std_zp WORK+16, DISP_BAS, WORK addd_im 8 std_zp WORK+2 ;L_e6f8 ldd_zp WORK+18 subd_im 8 ;L_e6fd lsrd_thrice jsr UMOVE8 ;L_e703 ldaa CHAR_BAC ;L_e705 tab ;L_e706 ldx WORK ;L_e708 std_ix 0,x std_ix 2,x std_ix 4,x std_ix 6,x ;L_e710 jmp L_e441 ; ; ; L_e713: jsr L_e43a ;L_e716 ldab #4 ;L_e718 jsr READ ; ; ; BLRIGT: ldd_zp WORK+16 addd_zp DISP_BAS addd_zp WORK+18 std_zp WORK ;L_e723 subd_im 8 std_zp WORK+2 ;L_e728 ldd_zp WORK+18 subd_im 8 ;L_e72d lsrd_thrice jsr DMOVE8 ;L_e733 ldaa CHAR_BAC ;L_e735 tab ;L_e736 ldx WORK+2 ;L_e738 std_ix 0,x std_ix 2,x std_ix 4,x std_ix 6,x ;L_e740 jmp L_e441 ; ; ; L_e743: rts ; ; ; L_e744: ldab #3 jsr READ ;L_e749 ldx WORK+16 stx SUB_PTR ;L_e74d ldaa_staa WORK+18, SUB_CNT ;L_e751 rts ; ; ; SET_PALT: sei ldaa PORT1 psha ; ldaa #$ef jsr ANDP1 ;L_e75b ldd_std PALT_TBL, PALETTE+0 ldd_std PALT_TBL+2, PALETTE+2 ldd_std PALT_TBL+4, PALETTE+4 ldd_std PALT_TBL+6, PALETTE+6 ldd_std PALT_TBL+8, PALETTE+8 ldd_std PALT_TBL+10, PALETTE+10 ldd_std PALT_TBL+12, PALETTE+12 ldd_std PALT_TBL+14, PALETTE+14 ;L_e78b 32 pula jsr ORP1 rts ; ; ; L_e790: tst PALT_FLG ;L_e793 beq L_e79b ;L_e795 bd e7 52 jsr SET_PALT ;L_e798 clr PALT_FLG ; ; ; L_e79b: ldx CLOCK inx stx CLOCK ;L_e7a0 7d 00 d3 tst CUR_CNT ;L_e7a3 27 0c beq L_e7b1 ;L_e7a5 dec CUR_CNT ;L_e7a8 bne L_e7b1 ;L_e7aa ldaa_staa #$40, CUR_CNT ;L_e7ae jsr skip_e44d ; ; ; L_e7b1: jsr L_e804 ;L_e7b4 rti ;L_e7b5 ldaa PKT_CNT cmpa #$18 ; 24 rows of characters per screen? blt L_e7bd ;L_e7bb clra rts ; ; ; L_e7bd: stx WORK ;L_e7bf e6 02 ldab 2,x ; ; ; L_e7c1: ldx #PKT_Q ;L_e7c4 e1 02 cmpb 2,x blt L_e7da ;L_e7c8 e0 02 subb 2,x ;L_e7ca 08 inx inx ;L_e7cc 4a deca ;L_e7cd 2e f2 bgt L_e7c1 ;L_e7cf 37 pshb ;L_e7d0 dc e0 ldd_zp WORK std_ix 0,x ;L_e7d4 ee 00 ldx 0,x ;L_e7d6 33 pulb stab 2,x ;L_e7d9 rts ; ; ; L_e7da: pshb ;L_e7db 16 tab ;L_e7dc 97 e2 staa WORK+2 ;L_e7de 5a decb decb ;L_e7e0 3a abx abx ;L_e7e2 7a 00 e2 dec WORK+2 ; ; ; L_e7e5: ldd_ix 0,x ;L_e7e7 ed 02 std_ix 2,x ;L_e7e9 09 dex ;L_e7ea 09 dex ;L_e7eb 7a 00 e2 dec WORK+2 bne L_e7e5 ;L_e7f0 dc e0 ldd_zp WORK std_ix 0,x ;L_e7f4 32 pula ;L_e7f5 3c pshx ;L_e7f6 ee 00 ldx 0,x ;L_e7f8 a7 02 staa 2,x ;L_e7fa 38 pulx ;L_e7fb ee 02 ldx 2,x ;L_e7fd 40 nega ;L_e7fe e6 02 ldab 2,x aba staa 2,x ;L_e803 rts ; ; ; L_e804: tst PKT_CNT ;L_e807 26 01 bne L_e80a ; ; ; L_e809: rts ; ; ; L_e80a: ldx PKT_Q ;L_e80d 6a 02 dec 2,x ;L_e80f 26 f8 bne L_e809 ; return ;L_e811 ee 00 ldx 0,x ;L_e813 ad 00 jsr 0,x ;L_e815 96 b5 ldaa PKT_CNT deca staa PKT_CNT ;L_e81a 27 ed beq L_e809 ;L_e81c ce 18 40 ldx #PKT_Q ; ; ; L_e81f: psha ;L_e820 ec 02 ldd_ix 2,x ;L_e822 ed 00 std_ix 0,x ;L_e824 32 pula ;L_e825 4a deca ;L_e826 26 f7 bne L_e81f ;L_e828 rts ; 15 references ; ; ; READ: ldx #$f0 ; ; ; L_e82c: jsr GETCH ;L_e82f a7 00 staa 0,x ;L_e831 08 inx ;L_e832 5a decb bne L_e82c ;L_e835 rts ; ; ; MULT16: psha ;L_e837 d6 e2 ldab_mul WORK+2 stab WORK ; clr WORK+1 ; pula ; ldab_mul WORK+3 addd_zp_std_zp WORK, WORK ; rts ; ; ; DIV16: ldx #$e0 ;L_e84b c6 10 ldab #$10 stab Timer_and_Control_Status_Register,x ; indexed! Loop_e84f: asl External_Memory_5,x ;L_e851 69 04 rol 4,x ;L_e853 ec 00 ldd_ix 0,x ; subd_ix 2,x blt skip_e85d ; std_ix 0,x inc External_Memory_5,x skip_e85d: ; ldd_ix 0,x asld std_ix 0,x std_ix 6,x ;L_e864 6a 08 dec Timer_and_Control_Status_Register,x ;L_e866 26 e7 bne Loop_e84f ;L_e868 rts ; ; ; L_e869: ldab #4 jsr READ ;L_e86e de f0 ldx WORK+16 ;L_e870 dc f2 ldd_zp WORK+18 Loop_e872: psha ;L_e873 bd e2 98 jsr GETCH ;L_e876 a7 00 staa_ix 0,x inx ;L_e879 32 pula subd_im 1 bne Loop_e872 rts ; ; ; L_e880: ldab #4 jsr READ ;L_e885 de f0 ldx WORK+16 ;L_e887 dc f2 ldd_zp WORK+18 ; ; ; Loop_e889: psha ; push loop count ; ldaa_ix 0,x inx ; jsr PUTIT ; pula subd_im 1 bne Loop_e889 ; rts ; ; ; READHX: stx WORK+3 ;L_e899 37 pshb ;L_e89a bd e2 98 jsr GETCH jsr HEXBIN ;L_e8a0 48 asla_thrice asla ;L_e8a4 97 e5 staa WORK+5 ;L_e8a6 bd e2 98 jsr GETCH jsr HEXBIN ;L_e8ac 9a e5 oraa WORK+5 tab addb WORK stab WORK ;L_e8b3 33 pulb ;L_e8b4 de e3 ldx WORK+3 ;L_e8b6 rts ; ; ; CUR_LEFT: dec X_COORD jmp CURSOR ; ; ; TAB: ldab X_COORD addb #bits_per_byte andb #$f8 stab X_COORD ; jmp CURSOR ; ; ; LINEFEED: inc Y_COORD jmp CURSOR ; ; ; CUR_UP: dec Y_COORD jmp CURSOR ; ; ; CUR_RITE: inc X_COORD jmp CURSOR ; ; ; RETURN: clr X_COORD jmp CURSOR ; ; ; CUR_DOWN: ldab Y_COORD incb cmpb SCR_LEN bge skip_e8ea jmp CURSOR skip_e8ea: rts ; ; ; HOME: clr X_COORD clr Y_COORD jmp CURSOR ; ; ; NEWLINE: inc Y_COORD clr X_COORD jmp CURSOR ;L_e8fd 96 df ldaa Y_COORD adda #$20 jsr PUTIT ;L_e904 96 de ldaa X_COORD adda #$20 jmp PUTIT ; ; ; LINE_INS: jsr SCREEN ; ldd_zp TEX_END subd WORK+2 subd PLOT_WID std_zp WORK+6 ; ldd_zp TEX_END std_zp WORK ; subd PLOT_WID std_zp WORK+2 ; ldd_zp WORK+6 lsrd_thrice jsr DMOVE8 jmp L_e9bb ; ; ; LINE_DEL: jsr L_e43a jsr SCREEN ;L_e92f dc e2 ldd_zp WORK+2 std_zp WORK ;L_e933 d3 ac addd_zp_std_zp PLOT_WID, WORK+2 ;L_e937 dc b0 ldd_zp TEX_END subd WORK+2 ;L_e93b 04 lsrd_thrice jsr UMOVE8 ;L_e941 96 df ldaa Y_COORD psha ;L_e944 96 c5 ldaa SCR_LEN deca staa Y_COORD ;L_e949 bd e9 bb jsr L_e9bb ;L_e94c 32 pula staa Y_COORD ;L_e94f 7f 00 de clr X_COORD ;L_e952 7e e4 17 jmp CURSOR ; ; ; CHAR_INS: jsr L_e43a jsr SCREEN ;L_e95b dc e0 ldd_zp WORK std_zp WORK+10 ;L_e95f 96 bd ldaa CHAR_MOD ldab_mul #bits_per_byte std_zp WORK+6 ;L_e966 dc e2 ldd_zp_addd_zp_std_zp WORK+2, PLOT_WID, WORK ;L_e96c 93 e6 subd WORK+6 std_zp WORK+2 ;L_e970 dc e2 ldd_zp WORK+2 subd WORK+10 ;L_e974 04 lsrd_thrice jsr DMOVE8 ;L_e97a 86 20 ldaa #$20 ;L_e97c bd e4 f7 jsr PRCH ;L_e97f 7e e4 41 jmp L_e441 ; ; ; CHAR_DEL: jsr L_e43a jsr SCREEN ;L_e988 96 bd ldaa CHAR_MOD ldab_mul #bits_per_byte std_zp WORK+6 ;L_e98f dc e2 ldd_zp WORK+2 addd_zp PLOT_WID subd WORK+6 subd WORK std_zp WORK+8 ;L_e999 dc e0 ldd_zp_addd_zp_std_zp WORK, WORK+6, WORK+2 ;L_e99f dc e8 ldd_zp WORK+8 lsrd_thrice jsr UMOVE8 ;L_e9a7 de d0 ldx CUR_POS pshx ;L_e9aa de e0 ldx WORK sei stx CUR_POS ;L_e9af 86 20 ldaa #$20 jsr PRCH ;L_e9b4 38 pulx stx CUR_POS ;L_e9b7 bd e4 41 jsr L_e441 ;L_e9ba rts ; ; ; L_e9bb: jsr L_e43a jsr RETURN ;L_e9c1 de d0 ldx CUR_POS ;L_e9c3 0f sei ;L_e9c4 96 bb ldaa CHAR_BAC staa_ix 0,x ;L_e9c8 7f 00 d2 clr CUR_ON ;L_e9cb df e2 stx WORK+2 inx stx WORK ;L_e9d0 d6 c6 ldab SCR_WID ;L_e9d2 4f clra ;L_e9d3 05 asld_thrice ;L_e9d6 83 00 01 subd_im 1 ;L_e9d9 7e e2 71 jmp UMOVE ; ; ; ERA_SCR: sei ; interrupts off/on ;L_e9dd dc c3 ldd_zp SCR_END subd DISP_BAS ;L_e9e1 04 lsrd_thrice std_zp WORK ;L_e9e6 de e0 ldx WORK ;L_e9e8 d6 bb ldab CHAR_BAC ;L_e9ea 9f e4 sts WORK+4 ; save stack pointer lds SCR_END ; get new stack pointer des ; ; I'm guessing it clears the screen by repeated pushing. ; ; loop_e9ef_pshb_8_times_X: pshb pshb pshb pshb pshb pshb pshb pshb dex bne loop_e9ef_pshb_8_times_X ; ; ; L_e9fa: lds WORK+4 ;L_e9fc 7f 00 d2 clr CUR_ON clr X_COORD clr Y_COORD ;L_ea05 7e e4 17 jmp CURSOR ;L_ea08 bd e4 3a jsr L_e43a ;L_ea0b 96 bb ldaa CHAR_BAC ldx CUR_POS staa_ix 0,x stx WORK+2 ;L_ea13 08 inx stx WORK ;L_ea16 dc b0 ldd_zp TEX_END subd WORK jmp UMOVE ; ; ; DEL_RITE: sei ;L_ea1e bd e4 3a jsr L_e43a ;L_ea21 de d0 ldx CUR_POS ;L_ea23 96 bb ldaa CHAR_BAC staa_ix 0,x ;L_ea27 df e2 stx WORK+2 ;L_ea29 08 inx stx WORK ;L_ea2c d6 c2 ldab CHAR_WID subb X_COORD ldaa CHAR_MOD ;L_ea32 48 asla_thrice mul ;L_ea36 83 00 01 subd_im 1 ;L_ea39 bd e2 71 jsr UMOVE ;L_ea3c 7f 00 d2 clr CUR_ON jmp L_e441 ; ; ; PAGE_DEL: sei ;L_ea43 ldx CUR_POS ldaa CHAR_BAC staa 0,x ;L_ea49 stx WORK+2 ;L_ea4b inx stx WORK ;L_ea4e ldd_zp TEX_END subd WORK ;L_ea52 jsr UMOVE ;L_ea55 clr CUR_ON ;L_ea58 jmp L_e441 ; ; ; L_ea5b: ldab #$3 ;L_ea5d jsr READ ;L_ea60 ldx WORK+16 ;L_ea62 ldaa WORK+18 staa_ix 0,x ;L_ea66 rts ; ; ; L_ea67: ldab #$2 ;L_ea69 jsr READ ;L_ea6c ldx WORK+16 ldaa_ix 0,x ;L_ea70 jsr PUTIT rts ; ; ; L_ea74: addb var_9c,x orab STLI_ON,x orab X_PLOT,x orab CUR_CNT,x stx var_7f,x std_ix var_58,x ;L_ea80 ldx_ix var_2e,x ; ; ; Graphics_functions: jsr GETCH ;L_ea85 psha ;L_ea86 ldab #$4 ;L_ea88 bd e8 29 jsr READ ;L_ea8b pula psha ;L_ea8d anda #mask_bit_0_set bne L_ea9b ;L_ea91 ldd_zp_std_zp WORK+16, WORK+12 ldd_zp_std_zp WORK+18, WORK+14 ;L_ea99 bra L_eaa7 ; ; ; L_ea9b: ldd_zp_addd_zp_std_zp WORK+16, X_PLOT, WORK+12 ldd_zp_addd_zp_std_zp WORK+18, Y_PLOT, WORK+14 ; ; ; L_eaa7: pulb ;L_eaa8 andb #$fe ;L_eaaa ldx #$ea74 abx ldx_ix 0,x ;L_eab0 jmp 0,x ;L_eab2 ldd_zp_std_zp WORK+12, WORK+20 std_zp X_PLOT ldd_zp_std_zp WORK+14, WORK+22 std_zp Y_PLOT ;L_eabe jsr PNT_LOC ;L_eac1 ldd_zp WORK subd DISP_BAS std_zp PLOT_POS ;L_eac7 rts ; ; ; PLOT: ldd_zp_std_zp WORK+12, WORK+20 ldd_zp_std_zp WORK+14, WORK+22 jmp L_eb54 ; ; ; RD_PNT: ldd_zp_std_zp WORK+12, WORK+20 ldd_zp_std_zp WORK+14, WORK+22 ;L_eadb bd eb 0c jsr PNT_LOC ;L_eade bd eb 31 jsr PNT_MSK ;L_eae1 16 tab ;L_eae2 de e0 ldx WORK ;L_eae4 a4 00 anda 0,x ; ; ; L_eae6: lsrd ;L_eae7 24 fd bcc L_eae6 ;L_eae9 05 asld ;L_eaea 7e e3 32 jmp PUTIT ; ; ; CHK_LIM: ldd_zp WORK+20 blt L_eb0a ;L_eaf1 93 ac subd PLOT_WID bge L_eb0a ;L_eaf5 dc f6 ldd_zp WORK+22 blt L_eb0a ;L_eaf9 93 aa subd PLOT_LEN bge L_eb0a ;L_eafd dc be ldd_zp DASH_MOD ;L_eaff 47 asra rola rolb rola ;L_eb03 dd be std_zp DASH_MOD ;L_eb05 24 03 bcc L_eb0a ;L_eb07 86 ff ldaa #$ff ;L_eb09 rts ; ; ; L_eb0a: clra ;L_eb0b rts ; ; ; PNT_LOC: ldd_zp PLOT_LEN subd WORK+22 subd_im 1 ;L_eb13 04 lsrd lsrd ;L_eb15 37 pshb ;L_eb16 c4 f8 andb #$f8 ;L_eb18 dd e2 std_zp WORK+2 ;L_eb1a 96 c6 ldaa SCR_WID jsr MULT16 ;L_eb1f 33 pulb ;L_eb20 c4 07 andb #7 stab WORK+2 ;L_eb24 dc f4 ldd_zp WORK+20 andb #$f8 addb WORK+2 addd_zp WORK addd_zp DISP_BAS std_zp WORK ;L_eb30 rts ; ; ; PNT_MSK: ldaa #$80 ldab MODE bra L_eb38 ; ; ; L_eb37: asra ; ; ; L_eb38: decb bne L_eb37 ;L_eb3b d6 f5 ldab WORK+21 andb #7 stab WORK+2 ;L_eb41 d6 cf ldab MODE ;L_eb43 5a decb ;L_eb44 53 comb ;L_eb45 d4 e2 andb WORK+2 ;L_eb47 48 asla ; ; ; L_eb48: rora ;L_eb49 5a decb bge L_eb48 ;L_eb4c rts ; ; ; L_eb4d: jsr CHK_LIM ;L_eb50 4d tsta bne L_eb54 rts ; ; ; L_eb54: jsr PNT_LOC jsr PNT_MSK ;L_eb5a d6 cc ldab PLOT_MOD aslb ;L_eb5d ce eb 92 ldx #table_eb92 ; table of function addresses abx ; add offset ldx 0,x jmp 0,x L_eb65: ldx WORK tab anda PLOT_COL comb andb 0,x stab WORK+3 oraa WORK+3 staa 0,x ;L_eb73 rts ; ; L_eb74: ldx WORK anda PLOT_COL eora 0,x staa 0,x ;L_eb7c rts ; ; L_eb7d: ldx WORK tab anda CHAR_BAC comb andb 0,x stab WORK+3 ;L_eb87 9a e3 oraa WORK+3 staa 0,x ;L_eb8b rts ; ; ; L_eb8c: ldx WORK staa 0,x rts ; ; ; L_eb91_rts: rts ; ; ; table_eb92: DW L_eb91_rts DW L_eb74 DW L_eb65 DW L_eb7d DW L_eb8c ; LINE: ldab_stab MODE, WORK+28 ;L_eba0 dc ec ldd_zp WORK+12 subd X_PLOT ;L_eba4 20 02 bra L_eba8 ; ; ; Loop_eba6: asra_rorb ; ; ; L_eba8: ror WORK+28 bcc Loop_eba6 ;L_ebad dd f8 std_zp WORK+24 ;L_ebaf 2d 07 blt skip_ebb8 ;L_ebb1 d6 cf ldab MODE ;L_ebb3 4f clra ;L_ebb4 dd e4 std_zp WORK+4 ;L_ebb6 20 0e bra skip_ebc6 skip_ebb8: ldd_im 0 subd WORK+24 std_zp WORK+24 ;L_ebbf d6 cf ldab MODE negb ;L_ebc2 86 ff ldaa #$ff std_zp WORK+4 ; skip_ebc6: ldd_zp WORK+14 subd Y_PLOT ;L_ebca 47 asra_rorb asra_rorb ;L_ebce dd fa std_zp WORK+26 ;L_ebd0 2d 07 blt skip_ebd9 ;L_ebd2 cc 00 04 ldd_im_std_zp 4, WORK+6 ;L_ebd7 20 0c bra skip_ebe5 ; skip_ebd9: ldd_im 0 subd WORK+26 std_zp WORK+26 ;L_ebe0 cc ff fc ldd_im_std_zp L_fffc, WORK+6 ; ; ; skip_ebe5: ldd_zp WORK+26 subd WORK+24 ;L_ebe9 2c 03 bge skip_ebee ;L_ebeb cc 00 00 ldd_im 0 ; skip_ebee: addd_zp_std_zp WORK+24, WORK+28 ; asra_rorb ; std_zp WORK+16 std_zp WORK+18 ;L_ebf8 dc ec ldd_zp_std_zp WORK+12, WORK+20 ldd_zp_std_zp WORK+14, WORK+22 ;L_ec00 bd ea ed jsr CHK_LIM ;L_ec03 97 ff staa WORK+31 ;L_ec05 dc c8 ldd_zp_std_zp X_PLOT, WORK+20 ldd_zp_std_zp Y_PLOT, WORK+22 ;L_ec0d bd ea ed jsr CHK_LIM ;L_ec10 94 ff anda WORK+31 ;L_ec12 26 03 bne skip_ec17 ;L_ec14 7e ec e4 jmp L_ece4 ; ; ; skip_ec17: jsr PNT_LOC ;L_ec1a bd eb 31 jsr PNT_MSK ;L_ec1d 97 e2 staa WORK+2 ;L_ec1f dc ec ldd_zp_std_zp WORK+12, X_PLOT ;L_ec23 dc ee ldd_zp_std_zp WORK+14, Y_PLOT ;L_ec27 bd ed 40 jsr L_ed40 ;L_ec2a dc fc ldd_zp_std_zp WORK+28, WORK+12 ;L_ec2e 26 01 bne L_ec31 rts ; ; ; L_ec31: clr WORK+31 ;L_ec34 dc f8 ldd_zp_addd_zp_std_zp WORK+24, WORK+16, WORK+16 ;L_ec3a 93 ec subd WORK+12 bcs L_ec7b ;L_ec3e dd f0 std_zp WORK+16 ;L_ec40 7a 00 ff dec WORK+31 ;L_ec43 96 e4 ldaa WORK+4 bge L_ec62 ;L_ec47 4f clra ;L_ec48 d6 e2 ldab WORK+2 ;L_ec4a de e4 ldx WORK+4 ; ; ; L_ec4c: asld ;L_ec4d 08 inx bne L_ec4c ;L_ec50 4d tsta bne L_ec57 ;L_ec53 d7 e2 stab WORK+2 ;L_ec55 20 24 bra L_ec7b ; ; ; L_ec57: staa WORK+2 ;L_ec59 dc e0 ldd_zp WORK subd_im 8 std_zp WORK ;L_ec60 20 19 bra L_ec7b ; ; ; L_ec62: clrb ;L_ec63 96 e2 ldaa WORK+2 ;L_ec65 de e4 ldx WORK+4 ; ; ; L_ec67: lsrd ;L_ec68 09 dex bne L_ec67 ;L_ec6b 5d tstb bne L_ec72 ;L_ec6e 97 e2 staa WORK+2 bra L_ec7b ; ; ; L_ec72: stab WORK+2 ;L_ec74 dc e0 ldd_zp WORK addd_im 8 std_zp WORK ; ; ; L_ec7b: ldd_zp_addd_zp_std_zp WORK+26, WORK+18, WORK+18 ;L_ec81 93 ec subd WORK+12 bcs L_ecc0 ;L_ec85 dd f2 std_zp WORK+18 ;L_ec87 dc e6 ldd_zp WORK+6 bgt L_eca2 ;L_ec8b dc e0 ldd_zp WORK addd_im 1 std_zp WORK ;L_ec92 c4 07 andb #7 ;L_ec94 26 2f bne L_ecc5 ;L_ec96 d6 c6 ldab SCR_WID decb ;L_ec99 86 08 ldaa_mul #bits_per_byte ;L_ec9c d3 e0 addd_zp_std_zp WORK, WORK ;L_eca0 20 23 bra L_ecc5 ; ; ; L_eca2: ldd_zp WORK subd_im 1 std_zp WORK ;L_eca9 c4 07 andb #7 cmpb #7 ;L_ecad 26 16 bne L_ecc5 ;L_ecaf d6 c6 ldab SCR_WID decb ;L_ecb2 86 08 ldaa_mul #bits_per_byte ;L_ecb5 43 coma comb ;L_ecb7 c3 00 01 addd_im 1 addd_zp_std_zp WORK, WORK ;L_ecbe 20 05 bra L_ecc5 ; ; ; L_ecc0: tst WORK+31 beq L_ecc8 ; ; ; L_ecc5: jsr L_ed40 ; ; ; L_ecc8: ldx WORK+28 dex stx WORK+28 ;L_eccd 27 03 beq L_ecd2 ;L_eccf 7e ec 31 jmp L_ec31 ; ; ; L_ecd2: ldd_zp_std_zp X_PLOT, WORK+20 ;L_ecd6 dc ca ldd_zp_std_zp Y_PLOT, WORK+22 ;L_ecda bd eb 0c jsr PNT_LOC ;L_ecdd dc e0 ldd_zp WORK subd DISP_BAS std_zp PLOT_POS ;L_ece3 rts ; ; ; L_ece4: ldd_zp_std_zp WORK+12, X_PLOT ldd_zp_std_zp WORK+14, Y_PLOT ; jsr L_eb4d ; ldd_zp_std_zp WORK+28, WORK+12 ; ; ; L_ecf3: clr WORK+31 ;L_ecf6 dc f8 ldd_zp_addd_zp_std_zp WORK+24, WORK+16, WORK+16 ; WORK+16 += WORK+24 ;L_ecfc 93 ec subd WORK+12 bcs skip_ed0b ; std_zp WORK+16 dec WORK+31 ldd_zp_addd_zp_std_zp WORK+4, WORK+20, WORK+20; WORK+20 += WORK+4 ; skip_ed0b: ldd_zp_addd_zp_std_zp WORK+26, WORK+18, WORK+18; WORK+18 += WORK+26 ;L_ed11 93 ec subd WORK+12 ;L_ed13 25 0a bcs skip_ed1f ;L_ed15 dd f2 std_zp WORK+18 ;L_ed17 dc e6 ldd_zp_addd_zp_std_zp WORK+6, WORK+22, WORK+22; WORK+22 += WORK+26 ;L_ed1d 20 05 bra L_ed24 skip_ed1f: tst WORK+31 ;L_ed22 27 03 beq L_ed27 ; ; ; L_ed24: jsr L_eb4d ; ; ; L_ed27: ldx WORK+28 dex stx WORK+28 ;L_ed2c 26 c5 bne L_ecf3 ;L_ed2e dc c8 ldd_zp X_PLOT std_zp WORK+20 ;L_ed32 dc ca ldd_zp_std_zp Y_PLOT, WORK+22 ;L_ed36 bd eb 0c jsr PNT_LOC ;L_ed39 dc e0 ldd_zp WORK subd DISP_BAS std_zp PLOT_POS ; rts ; ; ; L_ed40: ldd_zp DASH_MOD ;L_ed42 47 asra rola rolb rola ;L_ed46 dd be std_zp DASH_MOD ;L_ed48 25 01 bcs L_ed4b ;L_ed4a rts ; ; ; L_ed4b: ldaa WORK+2 ;L_ed4d d6 cc ldab PLOT_MOD ;L_ed4f 58 aslb ;L_ed50 ce eb 92 ldx #$eb92 ;L_ed53 3a abx ;L_ed54 ee 00 ldx 0,x ;L_ed56 6e 00 jmp 0,x ; ; ; QLINE: ldab_stab MODE, WORK+28 ;L_ed5c d6 c6 ldab SCR_WID ;L_ed5e 5a decb ;L_ed5f 4f clra ;L_ed60 05 asld_thrice ;L_ed63 dd ea std_zp WORK+10 ;L_ed65 dc ec ldd_zp WORK+12 subd X_PLOT ;L_ed69 47 asra_rorb asra_rorb ;L_ed6d 97 e4 staa WORK+4 ;L_ed6f 2c 01 bge L_ed72 ;L_ed71 50 negb ; ; ; L_ed72: stab WORK+24 ;L_ed74 dc ee ldd_zp WORK+14 subd Y_PLOT ;L_ed78 47 asra_rorb asra_rorb ;L_ed7c 97 e6 staa WORK+6 ;L_ed7e 2c 01 bge L_ed81 ;L_ed80 50 negb ; ; ; L_ed81: stab WORK+26 ;L_ed83 d0 f8 subb WORK+24 ;L_ed85 2c 01 bge L_ed88 ;L_ed87 5f clrb ; ; ; L_ed88: addb WORK+24 stab WORK+28 ;L_ed8c 57 asrb ;L_ed8d 26 01 bne L_ed90 ;L_ed8f rts ; ; ; L_ed90: stab WORK+16 stab WORK+18 ;L_ed94 dc c8 ldd_zp_std_zp X_PLOT, WORK+20 ldd_zp_std_zp Y_PLOT, WORK+22 ;L_ed9c bd eb 0c jsr PNT_LOC jsr PNT_MSK ;L_eda2 97 e2 staa WORK+2 ;L_eda4 dc ec ldd_zp_std_zp WORK+12, X_PLOT ldd_zp_std_zp WORK+14, Y_PLOT ;L_edac 96 e2 ldaa WORK+2 ;L_edae de e0 ldx WORK eora 0,x staa 0,x ;L_edb4 d6 fc ldab_stab WORK+28, WORK+12 ; ; ; L_edb8: ldab WORK+24 addb WORK+16 stab WORK+16 ;L_edbe d0 ec subb WORK+12 bcs L_ede2 ;L_edc2 d7 f0 stab WORK+16 ;L_edc4 d6 e4 ldab WORK+4 bge skip_edd6 ;L_edc8 73 00 e2 com WORK+2 blt L_ede2 ;L_edcd dc e0 ldd_zp WORK subd_im 8 std_zp WORK ;L_edd4 20 0c bra L_ede2 ; skip_edd6: com WORK+2 ;L_edd9 2e 07 bgt L_ede2 ;L_eddb dc e0 ldd_zp WORK addd_im 8 std_zp WORK ; ; ; L_ede2: ldab WORK+26 addb WORK+18 stab WORK+18 ;L_ede8 d0 ec subb WORK+12 bcs L_ee0c ;L_edec d7 f2 stab WORK+18 ;L_edee 96 e6 ldaa WORK+6 bge L_edff ;L_edf2 dc e0 ldd_zp WORK addd_im 1 bitb #7 bne skip_ee0a ;L_edfb d3 ea addd_zp WORK+10 bra skip_ee0a ; ; ; L_edff: ldd_zp WORK ;L_ee01 c5 07 bitb #7 bne skip_ee07 ;L_ee05 93 ea subd WORK+10 ; ; ; skip_ee07: subd_im 1 ; ; ; skip_ee0a: std_zp WORK ; ; ; L_ee0c: ldaa WORK+2 ;L_ee0e de e0 ldx WORK eora 0,x staa 0,x ;L_ee14 7a 00 fc dec WORK+28 ;L_ee17 27 03 beq L_ee1c ;L_ee19 7e ed b8 jmp L_edb8 ; ; ; L_ee1c: ldd_zp_std_zp X_PLOT, WORK+20 ldd_zp_std_zp Y_PLOT, WORK+22 ;L_ee24 bd eb 0c jsr PNT_LOC ;L_ee27 dc e0 ldd_zp WORK subd DISP_BAS std_zp PLOT_POS ;L_ee2d rts ; ; ; FILL: ldab SCR_LEN ;L_ee30 86 20 ldaa_mul #32 ; multiply by 32 (= characters per line?) ;L_ee33 83 00 01 subd_im 1 std_zp WORK ;L_ee38 dc ca ldd_zp Y_PLOT subd WORK+14 ;L_ee3c 2c 03 bge L_ee41 ; if less than, clear to zero ldd_im 0 ; clear to zero ; ; ; L_ee41: addd_zp WORK+14 subd WORK ;L_ee45 2f 03 ble L_ee4a ; if greater than, ldd_im 0 ; clear to zero ; ; ; L_ee4a: addd_zp_std_zp WORK, WORK+26 ;L_ee4e 2d 3c blt L_ee8c_rts ;L_ee50 dc ca ldd_zp Y_PLOT ;L_ee52 93 ee subd WORK+14 ble skip_ee59 ; if greater than, ldd_im 0 ; clear to zero skip_ee59: addd_zp WORK+14 subd_im 0 ;L_ee5e 2c 03 bge skip_ee63 ldd_im 0 ; if less than, clear to zero skip_ee63: std_zp WORK+30 ;L_ee65 93 e0 subd WORK bgt L_ee8c_rts ;L_ee69 4f clra ;L_ee6a d6 c6 ldab SCR_WID ;L_ee6c 05 asld_thrice ; D = D/8 = number of bytes? subd_im 1 ; minus 1 std_zp WORK+10 ;L_ee74 dc c8 ldd_zp X_PLOT subd WORK+12 bge L_ee7d ldd_im 0 ; if less than, clear to zero ; ; ; L_ee7d: addd_zp WORK+12 subd WORK+10 ble skip_ee86 ldd_im 0 ; if greater than, clear to zero skip_ee86: addd_zp_std_zp WORK+10, WORK+24 ;L_ee8a 2c 01 bge L_ee8d ; L_ee8c_rts: rts ; ; ; L_ee8d: ldd_zp X_PLOT subd WORK+12 ;L_ee91 2f 03 ble L_ee96 ldd_im 0 ; if greater than, clear to zero ; ; ; L_ee96: addd_zp WORK+12 ;L_ee98 83 00 00 subd_im 0 ;L_ee9b 2c 03 bge L_eea0 ldd_im 0 ; if less than, clear to zero ; ; ; L_eea0: std_zp WORK+28 subd WORK+10 ;L_eea4 2e e6 bgt L_ee8c_rts ;L_eea6 dc ea ldd_zp WORK+10 subd_im 7 std_zp WORK+10 ;L_eead dc fc ldd_zp_std_zp WORK+28, WORK+20 ldd_zp_std_zp WORK+30, WORK+22 ;L_eeb5 bd eb 0c jsr PNT_LOC ;L_eeb8 dc e0 ldd_zp_std_zp WORK, WORK+4 ldd_zp WORK+30 lsrd lsrd std_zp WORK+6 ;L_eec2 dc fa ldd_zp WORK+26 lsrd lsrd subd WORK+6 addd_im 1 std_zp WORK+6 ;L_eecd dc fc ldd_zp WORK+28 lsrd_thrice std_zp WORK+16 ;L_eed4 dc f8 ldd_zp WORK+24 lsrd_thrice subd WORK+16 std_zp WORK+16 ;L_eedd 26 13 bne L_eef2 ;L_eedf 96 fd ldaa WORK+29 jsr L_ef45 stab WORK+16 ;L_eee6 96 f9 ldaa WORK+25 jsr L_ef57 ;L_eeeb d4 f0 andb WORK+16 ;L_eeed d7 e2 stab WORK+2 ;L_eeef 7e ef 2c jmp L_ef2c ; ; ; L_eef2: ldaa WORK+28 ;L_eef4 84 07 anda #7 ;L_eef6 91 cf cmpa MODE ;L_eef8 2d 11 blt L_ef0b ;L_eefa bd ef 45 jsr L_ef45 stab WORK+2 ;L_eeff bd ef 2c jsr L_ef2c ;L_ef02 dc fc ldd_zp WORK+28 ;L_ef04 c4 f8 andb #$f8 ;L_ef06 c3 00 08 addd_im 8 ;L_ef09 dd fc std_zp WORK+28 ; ; ; L_ef0b: ldx WORK+16 ;L_ef0d 86 ff ldaa_staa #$ff, WORK+2 ; ; ; L_ef11: pshx jsr L_ef2c pulx ;L_ef16 09 dex bne L_ef11 ;L_ef19 96 f8 ldaa WORK+24 ; %1111 1000 ;L_ef1b 84 07 anda #7 ; %0000 0111 ;L_ef1d 9b cf adda MODE ;L_ef1f 81 07 cmpa #7 ;L_ef21 2c 08 bge L_ef2b_rts ;L_ef23 bd ef 57 jsr L_ef57 ;L_ef26 d7 e2 stab WORK+2 ;L_ef28 bd ef 2c jsr L_ef2c ; ; ; L_ef2b_rts: rts ; ; ; L_ef2c: ldd_zp_std_zp WORK+4, WORK ;L_ef30 c3 00 08 addd_im 8 ;L_ef33 dd e4 std_zp WORK+4 ;L_ef35 de e6 ldx WORK+6 loop_ef37: ldaa WORK+2 ;L_ef39 3c pshx ;L_ef3a bd ef 66 jsr L_ef66 jsr L_ef71 ;L_ef40 38 pulx ;L_ef41 09 dex ;L_ef42 26 f3 bne loop_ef37 ;L_ef44 rts ; ; ; L_ef45: nega ;L_ef46 80 08 suba #bits_per_byte ;L_ef48 d6 cf ldab MODE ;L_ef4a 5a decb ;L_ef4b 53 comb ;L_ef4c d7 e3 stab WORK+3 ;L_ef4e 94 e3 anda WORK+3 ;L_ef50 5f clrb ; Loop_ef51: sec rolb deca bne Loop_ef51 ;L_ef56 rts ; ; ; L_ef57: ldab MODE ;L_ef59 5a decb ;L_ef5a 53 comb ;L_ef5b d7 e3 stab WORK+3 ;L_ef5d 94 e3 anda WORK+3 ;L_ef5f 5f clrb loop_ef60: sec ;L_ef61 56 rorb inca bne loop_ef60 rts ; ; ; L_ef66: ldab PLOT_MOD ;L_ef68 58 aslb ;L_ef69 ce eb 92 ldx #$eb92 ;L_ef6c 3a abx ;L_ef6d ee 00 ldx 0,x ;L_ef6f 6e 00 jmp 0,x ; ; ; L_ef71: ldd_zp WORK ;L_ef73 c5 07 bitb #7 ;L_ef75 26 02 bne L_ef79 ;L_ef77 93 ea subd WORK+10 ; ; ; L_ef79: subd_im 1 ;L_ef7c dd e0 std_zp WORK ;L_ef7e rts ; ; ; ARC: ldd_zp WORK+12 subd X_PLOT std_zp WORK+24 ;L_ef85 dc ee ldd_zp WORK+14 subd Y_PLOT std_zp WORK+27 ;L_ef8b c6 02 ldab #2 jsr READ ; clr WORK+26 clr WORK+29 ; Loop_ef96: ldd_zp_addd_zp_std_zp WORK+24, X_PLOT, WORK+20; WORK+20 = WORK+24 + X_PLOT ldd_zp_addd_zp_std_zp WORK+27, Y_PLOT, WORK+22; WORK+22 = WORK+27 + Y_PLOT ; jsr L_eb4d ; ldd_zp_addd_zp_std_zp WORK+27, WORK+25, WORK+25; WORK+25 += WORK+27 ;L_efab d6 f8 ldab WORK+24 ;L_efad c9 00 adcb #$0 ;L_efaf 96 fb ldaa WORK+27 ;L_efb1 48 asla ;L_efb2 c2 00 sbcb #$0 ;L_efb4 d7 f8 stab WORK+24 ;L_efb6 dc fc ldd_zp WORK+28 subd WORK+24 std_zp WORK+28 ;L_efbc d6 fb ldab WORK+27 sbcb #$0 ;L_efc0 96 f8 ldaa WORK+24 asla adcb #$0 stab WORK+27 ;L_efc7 dc f0 ldd_zp WORK+16 subd_im 1 std_zp WORK+16 ;L_efce 26 c6 bne Loop_ef96 rts ; ; ; ; Does not look like code: ; PLOT_INC: jsr GETCH ;L_efd4 16 tab ;L_efd5 58 aslb ;L_efd6 ce f0 1d ldx #$f01d ;L_efd9 3a abx ;L_efda ee 00 ldx 0,x ;L_efdc 6e 00 jmp 0,x ;L_efde 7e f0 85 jmp INC_PLOT ; ; ; INC_1: jsr X_INC jsr Y_INC jmp INC_PLOT ;L_efea bd f0 2f jsr X_INC jmp INC_PLOT ; ; ; INC_3: jsr X_INC jsr Y_DEC jmp INC_PLOT ;L_eff9 bd f0 55 jsr Y_DEC jmp INC_PLOT ; ; ; INC_5: jsr X_DEC jsr Y_DEC jmp INC_PLOT ;L_f008 bd f0 42 jsr X_DEC jmp INC_PLOT ; ; ; INC_7: jsr X_DEC jsr Y_INC ; ; ; L_f014: jmp INC_PLOT ;L_f017 bd f0 6d jsr Y_INC jmp INC_PLOT ; ; ; L_f01d: stx X_COORD,x stx WORK+1,x stx WORK+10,x stx WORK+16,x stx WORK+25,x stx WORK+31,x ;L_f029 f0 08 f0 subb $08f0 ;L_f02c 0e cli ;L_f02d f0 17 dc subb $17dc ; ; ; X_INC equ $f02f ; midway into an instruction? ; ; ;L_f030 c8 c3 eorb #$c3 ;L_f032 00 DB $00 ; 00000000 ;L_f033 04 lsrd ;L_f034 dd c8 std_zp X_PLOT ;L_f036 c5 04 bitb #$4 ;L_f038 26 07 bne L_f041 ;L_f03a dc ae ldd_zp PLOT_POS ;L_f03c c3 00 08 addd_im 8 ;L_f03f dd ae std_zp PLOT_POS ; ; ; L_f041: rts ; ; ; X_DEC: ldd_zp X_PLOT subd_im 4 std_zp X_PLOT ;L_f049 c5 04 bitb #$4 beq L_f054 ;L_f04d dc ae ldd_zp PLOT_POS subd_im 8 ;L_f052 dd ae std_zp PLOT_POS L_f054: rts ; ; ; Y_DEC: ldd_zp Y_PLOT subd_im 4 std_zp Y_PLOT ;L_f05c dc ae ldd_zp PLOT_POS addd_im 1 ;L_f061 c5 07 bitb #7 bne L_f06a ;L_f065 d3 ac addd_zp PLOT_WID subd_im 8 ; ; ; L_f06a: std_zp PLOT_POS rts ; ; ; Y_INC: ; ;Y_INC dc ca ldd_zp Y_PLOT addd_im 4 std_zp Y_PLOT ;L_f074 dc ae ldd_zp PLOT_POS bitb #7 bne L_f07f ;L_f07a 93 ac subd PLOT_WID addd_im 8 ; ; ; L_f07f: subd_im 1 std_zp PLOT_POS rts ; ; ; INC_PLOT: ldd_zp_addd_zp_std_zp PLOT_POS, DISP_BAS, WORK ;L_f08b de e0 ldx WORK ;L_f08d 86 f0 ldaa #$f0 ldab X_PLOT+1 ;L_f091 c5 04 bitb #$4 beq skip_f096 coma skip_f096: ; eora 0,x staa 0,x rts ; ; ; GSX: rts ; ; ; HEXBIN: suba #$30 blt L_f0ac ; cmpa #$17 bcc L_f0ad ; cmpa #$a bcs L_f0ab ; suba #7 rts ; ; ; L_f0ab: DB $0c ; 00001100 ; ; ; L_f0ac: rts ; ; ; L_f0ad: sec rts ; ; ; SET_REG: ; write to 6845 register staa THE_6845_REG_SEL stab THE_6845_DATA rts ; ; This is a table of data ; for initialising the 16 registers of the 6845 ; but the values do not look plausible. ; ; Perhaps table for 6845 registers? ; ; ; ; if 224 cycles in 64 us, ; 244 / 64 = 3.5 MHz ; 3.5 * 8 = 28 MHz ; ; If f_clock = 26.75 MHz, ; f_clock/8 = 3.34375 MHz, ; cycles per line = 3.34375 * 64 = 214 = D6 hex ; ; If f_clock = 27.75 MHz, (ideal PAL) ; f_clock/8 = 3.46875 MHz, ; cycles per line = 3.46875 * 64 = 222 = DE hex ; ; The manual says: ; ; Line period 64 µs ; Frame period 20 ms ; Line blanking 12 µs ; Frame blanking 24 lines ; Video bandwidth Mode 4: - 6.2 MHz ; Mode 2: - 12.3 MHz ; Mode 1: - 24.6 MHz ; ; table_f0b6: DB 16 ; number of entries in table ; db $00, 224 ; Horizontal Total: 224 bytes per line? db $01, SETWID ; Horizontal Displayed: 160 characters? db $02, 175 ; Horizontal Sync Position: at 175 db $03, $4f ; Horizontal Sync Width: db $04, 40 ; Vertical Total: 40 db $05, 8 ; Vert. Total Adjust8 db $06, SETLEN ; Vertical Displayed: 32 db $07, 37 ; Vertical Sync. Postion: 37 db $08, 16 ; Interlace mode: 16 db $09, 7 ; Max Scan Line Address: 7 db $0a, $60 ; Cursor Start: db $0b, $07 ; Cursor End: db $0c, 4 ; Start Address High: db $0d, 0 ; Start Address Low: db $0e, 4 ; Cursor MSB: db $0f, 0 ; Cursor LSB: ; These are example values for the Elektor VDU ;in 80 x 24 character mode ; reg ; 0 = $80 HORIZONTAL TOTAL - 1 = 129-1 CHAR. ; 1 = $50 HORIZONTAL DISPLAYED = 80 CHAR. ; 2 = $60 HORIZONTAL - SYNC. POSITION = 96 CHAR. ; 3 = $08 VERTICAL/HORIZONTAL. SYNC WIDTH = 16/8 ; 4 = $22 VERTICAL TOTAL -1 = 34 CHAR. LINES ; 5 = $00 VERTICAL TOTAL ADJ. = 0 * 6.4 MICRO SEC. ; 6 = $18 VERTICAL DISPLAYED = 24 LINES ; 7 = $1C VERTICAL SYNC. POSITION = 29 CHAR. LINES ; 8 = $00 MODE CONTROL ; 9 = $08 SCAN LINES - 1 = 9 - 1 ; a = $00 CURSOR START ; b = $09 CURSOR END ; c = $00 DISPLAY START (NOT NEEDED) ; d = $00 ; e = $00 CURSOR POSITION (NOT NEEDED) ; f = $00 ; = $50 CHARACTERS/LINE ; = $18 LINES/SCREEN ; ; ESC_0_rts: ESC_1_rts: ESC_2_rts: ESC_3_rts: ESC_4_rts: ESC_5_rts: ESC_6_rts: ESC_7_rts: ESC_8_rts: ESC_9_rts: ESC_10_rts: ESC_11_rts: ESC_12_rts: ESC_13_rts: ESC_14_rts: ESC_15_rts: ESC_16_rts: ESC_17_rts: ESC_18_rts: ESC_19_rts: ESC_20_rts: ESC_21_rts: ESC_22_rts: ESC_23_rts: ESC_24_rts: ESC_25_rts: ESC_26_rts: ESC_27_rts: ESC_28_rts: ESC_29_rts: ESC_30_rts: ESC_31_rts: ESC_32_rts: ESC_33_rts: ESC_34_rts: ESC_35_rts: rts ; ; ; ESC_36_set_GRAPH_ON: ldaa_staa #$ff, GRAPH_ON rts ; ; ; ESC_37_clr_GRAPH_ON: clr GRAPH_ON rts ; ; ; ESC_38_Set_palette_colour: sei ;L_f0e2 96 cf ldaa MODE cmpa #$2 ble L_f102 ;L_f0e8 c6 10 ldab #$10 ;L_f0ea bd e8 29 jsr READ ;L_f0ed ce 00 f0 ldx #$f0 stx WORK+2 ;L_f0f2 ce 18 70 ldx_stx #PALT_TBL, WORK ;L_f0f7 cc 00 10 ldd_im $10 ;L_f0fa bd e2 71 jsr UMOVE ;L_f0fd 86 ff ldaa_staa #$ff, PALT_FLG ;L_f101 rts ; ; ; L_f102: ldab #4 ;L_f104 bd e8 29 jsr READ ;L_f107 dc f0 ldd_zp WORK+16 ldx WORK+18 ;L_f10b fd 18 70 std PALT_TBL stx PALT_TBL+2 std PALT_TBL+4 stx PALT_TBL+6 std PALT_TBL+8 stx PALT_TBL+10 std PALT_TBL+12 stx PALT_TBL+14 ;L_f123 86 ff ldaa_staa #$ff, PALT_FLG ;L_f127 rts ; ; ; ESC_39_Set_whole_palette: sei ;L_f129 c6 02 ldab #$2 ; ; ; L_f12b: jsr READ ;L_f12e ce 18 70 ldx #PALT_TBL ;L_f131 d6 f0 ldab WORK+16 ; ; ; L_f133: andb #$f ;L_f135 3a abx ;L_f136 d6 f1 ldab WORK+17 stab 0,x ;L_f13a 96 cf ldaa MODE cmpa #2 bgt L_f146 ;L_f140 e7 04 stab 4,x ;L_f142 e7 08 stab 8,x ;L_f144 e7 0c stab Output_Compare_Register_low_byte,x ; ; ; L_f146: ldaa_staa #$ff, PALT_FLG ;L_f14a 0e cli rts ; ; ; ESC_40_Half_intensity_off: ldaa #1 ;L_f14e bd f4 08 jsr_staa L_f408, CHAR_COL rts ; ; ; ESC_41_Half_intensity_on: ldab MODE ldaa #1 ; ; ; Loop_f158: asla decb bne Loop_f158 ; deca bne skip_f160 inca skip_f160: jsr_staa L_f408, CHAR_COL rts ; ; ; ESC_42_Scroll_block_left: jmp L_e6e5 ; ; ; ESC_43_Scroll_block_right: jmp L_e713 ; ; ; ESC_44_rts: ESC_45_rts: rts ; ; ; ESC_46_Set_cursor_style: jsr GETCH ;L_f170 5f clrb suba #$30 bne L_f17c ;L_f175 36 psha ;L_f176 bd e4 3a jsr L_e43a ;L_f179 c6 ff ldab #$ff ;L_f17b 32 pula ; ; ; L_f17c: stab CUR_OFF ;L_f17e 5f clrb ;L_f17f 81 01 cmpa #1 bne skip_f185 ldab #$40 skip_f185: stab CUR_CNT rts ; ; ; ESC_47_rts: ESC_48_rts: ESC_49_rts: ESC_50_rts: ESC_51_rts: ESC_52_rts: ESC_53_rts: ESC_54_rts: ESC_55_rts: ESC_56_rts: ESC_57_rts: ESC_58_rts: ESC_59_rts: ESC_60_rts: rts ; ; ; ESC_61_Move_cursor: jsr GETCH suba_staa #$20, Y_COORD ;L_f190 bd e2 98 jsr GETCH suba_staa #$20, X_COORD ;L_f197 7e e4 17 jmp CURSOR ; ; ; ESC_62_rts: rts ; ; ; ESC_63_Read_text_cursor_position: ldaa X_COORD ;L_f19d 8b 20 adda #$20 ;L_f19f bd e3 32 jsr PUTIT ;L_f1a2 96 df ldaa Y_COORD adda #$20 jmp PUTIT ; ; ; ESC_64_Write_a_byte_to_memory_or_device: jmp L_ea5b ; ; ; ESC_65_Load_data_into_memory: jmp L_e869 ; ; ; ESC_66_Read_data_from_6803_memory: jmp L_e880 ; ; ; ESC_67_Scroll_left_one_raster: jmp LEFSCR ; ; ; ESC_68_Scroll_right_one_raster: jmp RIGSCR ; ; ; ESC_69_Insert_line: jmp LINE_INS ; ; ; ESC_70: ldaa_staa #$ff, CTRL_ON rts ESC_71_Set_printing_style: jsr GETCH ;L_f1c3 16 tab ;L_f1c4 c4 01 andb #mask_bit_0_set ;L_f1c6 27 02 beq L_f1ca ;L_f1c8 c6 ff ldab #$ff ; ; ; L_f1ca: stab INVIS_ON ;L_f1cc 16 tab ;L_f1cd c4 02 andb #mask_bit_1_set beq skip_f1d3 ldab #$ff skip_f1d3: stab FLASH_ON ;L_f1d5 16 tab andb #%00000011 beq skip_f1dc ; ; ; L_f1da: ldab #$ff ; ; ; skip_f1dc: stab RVRSE_ON ;L_f1de 16 tab andb #mask_bit_2_set beq L_f1e5 ldab #$ff ; ; ; L_f1e5: stab UDLIN_ON rts ; ; ; ESC_81_Insert_character: jmp CHAR_INS ; ; ; ESC_82_Delete_line: jmp LINE_DEL ; ; ; ESC_83_Graphics_functions: jmp Graphics_functions ; ; ; ESC_84_Erase_to_end_of_line: jmp DEL_RITE ESC_85_rts: rts ; ; ; ESC_86_Display_test_pattern: ldx_stx #L_f1ff, SUB_PTR ;L_f1fa 86 65 ldaa_staa #$65, SUB_CNT rts ; ; ; L_f1ff: DW $1b63 ;L_f200 DW $1b65 ;L_f203 DB 8 ;L_f204 DB LF DB LF DB LF DB LF DB LF DB LF DB LF DB LF DB LF ; ;L_f20d DB SP,SP,SP,SP,SP ; five spaces ; ;L_f212 DB "Arcom SGT1" DB CR, LF, LF, LF ; ;L_f220 DB SP,SP,SP ; 3 spaces DB "Graphics Board" DB CR, LF, LF ; ;F234: DB $1B, $65, $04, $1B ; d....e.. ;F238: DB $5F, $05, SP, SP, SP, SP, SP, SP ; _. ;F240: DB "Firmware Version", SP DB VERS+"0" DB ". Issue", SP DB ISSUE+"0" DB ".", CR, LF ;F25E: ; ; This is probably data: ; org $f25e ;L_f25e ;DB 0x65,0x20,0x33,0x2E,0x0D,0x0A DB 0x1E,0x1B DB 0x5E,0xF2,0x64,0x85,0x1B,0x6D,0x01,0x1B DB 0x53,0x02,0x03,0xC0,0x00,0x00,0x1B,0x53 DB 0x0D,0x00,0xA0,0x00,0xA0,0x1B,0x6D,0x02 DB 0x1B,0x53,0x03,0xFF,0x60,0x00,0x00,0x1B DB 0x53,0x0D,0x00,0xA0,0x00,0xA0,0x1B,0x6D DB 0x03,0x1B,0x53,0x03,0xFF,0x60,0x00,0x00 DB 0x1B,0x53,0x0D,0x00,0xA0,0x00,0xA0,0x1B DB 0x6D,0x04,0x1B,0x53,0x03,0xFF,0x60,0x00 DB 0x00,0x1B,0x53,0x0D,0x00,0xA0,0x00,0xA0 ; F2A8 DB 0x1B,0x6D,0x05,0x1B,0x53,0x03,0xFF,0x60 DB 0x00,0x00,0x1B,0x53,0x0D,0x00,0xA0,0x00 DB 0xA0,0x1B,0x6D,0x06,0x1B,0x53,0x03,0xFF DB 0x60,0x00,0x00,0x1B,0x53,0x0D,0x00,0xA0 DB 0x00,0xA0,0x1B,0x6D,0x07,0x1B,0x53,0x02 DB 0x00,0x08,0x00,0x00,0x1B,0x53,0x0D,0x00 DB 0x9C,0x00,0xA0,0x1B,0x58,0x1B,0x53,0x02 DB 0x00,0x00,0x00,0x00,0x1B,0x63,0x1B,0x5F ; F2E8 DB 0x0F ; ; ; ESC_87_Delete_character: jmp CHAR_DEL ; ; ; ESC_88_Wait_for_read_operation: clra jmp PUTIT ; ; ; ESC_89_Erase_to_end_of_page: jmp PAGE_DEL ; ; ; ESC_90_Step_graphics_cursor: jmp PLOT_INC ; ; ; ESC_91_Set_cursor_row_address: jsr GETCH suba_staa #$20, Y_COORD jmp CURSOR ; ; ; ESC_92_Read_a_byte_from_memory_or_device: jmp L_ea67 ; ; ; ESC_93_Set_cursor_column_address: jsr GETCH suba_staa #$20, X_COORD jmp CURSOR ; ; ; ESC_94_Submit_command_sequence: L_f30d: jmp L_e744 ; ; ; ESC_95_Set_printing_colour: L_f310: jsr GETCH jsr_staa L_f408, CHAR_COL rts ; ; ; ESC_96_Set_background_colour: jsr GETCH jsr_staa L_f408, CHAR_BAC rts ; ; ; ESC_97_Read_graphics_cursor_position: ldaa_jsr X_PLOT, PUTIT ldaa_jsr X_PLOT+1, PUTIT ldaa_jsr Y_PLOT, PUTIT ldaa_jmp Y_PLOT+1, PUTIT ; ; ; ESC_98_rts: rts ; ; ; ESC_99_Clear_Screen: jmp ERA_SCR ; ; ; ESC_100_rts: rts ; ; ; ESC_101_Set_colour_mode: jsr L_e43a jsr GETCH ;L_f341 97 cf staa MODE ; ; ; L_f343: cmpa #1 bgt skip_f348 inca skip_f348: ; ldaa PORT1 ; ldab_stab MODE, CHAR_MOD ; cmpb #2 bgt L_f35d ; anda #$bf cmpb #1 bgt L_f35f ; inc CHAR_MOD bra L_f35f ; ; ; L_f35d: oraa #$40 ; ; ; L_f35f: staa PORT1 staa Port_1_Data_Register ;L_f363 96 c6 ldaa SCR_WID ldab CHAR_MOD ;L_f367 54 lsrb ; ; ; L_f368: lsrd bcc L_f368 ;L_f36b 97 c2 staa CHAR_WID ;L_f36d 7e e4 17 jmp CURSOR ; ; ; ESC_102_Write_to_status_line: jmp L_e49b ; ; ; ESC_103_Status_line_on: jmp L_e47d ; ; ; ESC_104_Set_a_6845_register: ldab_jsr #2, READ ldaa WORK+16 ldab WORK+17 jmp SET_REG; ; ; ; ESC_105: ldab #$10 rts ; ; ; ESC_106_Set_up_screen_size: ldab_jsr #2, READ ldab_stab WORK+16, SCR_WID ldaa_jsr #1, SET_REG; ldab_stab WORK+17, SCR_LEN ldaa_jsr #6, SET_REG; ; ldaa_mul SCR_WID asld_thrice addd_zp_std_zp DISP_BAS, SCR_END std_zp TEX_END ;L_f3a8 7f 00 b2 clr STLI_ON ;L_f3ab d6 c5 ldab SCR_LEN ldaa_mul #bits_per_byte std_zp PLOT_LEN ;L_f3b2 d6 c6 ldab SCR_WID ldaa_mul #bits_per_byte std_zp PLOT_WID ;L_f3b9 dc c8 ldd_zp_std_zp X_PLOT, WORK+20 ldd_zp_std_zp Y_PLOT, WORK+22 ;L_f3c1 bd eb 0c jsr PNT_LOC ;L_f3c4 dc e0 ldd_zp_std_zp WORK, PLOT_POS ;L_f3c8 96 cf ldaa_jmp MODE, L_f343 ; ; ; ESC_107_Set_display_base_address: ldab #$2 ;L_f3cf bd e8 29 jsr READ ;L_f3d2 dc f0 ldd_zp WORK+16 subd DISP_BAS std_zp WORK ;L_f3d8 d3 c3 addd_zp_std_zp SCR_END, SCR_END ;L_f3dc dc e0 ldd_zp_addd_zp_std_zp WORK, TEX_END, TEX_END ;L_f3e2 dc f0 ldd_zp_std_zp WORK+16, DISP_BAS ;L_f3e6 04 lsrd_thrice psha ldaa_jsr #$d, SET_REG; pulb ldaa_jmp #$c, SET_REG; ; ; ; ESC_108_Read_display_base_address: ldaa_jsr DISP_BAS, PUTIT ldaa_jmp DISP_BAS+1, PUTIT ; ; ; ESC_109_Set_graphics_drawing_colour: jsr GETCH jsr_staa L_f408, PLOT_COL rts ; ; ; L_f408: staa WORK+2 ldab MODE ldaa #1 ; Loop_f40e: asla decb bne Loop_f40e ;L_f412 97 e1 staa WORK+1 ldab MODE ldaa #bits_per_byte ; Loop_f418: lsrd bcc Loop_f418 ;L_f41b 05 asld deca staa WORK ldab WORK+2 ; Loop_f421: ldaa_mul WORK+1 orab WORK+2 ;L_f426 7a 00 e0 dec WORK bne Loop_f421 ;L_f42b 17 tba rts ; ; ; ESC_110_rts: ESC_111_rts: rts ; ; ; ESC_112_rts: ESC_113_rts: ESC_114_rts: ESC_115_rts: ESC_116_rts: ESC_117_rts: ESC_118_rts: ESC_119_rts: ESC_120_rts: ESC_121_rts: ESC_122_rts: rts ; ; ; ESC_123_rts: rts ; ; ; ESC_124_Set_graphics_plotting_mode: jsr GETCH staa PLOT_MOD rts ; ; ; ESC_125_Status_line_off: jmp L_e45f ; ; ; ESC_126_Receive_command_sequence: jmp L_e2de ; ; ; ESC_127_Warm_start: jmp START ; ; ; CTRL_0_to_7_rts: rts ; ; ; CTRL_8_BACKSPACE: jmp CUR_LEFT ; ; ; CTRL_9_TAB: jmp TAB ; ; ; CTRL_10_LINEFEED: jmp LINEFEED ; ; ; CTRL_11_CURSOR_UP: jmp CUR_UP ; ; ; CTRL_12_CURSOR_RIGHT: jmp CUR_RITE ; ; ; CTRL_13_CARRIAGE_RETURN: jmp RETURN ; ; ; CTRL_14_rts: CTRL_15_rts: rts ; ; ; CTRL_16_CURSOR_DOWN: jmp CUR_DOWN ; ; ; CTRL_17_rts: CTRL_18_rts: CTRL_19_rts: CTRL_20_rts: CTRL_21_rts: CTRL_22_rts: CTRL_23_rts: CTRL_24_rts: CTRL_25_rts: CTRL_26_rts: rts ; ; ; CTRL_27_ESCAPE: jmp ESCAPE ; ; ; CTRL_28_rts: CTRL_29_rts: rts ; ; ; CTRL_30_HOME: jmp HOME ; ; ; CTRL_31_NEWLINE: jmp NEWLINE ; ; Some kind of jump table? ; 160 entries.. ; CTRL_TBL_defaults: ; $F461 64 bytes = 32 words ; L_F461: DW CTRL_0_to_7_rts, CTRL_0_to_7_rts DW CTRL_0_to_7_rts, CTRL_0_to_7_rts DW CTRL_0_to_7_rts, CTRL_0_to_7_rts DW CTRL_0_to_7_rts, CTRL_0_to_7_rts ; L_F471: DW CTRL_8_BACKSPACE ; CTRL H ( 8 ) Backspace DW CTRL_9_TAB ; CTRL I ( 9 ) Tab DW CTRL_10_LINEFEED ; CTRL J ( 10 ) Linefeed DW CTRL_11_CURSOR_UP ; CTRL K ( 11 ) Cursor up DW CTRL_12_CURSOR_RIGHT ; CTRL L ( 12 ) Cursor right DW CTRL_13_CARRIAGE_RETURN ; CTRL M ( 13 ) Carriage return ; DW CTRL_14_rts, CTRL_15_rts .if VERS = 1 .if ISSUE = 3 DW CTRL_15_rts DW CTRL_15_rts DW CTRL_15_rts DW CTRL_15_rts DW CTRL_15_rts DW CTRL_15_rts DW CTRL_16_CURSOR_DOWN ; CTRL P ( 16 ) Cursor down endif .else DW CTRL_16_CURSOR_DOWN ; CTRL P ( 16 ) Cursor down DW CTRL_17_rts DW CTRL_18_rts DW CTRL_19_rts DW CTRL_20_rts DW CTRL_21_rts DW CTRL_22_rts .endif ; DW CTRL_23_rts DW CTRL_24_rts DW CTRL_25_rts DW CTRL_26_rts ; DW CTRL_27_ESCAPE ; DW CTRL_28_rts DW CTRL_29_rts ; DW CTRL_30_HOME ; CTRL ¾ ( 30 ) Cursor home DW CTRL_31_NEWLINE ; CTRL _ ( 31 ) Newline ESC_TBL_defaults: ; $F4A1 64 bytes = 32 words DW ESC_0_rts, ESC_1_rts, ESC_2_rts, ESC_3_rts DW ESC_4_rts, ESC_5_rts, ESC_6_rts, ESC_7_rts DW ESC_8_rts, ESC_9_rts, ESC_10_rts, ESC_11_rts DW ESC_12_rts, ESC_13_rts, ESC_14_rts, ESC_15_rts DW ESC_16_rts, ESC_17_rts, ESC_18_rts, ESC_19_rts DW ESC_20_rts, ESC_21_rts, ESC_22_rts, ESC_23_rts DW ESC_24_rts, ESC_25_rts, ESC_26_rts, ESC_27_rts DW ESC_28_rts, ESC_29_rts, ESC_30_rts, ESC_31_rts DW ESC_32_rts, ESC_33_rts, ESC_34_rts, ESC_35_rts ; escape 36 DW ESC_36_set_GRAPH_ON ; for DW ESC_37_clr_GRAPH_ON DW ESC_38_Set_palette_colour DW ESC_39_Set_whole_palette ;L_F4F1: DW ESC_40_Half_intensity_off DW ESC_41_Half_intensity_on DW ESC_42_Scroll_block_left DW ESC_43_Scroll_block_right DW ESC_44_rts DW ESC_45_rts DW ESC_46_Set_cursor_style DW ESC_47_rts ;L_F501: DW ESC_48_rts, ESC_49_rts, ESC_50_rts, ESC_51_rts DW ESC_52_rts, ESC_53_rts, ESC_54_rts, ESC_55_rts DW ESC_56_rts, ESC_57_rts, ESC_58_rts, ESC_59_rts DW ESC_60_rts ; DW ESC_61_Move_cursor DW ESC_62_rts DW ESC_63_Read_text_cursor_position L_F521: DW ESC_64_Write_a_byte_to_memory_or_device DW ESC_65_Load_data_into_memory DW ESC_66_Read_data_from_6803_memory DW ESC_67_Scroll_left_one_raster DW ESC_68_Scroll_right_one_raster DW ESC_69_Insert_line DW ESC_70 DW ESC_71_Set_printing_style ;L_F531: DW ESC_81_Insert_character, ESC_81_Insert_character DW ESC_81_Insert_character, ESC_81_Insert_character ; 72-81 DW ESC_81_Insert_character, ESC_81_Insert_character DW ESC_81_Insert_character, ESC_81_Insert_character DW ESC_81_Insert_character, ESC_81_Insert_character ;L_F543: DW ESC_82_Delete_line DW ESC_83_Graphics_functions DW ESC_84_Erase_to_end_of_line DW ESC_85_rts DW ESC_86_Display_test_pattern DW ESC_87_Delete_character ;L_F551: DW ESC_88_Wait_for_read_operation DW ESC_89_Erase_to_end_of_page DW ESC_90_Step_graphics_cursor DW ESC_91_Set_cursor_row_address DW ESC_92_Read_a_byte_from_memory_or_device DW ESC_93_Set_cursor_column_address DW ESC_94_Submit_command_sequence DW ESC_95_Set_printing_colour ;L_F561: DW ESC_96_Set_background_colour DW ESC_97_Read_graphics_cursor_position DW ESC_98_rts DW ESC_99_Clear_Screen DW ESC_100_rts DW ESC_101_Set_colour_mode DW ESC_102_Write_to_status_line DW ESC_103_Status_line_on ;L_F571: DW ESC_104_Set_a_6845_register DW ESC_105 DW ESC_106_Set_up_screen_size DW ESC_107_Set_display_base_address DW ESC_108_Read_display_base_address DW ESC_109_Set_graphics_drawing_colour DW ESC_110_rts DW ESC_111_rts ;L_F581: DW ESC_112_rts, ESC_113_rts, ESC_114_rts, ESC_115_rts DW ESC_116_rts, ESC_117_rts, ESC_118_rts, ESC_119_rts DW ESC_120_rts, ESC_121_rts, ESC_122_rts, ESC_123_rts ;L_F595: DW ESC_124_Set_graphics_plotting_mode DW ESC_125_Status_line_off DW ESC_126_Receive_command_sequence DW ESC_127_Warm_start ; ; ESC_TBL EQU $1900 $F421 256 bytes = 128 words CHAR_TBL_defaults: ; EQU $1a00 1024 bytes = 128 characters * 8 bytes per character ; ; L_F5A1: ; Font ROM - first 32 characters are control codes ; DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ; space character ;; ;; Start of font bitmaps ; ; ; L_F6A8: DB %00000000 ; ........ $00 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00000000 ; ........ $00 DB %00011000 ; ...##... $18 L_F6B0: DB %00000000 ; ........ $00 ; ; ; DB %01101100 ; .##.##.. $6C DB %01101100 ; .##.##.. $6C DB %01101100 ; .##.##.. $6C DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 L_F6B8: DB %00000000 ; ........ $00 ; ; ; DB %00110110 ; ..##.##. $36 DB %00110110 ; ..##.##. $36 DB %01111111 ; .####### $7F DB %00110110 ; ..##.##. $36 DB %01111111 ; .####### $7F DB %00110110 ; ..##.##. $36 DB %00110110 ; ..##.##. $36 L_F6C0: DB %00000000 ; ........ $00 ; ; ; DB %00001100 ; ....##.. $0C DB %00111111 ; ..###### $3F DB %01101000 ; .##.#... $68 DB %00111110 ; ..#####. $3E DB %00001011 ; ....#.## $0B DB %01111110 ; .######. $7E DB %00011000 ; ...##... $18 L_F6C8: DB %00000000 ; ........ $00 ; ; ; DB %01100000 ; .##..... $60 DB %01100110 ; .##..##. $66 DB %00001100 ; ....##.. $0C DB %00011000 ; ...##... $18 DB %00110000 ; ..##.... $30 DB %01100110 ; .##..##. $66 DB %00000110 ; .....##. $06 L_F6D0: DB %00000000 ; ........ $00 ; ; ; DB %00111000 ; ..###... $38 DB %01101100 ; .##.##.. $6C DB %01101100 ; .##.##.. $6C DB %00111000 ; ..###... $38 DB %01101101 ; .##.##.# $6D DB %01100110 ; .##..##. $66 DB %00111011 ; ..###.## $3B L_F6D8: DB %00000000 ; ........ $00 ; ; ; DB %00001100 ; ....##.. $0C DB %00011000 ; ...##... $18 DB %00110000 ; ..##.... $30 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 L_F6E0: DB %00000000 ; ........ $00 ; ; ; DB %00001100 ; ....##.. $0C DB %00011000 ; ...##... $18 DB %00110000 ; ..##.... $30 DB %00110000 ; ..##.... $30 DB %00110000 ; ..##.... $30 DB %00011000 ; ...##... $18 DB %00001100 ; ....##.. $0C L_F6E8: DB %00000000 ; ........ $00 ; ; ; DB %00110000 ; ..##.... $30 DB %00011000 ; ...##... $18 DB %00001100 ; ....##.. $0C DB %00001100 ; ....##.. $0C DB %00001100 ; ....##.. $0C DB %00011000 ; ...##... $18 DB %00110000 ; ..##.... $30 L_F6F0: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00011000 ; ...##... $18 DB %01111110 ; .######. $7E DB %00111100 ; ..####.. $3C DB %01111110 ; .######. $7E DB %00011000 ; ...##... $18 DB %00000000 ; ........ $00 L_F6F8: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %01111110 ; .######. $7E DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00000000 ; ........ $00 L_F700: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 L_F708: DB %00110000 ; ..##.... $30 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %01111110 ; .######. $7E DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 L_F710: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 L_F718: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000110 ; .....##. $06 DB %00001100 ; ....##.. $0C DB %00011000 ; ...##... $18 DB %00110000 ; ..##.... $30 DB %01100000 ; .##..... $60 DB %00000000 ; ........ $00 L_F720: DB %00000000 ; ........ $00 ; ; ; DB %00111100 ; ..####.. $3C DB %01100110 ; .##..##. $66 DB %01101110 ; .##.###. $6E DB %01111110 ; .######. $7E DB %01110110 ; .###.##. $76 DB %01100110 ; .##..##. $66 DB %00111100 ; ..####.. $3C L_F728: DB %00000000 ; ........ $00 DB %00011000 ; ...##... $18 DB %00111000 ; ..###... $38 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %01111110 ; .######. $7E L_F730: DB %00000000 ; ........ $00 ; ; ; DB %00111100 ; ..####.. $3C DB %01100110 ; .##..##. $66 DB %00000110 ; .....##. $06 DB %00001100 ; ....##.. $0C DB %00011000 ; ...##... $18 DB %00110000 ; ..##.... $30 DB %01111110 ; .######. $7E L_F738: DB %00000000 ; ........ $00 ; ; ; DB %00111100 ; ..####.. $3C DB %01100110 ; .##..##. $66 DB %00000110 ; .....##. $06 DB %00011100 ; ...###.. $1C DB %00000110 ; .....##. $06 DB %01100110 ; .##..##. $66 DB %00111100 ; ..####.. $3C L_F740: DB %00000000 ; ........ $00 ; ; ; DB %00001100 ; ....##.. $0C DB %00011100 ; ...###.. $1C DB %00111100 ; ..####.. $3C DB %01101100 ; .##.##.. $6C DB %01111110 ; .######. $7E DB %00001100 ; ....##.. $0C DB %00001100 ; ....##.. $0C L_F748: DB %00000000 ; ........ $00 ; ; ; DB %01111110 ; .######. $7E DB %01100000 ; .##..... $60 DB %01111100 ; .#####.. $7C DB %00000110 ; .....##. $06 DB %00000110 ; .....##. $06 DB %01100110 ; .##..##. $66 DB %00111100 ; ..####.. $3C L_F750: DB %00000000 ; ........ $00 ; ; ; DB %00011100 ; ...###.. $1C DB %00110000 ; ..##.... $30 DB %01100000 ; .##..... $60 DB %01111100 ; .#####.. $7C DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %00111100 ; ..####.. $3C L_F758: DB %00000000 ; ........ $00 ; ; ; DB %01111110 ; .######. $7E DB %00000110 ; .....##. $06 DB %00001100 ; ....##.. $0C DB %00011000 ; ...##... $18 DB %00110000 ; ..##.... $30 DB %00110000 ; ..##.... $30 DB %00110000 ; ..##.... $30 L_F760: DB %00000000 ; ........ $00 ; ; ; DB %00111100 ; ..####.. $3C DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %00111100 ; ..####.. $3C DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %00111100 ; ..####.. $3C L_F768: DB %00000000 ; ........ $00 ; ; ; DB %00111100 ; ..####.. $3C DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %00111110 ; ..#####. $3E DB %00000110 ; .....##. $06 DB %00001100 ; ....##.. $0C DB %00111000 ; ..###... $38 L_F770: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00000000 ; ........ $00 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 L_F778: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00000000 ; ........ $00 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 L_F780: DB %00110000 ; ..##.... $30 ; ; ; DB %00001100 ; ....##.. $0C DB %00011000 ; ...##... $18 DB %00110000 ; ..##.... $30 DB %01100000 ; .##..... $60 DB %00110000 ; ..##.... $30 DB %00011000 ; ...##... $18 DB %00001100 ; ....##.. $0C L_F788: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %01111110 ; .######. $7E DB %00000000 ; ........ $00 DB %01111110 ; .######. $7E DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 L_F790: DB %00000000 ; ........ $00 ; ; ; DB %00110000 ; ..##.... $30 DB %00011000 ; ...##... $18 DB %00001100 ; ....##.. $0C DB %00000110 ; .....##. $06 DB %00001100 ; ....##.. $0C DB %00011000 ; ...##... $18 DB %00110000 ; ..##.... $30 L_F798: DB %00000000 ; ........ $00 ; ; ; DB %00111100 ; ..####.. $3C DB %01100110 ; .##..##. $66 DB %00001100 ; ....##.. $0C DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00000000 ; ........ $00 DB %00011000 ; ...##... $18 L_F7A0: DB %00000000 ; ........ $00 ; ; ; DB %00111100 ; ..####.. $3C DB %01100110 ; .##..##. $66 DB %01101110 ; .##.###. $6E DB %01101010 ; .##.#.#. $6A DB %01101110 ; .##.###. $6E DB %01100000 ; .##..... $60 DB %00111100 ; ..####.. $3C L_F7A8: DB %00000000 ; ........ $00 ; ; ; DB %00111100 ; ..####.. $3C DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01111110 ; .######. $7E DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 L_F7B0: DB %00000000 ; ........ $00 ; ; ; DB %01111100 ; .#####.. $7C DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01111100 ; .#####.. $7C DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01111100 ; .#####.. $7C L_F7B8: DB %00000000 ; ........ $00 ; ; ; DB %00111100 ; ..####.. $3C DB %01100110 ; .##..##. $66 DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 DB %01100110 ; .##..##. $66 DB %00111100 ; ..####.. $3C L_F7C0: DB %00000000 ; ........ $00 ; ; ; DB %01111000 ; .####... $78 DB %01101100 ; .##.##.. $6C DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01101100 ; .##.##.. $6C DB %01111000 ; .####... $78 L_F7C8: DB %00000000 ; ........ $00 ; ; ; DB %01111110 ; .######. $7E DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 DB %01111100 ; .#####.. $7C DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 DB %01111110 ; .######. $7E L_F7D0: DB %00000000 ; ........ $00 ; ; ; DB %01111110 ; .######. $7E DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 DB %01111100 ; .#####.. $7C DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 L_F7D8: DB %00000000 ; ........ $00 ; ; ; DB %00111100 ; ..####.. $3C DB %01100110 ; .##..##. $66 DB %01100000 ; .##..... $60 DB %01101110 ; .##.###. $6E DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %00111100 ; ..####.. $3C L_F7E0: DB %00000000 ; ........ $00 ; ; ; DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01111110 ; .######. $7E DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 L_F7E8: DB %00000000 ; ........ $00 ; ; ; DB %01111110 ; .######. $7E DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %01111110 ; .######. $7E L_F7F0: DB %00000000 ; ........ $00 ; ; ; DB %00111110 ; ..#####. $3E DB %00001100 ; ....##.. $0C DB %00001100 ; ....##.. $0C DB %00001100 ; ....##.. $0C DB %00001100 ; ....##.. $0C DB %01101100 ; .##.##.. $6C DB %00111000 ; ..###... $38 L_F7F8: DB %00000000 ; ........ $00 DB %01100110 ; .##..##. $66 DB %01101100 ; .##.##.. $6C DB %01111000 ; .####... $78 DB %01110000 ; .###.... $70 DB %01111000 ; .####... $78 DB %01101100 ; .##.##.. $6C DB %01100110 ; .##..##. $66 L_F800: DB %00000000 ; ........ $00 ; ; ; DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 DB %01111110 ; .######. $7E L_F808: DB %00000000 ; ........ $00 ; ; ; DB %01100011 ; .##...## $63 DB %01110111 ; .###.### $77 DB %01111111 ; .####### $7F DB %01101011 ; .##.#.## $6B DB %01101011 ; .##.#.## $6B DB %01100011 ; .##...## $63 DB %01100011 ; .##...## $63 L_F810: DB %00000000 ; ........ $00 ; ; ; DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01110110 ; .###.##. $76 DB %01111110 ; .######. $7E DB %01101110 ; .##.###. $6E DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 L_F818: DB %00000000 ; ........ $00 ; ; ; DB %00111100 ; ..####.. $3C DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %00111100 ; ..####.. $3C L_F820: DB %00000000 ; ........ $00 ; ; ; DB %01111100 ; .#####.. $7C DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01111100 ; .#####.. $7C DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 L_F828: DB %00000000 ; ........ $00 ; ; ; DB %00111100 ; ..####.. $3C DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01101010 ; .##.#.#. $6A DB %01101100 ; .##.##.. $6C DB %00110110 ; ..##.##. $36 L_F830: DB %00000000 ; ........ $00 ; ; ; DB %01111100 ; .#####.. $7C DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01111100 ; .#####.. $7C DB %01101100 ; .##.##.. $6C DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 L_F838: DB %00000000 ; ........ $00 ; ; ; DB %00111100 ; ..####.. $3C DB %01100110 ; .##..##. $66 DB %01100000 ; .##..... $60 DB %00111100 ; ..####.. $3C DB %00000110 ; .....##. $06 DB %01100110 ; .##..##. $66 DB %00111100 ; ..####.. $3C L_F840: DB %00000000 ; ........ $00 ; ; ; DB %01111110 ; .######. $7E DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 L_F848: DB %00000000 ; ........ $00 ; ; ; DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %00111100 ; ..####.. $3C L_F850: DB %00000000 ; ........ $00 ; ; ; DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %00111100 ; ..####.. $3C DB %00011000 ; ...##... $18 L_F858: DB %00000000 ; ........ $00 ; ; ; DB %01100011 ; .##...## $63 DB %01100011 ; .##...## $63 DB %01101011 ; .##.#.## $6B DB %01101011 ; .##.#.## $6B DB %01111111 ; .####### $7F DB %01110111 ; .###.### $77 DB %01100011 ; .##...## $63 L_F860: DB %00000000 ; ........ $00 ; ; ; DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %00111100 ; ..####.. $3C DB %00011000 ; ...##... $18 DB %00111100 ; ..####.. $3C DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 L_F868: DB %00000000 ; ........ $00 ; ; ; DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %00111100 ; ..####.. $3C DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 L_F870: DB %00000000 ; ........ $00 ; ; ; DB %01111110 ; .######. $7E DB %00000110 ; .....##. $06 DB %00001100 ; ....##.. $0C DB %00011000 ; ...##... $18 DB %00110000 ; ..##.... $30 DB %01100000 ; .##..... $60 DB %01111110 ; .######. $7E L_F878: DB %00000000 ; ........ $00 ; ; ; DB %01111100 ; .#####.. $7C DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 DB %01111100 ; .#####.. $7C L_F880: DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %01100000 ; .##..... $60 DB %00110000 ; ..##.... $30 DB %00011000 ; ...##... $18 DB %00001100 ; ....##.. $0C DB %00000110 ; .....##. $06 DB %00000000 ; ........ $00 L_F888: DB %00000000 ; ........ $00 ; ; ; DB %00111110 ; ..#####. $3E DB %00000110 ; .....##. $06 DB %00000110 ; .....##. $06 DB %00000110 ; .....##. $06 DB %00000110 ; .....##. $06 DB %00000110 ; .....##. $06 DB %00111110 ; ..#####. $3E L_F890: DB %00000000 ; ........ $00 ; ; ; DB %00011000 ; ...##... $18 DB %00111100 ; ..####.. $3C DB %01100110 ; .##..##. $66 DB %01000010 ; .#....#. $42 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 L_F898: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 L_F8A0: DB %11111111 ; ######## $FF ; ; ; DB %00011100 ; ...###.. $1C DB %00110110 ; ..##.##. $36 DB %00110000 ; ..##.... $30 DB %01111100 ; .#####.. $7C DB %00110000 ; ..##.... $30 DB %00110000 ; ..##.... $30 DB %01111110 ; .######. $7E L_F8A8: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00111100 ; ..####.. $3C DB %00000110 ; .....##. $06 DB %00111110 ; ..#####. $3E DB %01100110 ; .##..##. $66 DB %00111110 ; ..#####. $3E L_F8B0: DB %00000000 ; ........ $00 ; ; ; DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 DB %01111100 ; .#####.. $7C DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01111100 ; .#####.. $7C L_F8B8: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00111100 ; ..####.. $3C DB %01100110 ; .##..##. $66 DB %01100000 ; .##..... $60 DB %01100110 ; .##..##. $66 DB %00111100 ; ..####.. $3C L_F8C0: DB %00000000 ; ........ $00 ; ; ; DB %00000110 ; .....##. $06 DB %00000110 ; .....##. $06 DB %00111110 ; ..#####. $3E DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %00111110 ; ..#####. $3E L_F8C8: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00111100 ; ..####.. $3C DB %01100110 ; .##..##. $66 DB %01111110 ; .######. $7E DB %01100000 ; .##..... $60 DB %00111100 ; ..####.. $3C L_F8D0: DB %00000000 ; ........ $00 ; ; ; DB %00011100 ; ...###.. $1C DB %00110000 ; ..##.... $30 DB %00110000 ; ..##.... $30 DB %01111100 ; .#####.. $7C DB %00110000 ; ..##.... $30 DB %00110000 ; ..##.... $30 DB %00110000 ; ..##.... $30 L_F8D8: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00111110 ; ..#####. $3E DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %00111110 ; ..#####. $3E DB %00000110 ; .....##. $06 L_F8E0: DB %00111100 ; ..####.. $3C ; ; ; DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 DB %01111100 ; .#####.. $7C DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 L_F8E8: DB %00000000 ; ........ $00 ; ; ; DB %00011000 ; ...##... $18 DB %00000000 ; ........ $00 DB %00111000 ; ..###... $38 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00111100 ; ..####.. $3C L_F8F0: DB %00000000 ; ........ $00 ; ; ; DB %00011000 ; ...##... $18 DB %00000000 ; ........ $00 DB %00111000 ; ..###... $38 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 L_F8F8: DB %01110000 ; .###.... $70 ; ; ; DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 DB %01100110 ; .##..##. $66 DB %01101100 ; .##.##.. $6C DB %01111000 ; .####... $78 DB %01101100 ; .##.##.. $6C DB %01100110 ; .##..##. $66 L_F900: DB %00000000 ; ........ $00 ; ; ; DB %00111000 ; ..###... $38 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00111100 ; ..####.. $3C L_F908: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00110110 ; ..##.##. $36 DB %01111111 ; .####### $7F DB %01101011 ; .##.#.## $6B DB %01101011 ; .##.#.## $6B DB %01100011 ; .##...## $63 L_F910: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %01111100 ; .#####.. $7C DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 L_F918: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00111100 ; ..####.. $3C DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %00111100 ; ..####.. $3C L_F920: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %01111100 ; .#####.. $7C DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01111100 ; .#####.. $7C DB %01100000 ; .##..... $60 L_F928: DB %01100000 ; .##..... $60 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00111110 ; ..#####. $3E DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %00111110 ; ..#####. $3E DB %00000110 ; .....##. $06 L_F930: DB %00000111 ; .....### $07 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %01101100 ; .##.##.. $6C DB %01110110 ; .###.##. $76 DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 DB %01100000 ; .##..... $60 L_F938: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00111110 ; ..#####. $3E DB %01100000 ; .##..... $60 DB %00111100 ; ..####.. $3C DB %00000110 ; .....##. $06 DB %01111100 ; .#####.. $7C L_F940: DB %00000000 ; ........ $00 ; ; ; DB %00110000 ; ..##.... $30 DB %00110000 ; ..##.... $30 DB %01111100 ; .#####.. $7C DB %00110000 ; ..##.... $30 DB %00110000 ; ..##.... $30 DB %00110000 ; ..##.... $30 DB %00011100 ; ...###.. $1C L_F948: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %00111110 ; ..#####. $3E L_F950: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %00111100 ; ..####.. $3C DB %00011000 ; ...##... $18 L_F958: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %01100011 ; .##...## $63 DB %01101011 ; .##.#.## $6B DB %01101011 ; .##.#.## $6B DB %01111111 ; .####### $7F DB %00110110 ; ..##.##. $36 L_F960: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %01100110 ; .##..##. $66 DB %00111100 ; ..####.. $3C DB %00011000 ; ...##... $18 DB %00111100 ; ..####.. $3C DB %01100110 ; .##..##. $66 L_F968: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %01100110 ; .##..##. $66 DB %00111110 ; ..#####. $3E DB %00000110 ; .....##. $06 L_F970: DB %00111100 ; ..####.. $3C ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %01111110 ; .######. $7E DB %00001100 ; ....##.. $0C DB %00011000 ; ...##... $18 DB %00110000 ; ..##.... $30 DB %01111110 ; .######. $7E L_F978: DB %00000000 ; ........ $00 ; ; ; DB %00001100 ; ....##.. $0C DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %01110000 ; .###.... $70 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00001100 ; ....##.. $0C L_F980: DB %00000000 ; ........ $00 ; ; ; DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00000000 ; ........ $00 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 L_F988: DB %00000000 ; ........ $00 ; ; ; DB %00110000 ; ..##.... $30 DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00001110 ; ....###. $0E DB %00011000 ; ...##... $18 DB %00011000 ; ...##... $18 DB %00110000 ; ..##.... $30 L_F990: DB %00000000 ; ........ $00 ; ; ; DB %00110001 ; ..##...# $31 DB %01101011 ; .##.#.## $6B DB %01000110 ; .#...##. $46 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 L_F998: DB %00000000 ; ........ $00 ; ; ; DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 DB %00000000 ; ........ $00 FONT_END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F,0xFF DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF ; ; ; L_fff0: .word INT_TBL_SCI ;(RDRF + ORFE + TDRE) * ; L_fff2: .word var_185b_TOF ;(Timer Overflow) * ; L_fff4: .word var_185e_OCF ;(Output compare) * ; L_fff6: .word var_1861_ICF ;(input capture) * ; L_fff8: .word var_1864_IRQ1 ; L_fffa: .word var_1867_SWI L_fffc: .word L_e2fb_NMI ; NMI vector? ; L_fffe: .word START ; reset vector? ; ; * = IRQ2 interrupt ; ; end