83Plus:Hooks:9BCC
Contents
Synopsis
Name: Localize Hook
Hook Pointer Block Address: 9BCC
Hook Enable BCALL: 4F93
Hook Disable BCALL: 4F96 (note this resets (localLanguage) to English)
Hook Call BCALL: 4006
Hook Active Flag: 1, (iy + 35h)
This hook allows you to change almost every string in TIOS (except tokens, which are handled by the token hook) as well as the default font bitmaps.
Using the Hook
This hook is by far the most complicated to handle properly.
- Most conditions pass the default string in HL. You are expected to return the string to be displayed in HL. localTokStr is a good place to copy your strings. Most of these conditions will not display anything if Z is set. Some ignore the zero flag.
- Condition 9 and the font conditions do not give you the default, but they will display a string or character you define at HL if you return Z. (You must still save all registers if you want to use the default string.)
- The conditions for menu quasi-functions, data types, and configuration variables do not give you the default, but require you to provide a string to display.
- The memory reset conditions pass a default string, but will display whatever is output regardless of flags. The zero flag in this case is used to specify cursor coordinates: Z to use the default coordinates; NZ to use the coordinates given in DE. Default coordinates are not passed. (Note this applies only to the RAM and defaults resets. The Arc Vars is a standard condition.)
- A few conditions seem to want you to display the string yourself. These conditions tell you nothing and display only the default string if NZ is set.
In many situations, it is permissible to insert your own values for cursor and pen coordinates, and indeed TI's apps sometimes do: the hook is only called when the string is actually about to be displayed.
Some items need to be returned as zero-terminated strings, some as one-byte-length prefixed strings. As a general rule of thumb, strings that will be displayed in menus are 1BL, and others are usually ZT.
Required Conditions
The careful reader will notice that several conditions cannot be satisfied by a simple "save all and return NZ." The following conditions must be handled specially, even if your hook does nothing else.
Menu Quasi-Functions
- A = 0Ah
- HL must be set to point to a one-byte length string
- E = identifies a function
E | String |
---|---|
69 | Select |
7E | maximum |
7D | minimum |
7C | dr/dθ |
7A | dy/dt |
7B | dx/dt |
77 | dy/dx |
78 | ∫f(x)dx |
79 | zero |
76 | intersect |
75 | value |
6D | Pen |
5B | ZoomFit |
Configuration Variables
- A = 3Ah
- HL must be set to point to a one-byte length string
- B identifies the variable
- 0 = Window
- 1 = RclWindow
- 2 = TblSet
Data Types
- A = 3Bh
- HL must be set to point to a zero-terminated string
- B = variable type
Memory Reset
- A = identifies reset type
- 42h = "Memory Cleared"
- 43h = "RAM Cleared"
- 44h = "Defaults Set"
- HL points to the default zero-terminated string (page 19h) which may be modified
- You must either:
- Set Z to place at the default coordinates, or
- Return the coordinates where the string should be displayed in DE (D = column, E = row.)
Font Conditions
For a while this hook was called the character hook, simply because of these conditions.
Small Font Bitmap
- A = 75h
- HL = character << 3
- Return NZ for default, or set HL to points to an 8-byte small font structure (see the font hook for details.)
Large Font Bitmap
- A = 76h
- HL = character << 3
- B = character (possibly unsupported)
- Return NZ for default, or set HL to points to a 7-byte large font structure (see the font hook for details.)
Small Font Width
- A = 77h
- HL = character << 3
- Return NZ for default, or set B to the desired width of the character.
Large Font Bitmap (fracDrawLFont mode)
- A = 78h
- HL = character << 3
- B = character (possibly unsupported)
- Return NZ for default, or set HL to point to a 7-byte large font structure. Note that in this case, as with the font hook, the data will be shifted and copied to lFontRecord+1, so your data must not partially overlap with this area (as it would if you copied the 7 bytes to lFontRecord.)
Standard Conditions
Virtually any string which is not handled by one of the conditions other conditions described is handled by a "standard" condition.
- A identifies a string to be displayed
- HL points to the default zero terminated string, which may be modified
- Return Z if you display it yourself.
Other Optional Conditions
Mode Screen
- A = 0 when displaying the cursor, 1 when displaying the string
- HL identifies an option.
- A=0: Return Z if you display it yourself
- A=1: return Z if a custom cursor width (number of spaces) is specified in A.
Menu Items (condition 7)
- A = 7
- HL points to the default one byte length string (page 1) which may be modified
- E identifies a string
- Return Z if you display it yourself
Menu Items (condition 9)
- A = 9
- E identifies a string
- Return NZ for default, or set HL to points to a one byte length string
Error Messages
- A = 0Ch
- E = ((error code) & 7fh) - 1
- (Overflow is 0, Divide by zero is 1, etc.)
- HL points to the default zero terminated string (page 7) which may be modified
Done
- A = 0Dh
- Return Z if you display it yourself
Variable Names
- A = 14h
- B = identifies a variable
- HL points to the default zero terminated string (page 3) which may be modified
- Note that the string does not include the = sign
Stat Plot Editor
- A = 28h when displaying a cursor on a large font option
- A = 29h when displaying a cursor on a small font option
- A = 2Ah when displaying a large font option
- A = 2Bh when displaying a small font option
- E identifies an option
- HL points to the default zero terminated string (page 5) which may be modified
- Zero flag is ignored
Stat Plot Editor Coordinates
- A = 2Ch: coordinates of Data List name
- A = 2Dh: coordinates of Xlist name
- A = 2Eh: about to draw Ylist
- No coordinates passed; you must adjust them yourself
- A = 2Fh: coordinates of Freq
- H = column, L = row, which may be modified
"EQUATION SOLVER"
- A = 31h
- HL points to the default zero terminated string (in RAM) which may be modified
- Zero flag is ignored
"PROGRAM"
- A = 56h
- E = 88h if displaying in the program editor, where the string will be truncated to 8 characters (this is tentative at best)
- HL points to the default zero terminated string (page 6) which may be modified
- Return Z if you display it yourself
About screen options
- A = 65h: "TI-83 Plus"
- A = 70h: "Help: www.ti.com/calc"
- A = 7Ch: "TI-83 Plus Silver Edition"
- A = 7Dh: "PROD. ID"
- A = 86h: "TI-84 Plus"
- A = 87h: "TI-84 Plus Silver Edition"
- HL points to the default string (page 1) which may be modified
- (HL) is the X coordinate where the string should be displayed
- (HL+1) is the Y coordinate
- (HL+2) to (HL+n) are a zero-terminated string to display
- Return Z if you display it yourself
Summary
Please note that all of the left-hand column values are hexadecimal, not decimal
A= | +0 | +1 | +2 | +3 | +4 | +5 | +6 | +7 |
---|---|---|---|---|---|---|---|---|
00 | Mode | Mode | "PMT:" | "RAM FREE" | "ARC FREE" | "SELECT" | " TRANSMIT" | Menu |
08 | ? | Menu | MQF | "ERR:" | Error | Done | "Rcl " | "Name" |
10 | "Name=" | "WINDOW" | "ZOOM FACTORS" | "TABLE SETUP" | Vars | "Indpnt:" | "Depend:" | "bound" |
18 | "left-rt" | "eqn:0=" | "Plot1" | "Plot2" | "Plot3" | "On" | "Off" | "Axis" |
20 | ? | "Type:" | "Data List:" | "Data Axis:" | "Mark:" | "Xlist:" | "Ylist:" | "Freq:" |
28 | StatPlot | Stat Plot | Stat Plot | Stat Plot | Stat Plot Coords | Stat Plot Coords | Stat Plot Coords | Stat Plot Coords |
30 | ? | "EQUATION SOLVER" | "MATRIX[" | "CATALOG" | "Waiting..." | "Receiving..." | "DELETE BYTES" | " Receiving..." |
38 | "Certificate" | "Validating..." | Config | Data types | "MEMORY BACKUP" | "IDList" | ? | ? |
40 | ? | ? | "Memory Cleared" | "RAM Cleared" | "Defaults Set" | ? | ? | ? |
48 | ? | ? | ? | ? | ? | ? | ? | ? |
50 | ? | ? | ? | ? | ? | "Arc Vars Cleared" | "PROGRAM" | ? |
58 | ? | ? | ? | ? | ? | ? | ? | ? |
60 | ? | ? | ? | ? | ? | "TI-83 Plus" | ? | "DONE" |
68 | ? | ? | ? | ? | ? | ? | ? | ? |
70 | "Help: www.ti.com/calc" | ? | "Garbage" | "Collecting..." | ? | Small Font | Large Font | Width |
78 | Large Font | ? | ? | ? | "TI-83 Plus SE" | "PROD. ID" | ? | ? |
80 | ? | ? | ? | ? | ? | ? | "TI-84 Plus" | "TI-84 Plus SE" |
Index of Strings
Mode Screen Options
Mode Screen | ||
---|---|---|
H | L | String |
FE | FB | G-T |
FE | 54 | Horiz |
FE | 55 | Full |
FE | AD | re^θi |
FE | AE | a+bi |
FE | AC | real |
FE | 6A | Simul |
FE | 69 | Sequential |
FE | 70 | Dot |
FE | 6F | Connected |
FE | 59 | Seq |
FE | 58 | Pol |
FE | 57 | Par |
FE | 56 | Func |
FE | 4E | Degree |
FE | 4D | Radian |
97 | 00 | 9 |
96 | 00 | 8 |
95 | 00 | 7 |
94 | 00 | 6 |
93 | 00 | 5 |
92 | 00 | 4 |
91 | 00 | 3 |
90 | 00 | 2 |
8F | 00 | 1 |
8E | 00 | 0 |
FE | 52 | Float |
FE | 51 | Eng |
FE | 50 | Sci |
FE | 4F | Normal |
Format Screen | ||
FE | B6 | ExprOff |
FE | B5 | ExprOn |
FE | 75 | LabelOn |
FE | 76 | LabelOff |
FE | 72 | AxesOff |
FE | 71 | AxesOn |
FE | 73 | GridOn |
FE | 74 | GridOff |
FE | 6E | CoordOff |
FE | 6D | CoordOn |
FE | 6B | PolarGC |
FE | 6C | RectGC |
FE | B1 | uw |
FE | B0 | vw |
FE | AF | uv |
FE | EF | Web |
FE | F0 | Time |
Table Setup Screen | ||
FE | 5D | DependAsk |
FE | 5C | DependAuto |
FE | 5B | IndpntAsk |
FE | 5A | IndpntAuto |
Stat Plot Options
E | String |
---|---|
0E | On |
10 | Off |
12 | Plot1 |
14 | Plot2 |
16 | Plot3 |
18 | (Scatter) |
1A | (XYLine) |
1C | (ModBox) |
1E | (Histogram) |
20 | (Box) |
22 | (Normal) |
24 | (Mark Box) |
26 | (Mark Cross) |
28 | (Mark Dot) |
2A | X |
2C | Y |
Condition 7
E | String |
---|---|
01 | Window... |
02 | Zoom... |
03 | GDB... |
04 | Picture... |
05 | String... |
06 | Statistics... |
07 | Table... |
08 | Function... |
09 | Parametric... |
0A | Polar... |
0B | On/Off... |
0C | Reset... |
0D | |
0E | Defaults... |
0F | Finance... |
10 | All RAM... |
11 | Vars... |
12 | Apps... |
13 | Both... |
14 | All Memory... |
15 | Group... |
16 | Resetting RAM erases all data and programs from RAM. |
17 | Resetting Vars erases all data and programs from Archive. |
18 | Resetting Apps erases all Apps from Archive. |
19 | Resetting Both erases all data, programs & apps from Archive. |
1A | Resetting ALL will erase all data, programs & Apps from RAM & Archive. |
1B | |
1C | ALL |
1D | ANGLE |
1E | APPLICATIONS |
1F | ARCHIVE |
20 | Are You Sure? |
21 | |
22 | |
23 | CALC |
24 | CALCULATE |
25 | CPX |
26 | CTL |
27 | |
28 | DISTR |
29 | DRAW |
2A | |
2B | Σ |
2C | EDIT |
2D | EQ |
2E | |
2F | EXEC |
30 | FUNCTION |
31 | GRAPH DATABASE |
32 | I/O |
33 | LOGIC |
34 | MARK |
35 | MATH |
36 | MEMORY |
37 | MEMORYBACKUP |
38 | |
39 | NAMES |
3A | NEW |
3B | NUM |
3C | ON/OFF |
3D | OPS |
3E | PARAMETRIC |
3F | PICTURE |
40 | PLOTS |
41 | POINTS |
42 | POLAR |
43 | PRB |
44 | PTS |
45 | RAM |
46 | RECEIVE |
47 | SELECT |
48 | SEND |
49 | STAT PLOTS |
4A | RESET ARC BOTH |
4B | RESET ARC APPS |
4C | RESET ARC VARS |
4D | RESET DEFAULTS |
4E | RESET MEMORY |
4F | RESET RAM |
50 | TESTS |
51 | STO |
52 | STRING |
53 | TABLE |
54 | TEST |
55 | Error in Xmit |
56 | TRANSMIT |
57 | T/θ |
58 | TYPE |
59 | U/V/W |
5A | VARS |
5B | XY |
5C | X/Y |
5D | Y-VARS |
5E | ZOOM |
5F | ZT/Zθ |
60 | ZU |
61 | ZX/ZY |
62 | GROUP |
63 | UNGROUP |
64 | DONE |
65 | GarbageCollect? |
Condition 9
E | String |
---|---|
00 | All+... |
01 | All-... |
02 | Lists to TI82... |
03 | Back Up... |
04 | Receive |
05 | Quit (Link error) |
0B | SendID |
0C | SendOS |
0D | Yes (Delete) |
0E | No |
15 | Quit (Normal error) |
18 | Edit... |
1C | Create New (Program) |
22 | Mem Mgmt/Del... |
24 | Yes (Reset) |
26 | SetFactors... |
28 | TVM Solver... |
29 | Solver... |
2A | Plot1... |
2B | Plot2... |
2C | Plot3... |
2D | [A] |
2E | [B] |
2F | [C] |
30 | [D] |
31 | [E] |
32 | [F] |
33 | [G] |
34 | [H] |
35 | [I] |
36 | [J] |
41 | Z-Test... |
42 | T-Test... |
43 | 2-SampZTest... |
44 | 2-SampTTest... |
45 | 1-PropZTest... |
46 | 2-PropZTest... |
47 | ZInterval... |
48 | TInterval... |
49 | 2-SampZInt... |
4A | 2-SampTInt... |
4B | 1-PropZInt... |
4C | 2-PropZInt... |
4D | χ2-Test... |
4E | 2-SampFTest... |
4F | LinRegTTest... |
50 | All... |
51 | Real... |
52 | Complex... |
53 | List... |
54 | Matrix... |
55 | Y-Vars... |
56 | Prgm... |
57 | Pic... |
58 | GDB... |
59 | String... |
5B | Apps... |
5C | AppVars... |
5D | Group... |
5E | Done |
60 | About |
61 | Create New (Group) |
Editable Variables
B | String |
---|---|
02 | Xscl |
03 | Yscl |
0A | Xmin |
0B | Xmax |
0C | Ymin |
0D | Ymax |
0E | Tmin |
0F | Tmax |
10 | θmin |
11 | θmax |
1A | TblMin |
1B | PlotStart |
1D | nMax |
1F | nMin |
21 | ΔTbl |
22 | Tstep |
23 | θstep |
28 | XFact |
29 | YFact |
2B | N |
2C | I% |
2D | PV |
2E | PMT |
2F | FV |
30 | P/Y |
31 | C/Y |
34 | PlotStep |
36 | Xres |