Download Print this page

Radio Shack TRS-80 Model II Reference Manual page 159

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

Advertisement

Utility Programs
QATM Source Listing
For Assembly-Language Programmers
Notice that the program is ORGed at
X'OOOO'.
This is simply to make it easier for you
to relocate the program.
DATM32
is actually ORGed at X'6C6()";
DATMM,
at X'EC60·.
In
general, the entry and exit conditions for this subroutine are the same as
those given for
EXDATM.
Entry Conditions
B
=
Function Switch
If B
=
0 then compute date addition
If B
=I
0 then compute date difference
For date addition (B
=
0)
(HL)
=
16-byte text buffer located above
X'27FF',
as follows:
mm/dd/yyyy'i5jjjjj
just like the input text for
EXDATM
described previously.
(DE)
=
26-byte output buffer located above
X'27FF',
as follows:
NAME OF
MONTH DAY OF
DAY
MONTH
YA.
DAY OF
YA.
TIME
MONTH DAY OF
OFYA.
WEEK
3
3
2
4
3
8
2
For date difference (B ::;t 0)
(HL)
=
21-byte text buffer located above
X'27FF',
as follows:
mm/dd/yyyy};Jmm/dd/yyyy
just like the input text for
EXDATM
described previously.
(DE)
=
5-byte output buffer, located above
X'27FF' ,
as follows:
JJJJJ
with leading blanks supplied as necessary.
To call
DATM,
execute a
CALL
to the start address.
Exit conditions
(DE)
=
output text, in the format described previously.
NZ
=
Error occurred
A
=
Error code
195

Advertisement

loading