Re: A86: VAR_GET
[Prev][Next][Index][Thread]
Re: A86: VAR_GET
> Does anyone know an equivelent to this 85 routine, VAR_GET? Please
> help. Thanks.
Here it is (not tested !) :
Input: HL = pointer to name of variable to be found
Output: AHL = pointer to variable data (length of variable skipped)
DE = pointer to VAT entry
If CF, the variable was not found
VAR_GET:
rst rmov10toop1 ; equ 20h
rst rfindsym ; equ 10h
ret c
push hl
xor a
ld hl,2
add hl,de
adc a,b
pop de
or a ; clear Carry Flag
ret
Example:
ld hl,var_name-1
call VAR_GET
jp c,notFound
...
var_name:
.db 7,"varname" ; 7 is the name lenght
Later,
--
+-----------------------------------------+
| name : CLEM |
| homepage : http://www.mygale.org/~clems |
| e-mail : mailto:clems@mygale.org |
+-----------------------------------------+
References: