projects
/
dcpu16
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
898808b10566484a10459c203362c980cd001c2a
[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, 0x0003
19
SET A, 3
20
HWI [num]
21
22
; show some text
23
SET I, string
24
SET J, 0x8000
25
; color
26
SET Z, 0x1e00
27
:print
28
BOR [i], Z
29
STI [j], [i]
30
IFN [I], 0
31
SET PC, print
32
33
:wait
34
SET PC, wait
35
36
:num dat 0x0000
37
:string dat "yerf!", 0