-
Notifications
You must be signed in to change notification settings - Fork 1
/
PulseDelay.asm
29 lines (29 loc) · 915 Bytes
/
PulseDelay.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
;Pulse delayed by 1024 bit-times
;(Relocatable). Uses serial in/out.
;
.=0F1F
Bits: .=.+1 ;bit counter
;
Enter: LDI H(Scrat)
XPAH 1
LDIL (Scrat)
Next: XPAL 1
LDI 8
ST Bits
LD (1) ;Get old byte
XAE ;Exchange
ST @+1(1) ;Put back new byte
Output: SIO ;Serial I/O
LDI TC1
DLY TC2 ;Delay bits
DLD Bits
JNZ Output
XPAL 1 ;P1 = 0D00 Yet?
JNZ Next
JMP Enter
;
TC1 = 0 ;Bit-time
TC2 = 4 ;Delay constants
;
Scrat = 0F80 ;Start of scratch area
.END