Official Name: AppStartMouse
TI-83+/SE & TI-84+/SE BCALL Address: 4D47
TI-84+CSE BCALL Address: 4D2F (useless, see comments)
Initializes mouse, displays mouse cursor on screen, and waits for a keypress.
On the TI-84+CSE, this (and all mouse routines) has no actual LCD code, so the calculator will just freeze until you press enter.
- A: 0Ah if arrow key pressed, 0Ch if enter key pressed
- 986D: Current mouse cursor coordinates
- 9E4E on the TI-84+CSE (useless)
- Cursor turned off
- Run indicated turned off
- Mouse cursor displayed at center of LCD
- BC, DE, HL
This entry point does not clear the screen before displaying the mouse cursor. It waits for a keypress, but only responds to the arrow keys and the enter key. Use the AppUpdateMouse entry point to update the cursor on the screen and wait for another keypress.
All of the LCD I/O has been stripped from all mouse routines in OS 4.x (that is, the TI-84+CSE), so the mouse routines are useless. Otherwise, the code is unchanged; TI didn't even expand the column variable to 2 bytes, so the code couldn't be made to work anyway without being largely rewritten. You'd also have to find a lot more scrap RAM (maybe PlotSScreen or SaveSScreen).
8100h appears to store the y coordinate for the mouse (LCD driver style). 8101h is the x coordinate (byte aligned). 986Dh holds the actual pixel coordinates. Or maybe it's 8122h. Not sure. When this paints the mouse, it seems to store a copy of the former background to 811Ah
Here's a fragment of the routine's code in OS 2.55:
; ROM page 7B: AppStartMouse: 78F9: call 75B0 call 77D9 78FF: ld a, 01 ld (0032), a ld (000A), a set 0, (iy + 2C) ei halt call 04B2 or a jr z, 78FF di ld hl, (986D) ld (8122), hl res 0, (iy + 2C) cp 0A jr c, 7934 cp F3 jr nc, 7934 cp 36 jr nz, 78FF ld a, (iy + 12) xor 00 ld (iy + 12), a jr 78FF AppUpdateMouse: 7A56: res 7, (iy + 2C) call 76BD jp 78FF
Dan Englender for the RAM variables
BrandonW has also done more work on the mouse routines.