EasyManuals Logo

Tandy 1000 Programmer's Reference Guide

Default Icon
251 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #87 background imageLoading...
Page #87 background image
Chapter
1
I
System
Calls
GetDate
Get Date Function Call
2AH
Returns the current date set in the operating system. The
date is returned as binary numbers.
En try Conditions:
AH
=
2AH
Exit Conditions:
CX
=
year (1980-2099)
DH
=
month
(1
=
January,
2
=
February, etc.)
DL
=
day
of
the month (1-31)
AL
=day
of
the week
(0
=
Sunday,
1
=
Monday,
etc.)
Macro
Definition:
get-date macro
mov ah,2AH
int
21
H
endm
Example:
The following program gets the date, increments the day,
increments the month or year, if necessary, and sets the
new date.
month db
31
,28,31 ,38,31 ,38,31 ,31 ,30,31 ,30,31
func-2AH: get-date
inc
xor
mov
dec
CmP
1'e
mov
inc
CmP
mov
inc
J'e
month-ok: set-date
dl
bx, bx
bl
.dh
bx
dl,month[bxl
mont h-o
k
dl,l
dh
dh,l2
mon
t
h-o
k
dh,
1
cx,dh,dl
cx
;see above
;increment day
;so
EL
can be used
as
;index
;move month
to
index
:register
;month
table
5tarts
with
0
;past
end
of
month?
;no, set the new date
;ye5, 5et day
to
1
;and increment month
;pa5t
end
of
year?
;no, 5et the new date
;yes, set the month to
1
;increment year
;see Function 2BH
85

Other manuals for Tandy 1000

Questions and Answers:

Question and Answer IconNeed help?

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

Tandy 1000 Specifications

General IconGeneral
ProcessorIntel 8088
Processor Speed4.77 MHz
RAM128 KB (expandable to 640 KB)
Operating SystemMS-DOS 2.11
ManufacturerTandy Corporation
Release Year1984
StorageSingle or double 5.25" floppy disk drive (360 KB), optional hard drive
SoundTandy 3-voice sound
PortsParallel, Serial
GraphicsCGA (Color Graphics Adapter)
Graphics Modes320x200, 640x200

Related product manuals