Download Print this page

Radio Shack TRS-80 Model II Reference Manual page 234

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

Advertisement

Model II
TRSDOS
BINHEX
Binary/Hexadecimal (function code 24)
This routine converts a two-byte binary number to
ASCII
-coded hexadecimal,
and vice versa. Hexadecimal range is
[O,FFFF].
Entry Conditions
B
=
Function Switch:
If B
=
0, then convert binary to
ASCII
hexadecimal
If B is not 0, then convert
ASCII
hexadecimal to binary
A
=
24
Contents of other registers when B
=
0:
DE
=
Two-byte binary number to convert
(HL)
=
4 byte area to contain
ASCII
coded hexadecimal value upon
return. The field will contain hexadecimal digits with leading
zeroes on the left as necessary to fill the field, for example, the
number
X'FF'
would be:
OOFF
Contents of other registers when B not 0:
(HL)
=
5-byte area containing
ASCII
hexadecimal value to be converted as
described above
A
=
24
Exit Conditions
(HL)
=
Hexadecimal value
DE
=
Binary value
270

Advertisement

loading