Forgive me if this is a silly question, but I'm not too sure why this code doesn't work.
Basically, I want to have a small time delay at the start of my code, then after the user presses Enter or Space, have another time delay before moving onto another section of code. The problem is that the first delay call works correctly, but when the second is called it just completely freezes the program. If I trace into the code or pause and unpause when it is frozen it will continue on with the code correctly, but running it normally will just completely freeze it.
The code in question is below.
Code:
ORG $1000
DELAY MACRO
MOVE #23, D0
MOVE #\1, D1
TRAP #15
ENDM
START:
DELAY 10
LEA INPUT, A1
MOVE.B #14, D0
TRAP #15
repeat
MOVE.L #$0D200000, D1
MOVE.B #19, D0
TRAP #15
until.l D1 <ne> #0 do
MOVE.B #11, D0
MOVE.W #$FF00, D1
TRAP #15
DELAY 10
LEA OUTPUT, A1
MOVE.B #14, D0
TRAP #15
SIMHALT
INPUT DC.B 'Press Enter or Space.',0
OUTPUT DC.B 'Done.',0
END START