83Plus:BCALLs:4A53

From WikiTI
Revision as of 10:38, 26 March 2005 by Dan Englender (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

SymLoop:
 ld  hl, symTable
 B_CALL MoveToNextSym
  ;Do something with symbol table entry
 ld de,(pTemp)
 B_CALL CpHLDE
 jr nz,SymLoop