Difference between revisions of "83Plus:BCALLs:4A53"
From WikiTI
(Created MoveToNextSym) |
m (→Comments: Linked pTemp) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category:83Plus:BCALLs:By Name:Variable|MoveToNextSym]] [[Category:83Plus:BCALLs:By Name|MoveToNextSym]] [[Category:83Plus:BCALLs:By Address|4A53 - MoveToNextSym]] | ||
== Synopsis == | == Synopsis == | ||
'''Official Name:''' MoveToNextSym | '''Official Name:''' MoveToNextSym | ||
Line 16: | Line 17: | ||
== Comments == | == Comments == | ||
− | This routine can be used to traverse both the program/list and the regular symbol tables. It does not do bound checking, so you must check if HL equals the value at pTemp yourself to see if you've reached the end of the table. The example below browses the entire symbol table. | + | This routine can be used to traverse both the program/list and the regular symbol tables. It does not do bound checking, so you must check if HL equals the value at [[83Plus:RAM:892E|pTemp]] yourself to see if you've reached the end of the table. The example below browses the entire symbol table. |
== Example == | == Example == | ||
− | <nowiki> | + | <nowiki> ld hl, symTable |
− | + | SymLoop: | |
+ | ;Do something with symbol table entry | ||
B_CALL MoveToNextSym | B_CALL MoveToNextSym | ||
− | |||
ld de,(pTemp) | ld de,(pTemp) | ||
B_CALL CpHLDE | B_CALL CpHLDE | ||
jr nz,SymLoop</nowiki> | jr nz,SymLoop</nowiki> |
Latest revision as of 07:48, 26 April 2005
Synopsis
Official Name: MoveToNextSym
BCALL Address: 4A53
Finds the next entry in the symbol table.
Inputs
- HL: points to type byte of current symbol table entry
Outputs
- HL: points to type byte of next symbol table entry
Registers Destroyed
- AF, DE
Comments
This routine can be used to traverse both the program/list and the regular symbol tables. It does not do bound checking, so you must check if HL equals the value at pTemp yourself to see if you've reached the end of the table. The example below browses the entire symbol table.
Example
ld hl, symTable SymLoop: ;Do something with symbol table entry B_CALL MoveToNextSym ld de,(pTemp) B_CALL CpHLDE jr nz,SymLoop