AMX 86 Frozen Dessert Maker User Manual


 
AMX Timing Control
K
A
DAK
87
Your Time/Date Scheduling Procedure can be coded in assembly language as a FAR
procedure as follows:
INCLUDE AMX831SD.DEF ;AMX Structure Definitions
;
;
TDS_CODE SEGMENT BYTE 'CODE'
;
; Time/Date Scheduling Procedure located in program memory
;
ASSUME CS:TDS_CODE
;
PUBLIC TDSHD
;
TDSHD PROC FAR
MOV AL,[BP].AMTDSEC ;AL = seconds
:
MOV DL,[BP].AMTDDY ;DL = day
:
:
Perform required tests and initiate
actions if it is time for them
:
:
RET
;
TDSHD ENDP
;
TDS_CODE ENDS
Note that function TDSHD receives an entire AMXTDS time/date structure passed by value
on its stack. Since register BP is initialized with the offset of the structure on the stack,
register BP can be used to directly access the time/date structure as illustrated above.