3 ; TI-86 'Paged Ram' Support routines
10 _ABS_SRC_ADDR equ 0C392h ; 3 byte ABS address pointer
11 _ABS_DEST_ADDR equ 0C395h ; 3 byte ABS address pointer
12 _MM_NUM_BYTES equ 0C398h ; 3 byte block move counter
17 ; 'Block' Move Support Routines
22 ; ahl -> (_abs_src_addr)
24 _SET_ABS_SRC_ADDR equ 4647h
27 ; ahl -> (_abs_dest_addr)
29 _SET_ABS_DEST_ADDR equ 5285h
32 ; ahl -> (_mm_num_bytes)
34 _SET_MM_NUM_BYTES equ 464Fh
38 ; This routine mimmicks the Z80's LDIR instruction.
41 ; INPUTS - abs_src_addr, abs_dest_addr, mm_num_bytes
42 ; Source Address, Destination Address, and # of bytes,
44 ; OUTPUTS - abs_src_addr, abs_dest_addr, mm_num_bytes
45 ; Modified exactly as HL, DE, and BC are after LDIR
47 ; moves (_mm_num_bytes) bytes starting @ (_abs_src_addr) to (_abs_dest_addr)
48 ; incrementing the src/dest pointer after each byte moved
54 ; This routine mimmicks the Z80's LDIR instruction.
57 ; INPUTS - abs_src_addr, abs_dest_addr, mm_num_bytes
58 ; Source Address, Destination Address, and # of bytes,
60 ; OUTPUTS - abs_src_addr, abs_dest_addr, mm_num_bytes
61 ; Modified exactly as HL, DE, and BC are after LDIR
63 ; moves (_mm_num_bytes) bytes starting @ (_abs_src_addr) to (_abs_dest_addr)
64 ; decrementing the src/dest pointer after each byte moved
70 ; ahl -> (_abs_src_addr). move 10 bytes @ (_abs_src_addr) -> OP1
72 _ABS_MOV10TOOP1 equ 5235h
75 ; move 10 bytes @ (_abs_src_addr) -> OP1
77 _ABS_MOV10TOOP1_noset equ 5239h
80 ; ahl -> (_abs_dest_addr).move 10 bytes from (_abs_src_addr)->(_abs_dest_addr)
82 _ABS_MOV10B_SET_D equ 523Dh
85 ; move 10 bytes from (_abs_src_addr) -> (_abs_dest_addr)
90 ; ahl -> (_abs_dest_addr). move 10 bytes from OP1 -> (_abs_dest_addr)
92 _ABS_MOVFROP1_SET_D equ 5241h
95 ; move 10 bytes from OP1 -> (_abs_dest_addr)
97 _ABS_MOVFROP1 equ 5245h
104 _inc_ptr_ahl equ 4637h ; ahl = ahl + 1
105 _dec_ptr_ahl equ 463Bh ; ahl = ahl - 1
106 _inc_ptr_bde equ 463Fh ; bde = bde + 1 , ahl & status intact
107 _dec_ptr_dbe equ 4643h ; bde = bde - 1 , ahl & status intact
108 _dec_ptr_ade equ 46BFh ; ade = ade - 1
112 ; decode ABS ahl and load the RAM page and set hl = offset, (hl) = (ABS ahl)
114 _load_ram_ahl equ 462Fh
116 _GETB_AHL equ 46C3h ; acc = (ABS ahl), hl = asic address now
119 _RAM_PAGE_1 equ 47E3h ; load RAM page 1, FPS page
120 _RAM_PAGE_7 equ 47F3h ; load RAM page 7, symbol table page
123 ; write c -> (ABS ahl), ahl = ahl + 1, still ABS address
125 _writeb_inc_ahl equ 5567h