diff options
| author | Astrid Smith | 2011-10-22 00:48:25 -0700 |
|---|---|---|
| committer | Astrid Smith | 2011-10-22 00:48:25 -0700 |
| commit | 3c802cbedc1f5e5f07afb837efcc160c11336e83 (patch) | |
| tree | 671a540f93f5d910594119eb7e40b438facf49bb | |
| parent | b9be2d76a48409e1b5053338cd5f51f22b6e5b2f (diff) | |
Now gas eats it all happily
With the exception of the final binary being too large to link ...
| -rw-r--r-- | Makefile | 3 | ||||
| -rw-r--r-- | alu.s | 18 | ||||
| -rw-r--r-- | flags.s | 309 | ||||
| -rw-r--r-- | global.inc | 16 | ||||
| -rw-r--r-- | interrupts.s.m4 | 2 | ||||
| -rw-r--r-- | main.s | 20 | ||||
| -rw-r--r-- | opcodes.inc.m4 | 3 | ||||
| -rw-r--r-- | opcodes.s.m4 | 75 | ||||
| -rw-r--r-- | ports.s | 104 | ||||
| -rw-r--r-- | tios.inc | 1482 |
10 files changed, 1761 insertions, 271 deletions
@@ -28,7 +28,8 @@ NATIVE_OBJ=packager # flags for the tigcc cross-compiler TIGCCFLAGS_DEBUG=--debug -WA,-l$(LISTING_DEBUG) -TIGCCFLAGS=-Wall -Os -ffunction-sections -fdata-sections --optimize-code --cut-ranges --reorder-sections --merge-constants --remove-unused -Wall -Wextra -Wwrite-strings -WA,-d +TIGCCFLAGS=-Wall -Os -ffunction-sections -fdata-sections --optimize-code --cut-ranges --reorder-sections --merge-constants --remove-unused -Wall -Wextra -Wwrite-strings -WA,-d -Wa,--register-prefix-optional -Wa,-alhs +#-Wa,-ahls # flags for the native C compiler CFLAGS=-Wall -ltifiles @@ -28,7 +28,7 @@ alu_adc: move.b d1,f_tmp_dst_b add.b d2,d1 move sr,f_host_ccr - move.w #$0202,flag_byte + move.w #0x0202,flag_byte rts alu_sbc: @@ -37,7 +37,7 @@ alu_sbc: || d1 - (d0+C) -> d1 || sets flags - push.l d2 + push_l d2 bsr flags_normalize move.b flag_byte(pc),d2 andi.b #1,d2 @@ -46,9 +46,9 @@ alu_sbc: move.b d1,f_tmp_dst_b sub.b d2,d1 move sr,f_host_sr - move.b #$02,flag_byte - move.b #$02,flag_valid - pop.l d2 + move.b #0x02,flag_byte + move.b #0x02,flag_valid + pop_l d2 rts alu_sub: @@ -63,8 +63,8 @@ alu_sub: move.b d0,f_tmp_src_b move.b d1,f_tmp_dst_b move.b #1,f_tmp_byte - andi.b #%00000010,flag_valid - move.b #%00000010,flag_byte + andi.b #0b00000010,flag_valid + move.b #0b00000010,flag_byte sub d0,d1 move sr,f_host_sr rts @@ -89,8 +89,8 @@ alu_cp: move.b d0,f_tmp_src_b move.b d1,f_tmp_dst_b move.b #1,f_tmp_byte - andi.b #%00000010,flag_valid - move.b #%00000010,flag_byte + andi.b #0b00000010,flag_valid + move.b #0b00000010,flag_byte sub.b d0,d1 move sr,f_host_sr rts @@ -1,139 +1,142 @@ - ;; Routine to set the given flags - ;; Noted in \mask by a 1 bit -.macro F_SET mask ; 32 cycles, 8 bytes +||| -*- gas -*- +||| Code and variables to emulate z80 CPU flags + + || Routine to set the given flags + || Noted in \mask by a 1 bit +.macro F_SET mask | 32 cycles, 8 bytes or.b \mask,flag_byte-flag_storage(a3) or.b \mask,flag_valid-flag_storage(a3) .endm - ;; Clear the given flags - ;; Noted in \mask (must be a reg) by a 1 bit -.macro F_CLEAR mask ; 36 cycles, 10 bytes + || Clear the given flags + || Noted in \mask (must be a reg) by a 1 bit +.macro F_CLEAR mask | 36 cycles, 10 bytes or.b \mask,flag_valid-flag_storage(a3) not.b \mask and.b \mask,flag_byte-flag_storage(a3) .endm - ;; Use this when an instruction uses the P/V bit as Parity. - ;; Sets or clears the bit explicitly. - ;; - ;; Byte for which parity is calculated must be in \byte. High - ;; byte of \byte.w must be zero, using d0 is suggested. (a0,d1 - ;; destroyed) + || Use this when an instruction uses the P/V bit as Parity. + || Sets or clears the bit explicitly. + || + || Byte for which parity is calculated must be in \byte. High + || byte of \byte.w must be zero, using d0 is suggested. (a0,d1 + || destroyed) .macro F_PAR byte - ori.b #%00000100,flag_valid-flag_storage(a3) + ori.b #0b00000100,flag_valid-flag_storage(a3) move.b flag_byte(pc),d1 - andi.b #%11111011,d1 + andi.b #0b11111011,d1 lea lut_parity(pc),a0 or.b 0(a0,\byte.w),d1 move.b d1,flag_byte-flag_storage(a3) .endm - ;; Use this when an instruction uses the P/V bit as Overflow. - ;; Leaves the bit itself implicit; simply marks it dirty. -.macro F_OVFL ; 20 cycles, 6 bytes - andi.b #%11111011,flag_valid-flag_storage(a3) + || Use this when an instruction uses the P/V bit as Overflow. + || Leaves the bit itself implicit| simply marks it dirty. +.macro F_OVFL | 20 cycles, 6 bytes + andi.b #0b11111011,flag_valid-flag_storage(a3) .endm - ;; Save the two operands from ADD \1,\2 + || Save the two operands from ADD \1,\2 .macro F_ADD_SAVE src dst move.b \src,f_tmp_src_b-flag_storage(a3) move.b \dst,f_tmp_dst_b-flag_storage(a3) - move.b #$01,f_tmp_byte-flag_storage(a3) - F_SET #% + move.b #0x01,f_tmp_byte-flag_storage(a3) + F_SET #0b .endm .text - ;; Normalize and return inverse of emulated Carry bit (loaded - ;; into host zero flag) + || Normalize and return inverse of emulated Carry bit (loaded + || into host zero flag) - ;; Destroys d1 + || Destroys d1 f_norm_c: move.b flag_valid-flag_storage(a3),d1 -; d1 is destroyed in all cases, so you can use lsr and the C bit (same speed, smaller) +| d1 is destroyed in all cases, so you can use lsr and the C bit (same speed, smaller) lsr.b #1,d1 - bcs.s FNC_ok ; Bit is valid + bcs.s FNC_ok | Bit is valid move.b (f_host_sr+1)-flag_storage(a3),d1 - andi.b #%00000001,d1 + andi.b #0b00000001,d1 or.b d1,flag_byte-flag_storage(a3) - ori.b #%00000001,flag_valid-flag_storage(a3) + ori.b #0b00000001,flag_valid-flag_storage(a3) FNC_ok: move.b flag_byte-flag_storage(a3),d1 - andi.b #%00000001,d1 + andi.b #0b00000001,d1 rts - ;; Normalize and return **INVERSE** of emulated Zero bit - ;; (loaded into host's zero flag) + || Normalize and return **INVERSE** of emulated Zero bit + || (loaded into host's zero flag) - ;; Destroys d1 + || Destroys d1 f_norm_z: move.b flag_valid-flag_storage(a3),d1 - andi.b #%01000000,d1 - bne.s FNZ_ok ; Bit is valid + andi.b #0b01000000,d1 + bne.s FNZ_ok | Bit is valid bsr flags_normalize FNZ_ok: move.b flag_byte-flag_storage(a3),d1 - andi.b #%01000000,d1 + andi.b #0b01000000,d1 rts - ;; Normalize and return **INVERSE** of emulated Parity/oVerflow - ;; bit (loaded into host zero flag) + || Normalize and return **INVERSE** of emulated Parity/oVerflow + || bit (loaded into host zero flag) - ;; Destroys d1 + || Destroys d1 f_norm_pv: move.b flag_valid-flag_storage(a3),d1 - andi.b #%00000100,d1 - bne.s FNPV_ok ; Bit is already valid + andi.b #0b00000100,d1 + bne.s FNPV_ok | Bit is already valid bsr flags_normalize FNPV_ok: move.b flag_byte-flag_storage(a3),d1 - andi.b #%00000100,d1 + andi.b #0b00000100,d1 rts - ;; Calculate the P/V bit as Parity, for the byte in - ;; d1. Destroys d0,d1. + || Calculate the P/V bit as Parity, for the byte in + || d1. Destroys d0,d1. f_calc_parity: - andi.w #$ff,d1 + andi.w #0xff,d1 move.b lut_parity-flag_storage(a3,d1.w),d1 move.b (flag_byte),d0 - and.b #%11110111,d0 - or.w #%0000100000000000,d0 + and.b #0b11110111,d0 + or.w #0b0000100000000000,d0 or.b d1,d0 move.w d0,flag_byte-flag_storage(a3) rts - ;; Routine to make both the Carry and Half-Carry flags valid. - ;; Trashes d0, d1. + || Routine to make both the Carry and Half-Carry flags valid. + || Trashes d0, d1. f_calc_carries: - ;; XXX do this - ;; if f_tmp_byte == 0 { - ;; return, shit is valid - ;; } else if f_tmp_byte == 2 { - ;; // it's a word - ;; add f_tmp_src_w to f_tmp_dst_w - ;; low bytes only, create a carry and save - ;; then high bytes, create a carry and output - ;; then 3rd nibble, create a half-carry and output - ;; } else if f_tmp_byte == 3 { - ;; // it's a byte - ;; add f_tmp_src_b to f_tmp_dst_b - ;; create a carry and output - ;; add low nybbles only - ;; create a half-carry and output - ;; } - ;; set f_tmp_byte = 0 - pushm d2-d5 ; how many registers do I need? + || XXX do this + || if f_tmp_byte == 0 { + || return, shit is valid + || } else if f_tmp_byte == 2 { + || // it's a word + || add f_tmp_src_w to f_tmp_dst_w + || low bytes only, create a carry and save + || then high bytes, create a carry and output + || then 3rd nibble, create a half-carry and output + || } else if f_tmp_byte == 3 { + || // it's a byte + || add f_tmp_src_b to f_tmp_dst_b + || create a carry and output + || add low nybbles only + || create a half-carry and output + || } + || set f_tmp_byte = 0 + pushm d2-d5 | how many registers do I need? move.b f_tmp_byte(pc),d0 bne f_cc_dirty rts f_cc_dirty: cmpi.b #2,d0 bne f_cc_byte - ;; it's a word! + || it's a word! move.w f_tmp_src_w(pc),d2 move.w f_tmp_dst_w(pc),d3 move.w d3,d4 @@ -141,11 +144,11 @@ f_cc_dirty: move sr,d5 andi.w #1,d5 rol #8,d5 - andi.w #$0fff,d2 - andi.w #$0fff,d4 + andi.w #0x0fff,d2 + andi.w #0x0fff,d4 add.w d2,d4 - andi.l #$1000,d4 - ori.w #%00010001,d5 + andi.l #0x1000,d4 + ori.w #0b00010001,d5 or.w d4,d5 or.w d5,flag_byte-flag_storage(a3) clr.b f_tmp_byte-flag_storage(a3) @@ -158,50 +161,50 @@ f_cc_byte: add.b d2,d3 move sr,d5 andi.b #1,d5 - andi.b #$0f,d2 - andi.b #$0f,d4 + andi.b #0x0f,d2 + andi.b #0x0f,d4 add.b d2,d4 - andi.b #$10,d4 + andi.b #0x10,d4 or.b d4,d5 or.b d5,flag_byte-flag_storage(a3) clr.b f_tmp_byte-flag_storage(a3) - or.b #%00010001,flag_valid-flag_storage(a3) + or.b #0b00010001,flag_valid-flag_storage(a3) popm d2-d5 rts - ;; Normalize and return inverse of emulated Sign bit (loaded - ;; into host zero flag). + || Normalize and return inverse of emulated Sign bit (loaded + || into host zero flag). - ;; Destroys d1 + || Destroys d1 f_norm_sign: move.b flag_valid-flag_storage(a3),d1 - andi.b #%01000000,d1 - bne.s FNsign_ok ; Bit is already valid + andi.b #0b01000000,d1 + bne.s FNsign_ok | Bit is already valid bsr flags_normalize FNsign_ok: move.b flag_byte-flag_storage(a3),d1 - andi.b #%01000000,d1 + andi.b #0b01000000,d1 rts - ;; Routine to turn 68k flags into z80 flags. + || Routine to turn 68k flags into z80 flags. flags_normalize: - move.b (f_host_sr+1)(pc),d1 ; 8/4 - ;; .w keeps d1 clean - andi.w #%00011111,d1 ; 8/4 + move.b (f_host_sr+1)(pc),d1 | 8/4 + || .w keeps d1 clean + andi.w #0b00011111,d1 | 8/4 - ;; doesn't this invalidate the previous contents of d1 - ;; entirely? - move.b lut_ccr(pc,d1.w),d1 ; 10/4 + || doesn't this invalidate the previous contents of d1 + || entirely? + move.b lut_ccr(pc,d1.w),d1 | 10/4 move.b flag_valid(pc),d0 not.b d0 - and.b d0,d1 ; Mask out all the unwanted bits + and.b d0,d1 | Mask out all the unwanted bits not.b d0 - ori.b #%11000101,d0 ; These are the z80 flag register bits that can be derived from the 68k CCR. + ori.b #0b11000101,d0 | These are the z80 flag register bits that can be derived from the 68k CCR. move.b d0,flag_valid-flag_storage(a3) or.b d1,flag_byte-flag_storage(a3) rts - ;; Routine to completely fill the flags register + || Routine to completely fill the flags register flags_all: bsr flags_normalize bsr f_calc_carries @@ -211,18 +214,18 @@ flags_all: .data flag_storage: - ;; 0 if the flag is already valid - ;; 2 if tmp_???b is valid - ;; 3 if tmp_???w is valid + || 0 if the flag is already valid + || 2 if tmp_???b is valid + || 3 if tmp_???w is valid f_tmp_byte: .byte 0 - ;; 2 if P is 0 - ;; 3 if P is 1 - ;; 4 if P is uncalculated Parity - ;; 5 if P is uncalculated oVerflow + || 2 if P is 0 + || 3 if P is 1 + || 4 if P is uncalculated Parity + || 5 if P is uncalculated oVerflow f_tmp_p_type: .byte 0 - ;; byte operands + || byte operands f_tmp_src_b: .byte 0 f_tmp_dst_b: .byte 0 f_tmp_result_b: .byte 0 @@ -232,65 +235,65 @@ f_tmp_src_w: .word 0 f_tmp_dst_w: .word 0 f_tmp_result_w: .word 0 - ;; 000XNZVC + || 000XNZVC .even - ;; DO NOT REARRANGE THESE + || DO NOT REARRANGE THESE f_host_sr: .word 0 -f_host_ccr: .byte 0 ;XXX make overlap somehow? +f_host_ccr: .byte 0 |XXX make overlap somehow? .even - ;; DO NOT REARRANGE THESE. -flag_byte: .byte 0 ; Byte of all flags -flag_valid: .byte 0 ; Validity mask -- 1 if valid. + || DO NOT REARRANGE THESE. +flag_byte: .byte 0 | Byte of all flags +flag_valid: .byte 0 | Validity mask -- 1 if valid. - ;; LUT for the CCR -> F mapping + || LUT for the CCR -> F mapping lut_ccr: - ;; N =S - ;; Z = Z - ;; V ~ P - ;; C= C - ;; - ;; =CCR= == z80== - ;; XNZVC SZ5H3PNC - .byte %00000000 ;; 00000 00000000 - .byte %00000001 ;; 00001 00000001 - .byte %00000100 ;; 00010 00000100 - .byte %00000101 ;; 00011 00000101 - .byte %01000000 ;; 00100 01000000 - .byte %01000001 ;; 00101 01000001 - .byte %01000100 ;; 00110 01000100 - .byte %01000101 ;; 00111 01000101 - .byte %10000000 ;; 01000 10000000 - .byte %10000001 ;; 01001 10000001 - .byte %10000100 ;; 01010 10000100 - .byte %10000101 ;; 01011 10000101 - .byte %11000000 ;; 01100 11000000 - .byte %11000001 ;; 01101 11000001 - .byte %11000100 ;; 01110 11000100 - .byte %11000101 ;; 01111 11000101 - .byte %00000000 ;; 10000 00000000 - .byte %00000001 ;; 10001 00000001 - .byte %00000100 ;; 10010 00000100 - .byte %00000101 ;; 10011 00000101 - .byte %01000000 ;; 10100 01000000 - .byte %01000001 ;; 10101 01000001 - .byte %01000100 ;; 10110 01000100 - .byte %01000101 ;; 10111 01000101 - .byte %10000000 ;; 11000 10000000 - .byte %10000001 ;; 11001 10000001 - .byte %10000100 ;; 11010 10000100 - .byte %10000101 ;; 11011 10000101 - .byte %11000000 ;; 11100 11000000 - .byte %11000001 ;; 11101 11000001 - .byte %11000100 ;; 11110 11000100 - .byte %11000101 ;; 11111 11000101 - - ;; 256-byte LUT for the Parity bit. - ;; Keep this last so all storage references require only one - ;; extension word. - ;; - ;; This table taken from another z80 emulator + || N =S + || Z = Z + || V ~ P + || C= C + || + || =CCR= == z80== + || XNZVC SZ5H3PNC + .byte 0b00000000 || 00000 00000000 + .byte 0b00000001 || 00001 00000001 + .byte 0b00000100 || 00010 00000100 + .byte 0b00000101 || 00011 00000101 + .byte 0b01000000 || 00100 01000000 + .byte 0b01000001 || 00101 01000001 + .byte 0b01000100 || 00110 01000100 + .byte 0b01000101 || 00111 01000101 + .byte 0b10000000 || 01000 10000000 + .byte 0b10000001 || 01001 10000001 + .byte 0b10000100 || 01010 10000100 + .byte 0b10000101 || 01011 10000101 + .byte 0b11000000 || 01100 11000000 + .byte 0b11000001 || 01101 11000001 + .byte 0b11000100 || 01110 11000100 + .byte 0b11000101 || 01111 11000101 + .byte 0b00000000 || 10000 00000000 + .byte 0b00000001 || 10001 00000001 + .byte 0b00000100 || 10010 00000100 + .byte 0b00000101 || 10011 00000101 + .byte 0b01000000 || 10100 01000000 + .byte 0b01000001 || 10101 01000001 + .byte 0b01000100 || 10110 01000100 + .byte 0b01000101 || 10111 01000101 + .byte 0b10000000 || 11000 10000000 + .byte 0b10000001 || 11001 10000001 + .byte 0b10000100 || 11010 10000100 + .byte 0b10000101 || 11011 10000101 + .byte 0b11000000 || 11100 11000000 + .byte 0b11000001 || 11101 11000001 + .byte 0b11000100 || 11110 11000100 + .byte 0b11000101 || 11111 11000101 + + || 256-byte LUT for the Parity bit. + || Keep this last so all storage references require only one + || extension word. + || + || This table taken from another z80 emulator lut_parity: .byte 4,0,0,4,0,4,4,0,0,4,4,0,4,0,0,4 .byte 0,4,4,0,4,0,0,4,4,0,0,4,0,4,4,0 @@ -309,7 +312,7 @@ lut_parity: .byte 0,4,4,0,4,0,0,4,4,0,0,4,0,4,4,0 .byte 4,0,0,4,0,4,4,0,0,4,4,0,4,0,0,4 - ;; To save space I might be able to overlay the Parity table - ;; with the CCR table, or even interleave it in the opcodes. + || To save space I might be able to overlay the Parity table + || with the CCR table, or even interleave it in the opcodes. @@ -1,18 +1,18 @@ || -*- gas -*- || Register naming -.equiv esp a4 +.equiv esp, a4 || a5 is pointer to base of opcode jump table -.equiv epc a6 +.equiv epc, a6 || d0 is scratch generally used in macros || d1 is scratch generally used outside macros || d2 is scratch and up for grabs -.equiv eaf d3 -.equiv ebc d4 -.equiv ede d5 -.equiv ehl d6 -.equiv eixy d7 +.equiv eaf, d3 +.equiv ebc, d4 +.equiv ede, d5 +.equiv ehl, d6 +.equiv eixy, d7 .macro SAVEREG movem.l d3-d7/a3-a6,-(sp) @@ -24,4 +24,4 @@ || Size of the ‘jmp do_interrupt’ in every invocation of || START. -.set INT_OFFSET 4 +.set INT_OFFSET, 4 diff --git a/interrupts.s.m4 b/interrupts.s.m4 index 8982cb3..5a47d14 100644 --- a/interrupts.s.m4 +++ b/interrupts.s.m4 @@ -26,7 +26,7 @@ int_enabled: dc.b 1 || argument from the JP instruction in the shim, and then || dance off into la-la land. int0_opcode: dc.b 0 - dc.b $c3 | JP immed.w + dc.b 0xc3 | JP immed.w int0_return: dc.w 0 | the destination address @@ -42,7 +42,7 @@ |.xdef _ti92plus .xdef __main |.xdef _tigcc_native -.include "../tios.h" +.include "./tios.inc" .include "global.inc" @@ -72,7 +72,7 @@ emu_setup: movea.l emu_op_00,a5 lea emu_run,a2 lea flag_storage,a3 - move.w #$4000,d1 + move.w #0x4000,d1 bsr deref move.l a0,epc move.l a0,esp @@ -96,10 +96,10 @@ emu_teardown: deref: | 76 cycles + 18 cycles for bsr | 20 bytes to inline, saves 34 cycles per call move.w d1,d0 - andi.w #$3FFF,d0 + andi.w #0x3FFF,d0 movea.w d0,a0 move.w d1,d0 - andi.w #$C000,d0 | Can cut this out by pre-masking the table. + andi.w #0xC000,d0 | Can cut this out by pre-masking the table. rol.w #4,d0 adda.l deref_table(pc,d0.w),a0 rts @@ -147,24 +147,24 @@ underef: clr.w d2 sub.l (a1)+,d0 bmi.s underef_not0 - cmpi.l #$4000,d0 + cmpi.l #0x4000,d0 bmi.s underef_thatsit underef_not0: move.l a0,d0 - move.w #$4000,d2 + move.w #0x4000,d2 sub.l (a1)+,d0 bmi.s underef_not1 - cmpi.l #$4000,d0 + cmpi.l #0x4000,d0 bmi.s underef_thatsit underef_not1: move.l a0,d0 - move.w #$8000,d2 + move.w #0x8000,d2 sub.l (a1)+,d0 bmi.s underef_not2 - cmpi.l #$4000,d0 + cmpi.l #0x4000,d0 bmi.s underef_thatsit underef_not2: - move.w #$c000,d2 + move.w #0xc000,d2 suba.l (a1)+,a0 || if that fails too, well shit man! moveq #0,d0 diff --git a/opcodes.inc.m4 b/opcodes.inc.m4 index 0ce4a17..a2fb064 100644 --- a/opcodes.inc.m4 +++ b/opcodes.inc.m4 @@ -12,6 +12,7 @@ dnl # 4. Cycles the emulator takes dnl # 5. Bytes of emulator code for this instruction dnl # define(«OPCODE»,« START +.print "Opcode $1" dnl # This little bit of trickery lets me define a local label. dnl # Calling local(end) inside of OPCODE(10, ...) will expand to dnl # end_10, and is undefined everywhere else. @@ -34,7 +35,7 @@ define(«OP_CB»,« START_CB define(«local»,$«»1_cb««$1»»)dnl «emu_op_cb»$1«:» $2 - TIME $3 ifelse(«,$4», «,», «», «,$4») + TIME ifelse(«,$3», «,», «0», «$3»), ifelse(«,$4», «,», «0», «$4») undefine(«label»)dnl DONE»)dnl dnl diff --git a/opcodes.s.m4 b/opcodes.s.m4 index 038fed4..5c2065f 100644 --- a/opcodes.s.m4 +++ b/opcodes.s.m4 @@ -15,7 +15,7 @@ || Macro to read a byte from main memory at register \addr. Puts || the byte read in \dest. -.macro FETCHB src dest | 106 cycles, 8 bytes +.macro FETCHB addr dest | 106 cycles, 8 bytes move.w \addr,d1 jsr deref move.b (a0),\dest @@ -100,32 +100,32 @@ .macro start .org emu_plain_op+_align -.set _align,_align+$100 | opcode routine length +.set _align,_align+0x100 | opcode routine length jmp do_interrupt | for interrupt routines .endm .macro START_DD - .org emu_plain_op+_align+$40 + .org emu_plain_op+_align+0x40 .endm .macro START_CB - .org emu_plain_op+_align+$42 + .org emu_plain_op+_align+0x42 .endm .macro START_DDCB - .org emu_plain_op+_align+$44 + .org emu_plain_op+_align+0x44 .endm .macro START_FD - .org emu_plain_op+_align+$46 + .org emu_plain_op+_align+0x46 .endm .macro START_FDCB - .org emu_plain_op+_align+$48 + .org emu_plain_op+_align+0x48 .endm .macro START_ED - .org emu_plain_op+_align+$4A + .org emu_plain_op+_align+0x4A .endm || LOHI/HILO are hideously slow for instructions used often. @@ -158,11 +158,11 @@ || == Special Opcode Macros ======================================== || Do an ADD \1,\2 -.macro F_ADD_W | ? cycles, ? bytes +.macro F_ADD_W dest src | ? cycles, ? bytes || XXX .endm || Do an SUB \1,\2 -.macro F_SUB_W | ? cycles, ? bytes +.macro F_SUB_W dest src | ? cycles, ? bytes || XXX .endm @@ -187,11 +187,11 @@ .macro F_INC_W regpr | 4 cycles, 2 bytes addq.w #1,\regpr - ENDM +.endm .macro F_DEC_W regpr | 4 cycles, 2 bytes subq.w #1,\regpr - ENDM +.endm || I might be able to unify rotation flags or maybe use a || lookup table @@ -201,7 +201,7 @@ done: clr.w d0 | 4 cycles / 2 bytes move.b (epc)+,d0 | 8 cycles / 2 bytes - move.b d0,$4c00+32*(128/8) + move.b d0,0x4c00+32*(128/8) rol.w #6,d0 |18 cycles / 2 bytes jmp 0(a5,d0.w) |14 cycles / 4 bytes || overhead: 42 cycles /10 bytes @@ -210,7 +210,7 @@ done: .macro DONE clr.w d0 | 4 cycles / 2 bytes move.b (epc)+,d0 | 8 cycles / 2 bytes - move.b d0,$4c00+32*(128/8) + move.b d0,0x4c00+32*(128/8) rol.w #6,d0 |18 cycles / 2 bytes jmp 0(a5,d0.w) |14 cycles / 4 bytes .endm @@ -219,10 +219,11 @@ done: || || \1 is number of tstates the current instruction should take || \2 is number of cycles taken already -.macro TIME +.macro TIME should is .endm - CNOP 0,32 +.text +.align 8 emu_plain_op: | Size(bytes) Time(cycles) | S0 T0 @@ -1156,10 +1157,10 @@ OP_ED(36,«») || XXX flags are more complicated than this :( || ? cycles OPCODE(37,« - ori.b #%00111011,flag_valid-flag_storage(a3) + ori.b #0b00111011,flag_valid-flag_storage(a3) move.b eaf,d1 - ori.b #%00000001,d1 - andi.b #%11101101,d1 + ori.b #0b00000001,d1 + andi.b #0b11101101,d1 or.b d1,flag_byte-flag_storage(a3) ») |nok @@ -1276,8 +1277,8 @@ OP_ED(3e,«») OPCODE(3f,« jsr flags_normalize || SZ5H3PNC - ori.b #%00000001,flag_valid-flag_storage(a3) - andi.b #%11111110,flag_byte-flag_storage(a3) + ori.b #0b00000001,flag_valid-flag_storage(a3) + andi.b #0b11111110,flag_byte-flag_storage(a3) ») |nok @@ -1636,7 +1637,7 @@ OP_ED(52,«») || LD D,E OPCODE(53,« - andi.w #$00ff,ede + andi.w #0x00ff,ede move.b ede,d1 lsl #8,d1 or.w d1,ede @@ -1757,7 +1758,7 @@ OP_ED(59,« || LD E,D OPCODE(5a,« - andi.w #$ff00,ede | 8/4 + andi.w #0xff00,ede | 8/4 move.b ede,d1 | 4/2 lsr.w #8,d1 |22/2 or.w d1,ede | 4/2 @@ -2347,7 +2348,7 @@ OP_ED(7f,«») move.b \src,d0 jsr alu_add move.b d1,\dest - ENDM +.endm || ADD A,B OPCODE(80,« @@ -2470,7 +2471,7 @@ OP_ED(87,«») move.b \src,d0 jsr alu_adc move.b d1,\dest - ENDM +.endm || ADC A,B || A <- A + B + (carry) @@ -2597,7 +2598,7 @@ OP_ED(8f,«») move.b \src,d0 jsr alu_sub move.b d1,\dest - ENDM +.endm || SUB A,B OPCODE(90,« @@ -2958,7 +2959,7 @@ OPCODE(a7,« move.b \src,d0 jsr alu_xor move.b d1,\dest - ENDM +.endm OP_DD(a7,«») OP_CB(a7,«») @@ -3448,7 +3449,7 @@ OPCODE(c7,« move.l epc,a0 jsr underef PUSHW d0 - move.w #$00,d0 + move.w #0x00,d0 jsr deref move.l a0,epc ») @@ -3581,7 +3582,7 @@ OPCODE(cf,« move.l epc,a0 jsr underef | d0 has PC PUSHW d0 - move.w #$08,d0 + move.w #0x08,d0 jsr deref move.l a0,epc ») @@ -3698,7 +3699,7 @@ OPCODE(d7,« move.l epc,a0 jsr underef PUSHW d0 - move.w #$10,d0 + move.w #0x10,d0 jsr deref move.l a0,epc ») @@ -3808,7 +3809,7 @@ OPCODE(df,« move.l epc,a0 jsr underef PUSHW d0 - move.w #$18,d0 + move.w #0x18,d0 jsr deref move.l a0,epc ») @@ -3929,7 +3930,7 @@ OPCODE(e7,« move.l epc,a0 jsr underef PUSHW d0 - move.w #$20,d0 + move.w #0x20,d0 jsr deref move.l a0,epc ») @@ -3989,7 +3990,7 @@ OP_ED(e9,«») || EX DE,HL OPCODE(eb,« - exg.w ede,ehl + exg ede,ehl ») |nok @@ -4049,7 +4050,7 @@ OPCODE(ef,« move.l epc,a0 jsr underef PUSHW d0 - move.w #$28,d0 + move.w #0x28,d0 jsr deref move.l a0,epc ») @@ -4083,7 +4084,7 @@ OP_ED(ef,«») OPCODE(f1,« POPW eaf move.w eaf,(flag_byte-flag_storage)(a3) - move.b #$ff,(flag_valid-flag_storage)(a3) + move.b #0xff,(flag_valid-flag_storage)(a3) ») |nok @@ -4174,7 +4175,7 @@ OPCODE(f7,« move.l epc,a0 jsr underef PUSHW d0 - move.w #$30,d0 + move.w #0x30,d0 jsr deref move.l a0,epc ») @@ -4294,7 +4295,7 @@ OPCODE(ff,« move.l epc,a0 jsr underef PUSHW d0 - move.w #$38,d0 + move.w #0x38,d0 jsr deref move.l a0,epc ») @@ -1,10 +1,12 @@ - ;; Routines to process OUT and IN instructions. This is the - ;; bit that's unique to TI calculators. +|| -*- gas -*- - ;; Port is in d0, byte is in d1 - ;; Destroys a0 + || Routines to process OUT and IN instructions. This is the + || bit that's unique to TI calculators. + + || Port is in d0, byte is in d1 + || Destroys a0 port_in: - andi.w #$ff,d0 + andi.w #0xff,d0 add.w d0,d0 add.w d0,d0 movea.l lut_ports_in(pc,d0),a0 @@ -270,8 +272,8 @@ lut_ports_in: .int port_in_ff port_out: - andi.w #$ff,d0 - ;; This is the fastest way to shift left 2 bits. :S + andi.w #0xff,d0 + || This is the fastest way to shift left 2 bits. :S add.w d0,d0 add.w d0,d0 movea.l lut_ports_out(pc,d0.w),a0 @@ -537,10 +539,10 @@ lut_ports_out: port_in_00: port_out_00: - ;; Temporary test harness. Writing to this port writes a - ;; character to the screen. + || Temporary test harness. Writing to this port writes a + || character to the screen. SAVEREG - andi.w #$ff,d1 + andi.w #0xff,d1 move.w d1,-(sp) jsr char_draw addq #2,sp @@ -555,7 +557,7 @@ port_in_03: port_out_03: port_in_04: port_out_04: - ;; Bank B paging, among other things + || Bank B paging, among other things SAVEREG move.b d1,-(a7) jsr bankswap_b_write @@ -567,7 +569,7 @@ port_in_05: port_out_05: port_in_06: port_out_06: - ;; Bank A paging + || Bank A paging SAVEREG move.b d1,-(a7) jsr bankswap_a_write @@ -604,7 +606,7 @@ port_in_10: .xref video_write .xref video_read - ;; LCD status + || LCD status clr.b d1 or.b video_increment,d1 or.b video_row,d1 @@ -614,7 +616,7 @@ port_in_10: rts port_out_10: - ;; LCD command + || LCD command tst.b d1 beq port_out_10_00 subq.b #1,d1 @@ -632,77 +634,77 @@ port_out_10: subq.b #1,d1 beq port_out_10_07 addq.b #7,d1 - cmpi.b #$0b,d1 ; power supply enhancement + cmpi.b #0x0b,d1 | power supply enhancement ble port_out_10_undef - cmpi.b #$13,d1 ; power supply level + cmpi.b #0x13,d1 | power supply level ble port_out_10_undef - cmpi.b #$17,d1 ; undefined + cmpi.b #0x17,d1 | undefined ble port_out_10_undef - cmpi.b #$18,d1 ; cancel test mode + cmpi.b #0x18,d1 | cancel test mode beq port_out_10_undef - cmpi.b #$1b,d1 ; undefined + cmpi.b #0x1b,d1 | undefined beq port_out_10_undef - cmpi.b #$1f,d1 ; enter test mode + cmpi.b #0x1f,d1 | enter test mode ble port_out_10_undef - cmpi.b #$3f,d1 ; set column + cmpi.b #0x3f,d1 | set column ble port_out_10_set_col - cmpi.b #$7f,d1 ; z-addressing - ble port_out_10_undef ; XXX? - cmpi.b #$df,d1 ; set row + cmpi.b #0x7f,d1 | z-addressing + ble port_out_10_undef | XXX? + cmpi.b #0xdf,d1 | set row ble port_out_10_set_row - ;; fallthrough: set contrast (unimplemented) + || fallthrough: set contrast (unimplemented) rts - ;; ... -port_out_10_00: ; 6-bit mode - move.b #$00,video_6bit + || ... +port_out_10_00: | 6-bit mode + move.b #0x00,video_6bit rts -port_out_10_01: ; 8-bit mode - move.b #$40,video_6bit +port_out_10_01: | 8-bit mode + move.b #0x40,video_6bit rts -port_out_10_02: ; screen off - move.b #$20,video_enabled +port_out_10_02: | screen off + move.b #0x20,video_enabled rts -port_out_10_03: ; screen on - move.b #$00,video_enabled +port_out_10_03: | screen on + move.b #0x00,video_enabled rts -port_out_10_04: ; x-- - move.b #$01,video_row - move.b #$00,video_increment +port_out_10_04: | x-- + move.b #0x01,video_row + move.b #0x00,video_increment rts -port_out_10_05: ; x++ - move.b #$01,video_row - move.b #$02,video_increment +port_out_10_05: | x++ + move.b #0x01,video_row + move.b #0x02,video_increment rts -port_out_10_06: ; y-- - move.b #$00,video_row - move.b #$00,video_increment +port_out_10_06: | y-- + move.b #0x00,video_row + move.b #0x00,video_increment rts -port_out_10_07: ; y++ - move.b #$00,video_row - move.b #$02,video_increment +port_out_10_07: | y++ + move.b #0x00,video_row + move.b #0x02,video_increment rts port_out_10_undef: rts port_out_10_set_col: - sub.b #$20,d1 + sub.b #0x20,d1 move.b d1,video_cur_col rts port_out_10_set_row: - sub.b #$80,d1 + sub.b #0x80,d1 move.b d1,video_cur_row rts port_in_11: - ;; LCD data + || LCD data SAVEREG jsr video_read - move.b d0,d1 ; return value + move.b d0,d1 | return value RESTREG rts port_out_11: - ;; LCD data + || LCD data SAVEREG move.b d1,-(a7) jsr video_write diff --git a/tios.inc b/tios.inc new file mode 100644 index 0000000..6c611e4 --- /dev/null +++ b/tios.inc @@ -0,0 +1,1482 @@ +.equ acos, 0xF5 +.equ acosh, 0x288 +.equ asin, 0xF6 +.equ asinh, 0x287 +.equ atan, 0xF7 +.equ atan2, 0xF8 +.equ atanh, 0x289 +.equ cacos, 0x13A +.equ cacosh, 0x13D +.equ casin, 0x13B +.equ casinh, 0x13E +.equ catan, 0x13C +.equ catanh, 0x13F +.equ ccos, 0x140 +.equ ccosh, 0x143 +.equ ceil, 0x105 +.equ cexp, 0x149 +.equ cln, 0x147 +.equ clog10, 0x148 +.equ cos, 0xF9 +.equ cosh, 0xFC +.equ csin, 0x141 +.equ csinh, 0x144 +.equ csqrt, 0x146 +.equ ctan, 0x142 +.equ ctanh, 0x145 +.equ exp, 0xFF +.equ fabs, 0x106 +.equ fadd, 0xB6 +.equ fcmp, 0xBB +.equ fdiv, 0xB9 +.equ flt, 0xBD +.equ float_class, 0x2FA +.equ floor, 0x107 +.equ fmod, 0x108 +.equ fmul, 0xB8 +.equ fneg, 0xBA +.equ fpisanint, 0x172 +.equ fpisodd, 0x173 +.equ frexp10, 0x2FB +.equ fsub, 0xB7 +.equ is_float_infinity, 0x2FF +.equ is_float_negative_zero, 0x300 +.equ is_float_positive_zero, 0x301 +.equ is_float_signed_infinity, 0x302 +.equ is_float_transfinite, 0x303 +.equ is_float_unsigned_inf_or_nan, 0x304 +.equ is_float_unsigned_zero, 0x305 +.equ is_inf, 0x2FF +.equ is_nan, 0x306 +.equ is_nzero, 0x300 +.equ is_pzero, 0x301 +.equ is_sinf, 0x302 +.equ is_transfinite, 0x303 +.equ is_uinf_or_nan, 0x304 +.equ is_uzero, 0x305 +.equ itrig, 0x28A +.equ log, 0x100 +.equ log10, 0x101 +.equ modf, 0x102 +.equ pow, 0x103 +.equ round12, 0x174 +.equ round12_err, 0x227 +.equ round14, 0x175 +.equ sin, 0xFA +.equ sincos, 0x286 +.equ sinh, 0xFD +.equ sqrt, 0x104 +.equ tan, 0xFB +.equ tanh, 0xFE +.equ trig, 0x28B +.equ trunc, 0xBC +.equ all_tail, 0x3B5 +.equ any_tail, 0x3B6 +.equ are_expressions_identical, 0x2BF +.equ can_be_approxed, 0x2F5 +.equ check_estack_size, 0x2C2 +.equ compare_complex_magnitudes, 0x2F6 +.equ compare_expressions, 0x2C0 +.equ compare_Floats, 0x2F7 +.equ deleted_between, 0x2C4 +.equ deleted_expression, 0x2C6 +.equ delete_between, 0x2C3 +.equ delete_expression, 0x2C5 +.equ did_push_cnvrt_Float_to_integer, 0x2F8 +.equ display_statements, 0x4E +.equ estack_number_to_Float, 0x2F9 +.equ estack_to_short, 0x2C7 +.equ estack_to_ushort, 0x2C8 +.equ factor_base_index, 0x2C9 +.equ factor_exponent_index, 0x2CA +.equ gcd_exact_whole_Floats, 0x2FC +.equ GetValue, 0x2CB +.equ get_key_ptr, 0x2B7 +.equ HToESI, 0x247 +.equ im_index, 0x2CC +.equ index_below_display_expression_aux, 0x2B6 +.equ index_main_var, 0x2CF +.equ index_numeric_term, 0x2CD +.equ index_of_lead_base_of_lead_term, 0x2CE +.equ is_advanced_tag, 0x2D0 +.equ is_antisymmetric, 0x2D1 +.equ is_complex_number, 0x2D2 +.equ is_complex0, 0x2D3 +.equ is_Float_exact_whole_number, 0x2FE +.equ is_free_of_tag, 0x2D4 +.equ is_independent_of, 0x2D5 +.equ is_independent_of_de_seq_vars, 0x2D6 +.equ is_independent_of_elements, 0x2D8 +.equ is_independent_of_tail, 0x2D7 +.equ is_matrix, 0x3B7 +.equ is_monomial, 0x2D9 +.equ is_monomial_in_kernel, 0x2DA +.equ is_narrowly_independent_of, 0x2DB +.equ is_square_matrix, 0x3B8 +.equ is_symmetric, 0x2DC +.equ bottom_estack, 0x432 +.equ is_valid_smap_aggregate, 0x3B9 +.equ last_element_index, 0x3BA +.equ lead_base_index, 0x2DE +.equ lead_exponent_index, 0x2DF +.equ lead_factor_index, 0x2E0 +.equ lead_term_index, 0x2E1 +.equ likely_approx_to_complex_number, 0x307 +.equ likely_approx_to_number, 0x308 +.equ main_gen_var_index, 0x2E2 +.equ map_tail, 0x3BB +.equ map_tail_Int, 0x3BC +.equ map_unary_over_comparison, 0x2E3 +.equ min_quantum, 0x2E4 +.equ moved_between_to_top, 0x2E6 +.equ move_between_to_top, 0x2E5 +.equ next_expression_index, 0x10A +.equ NG_approxESI, 0x25C +.equ NG_execute, 0x25D +.equ NG_graphESI, 0x25E +.equ NG_rationalESI, 0x25F +.equ NG_RPNToText, 0x25B +.equ NG_tokenize, 0x260 +.equ norm1_complex_Float, 0x309 +.equ numeric_factor_index, 0x2E7 +.equ Parms2D, 0x4D +.equ Parse1DExpr, 0x4F +.equ Parse2DExpr, 0x4A +.equ Parse2DMultiExpr, 0x4B +.equ Print2DExpr, 0x4C +.equ push_ANSI_string, 0x48A +.equ push_between, 0x2E8 +.equ push_cnvrt_integer_if_whole_nmb, 0x30D +.equ push_END_TAG, 0x263 +.equ push_expr2_quantum, 0x2EA +.equ push_expr_quantum, 0x2E9 +.equ push_Float, 0x30A +.equ push_Float_to_nonneg_int, 0x30B +.equ push_Float_to_rat, 0x30C +.equ push_internal_simplify, 0x4F8 +.equ push_LIST_TAG, 0x264 +.equ ARb_real_count, 0x5C2 +.equ push_next_arb_int, 0x2EB +.equ push_next_arb_real, 0x2EC +.equ push_next_internal_var, 0x2ED +.equ push_offset_array, 0x3C4 +.equ push_overflow_to_infinity, 0x30E +.equ push_parse_text, 0x3CA +.equ push_zstr, 0x48A +.equ push_quantum, 0x2EE +.equ push_quantum_pair, 0x2EF +.equ push_reversed_tail, 0x3BF +.equ push_round_Float, 0x310 +.equ reductum_index, 0x2F0 +.equ remaining_element_count, 0x3C3 +.equ remaining_factors_index, 0x2F1 +.equ reset_control_flags, 0x2F4 +.equ reset_estack_size, 0x2F3 +.equ re_index, 0x2F2 +.equ should_and_did_push_approx_arg2, 0x311 +.equ signum_Float, 0x312 +.equ top_estack, 0x109 +.equ is_tail_independent_of, 0x2DD +.equ push_transpose_aux, 0x3C1 +.equ TokenizeSymName, 0x80 +.equ push_expression, 0x44D +.equ ARb_int_count, 0x5C3 +.equ ABT_dialog, 0x10D +.equ CAT_dialog, 0x125 +.equ EV_captureEvents, 0xC6 +.equ EV_centralDispatcher, 0x156 +.equ EV_clearPasteString, 0xC7 +.equ EV_defaultHandler, 0x157 +.equ EV_eventLoop, 0x158 +.equ EV_getc, 0xC8 +.equ EV_getSplitRect, 0xC9 +.equ EV_hook, 0x2A3 +.equ EV_notifySwitchGraph, 0xCA +.equ EV_paintOneWindow, 0xCB +.equ EV_paintWindows, 0xCC +.equ EV_registerMenu, 0x159 +.equ EV_restorePainting, 0xCD +.equ EV_sendEvent, 0xCE +.equ EV_sendEventSide, 0xCF +.equ EV_sendString, 0xD0 +.equ EV_setCmdCheck, 0xD1 +.equ EV_setCmdState, 0xD2 +.equ EV_setFKeyState, 0xD3 +.equ EV_startApp, 0xD4 +.equ EV_startSide, 0xD5 +.equ EV_startTask, 0xD6 +.equ EV_suspendPainting, 0xD7 +.equ EV_switch, 0xD8 +.equ MO_currentOptions, 0xD9 +.equ MO_defaults, 0xDA +.equ MO_digestOptions, 0xDB +.equ MO_isMultigraphTask, 0xDC +.equ MO_modeDialog, 0xDD +.equ MO_notifyModeChange, 0xDE +.equ MO_sendQuit, 0xDF +.equ handleVarLinkKey, 0x129 +.equ handleRclKey, 0x14F +.equ AB_prodid, 0x29D +.equ AB_prodname, 0x29E +.equ AB_serno, 0x29F +.equ CB_fetchTEXT, 0xC2 +.equ CB_replaceTEXT, 0xC1 +.equ CU_restore, 0xC3 +.equ CU_start, 0xC4 +.equ CU_stop, 0xC5 +.equ EX_patch, 0x15A +.equ HelpKeys, 0x181 +.equ idle, 0x29B +.equ NeedStack, 0xA4 +.equ off, 0x29A +.equ OSCheckBreak, 0xEC +.equ OSClearBreak, 0xED +.equ OSContrastDn, 0x297 +.equ OSContrastUp, 0x296 +.equ OSdequeue, 0x3AA +.equ OSDisableBreak, 0xEF +.equ OSEnableBreak, 0xEE +.equ OSenqueue, 0x3A9 +.equ OSFreeTimer, 0xF1 +.equ OSqclear, 0x3AD +.equ OSqhead, 0x3AC +.equ OSqinquire, 0x3AB +.equ OSRegisterTimer, 0xF0 +.equ OSReset, 0x294 +.equ OSSetSR, 0x29C +.equ OSTimerCurVal, 0xF2 +.equ OSTimerExpired, 0xF3 +.equ OSTimerRestart, 0xF4 +.equ QModeKey, 0x182 +.equ QSysKey, 0x183 +.equ SumStoChkMem, 0x295 +.equ WordInList, 0x184 +.equ XR_stringPtr, 0x293 +.equ CU_cursorState, 0x503 +.equ FiftyMsecTick, 0x4FC +.equ ReleaseVersion, 0x440 +.equ ReleaseDate, 0x43F +.equ AB_getGateArrayVersion, 0x15E +.equ EX_getBasecodeParmBlock, 0x5DA +.equ ST_angle, 0xE0 +.equ ST_batt, 0xE1 +.equ ST_busy, 0xE2 +.equ ST_eraseHelp, 0xE3 +.equ ST_folder, 0xE4 +.equ ST_graph, 0xE5 +.equ ST_helpMsg, 0xE6 +.equ ST_modKey, 0xE7 +.equ ST_precision, 0xE8 +.equ ST_readOnly, 0xE9 +.equ ST_refDsp, 0xEB +.equ ST_showHelp, 0xE6 +.equ ST_stack, 0xEA +.equ ST_progressIncrement, 0x4DA +.equ ST_progressBar, 0x4D8 +.equ ST_progressDismiss, 0x4DB +.equ ST_progressUpdate, 0x4D9 +.equ AddSymToFolder, 0x70 +.equ DerefSym, 0x79 +.equ EM_moveSymFromExtMem, 0x161 +.equ EM_moveSymToExtMem, 0x162 +.equ EM_twinSymFromExtMem, 0x166 +.equ FindSymInFolder, 0x71 +.equ FolderAdd, 0x64 +.equ FolderAddTemp, 0x73 +.equ FolderClear, 0x66 +.equ FolderCount, 0x6B +.equ FolderCur, 0x65 +.equ FolderCurTemp, 0x72 +.equ FolderDel, 0x66 +.equ FolderDelAllTemp, 0x75 +.equ FolderDelTemp, 0x74 +.equ FolderFind, 0x67 +.equ FolderGetCur, 0x68 +.equ FolderOp, 0x69 +.equ FolderRename, 0x6A +.equ HSymDel, 0x5F +.equ HSYMtoName, 0x7A +.equ IsMainFolderStr, 0x77 +.equ MakeHSym, 0x282 +.equ SymAdd, 0x5C +.equ SymAddMain, 0x5D +.equ SymAddTwin, 0x27F +.equ SymCmp, 0x81 +.equ SymCpy, 0x82 +.equ SymCpy0, 0x83 +.equ SymDel, 0x5E +.equ SymDelTwin, 0x280 +.equ SymFind, 0x60 +.equ SymFindFirst, 0x6C +.equ SymFindFolderName, 0x6F +.equ SymFindHome, 0x62 +.equ SymFindMain, 0x61 +.equ SymFindNext, 0x6D +.equ SymFindPrev, 0x6E +.equ SymFindPtr, 0x283 +.equ SymMove, 0x63 +.equ TempFolderName, 0x76 +.equ TokToStrN, 0x7C +.equ StrToTokN, 0x7B +.equ ClearUserDef, 0x7E +.equ CheckLinkLockFlag, 0x7F +.equ VarRecall, 0x85 +.equ VarStore, 0x86 +.equ QSysProtected, 0x88 +.equ SetOK, 0x456 +.equ checkCurrent, 0x121 +.equ CheckReservedName, 0x8B +.equ CheckSysFunc, 0x89 +.equ EX_stoBCD, 0xC0 +.equ ValidateSymName, 0x84 +.equ SymSysVar, 0x8C +.equ ResetSymFlags, 0x8E +.equ partial_len, 0x11C +.equ GetDataType, 0x435 +.equ SmapTypeStrings, 0x436 +.equ GetFuncPrgmBodyPtr, 0x43A +.equ free, 0xA3 +.equ FreeHandles, 0x23B +.equ HeapAlloc, 0x90 +.equ HeapAllocESTACK, 0x91 +.equ HeapAllocHigh, 0x92 +.equ HeapAllocHighThrow, 0x94 +.equ HeapAllocPtr, 0xA2 +.equ HeapAllocThrow, 0x93 +.equ HeapAvail, 0x8F +.equ HeapCompress, 0x95 +.equ HeapDeref, 0x96 +.equ HeapEnd, 0xA1 +.equ HeapFreeIndir, 0x98 +.equ HeapFreePtr, 0xA3 +.equ HeapFree, 0x97 +.equ HeapGetHandle, 0x239 +.equ HeapGetLock, 0x9B +.equ HeapLock, 0x9A +.equ HeapMax, 0x9C +.equ HeapMoveHigh, 0xA0 +.equ HeapPtrToHandle, 0x23A +.equ HeapRealloc, 0x9D +.equ HeapSize, 0x9E +.equ HeapUnlock, 0x9F +.equ HLock, 0x99 +.equ malloc, 0xA2 +.equ HeapWalk, 0x12C +.equ HeapShuffle, 0x474 +.equ EX_getArg, 0xBE +.equ EX_getBCD, 0xBF +.equ RemainingArgCnt, 0x3C3 +.equ GKeyDown, 0x17F +.equ GKeyFlush, 0x180 +.equ GKeyIn, 0x17E +.equ kbhit, 0x52 +.equ ngetchx, 0x51 +.equ OSGetStatKeys, 0x299 +.equ OSInitBetweenKeyDelay, 0x249 +.equ pushkey, 0x50 +.equ OSInitKeyInitDelay, 0x248 +.equ alphaLockOn, 0x481 +.equ alphaLockOff, 0x482 +.equ SetAlphaStatus, 0x163 +.equ GetAlphaStatus, 0x164 +.equ KeyYesOrNo, 0x3EB +.equ OSFastArrows, 0x15C +.equ restoreAlphaLock, 0x483 +.equ BitmapGet, 0x185 +.equ BitmapInit, 0x186 +.equ BitmapPut, 0x187 +.equ BitmapSize, 0x188 +.equ ClrScr, 0x19E +.equ DrawChar, 0x1A4 +.equ DrawClipChar, 0x191 +.equ DrawClipEllipse, 0x192 +.equ DrawClipLine, 0x193 +.equ DrawClipPix, 0x194 +.equ DrawClipRect, 0x195 +.equ DrawFkey, 0x1A5 +.equ DrawIcon, 0x1A6 +.equ DrawLine, 0x1A7 +.equ DrawMultiLines, 0x196 +.equ DrawPix, 0x1A8 +.equ CalcBitmapSize, 0x3EF +.equ DrawStr, 0x1A9 +.equ DrawStrWidth, 0x197 +.equ DrawTo, 0x19C +.equ FillLines2, 0x199 +.equ FillTriangle, 0x198 +.equ FontCharWidth, 0x190 +.equ FontGetSys, 0x18E +.equ FontSetSys, 0x18F +.equ GetPix, 0x19F +.equ LineTo, 0x19C +.equ MoveTo, 0x19D +.equ PortRestore, 0x1A3 +.equ PortSet, 0x1A2 +.equ QScrRectOverlap, 0x18D +.equ RestoreScrState, 0x1A1 +.equ SaveScrState, 0x1A0 +.equ ScrRect, 0x2F +.equ ScrRectFill, 0x189 +.equ ScrRectOverlap, 0x18A +.equ ScrRectScroll, 0x18B +.equ ScrRectShift, 0x18C +.equ ScrToHome, 0x2E +.equ ScrToWin, 0x2D +.equ SetCurAttr, 0x19A +.equ SetCurClip, 0x19B +.equ ClientToScr, 0x42C +.equ DrawStrWidthP, 0x3EE +.equ MakeScrRect, 0x42D +.equ DrawWinBorder, 0x27 +.equ FirstWindow, 0x0 +.equ MakeWinRect, 0x2C +.equ RectWinToScr, 0x2A +.equ RectWinToWin, 0x29 +.equ WinActivate, 0x1 +.equ WinAttr, 0x2 +.equ WinBackground, 0x4 +.equ WinBackupToScr, 0x3 +.equ WinBegin, 0x5 +.equ WinBitmapGet, 0x6 +.equ WinBitmapPut, 0x7 +.equ WinBitmapSize, 0x8 +.equ WinChar, 0xA +.equ WinCharXY, 0x9 +.equ WinClose, 0xB +.equ WinClr, 0xC +.equ WinDeactivate, 0xD +.equ WinDupStat, 0xE +.equ WinEllipse, 0xF +.equ WinFill, 0x10 +.equ WinFillLines2, 0x11 +.equ WinFillTriangle, 0x12 +.equ WinFont, 0x13 +.equ WinGetCursor, 0x14 +.equ WinHeight, 0x292 +.equ WinHide, 0x15 +.equ WinHome, 0x16 +.equ WinLine, 0x17 +.equ WinLineNC, 0x18 +.equ WinLineRel, 0x1A +.equ WinLineTo, 0x19 +.equ WinMoveCursor, 0x1B +.equ WinMoveRel, 0x1D +.equ WinMoveTo, 0x1C +.equ WinOpen, 0x1E +.equ WinPixGet, 0x1F +.equ WinPixSet, 0x20 +.equ WinRect, 0x21 +.equ WinReOpen, 0x22 +.equ WinScrollH, 0x23 +.equ WinScrollV, 0x24 +.equ WinStr, 0x25 +.equ WinStrXY, 0x26 +.equ WinWidth, 0x291 +.equ DrawStaticButton, 0x35 +.equ SetWinClip, 0x42E +.equ BN_powerMod, 0x123 +.equ BN_power17Mod, 0x122 +.equ BN_prodMod, 0x124 +.equ cdecrypt, 0x127 +.equ MD5Done, 0x257 +.equ MD5Final, 0x256 +.equ MD5Init, 0x254 +.equ MD5Update, 0x255 +.equ Dialog, 0x30 +.equ DialogAdd, 0x33 +.equ DialogDo, 0x32 +.equ DialogNew, 0x34 +.equ DlgMessage, 0x1B4 +.equ VarNew, 0x28E +.equ VarOpen, 0x28C +.equ VarSaveAs, 0x28D +.equ ERD_dialog, 0x151 +.equ ERD_process, 0x152 +.equ ER_catch, 0x154 +.equ ER_success, 0x155 +.equ ER_throwVar, 0x153 +.equ find_error_message, 0x2C1 +.equ EM_abandon, 0x15B +.equ EM_findEmptySlot, 0x15F +.equ EM_GC, 0x160 +.equ EM_survey, 0x165 +.equ EM_write, 0x167 +.equ FL_addCert, 0x169 +.equ FL_download, 0x16A +.equ FL_getCert, 0x16C +.equ FL_getHardwareParmBlock, 0x16B +.equ FL_getVerNum, 0x16D +.equ FL_write, 0x171 +.equ BatTooLowFlash, 0x434 +.equ FlashMemoryEnd, 0x43D +.equ EM_blockVerifyErase, 0x15D +.equ flush_link, 0x24D +.equ getcalc, 0x54 +.equ LIO_Get, 0x57 +.equ LIO_GetMultiple, 0x59 +.equ LIO_Receive, 0x58 +.equ LIO_RecvData, 0x5B +.equ LIO_Send, 0x56 +.equ LIO_SendData, 0x5A +.equ LIO_SendProduct, 0x253 +.equ OSCheckSilentLink, 0x24A +.equ OSLinkClose, 0x24E +.equ OSLinkCmd, 0x24B +.equ OSLinkOpen, 0x24D +.equ OSLinkReset, 0x24C +.equ OSLinkTxQueueActive, 0x252 +.equ OSLinkTxQueueInquire, 0x251 +.equ OSReadLinkBlock, 0x24F +.equ OSWriteLinkBlock, 0x250 +.equ receive, 0x24F +.equ reset_link, 0x24C +.equ sendcalc, 0x55 +.equ transmit, 0x250 +.equ tx_free, 0x252 +.equ MenuAddIcon, 0x42 +.equ MenuAddText, 0x41 +.equ MenuBegin, 0x36 +.equ MenuCheck, 0x37 +.equ MenuEnd, 0x38 +.equ MenuGetTopRedef, 0x40 +.equ MenuKey, 0x39 +.equ MenuNew, 0x43 +.equ MenuOn, 0x3A +.equ MenuPopup, 0x3B +.equ MenuSubStat, 0x3C +.equ MenuTopRedef, 0x3F +.equ MenuTopSelect, 0x3E +.equ MenuTopStat, 0x3D +.equ MenuUpdate, 0x49 +.equ PopupAddText, 0x44 +.equ PopupClear, 0x46 +.equ PopupDo, 0x47 +.equ PopupNew, 0x45 +.equ PopupText, 0x48 +.equ VarCreateFolderPopup, 0x28F +.equ MenuLoad, 0x3F2 +.equ MenuFlags, 0x3F4 +.equ QMenuTopSelect, 0x41A +.equ DynMenuAdd, 0x3F1 +.equ FKeyI_H, 0x592 +.equ DynMenuChange, 0x3F0 +.equ MenuItemDef, 0x3F3 +.equ MenuOff, 0x419 +.equ PopupBegin, 0x3F5 +.equ PopupBeginDo, 0x3F6 +.equ ceof, 0x128 +.equ cfindfield, 0x12A +.equ cgetc, 0x12B +.equ cgetcertrevno, 0x2A0 +.equ cgetflen, 0x12D +.equ cgetfnl, 0x12E +.equ cgetnl, 0x12F +.equ cgetns, 0x130 +.equ cgetsn, 0x2A1 +.equ copen, 0x132 +.equ copensub, 0x133 +.equ cputhdr, 0x134 +.equ cputnl, 0x135 +.equ cputns, 0x136 +.equ cread, 0x137 +.equ ctell, 0x138 +.equ cwrite, 0x139 +.equ CertificateMemory, 0x43E +.equ sprintf, 0x53 +.equ vcbprintf, 0x53 +.equ cmd_clrdraw, 0x32D +.equ cmd_clrgraph, 0x32F +.equ cmd_clrhome, 0x330 +.equ cmd_clrio, 0x331 +.equ cmd_clrtable, 0x332 +.equ cmd_custmoff, 0x335 +.equ cmd_custmon, 0x336 +.equ cmd_disp, 0x33D +.equ cmd_dispg, 0x33E +.equ cmd_disphome, 0x33F +.equ cmd_disptbl, 0x340 +.equ cmd_fnoff, 0x34D +.equ cmd_fnon, 0x34E +.equ cmd_get, 0x350 +.equ cmd_getcalc, 0x351 +.equ cmd_graph, 0x353 +.equ cmd_input, 0x356 +.equ cmd_inputstr, 0x357 +.equ cmd_newprob, 0x367 +.equ cmd_output, 0x369 +.equ cmd_pause, 0x36B +.equ cmd_printobj, 0x370 +.equ cmd_prompt, 0x371 +.equ cmd_rclgdb, 0x381 +.equ cmd_send, 0x387 +.equ cmd_sendcalc, 0x388 +.equ cmd_sendchat, 0x389 +.equ cmd_stogdb, 0x390 +.equ cmd_style, 0x392 +.equ cmd_table, 0x393 +.equ cmd_shade, 0x38A +.equ cmd_newpic, 0x365 +.equ cmd_newplot, 0x366 +.equ cmd_pxlon, 0x37B +.equ cmd_circle, 0x32C +.equ cmd_cyclepic, 0x339 +.equ cmd_randseed, 0x380 +.equ cmd_line, 0x358 +.equ cmd_andpic, 0x32A +.equ cmd_blddata, 0x32B +.equ cmd_clrerr, 0x32E +.equ cmd_drawparm, 0x343 +.equ cmd_exit, 0x34A +.equ cmd_copyvar, 0x333 +.equ cmd_cubicreg, 0x334 +.equ cmd_custom, 0x337 +.equ cmd_cycle, 0x338 +.equ cmd_drawpol, 0x344 +.equ cmd_delfold, 0x33A +.equ cmd_delvar, 0x33B +.equ cmd_dialog, 0x33C +.equ cmd_drawinv, 0x342 +.equ cmd_drawfunc, 0x341 +.equ cmd_linehorz, 0x359 +.equ cmd_linetan, 0x35A +.equ cmd_else, 0x345 +.equ cmd_endfor, 0x346 +.equ cmd_for, 0x34F +.equ cmd_if, 0x354 +.equ cmd_ifthen, 0x355 +.equ cmd_linreg, 0x35C +.equ cmd_expreg, 0x34B +.equ cmd_lnreg, 0x35D +.equ cmd_logistic, 0x360 +.equ cmd_sinreg, 0x38C +.equ cmd_twovar, 0x398 +.equ cmd_onevar, 0x368 +.equ cmd_showstat, 0x38B +.equ cmd_rplcpic, 0x386 +.equ cmd_xorpic, 0x39B +.equ cmd_rclpic, 0x382 +.equ cmd_pxlcircle, 0x377 +.equ cmd_stopic, 0x391 +.equ cmd_fill, 0x34C +.equ cmd_goto, 0x352 +.equ cmd_popup, 0x36E +.equ cmd_endloop, 0x347 +.equ cmd_endwhile, 0x349 +.equ cmd_while, 0x39A +.equ cmd_try, 0x397 +.equ cmd_endtry, 0x348 +.equ cmd_passerr, 0x36A +.equ cmd_linevert, 0x35B +.equ cmd_plotsoff, 0x36C +.equ cmd_plotson, 0x36D +.equ cmd_slpline, 0x38D +.equ cmd_sortd, 0x38F +.equ cmd_sorta, 0x38E +.equ cmd_unlock, 0x399 +.equ cmd_lock, 0x35F +.equ cmd_unarchiv, 0x449 +.equ cmd_archive, 0x448 +.equ cmd_pxlline, 0x379 +.equ cmd_pxlhorz, 0x378 +.equ cmd_pxlvert, 0x37D +.equ cmd_ptchg, 0x372 +.equ cmd_ptoff, 0x373 +.equ cmd_pxltext, 0x37C +.equ cmd_pton, 0x374 +.equ cmd_pxlchg, 0x376 +.equ cmd_pxloff, 0x37A +.equ cmd_text, 0x394 +.equ cmd_pttext, 0x375 +.equ cmd_local, 0x35E +.equ cmd_movevar, 0x362 +.equ cmd_rename, 0x383 +.equ cmd_return, 0x385 +.equ cmd_trace, 0x396 +.equ cmd_toolbar, 0x395 +.equ cmd_request, 0x384 +.equ cmd_newdata, 0x363 +.equ cmd_newfold, 0x364 +.equ cmd_zoomin, 0x3A0 +.equ cmd_zoomdata, 0x39D +.equ cmd_zoomdec, 0x39E +.equ cmd_zoomfit, 0x39F +.equ cmd_zoomint, 0x3A1 +.equ cmd_zoomprev, 0x3A3 +.equ cmd_zoombox, 0x39C +.equ cmd_zoomout, 0x3A2 +.equ cmd_zoomrcl, 0x3A4 +.equ cmd_zoomsqr, 0x3A5 +.equ cmd_zoomsto, 0x3A7 +.equ cmd_zoomtrig, 0x3A8 +.equ cmd_zoomstd, 0x3A6 +.equ cmd_medmed, 0x361 +.equ cmd_quartreg, 0x37F +.equ cmd_quadreg, 0x37E +.equ cmd_powerreg, 0x36F +.equ TE_checkSlack, 0xA6 +.equ TE_close, 0xA5 +.equ TE_empty, 0xA7 +.equ TE_focus, 0xA8 +.equ TE_handleEvent, 0xA9 +.equ TE_indicateReadOnly, 0xAA +.equ TE_isBlank, 0xAB +.equ TE_openFixed, 0xAD +.equ TE_open, 0xAC +.equ TE_pasteText, 0xAE +.equ TE_reopenPlain, 0xB0 +.equ TE_reopen, 0xAF +.equ TE_select, 0xB1 +.equ TE_shrinkWrap, 0xB2 +.equ TE_unfocus, 0xB3 +.equ TE_updateCommand, 0xB4 +.equ longjmp, 0x267 +.equ setjmp, 0x266 +.equ strcat, 0x26E +.equ strchr, 0x274 +.equ strcmp, 0x271 +.equ strcpy, 0x26C +.equ strcspn, 0x275 +.equ strerror, 0x27D +.equ strlen, 0x27E +.equ strncat, 0x26F +.equ strncmp, 0x272 +.equ strncpy, 0x26D +.equ strpbrk, 0x276 +.equ strrchr, 0x277 +.equ strspn, 0x278 +.equ strstr, 0x279 +.equ strtok, 0x27A +.equ cmpstri, 0x16F +.equ stricmp, 0x407 +.equ memucmp, 0x3CC +.equ memcpy, 0x26A +.equ memchr, 0x273 +.equ memcmp, 0x270 +.equ _memset, 0x27B +.equ memmove, 0x26B +.equ memset, 0x27C +.equ add1_to_top, 0x51D +.equ push_gcd_then_cofactors, 0x59E +.equ and_onto_top, 0x579 +.equ are_units_consistent, 0x40F +.equ assign_between, 0x2AC +.equ push_mrow_aux, 0x31B +.equ CharNumber, 0x113 +.equ CheckGraphRef, 0x7D +.equ ST_flags, 0x443 +.equ ck_valid_float, 0x1E5 +.equ CkValidDelta, 0x1C3 +.equ cleanup_de_mem, 0x1EC +.equ cleanup_seq_mem, 0x1D7 +.equ clear_error_context, 0x44C +.equ FAccess, 0x3D4 +.equ compare_numbers, 0x50D +.equ convert_to_TI_92, 0x258 +.equ CountGrFunc, 0x1D5 +.equ cpt_gr_fun, 0x1D1 +.equ cpt_gr_param, 0x1D2 +.equ cpt_gr_polar, 0x1D3 +.equ CptDeltax, 0x1C1 +.equ CptDeltay, 0x1C2 +.equ CptFuncX, 0x1B9 +.equ CptIndep, 0x1C9 +.equ CptLastIndepDE, 0x1EF +.equ CreateEmptyList, 0x1E6 +.equ CTypeTable, 0x442 +.equ CustomBegin, 0x14A +.equ CustomEnd, 0x14C +.equ CustomFree, 0x150 +.equ CustomMenuItem, 0x14B +.equ DataTypeNames, 0x43B +.equ de_initRes, 0x1F0 +.equ de_loop, 0x1EB +.equ de_rng_no_graph, 0x2A2 +.equ delete_list_element, 0x2AF +.equ deStepCk, 0x1F9 +.equ did_push_divide_units, 0x3AE +.equ did_push_lincf, 0x572 +.equ did_push_var_val, 0x2AD +.equ divide_top, 0x527 +.equ does_push_fetch, 0x2AE +.equ dv_create_graph_titles, 0x117 +.equ dv_findColumn, 0x119 +.equ TIOS_EV_getAppID, 0x454 +.equ EQU_deStatus, 0x16E +.equ EQU_getNameInfo, 0x120 +.equ EQU_select, 0x11E +.equ EQU_setStyle, 0x11F +.equ ER_throwFrame, 0x507 +.equ ERD_dismissNotice, 0x476 +.equ ERD_notice, 0x475 +.equ estack_to_float, 0x469 +.equ EV_appA, 0x452 +.equ EV_appB, 0x453 +.equ EV_appSide, 0x458 +.equ EV_currentApp, 0x45C +.equ EV_errorCode, 0x46D +.equ TIOS_strtol, 0x4FF +.equ EV_quit, 0x48E +.equ EV_runningApp, 0x45D +.equ execute_graph_func, 0x1D0 +.equ FCreate, 0x3D6 +.equ FDelete, 0x3D7 +.equ FEof, 0x3D8 +.equ FFindNext, 0x3DA +.equ FGetC, 0x3DB +.equ FGetPos, 0x3DC +.equ FPutC, 0x3DF +.equ FindFunc, 0x1C5 +.equ FindGrFunc, 0x1C6 +.equ FirstNonblank, 0x4DE +.equ FirstSeqPlot, 0x1D6 +.equ fix_loop_displacements, 0x170 +.equ FLOATTAB, 0x464 +.equ ForceFloat, 0x47D +.equ FOpen, 0x3DE +.equ freeIdList, 0x4D6 +.equ FSetPos, 0x3E1 +.equ FSetVer, 0x3E4 +.equ FStatus, 0x3E5 +.equ FWrite, 0x3E7 +.equ FuncLineFlt, 0x1BF +.equ gdb_len, 0x1E0 +.equ gdb_recall, 0x1E2 +.equ gdb_store, 0x1E1 +.equ gen_version, 0x259 +.equ get_lb, 0x516 +.equ get_list_indices, 0x2B8 +.equ get_matrix_indices, 0x2B9 +.equ get_ub, 0x517 +.equ GetStatValue, 0x11B +.equ GetSysGraphRef, 0x8A +.equ GetTagStr, 0x46C +.equ GM_Derivative, 0x1B0 +.equ GM_DistArc, 0x1B1 +.equ GM_Inflection, 0x1AD +.equ GM_Integrate, 0x1AC +.equ GM_Intersect, 0x1AB +.equ GM_Math1, 0x1AF +.equ GM_Shade, 0x1B2 +.equ GM_TanLine, 0x1AE +.equ GM_Value, 0x1AA +.equ gr_active, 0x10B +.equ gr_add_fldpic, 0x1F6 +.equ gr_ck_solvergraph, 0x1FA +.equ gr_CptIndepInc, 0x1CA +.equ gr_de_axes_lbl, 0x1F2 +.equ gr_de_value, 0x1ED +.equ gr_del_locals, 0x1CB +.equ gr_del_vars_in_folder, 0x1F1 +.equ gr_delete_fldpic, 0x1F4 +.equ gr_DelFolder, 0x1CC +.equ gr_DispLabels, 0x1E3 +.equ gr_execute_de, 0x1F3 +.equ gr_execute_seq, 0x1D4 +.equ gr_find_de_result, 0x1E8 +.equ gr_find_el, 0x1F8 +.equ gr_find_func_index, 0x1EE +.equ gr_flags, 0x463 +.equ gr_initCondName, 0x1C8 +.equ gr_openFolder, 0x1CD +.equ gr_other, 0x10C +.equ GR_Pan, 0x1C4 +.equ gr_remove_fldpic, 0x1F5 +.equ gr_seq_value, 0x1DC +.equ gr_stopic, 0x1F7 +.equ gr_xres_pixel, 0x1B8 +.equ GR3_addContours, 0x1FB +.equ GR3_freeDB, 0x1FD +.equ GR3_handleEvent, 0x1FE +.equ GR3_paint3d, 0x1FF +.equ GR3_xyToWindow, 0x200 +.equ GraphActivate, 0x1FC +.equ GraphOrTableCmd, 0x1E4 +.equ GrAxes, 0x1B7 +.equ GrClipLine, 0x1C0 +.equ grFuncName, 0x1C7 +.equ GrLineFlt, 0x1BE +.equ GS_PlotAll, 0x202 +.equ GS_PlotTrace, 0x201 +.equ GT_BackupToScr, 0x20C +.equ GT_CalcDepVals, 0x20D +.equ GT_CenterGraphCursor, 0x20E +.equ GT_CursorKey, 0x20F +.equ GT_DE_Init_Conds, 0x22A +.equ GT_DspFreeTraceCoords, 0x210 +.equ GT_DspMsg, 0x212 +.equ GT_DspTraceCoords, 0x211 +.equ GT_Error, 0x213 +.equ GT_Format, 0x214 +.equ GT_FreeTrace, 0x215 +.equ GT_IncXY, 0x216 +.equ GT_KeyIn, 0x217 +.equ GT_Open, 0x21B +.equ GT_PrintCursor, 0x229 +.equ GT_QFloatCursorsInRange, 0x218 +.equ GT_Regraph, 0x219 +.equ GT_Regraph_if_neccy, 0x21A +.equ GT_SaveAs, 0x21C +.equ GT_SelFunc, 0x21D +.equ GT_Set_Graph_Format, 0x228 +.equ GT_SetCursorXY, 0x21F +.equ GT_SetGraphRange, 0x21E +.equ GT_ShowMarkers, 0x220 +.equ GT_Trace, 0x221 +.equ GT_ValidGraphRanges, 0x222 +.equ GT_WinBound, 0x223 +.equ GT_WinCursor, 0x224 +.equ GXcoord, 0x226 +.equ GYcoord, 0x225 +.equ GZ_Box, 0x22B +.equ GZ_Center, 0x22C +.equ GZ_Decimal, 0x22D +.equ GZ_Fit, 0x22E +.equ GZ_InOut, 0x22F +.equ GZ_Integer, 0x230 +.equ GZ_Previous, 0x231 +.equ GZ_Recall, 0x232 +.equ GZ_SetFactors, 0x233 +.equ GZ_Square, 0x234 +.equ GZ_Standard, 0x235 +.equ GZ_Stat, 0x236 +.equ GZ_Store, 0x237 +.equ GZ_Trig, 0x238 +.equ has_different_variable, 0x5A0 +.equ has_unit_base, 0x3AF +.equ hStrAppend, 0x45F +.equ index_after_match_endtag, 0x2B1 +.equ index_if_pushed_binomial_info, 0x5A1 +.equ index_if_pushed_qquad_info, 0x5A2 +.equ index_reductum_with_tag_base, 0x59F +.equ index_rmng_factor, 0x565 +.equ index_rmng_fctrs_start_base, 0x564 +.equ index_rmng_fctrs_start_base_tag, 0x563 +.equ index_rmng_fctrs_start_fctr_tag, 0x562 +.equ init_list_indices, 0x2BA +.equ init_matrix_indices, 0x2BB +.equ init_unit_system, 0x3B0 +.equ InitDEAxesRng, 0x1E9 +.equ InitDEMem, 0x1EA +.equ InitTimeSeq, 0x1D9 +.equ integer_non_unknown, 0x50C +.equ is_cFloat_agg, 0x465 +.equ is_complex_Float, 0x48B +.equ is_constant, 0x593 +.equ is_equivalent_to, 0x578 +.equ is_executable, 0x25A +.equ is_minus1, 0x508 +.equ is_neg_lead_numr_coef_re_part, 0x56D +.equ is_negative, 0x575 +.equ is_never0, 0x577 +.equ is_nonnegative, 0x574 +.equ is_nonpositive, 0x576 +.equ is_pathname, 0x3C6 +.equ is_polynomial_in_var_or_kern, 0x56B +.equ is_pos_int_and_eq_quantum, 0x509 +.equ is_positive, 0x573 +.equ is_reciprocal_of_quantum, 0x50A +.equ is_term_improper, 0x556 +.equ is_totally_polynomial, 0x56C +.equ is_units_term, 0x3B1 +.equ is_variable, 0x488 +.equ is_whole_number, 0x50B +.equ is0, 0x269 +.equ lead_conjunct_factor_index, 0x580 +.equ lead_disjunct_term_index, 0x57E +.equ linear_degree, 0x571 +.equ LIO_SendIdList, 0x3D0 +.equ LoadSymFromFindHandle, 0x281 +.equ LOC_formatDate, 0x590 +.equ LOC_getLocalDateFormat, 0x58F +.equ LOC_localVersionDate, 0x591 +.equ MO_option, 0x447 +.equ negate_top, 0x525 +.equ next_token, 0x3C7 +.equ next_var_or_kernel_index, 0x56E +.equ NG_control, 0x466 +.equ nonblank, 0x3C8 +.equ OO_appGetPublicStorage, 0x425 +.equ OO_appIsMarkedDelete, 0x426 +.equ OO_appMarkDelete, 0x427 +.equ OO_AppNameToACB, 0x406 +.equ OO_appSetPublicStorage, 0x429 +.equ OO_Deref, 0x3FB +.equ TIOS_ldiv, 0x5BD +.equ OO_CondGetAttr, 0x3FA +.equ OO_Destroy, 0x423 +.equ OO_DestroyAll, 0x4F5 +.equ OO_firstACB, 0x451 +.equ OO_GetAppAttr, 0x3FC +.equ OO_GetAttr, 0x3FD +.equ OO_HasAttr, 0x3FE +.equ OO_InstallAppHook, 0x490 +.equ OO_InstallAppHookByName, 0x492 +.equ OO_InstallSystemHook, 0x404 +.equ OO_New, 0x3FF +.equ OO_NextACB, 0x402 +.equ OO_PrevACB, 0x403 +.equ OO_SetAppAttr, 0x400 +.equ OO_SetAttr, 0x401 +.equ OO_SuperFrame, 0x48F +.equ OO_UninstallAppHook, 0x491 +.equ OO_UninstallAppHookByName, 0x493 +.equ OO_UninstallSystemHook, 0x405 +.equ or_onto_top, 0x57B +.equ OSModKeyStatus, 0x431 +.equ paint_all_except, 0x11D +.equ ParseSymName, 0x78 +.equ PlotDel, 0x203 +.equ PlotDup, 0x207 +.equ PlotGet, 0x205 +.equ PlotInit, 0x206 +.equ PlotLookup, 0x209 +.equ PlotPut, 0x204 +.equ PlotSize, 0x208 +.equ primary_tag_list, 0x467 +.equ pSymPG, 0x430 +.equ push_ans_entry, 0x2B0 +.equ push_auto_units_conversion, 0x3B2 +.equ push_but_conjunct_factor, 0x582 +.equ push_but_factor, 0x561 +.equ push_but_term, 0x56A +.equ push_constant_factors, 0x55D +.equ push_constant_terms, 0x566 +.equ push_dependent_factors, 0x55F +.equ push_dependent_terms, 0x568 +.equ push_div_dif_1c, 0x58D +.equ push_div_dif_1f, 0x58C +.equ push_float_qr_fact, 0x2BC +.equ push_format, 0x315 +.equ push_independent_factors, 0x560 +.equ push_independent_terms, 0x569 +.equ TIOS_abs, 0x5BA +.equ push_long_to_integer, 0x4E3 +.equ push_lu_fact, 0x2BD +.equ push_make_proper, 0x557 +.equ push_minus_recip_of_quantum, 0x510 +.equ push_negate_quantum_as_negint, 0x4F1 +.equ push_nonconstant_factors, 0x55E +.equ push_nonconstant_terms, 0x567 +.equ push_nonnumeric_factors, 0x55C +.equ push_parse_prgm_or_func_text, 0x3C9 +.equ push_pi, 0x512 +.equ push_pi_on_quantum, 0x513 +.equ push_poly_deg_in_var_or_kernel, 0x570 +.equ push_poly_qr, 0x59D +.equ push_quantum_as_nonnegative_int, 0x50E +.equ push_quantum_pair_as_pos_frac, 0x511 +.equ push_reciprocal, 0x597 +.equ push_reciprocal_of_quantum, 0x50F +.equ push_simplify, 0x44E +.equ push_simplify_statements, 0x44F +.equ push_sq_matrix_to_whole_number, 0x3C0 +.equ push_standardize, 0x558 +.equ push_symbolic_qr_fact, 0x2BE +.equ push_trig, 0x535 +.equ push_ulong_to_integer, 0x4E4 +.equ push_unit_system_list, 0x3B3 +.equ push_ushort_to_integer, 0x4E5 +.equ push_var, 0x3CB +.equ push_var_kern_tail, 0x56F +.equ push_zero_partial_column, 0x3C2 +.equ push0, 0x4E7 +.equ push1, 0x4E8 +.equ QActivePlots, 0x20A +.equ QPlotActive, 0x20B +.equ QSkipGraphErr, 0x1E7 +.equ QstatRcl, 0x40B +.equ raise_to_top, 0x529 +.equ ReallocExprStruct, 0x14D +.equ recall_data_var, 0x112 +.equ Regraph, 0x1B6 +.equ remaining_conjuncts_index, 0x581 +.equ remaining_disjuncts_index, 0x57F +.equ replace_top_with_reciprocal, 0x52D +.equ replace_top2_with_and, 0x57A +.equ replace_top2_with_difference, 0x51C +.equ replace_top2_with_imre, 0x559 +.equ replace_top2_with_or, 0x57C +.equ replace_top2_with_pow, 0x52A +.equ replace_top2_with_prod, 0x523 +.equ replace_top2_with_ratio, 0x528 +.equ replace_top2_with_sum, 0x519 +.equ rngLen, 0x1DF +.equ run_one_seq, 0x1DB +.equ ScrRectDivide, 0x28 +.equ SearchExprStruct, 0x14E +.equ seqStepCk, 0x1DE +.equ seqWebInit, 0x1DA +.equ SetGraphMode, 0x1B5 +.equ setup_more_graph_fun, 0x1CE +.equ setup_unit_system, 0x3B4 +.equ sf_width, 0x4D3 +.equ SP_Define, 0x110 +.equ spike_chk_gr_dirty, 0x11A +.equ spike_geo_titles, 0x115 +.equ spike_in_editor, 0x116 +.equ spike_optionD, 0x114 +.equ spike_titles_in_editor, 0x118 +.equ statEnd, 0x409 +.equ statFree, 0x40A +.equ statStart, 0x408 +.equ StepCk, 0x1DD +.equ store_data_var, 0x111 +.equ store_func_def, 0x2B4 +.equ store_to_subscripted_element, 0x2B5 +.equ FClose, 0x3D5 +.equ subtract_from_top, 0x51B +.equ subtract1_from_top, 0x51E +.equ time_loop, 0x1D8 +.equ times_top, 0x522 +.equ tokenize_if_TI_92_or_text, 0x265 +.equ TokenizeName, 0x3E9 +.equ FFindFirst, 0x3D9 +.equ unlock_more_graph_fun, 0x1CF +.equ ValidateStore, 0x8D +.equ VarGraphRefBitsClear, 0x268 +.equ VarOptList, 0x444 +.equ VarSaveTitle, 0x290 +.equ VarStoreLink, 0x87 +.equ WinBeginPaint, 0x500 +.equ WinBitmapSizeExt, 0x411 +.equ WinEndPaint, 0x501 +.equ WinLineExt, 0x47C +.equ WinRemove, 0x414 +.equ XCvtFtoP, 0x1BD +.equ XCvtPtoF, 0x1BA +.equ YCvtFtoP, 0x1BC +.equ YCvtFtoWin, 0x1B3 +.equ YCvtPtoF, 0x1BB +.equ did_map_aggregate_arg, 0x5B8 +.equ did_push_approx_inflection_point, 0x5B0 +.equ errno, 0x5D9 +.equ estack_max_index, 0x5BF +.equ EV_flags, 0x5DF +.equ Float0Index, 0x5D0 +.equ Float1Index, 0x5D1 +.equ FloatExp1Index, 0x5D4 +.equ FloatHalfIndex, 0x5E0 +.equ FloatMinus1Index, 0x5D2 +.equ FloatPiIndex, 0x5D3 +.equ IM_re_tol, 0x5C1 +.equ index_false, 0x5D6 +.equ index_true, 0x5D5 +.equ Integer0Index, 0x5CD +.equ Integer1Index, 0x5CE +.equ Integer2Index, 0x5E1 +.equ IntegerMinus1Index, 0x5CF +.equ is_real, 0x5A9 +.equ is_undefined, 0x5B7 +.equ NG_such_that_index, 0x5D7 +.equ OSCheckLinkOpen, 0x5E3 +.equ add_to_top, 0x518 +.equ RM_Type, 0x5DC +.equ TIOS_labs, 0x5BC +.equ RAtionalize_tol, 0x5C0 +.equ replace_top_with_post_simplified, 0x5B6 +.equ WinStrXYWrap, 0x5DB +.equ TIOS_div, 0x5BB +.equ UpdateWindows, 0x2B +.equ push_user_func, 0x2B3 +.equ is1, 0x2FD +.equ FGetSize, 0x3DD +.equ FRead, 0x3E0 +.equ FSetBufSize, 0x3E2 +.equ FSetSize, 0x3E3 +.equ FType, 0x3E6 +.equ GD_HVLine, 0x178 +.equ GD_Circle, 0x176 +.equ GD_Pen, 0x179 +.equ GD_Eraser, 0x17A +.equ GD_Text, 0x17B +.equ GD_Select, 0x17C +.equ GD_Contour, 0x17D +.equ GD_Line, 0x177 +.equ HomeAlone, 0x506 +.equ HS_getAns, 0x241 +.equ HomeExecute, 0x10E +.equ HomePushEStack, 0x10F +.equ HS_getEntry, 0x242 +.equ HS_countFIFO, 0x23D +.equ HS_freeFIFONode, 0x240 +.equ HS_deleteFIFONode, 0x23E +.equ HS_freeAll, 0x23F +.equ HS_chopFIFO, 0x23C +.equ HS_getFIFONode, 0x243 +.equ HS_newFIFONode, 0x245 +.equ HS_pushFIFONode, 0x246 +.equ HS_popEStack, 0x244 +.equ push_matrix_product, 0x3C5 +.equ push_list_times, 0x3BE +.equ push_list_plus, 0x3BD +.equ push_pow, 0x30F +.equ push_and, 0x5AB +.equ push_arg_plus_1, 0x51F +.equ push_arg_minus_1, 0x520 +.equ push_assignment, 0x4DD +.equ push_difference, 0x51A +.equ push_dot_div, 0x4CD +.equ push_dot_add, 0x4A0 +.equ push_dot_exponentiate, 0x596 +.equ push_dot_mult, 0x4A1 +.equ push_dot_sub, 0x4A2 +.equ push_equals, 0x5A3 +.equ push_exponentiate, 0x595 +.equ push_to_sphere, 0x329 +.equ push_factorial, 0x540 +.equ push_greater_than, 0x5A5 +.equ push_greater_than_or_equals, 0x5A7 +.equ push_indir_name, 0x2B2 +.equ push_degrees, 0x314 +.equ push_less_than, 0x5A6 +.equ push_less_than_or_equals, 0x5A8 +.equ push_negate, 0x524 +.equ push_not, 0x5AA +.equ push_not_equals, 0x5A4 +.equ push_or, 0x5AC +.equ push_percent, 0x555 +.equ push_radians, 0x4B3 +.equ push_product, 0x521 +.equ push_ratio, 0x526 +.equ push_sum, 0x594 +.equ push_substitute_simplify, 0x5B9 +.equ push_substitute_using_such_that, 0x5BE +.equ push_substitute_no_simplify, 0x489 +.equ push_to_cylin, 0x328 +.equ did_push_to_polar, 0x313 +.equ push_square, 0x52C +.equ push_setgraph, 0x322 +.equ push_getmode, 0x318 +.equ push_rand, 0x31F +.equ push_getkey, 0x316 +.equ push_setmode, 0x323 +.equ push_settable, 0x324 +.equ push_switch, 0x327 +.equ push_acos, 0x537 +.equ push_abs, 0x543 +.equ push_acosh, 0x53E +.equ push_1st_derivative, 0x5AE +.equ push_approx, 0x4F7 +.equ push_asinh, 0x53D +.equ push_asin, 0x536 +.equ push_augment, 0x496 +.equ push_atanh, 0x53F +.equ push_atan, 0x538 +.equ push_char, 0x497 +.equ push_ceiling, 0x54B +.equ push_coldim, 0x498 +.equ push_colnorm, 0x499 +.equ push_comdenom, 0x59B +.equ push_conj, 0x547 +.equ push_cosh, 0x53B +.equ push_cos, 0x533 +.equ push_cross_product, 0x4CE +.equ push_cumsum, 0x49A +.equ push_csolve, 0x585 +.equ push_czeros, 0x587 +.equ push_def_int, 0x5B2 +.equ push_desolve, 0x58B +.equ push_determinant, 0x49D +.equ push_diag, 0x49E +.equ push_dimension, 0x49F +.equ push_dotproduct, 0x4A3 +.equ push_eigvc, 0x4CF +.equ push_eigvl, 0x4D0 +.equ push_exp, 0x52E +.equ push_expand, 0x59A +.equ push_factor, 0x59C +.equ push_floor, 0x54A +.equ push_fractional_part, 0x54E +.equ push_gcd_numbers, 0x514 +.equ push_randnorm, 0x4B5 +.equ push_getfold, 0x317 +.equ push_gettype, 0x319 +.equ push_identity_mat, 0x4A4 +.equ push_im, 0x546 +.equ push_re, 0x545 +.equ push_comb, 0x542 +.equ push_perm, 0x541 +.equ push_part, 0x31C +.equ push_instring, 0x31A +.equ push_integer_remainder, 0x550 +.equ push_integer_part, 0x54D +.equ push_integer_gcd, 0x551 +.equ push_integer_lcm, 0x552 +.equ push_integer_quotient, 0x54F +.equ push_is_prime, 0x515 +.equ push_left, 0x4A5 +.equ did_push_series, 0x588 +.equ push_lim, 0x5AD +.equ push_ln, 0x52F +.equ push_list_to_mat, 0x4A6 +.equ push_log10, 0x530 +.equ push_mat_to_list, 0x4A8 +.equ push_matnorm, 0x4A7 +.equ push_max, 0x58A +.equ push_median, 0x4AA +.equ push_mean, 0x4A9 +.equ push_mid, 0x4AB +.equ push_min, 0x589 +.equ push_mod, 0x54C +.equ push_mrow, 0x4AC +.equ did_push_anti_deriv, 0x5B1 +.equ push_mrowadd, 0x4AD +.equ push_newmat, 0x4AF +.equ push_newlist, 0x4AE +.equ push_nint, 0x5B3 +.equ push_nsolve, 0x583 +.equ push_nth_derivative, 0x5AF +.equ push_denominator, 0x55B +.equ push_numerator, 0x55A +.equ push_max2, 0x599 +.equ push_max1, 0x554 +.equ push_min1, 0x553 +.equ push_min2, 0x598 +.equ push_ord, 0x4B0 +.equ push_r_cis, 0x549 +.equ push_pttest, 0x31D +.equ push_pxltest, 0x31E +.equ push_when, 0x57D +.equ push_zeros, 0x586 +.equ push_prodlist, 0x4B2 +.equ push_randmat, 0x4B4 +.equ push_randpoly, 0x320 +.equ push_right, 0x4B7 +.equ push_rotate, 0x4B8 +.equ push_round, 0x4B9 +.equ push_row_echelon, 0x4BE +.equ push_red_row_ech, 0x4B6 +.equ push_rowdim, 0x4BB +.equ push_rowadd, 0x4BA +.equ push_rowswap, 0x4BD +.equ push_rownorm, 0x4BC +.equ push_sequence, 0x4BF +.equ push_setfold, 0x321 +.equ push_shift, 0x4C0 +.equ push_sign, 0x544 +.equ push_sin2, 0x531 +.equ push_sin, 0x532 +.equ push_simult, 0x4C1 +.equ push_sinh, 0x53A +.equ push_solve, 0x584 +.equ push_sqrt, 0x52B +.equ push_string, 0x326 +.equ push_stddev, 0x4C3 +.equ push_submat, 0x4C4 +.equ push_str_to_expr, 0x325 +.equ push_sumlist, 0x4C5 +.equ push_summation, 0x5B4 +.equ push_extended_prod, 0x5B5 +.equ push_tan, 0x534 +.equ push_tanh, 0x53C +.equ push_unitv, 0x4C8 +.equ push_variance, 0x4C9 +.equ push_rec_to_angle, 0x539 +.equ push_phase, 0x548 + +.equ ScreenClear, 0x19e +.equ bcdadd, 0xb6 +.equ bcdcmp, 0xbb +.equ bcddiv, 0xb9 +.equ bcdbcd, 0xbd +.equ bcdmul, 0xb8 +.equ bcdneg, 0xba +.equ bcdsub, 0xb7 +.equ bcdlong, 0xbc + +.equ LCD_MEM, 0x4c00 +.equ doorsos__main_lcd, LCD_MEM +.equ doorsos__globals, 0x4c00 + +.macro ROM_CALL routine + move.l 0xC8,a4 + move.l \routine*4(a4),a4 + jsr (a4) +.endm + +.macro ROM_CALL2 routine + move.l 0xC8,a4 + move.l \routine*4(a4),a4 +.endm + +.macro incb reg + addq.b #1,\reg +.endm +.macro incw reg + addq.w #1,\reg +.endm +.macro incl reg + addq.l #1,\reg +.endm + +.macro decb reg + subq.b #1,\reg +.endm +.macro decw reg + subq.w #1,\reg +.endm +.macro decl reg + subq.l #1,\reg +.endm + + +.macro push_b val + move.b \val,-(a7) +.endm +.macro push_w val + move.w \val,-(a7) +.endm +.macro push_l val + move.l \val,-(a7) +.endm + +.macro pop_b val + move.b (a7)+,\val +.endm +.macro pop_w val + move.w (a7)+,\val +.endm +.macro pop_l val + move.l (a7)+,\val +.endm + + +.macro pushm regs + movem.l \regs,-(a7) +.endm + +.macro popm regs + movem.l (a7)+,\regs +.endm + +.macro push reg + move.l \reg,-(a7) +.endm + +.macro pop reg + move.l (a7)+,\reg +.endm + + +.equ doorsos__SYM_ENTRY.name, 0x0 +.equ doorsos__SYM_ENTRY.flags, 0x8 +.equ doorsos__SYM_ENTRY.hVal, 0xc +.equ doorsos__NULL, 0 +.equ doorsos__H_NULL, 0 +.equ doorsos__RAND_MAX, 0x7fff +.equ ACTIVITY_IDLE, 0 +.equ ACTIVITY_BUSY, 1 +.equ ACTIVITY_PAUSED, 2 +.equ ER_STOP, 2 +.equ ER_DIMENSION, 230 +.equ ER_MEMORY, 670 +.equ ER_MEMORY_DML, 810 +.equ UNDEFINED_TAG, 0x2a +.equ LIST_TAG, 0xd9 +.equ MATRIX_TAG, 0xdb +.equ END_TAG, 0xe5 +.equ CALC_TI89, 0 +.equ CALC_TI92PLUS, 1 +.xdef _nostub +.xdef _ti89 +.xdef _ti92plus |
