Download Print this page

Radio Shack TRS-80 Model II Reference Manual page 241

Disk operating system
Hide thumbs Also See for TRS-80 Model II:

Advertisement

Technical Information
STSCAN
String Scan (function code 49)
This is a general purpose string scan. It searches through a specified text buffer for
the specified string. This string can consist of any values 0-255 (it is not strictly
alphanumeric). The scan stops on the found string or on the first carriage return
encountered, whichever comes first.
Entry Conditions
(HL)
=
Text area to be searched
(DE)
=
Compare string
B
=
Length of compare string
A
=
49
Exit Conditions
NZ
=
String not found
Z
=
String found
(HL)
=
Start position of matching string in search string
SORT
RAM Sort (function code 56)
This routine sorts a list of entries in
RAM.
All entries must have the same length,
from I to 255 bytes. The sort is done according to a user-defined sort-key, which
may be located anywhere in the entry.
Entries with duplicate sort-keys will remain in the same relative order.
The routine uses a' 'bubble-sort" algorithm.
Entry Conditions
A
=56
(IX)
=
First byfe of first entry in list
(DE)
=
First byte of last entry in list
(not
the first byte following the list)
B
=
Position of key within an entry (0
=
first byte of
entry)
C
=
Length of each entry, C> 0
277

Advertisement

loading