-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblink.dasm
22 lines (22 loc) · 1.03 KB
/
blink.dasm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
adr| code | assembleur
-------|---------------------|---------------------
blink:
0200: 72 1A 50 0C bset PC_DDR,#5
0204: 72 1A 50 0D bset PC_CR1,#5
1$:
0208: 90 1A 50 0A bcpl PC_ODR,#5
; delay
020C: A6 04 ld a,#4
020E: 5F clrw x
2$:
020F: 5A decw x
0210: 26 FD jrne 2$
0212: 4A dec a
0213: 26 FA jrne 2$
; if key exit
0215: 72 0B 52 40 EE btjf UART_SR,#UART_SR_RXNE,1$
021A: C6 52 41 ld a,UART_DR
; reset MCU to ensure monitor
; with peripherals in known state
_swreset
021D: 35 80 50 D1 mov WWDG_CR,#0X80