Download Print this page

ZiLOG Z80 Handbook page 188

Hide thumbs Also See for Z80:

Advertisement

no match, LOOP is reentered. If there is a match, MAYBE is en-
tered where a direct one-for-one comparison is made culminating in
FOUND, if all of the remaining characters match. The portion of
code from MAYBE to FOUND could have been shortened consider-
ably by subroutine or loop use, but the code was expanded for
clarity.
TABLE OPERATIONS
Strings are a subset of tables, as they are contiguous lists of items.
Each entry in the string consists of one ASCII character. A table is
TABLE
TABLE +12810
TABLE +256
TABLE +384
Fig. 13 - 2. Employee table format.
TABLE +2560
+0
ENTRY 1
2
3
4
LAST NAME
+14
+15
FIRST NAME
+24
+25
OTHER
J
DATA
+127,01 ID#
made up of a number of entries that may be any number of bits long
and may contain subgroupings of data. Within the table, entries may
be ordered, in random order, or indexed by some external key.
Ordering may be done on any subgroup within the table entry. Let
us use a table of names and addresses to illustrate the use of an
indexed table in the Z-80. LASER PERIPHERALS, INC. has 101
employees. A table used in the payroll program is referenced by em-
197

Advertisement

loading
Need help?

Need help?

Do you have a question about the Z80 and is the answer not in the manual?