"diagonal line"
not vertically locked, just a test also not the whole screen, just a bit
This commit is contained in:
parent
b7004a0171
commit
29990cd93a
21
main.S
21
main.S
@ -2,9 +2,13 @@
|
||||
#include "macro.h"
|
||||
|
||||
.data
|
||||
|
||||
status:
|
||||
.byte 0x0
|
||||
|
||||
offset:
|
||||
.byte 78
|
||||
|
||||
.text
|
||||
|
||||
.global main_s
|
||||
@ -64,7 +68,17 @@ wait2:
|
||||
|
||||
.global int0_handler
|
||||
int0_handler:
|
||||
ldi r31, 80
|
||||
push r31
|
||||
in r31, IO(SREG) ; status register
|
||||
push r31
|
||||
|
||||
lds r31, offset
|
||||
dec r31
|
||||
cpi r31, 1
|
||||
brne 1f
|
||||
ldi r31, 78
|
||||
1:
|
||||
sts offset, r31
|
||||
loop:
|
||||
dec r31
|
||||
brne loop
|
||||
@ -85,5 +99,8 @@ loop:
|
||||
nop
|
||||
cbi IO(PORTB), 4
|
||||
1:
|
||||
pop r31
|
||||
out IO(SREG), r31
|
||||
pop r31
|
||||
reti
|
||||
|
||||
ret
|
||||
|
Loading…
Reference in New Issue
Block a user