Skip to content

Commit 1605fe3

Browse files
committed
Start on box drawer
1 parent 8a5826f commit 1605fe3

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

examples/box.asm

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
@define SCREEN_WIDTH 80
2+
@define SCREEN_HEIGHT 25
3+
@define BOX_WIDTH (SCREEN_WIDTH - 2)
4+
@define BOX_HEIGHT (SCREEN_HEIGHT - 2)
5+
6+
@define TR_CORNER 0xBB
7+
@define BR_CORNER 0xBC
8+
@define BL_CORNER 0xC8
9+
@define TL_CORNER 0xC9
10+
@define WALL 0xBA
11+
@define DASH 0xCD
12+
13+
jmp [_start]
14+
15+
/// math = ./math
16+
@include <math/mul.asm>
17+
18+
_start:
19+
call [draw_top]
20+
call [draw_bottom]
21+
call [draw_left]
22+
call [draw_right]
23+
halt
24+
25+
draw_top:
26+
mv A, 1
27+
28+
29+
ret
30+
31+
draw_bottom:
32+
ret
33+
34+
draw_left:
35+
ret
36+
37+
draw_right:
38+
ret

0 commit comments

Comments
 (0)