projects
/
dcpu16
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
merge
[dcpu16]
/
tests
/
test_lem1802.dasm
1
; bare-bones test to locate, activate, and write to a display
2
3
HWN [num]
4
:loop
5
SUB [num], 1
6
HWQ [num]
7
IFE B, 0x7349
8
SET PC, found
9
SET PC, loop
10
11
:found
12
; located the first display, power it on
13
SET B, 0x8000
14
SET A, 0
15
HWI [num]
16
17
; set border
18
SET B, 0x0002
19
SET A, 3
20
HWI [num]
21
22
; show some text
23
SET I, string1
24
SET J, 0x8000
25
SET Z, 0x1e00
26
JSR print
27
28
SET I, string2
29
SET Z, 0x1e80
30
JSR print
31
32
:done
33
SET PC, done
34
35
; prints string at I to vram at J in color Z
36
:print XOR [I], Z
37
SET [J], [I]
38
XOR [I], Z
39
ADD I, 1
40
ADD J, 1
41
IFE [I], 0
42
SET PC, POP
43
SET PC, print
44
45
:num dat 0x0000
46
:string1 dat "yerf!", 0
47
:string2 dat "ortort?", 0