| OP1 | +1 | +2 | +3 | +4 | +5 | +6 | +7 | +8 |
|---|---|---|---|---|---|---|---|---|
| TYPE | Variable name | |||||||
| Value | Equate | Variable Type |
|---|---|---|
| $00 | RealObj | Real number |
| $01 | ListObj | List |
| $02 | MatObj | Matrix |
| $03 | EquObj | Equation |
| $04 | StrngObj | String |
| $05 | ProgObj | Program |
| $06 | ProtProgObj | Protected program (Hidden from EDIT menu) |
| $07 | PictObj | Picture |
| $08 | GDBObj | Graph Database |
| $0B | NewEquObj | New Equation |
| $0C | CplxObj | Complex number |
| $0D | CListObj | Complex list |
| $15 | AppVarObj | AppVar |
| $16 | TempProgObj | Temporary program |
| Token Value | Class |
|---|---|
| tVarStrng | String variables |
| tVarMat | Matrix variables |
| tVarLst | List variables |
| tVarEqu | Equation variables |
| tVarPict | Picture variables |
| tVarGDB | Graph database variables |
| tVarOut | Output-only variables |
| tVarSys | System IO variables |
| t2ByteTok | Extra general tokens |
| OP1 | +1 | +2 | +3 | +4 | +5 | +6 | +7 | +8 | |
|---|---|---|---|---|---|---|---|---|---|
| RealObj | tX | t00 | $00 | ?? | ?? | ?? | ?? | ?? | Real variable X |
| CplxObj | tTheta | $00 | $00 | ?? | ?? | ?? | ?? | ?? | Complex variable θ |
| OP1 | +1 | +2 | +3 | +4 | +5 | +6 | +7 | +8 | |
|---|---|---|---|---|---|---|---|---|---|
| RealObj | tVarLst | tL1 | $00 | ?? | ?? | ?? | ?? | ?? | List L1 |
| CListObj | tVarLst | tD | tI | tS | tT | $00 | ?? | ?? | Complex list LDIST |
| OP1 | +1 | +2 | +3 | +4 | +5 | +6 | +7 | +8 | |
|---|---|---|---|---|---|---|---|---|---|
| MatObj | tVarMat | tMatC | $00 | ?? | ?? | ?? | ?? | ?? | Matrix [C] |
| PictObj | tVarPict | tPic5 | $00 | ?? | ?? | ?? | ?? | ?? | Picture Pic5 |
| StrngObj | tVarStrng | tStr1 | $00 | ?? | ?? | ?? | ?? | ?? | String Str1 |
| tY0 to tY9 | Function equations Y0 to Y9 |
| tX1T to tX6T | Parametric equations X1T to X6T |
| tY1T to tY6T | Parametric equations Y1T to Y6T |
| tR1 to tR6 | Polar equations r1 to r6 |
| tun | Sequence u(n) |
| tvn | Sequence v(n) |
| twn | Sequence w(n) |
| OP1 | +1 | +2 | +3 | +4 | +5 | +6 | +7 | +8 | |
|---|---|---|---|---|---|---|---|---|---|
| EquObj | tVarEqu | tY1 | $00 | ?? | ?? | ?? | ?? | ?? | Equation Y1 |
| OP1 | +1 | +2 | +3 | +4 | +5 | +6 | +7 | +8 | |
|---|---|---|---|---|---|---|---|---|---|
| ProgObj | tP | tR | tO | tG | tR | tA | tM | t1 | Program PROGRAM1 |
| ProtProgObj | tN | tO | tE | tD | tI | tT | $00 | ?? | Protected program NOEDIT |
| AppVarObj | tL | tA | tS | tT | tU | tS | tE | tR | AppVar LASTUSER |
| _FindSym | Finds variables that aren't programs, AppVars, or groups. | |
|---|---|---|
| INPUT | OP1 | Variable name. Not necessary to have the object type set. |
| OUTPUT | F | Carry set if not found, reset if exists. |
| A | Object type. Bits 5-7 are basically garbage, so if you want to use it, do AND $1F. | |
| B | Archive status. 0 if in RAM | |
| DE | Address of first byte of data | |
| HL | Address of symbol table entry | |
| DESTROYS | If variable is found, then C. If variable is not found, then All. | |
| _ChkFindSym | Finds any variable. | |
|---|---|---|
| INPUT | OP1 | Variable name. |
| OUTPUT | See _FindSym | |
To delete a variable
_DelVar
| Deletes a variable if it's in RAM. |
| |
|---|---|---|
| INPUT | HL | Pointer to start of symbol table entry. |
| DE | Pointer to start of variable's data storage. | |
| B | 0 if variable resides in RAM. Otherwise the Flash ROM page it is archived on. | |
| DESTROYS | All | |
| Remarks | System error if the variable is archived. Use _DelVarArc to delete any variable. Notice that the inputs to this routine are the same as the outputs of _FindSym. | |
The routines to create variables are
| Routine | Variable | Input HL |
|---|---|---|
| _CreateCList | Complex list | Number of elements (<1000) |
| _CreateCplx | Complex number | None |
| _CreateEqu | Equation | Number of bytes |
| _CreatePict | Picture | None |
| _CreateProg | Program | Number of bytes |
| _CreateProtProg | Protected program | Number of bytes |
| _CreateReal | Real Number | None |
| _CreateRList | Real list | Number of elements (<1000) |
| _CreateRMat | Matrix | H = rows (<100) L = columns (<100) |
| _CreateStrng | String | Number of bytes |
For these routines, HL is the dimensions of the variable (see the table) and OP1 holds the variable name. They output HL as a pointer to the VAT entry (more info later), DE as a pointer to the data, and OP4 holding a copy of the name.
When creating a parametric equation, you have to create both X and Y parts or you'll get a crash.
| $00 | $80 | $31 | $41 | $59 | $26 | $53 | $57 | $00 |
| 3.14159265357 | ||||||||
| $0C | $83 | $52 | $18 | $86 | $00 | $00 | $00 | $00 |
| $8C | $7F | $18 | $21 | $00 | $00 | $00 | $00 | $00 |
| 5219.86 - 0.1821i | ||||||||
| $03 | $00 | |||||||
| $80 | $82 | $23 | $45 | $00 | $00 | $00 | $00 | $00 |
| $00 | $7E | $10 | $00 | $57 | $12 | $00 | $00 | $00 |
| $00 | $80 | $50 | $00 | $00 | $00 | $00 | $00 | $00 |
| {-234.5, 0.01005712, 5} | ||||||||
| $02 | $00 | |||||||
| $0C | $80 | $10 | $00 | $00 | $00 | $00 | $00 | $00 |
| $0C | $80 | $20 | $00 | $00 | $00 | $00 | $00 | $00 |
| $8C | $80 | $40 | $00 | $00 | $00 | $00 | $00 | $00 |
| $0C | $80 | $80 | $00 | $00 | $00 | $00 | $00 | $00 |
| {1+2i, -4+8i} | ||||||||
| $03 | $02 | |||||||
| $00 | $81 | $14 | $95 | $72 | $75 | $75 | $00 | $00 |
| $80 | $82 | $83 | $67 | $57 | $54 | $74 | $00 | $00 |
| $80 | $81 | $33 | $57 | $61 | $43 | $96 | $00 | $00 |
| $00 | $80 | $48 | $48 | $78 | $16 | $76 | $24 | $00 |
| $80 | $81 | $85 | $56 | $56 | $72 | $78 | $00 | $00 |
| $00 | $80 | $86 | $56 | $01 | $97 | $47 | $00 | $00 |
| [ [14.95727575, -836.7575474, -33.57614396] [4.878167624, -85.56567278, 8.656019747 ] ] |
||||||||
If you think for one second that I'm gonna give a full example, then you've just gotta be high.
| $09 | $00 | |||||||
| tC | tA | tS | tI | tO | tSpace | tS | tU | tX |
| Probably string "CASIO SUX" | ||||||||