projects
/
calu.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
shit not working
[calu.git]
/
progs
/
testbench.s
1
#include "dt_inc.s"
2
.text
3
.define LCDBASE, 0x2060
4
.define LCDSTATUS, 0x0
5
.define LCDADDR, 0x4
6
7
.org 0x0
8
start:
9
br+ main
10
br+ main
11
ret
12
main:
13
call+ u_init
14
call+ u_recv_byte
15
call u_send_newline
16
17
ldis r1, 0x42
18
call u_send_byte
19
20
call t_init
21
call t_start
22
23
loop:
24
call u_recv_byte
25
ldi r0, LCDBASE@lo
26
ldih r0, LCDBASE@hi
27
ldw r1, LCDSTATUS(r0)
28
call u_send_byte
29
ldi r0, LCDBASE@lo
30
ldih r0, LCDBASE@hi
31
ldis r1, 0x141
32
stw r1, LCDADDR(r0)
33
br loop
34
35
reset_timer:
36
ldis r1, 0
37
call t_valset
38
br loop