X-Git-Url: http://git.squeep.com/?p=dcpu16;a=blobdiff_plain;f=tests%2Ftest_lem1802.dasm;fp=tests%2Ftest_lem1802.dasm;h=898808b10566484a10459c203362c980cd001c2a;hp=0000000000000000000000000000000000000000;hb=19bb0a4e64c9ab3e62ff4bbd959289704ee5b8f1;hpb=0a6b0889c67675bd71681ec41774d2ea57ce5335 diff --git a/tests/test_lem1802.dasm b/tests/test_lem1802.dasm new file mode 100644 index 0000000..898808b --- /dev/null +++ b/tests/test_lem1802.dasm @@ -0,0 +1,37 @@ +; bare-bones test to locate, activate, and write to a display + +HWN [num] +:loop + SUB [num], 1 + HWQ [num] + IFE B, 0x7349 + SET PC, found + SET PC, loop + +:found + ; located the first display, power it on + SET B, 0x8000 + SET A, 0 + HWI [num] + + ; set border + SET B, 0x0003 + SET A, 3 + HWI [num] + + ; show some text + SET I, string + SET J, 0x8000 + ; color + SET Z, 0x1e00 +:print + BOR [i], Z + STI [j], [i] + IFN [I], 0 + SET PC, print + +:wait + SET PC, wait + +:num dat 0x0000 +:string dat "yerf!", 0 \ No newline at end of file