Timer Delay Function (.Delay) - Motorola M68CPU32BUG User Manual

Debug monitor
Table of Contents

Advertisement

.DELAY
5.2.4
Timer Delay Function
SYSCALL
TRAP CODE: $0043
The .DELAY function generates timing delays based on the processor clock. This function uses
the MCU periodic interrupt timer for operation. The user specifies the desired delay count
(number of interrupt pulses generated). .DELAY returns system control to the user after the
specified delay is completed. Initialize (.TM_INI) and start (.TM_STR0) the timer before using
the .TM_RD function.
Entry Conditions:
SP ==>
Exit Conditions Different From Entry:
SP ==>
EXAMPLE
SYSCALL
.TM INI
SYSCALL
.TM_STR0
PEA.L
&1500
SYSCALL
.DELAY
*
*
*
PEA.L
&50000
SYSCALL
.DELAY
M68CPU32BUG/D REV 1
Timer Delay Function
.DELAY
Delay time (number of interrupt pulses) <long>
The timer keeps running after the delay and parameters are
removed from the stack.
Initialize timer
Start timer
Load a 1500 interrupt pulse delay
Load a 50000 interrupt pulse delay
5-8
SYSTEM CALLS
.DELAY

Advertisement

Table of Contents
loading

Table of Contents