Difference between revisions of "83Plus:BCALLs:42F1"
From WikiTI
m (→Outputs: fixed typo) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 11: | Line 11: | ||
=== Outputs === | === Outputs === | ||
+ | * [[83Plus:RAM:8478|OP1]] = Name of variable | ||
* HL = VAT pointer | * HL = VAT pointer | ||
− | * DE = Data location ( | + | * DE = Data location (if in archive, will be address when page is put into [[83Plus:Ports:06|bank A]]) |
* B = Flash Page, or 0 if in RAM | * B = Flash Page, or 0 if in RAM | ||
* C = Length of Variable Name | * C = Length of Variable Name | ||
− | * A = | + | * A = the lower 5 bits is the type. Use the mask 1Fh. |
* carry flag is set if the variable is not found in the VAT | * carry flag is set if the variable is not found in the VAT | ||
Latest revision as of 21:57, 16 January 2013
Synopsis
Official Name: ChkFindSym
BCALL Address: 42F1
Recalls various pointers and information for a symbol in the VAT.
Inputs
- OP1 = Name of variable (with proper initial defining byte, see example)
Outputs
- OP1 = Name of variable
- HL = VAT pointer
- DE = Data location (if in archive, will be address when page is put into bank A)
- B = Flash Page, or 0 if in RAM
- C = Length of Variable Name
- A = the lower 5 bits is the type. Use the mask 1Fh.
- carry flag is set if the variable is not found in the VAT
Registers Destroyed
'All'
Example
ld hl,varname B_CALL Mov9toOp1 B_CALL ChkFindSym jr c,notfound ;carry flag is set if the VAT entry is not found ex de,hl ;put data pointer into hl xor a cp b ;see if b is 0, and the program is in the ram jr z,unarchived ;if so, jump to unarchived ;do something to get it into RAM unarchived: ;do something once it is in RAM varName: .db AppVarObj, "APPVAR",0