-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrace.asm
executable file
·66 lines (57 loc) · 1.33 KB
/
trace.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
; push x
; push y
; push num (2B)
; push color
trace:
push bp
mov bp,sp
push bx
mov ax,[bp+6]
mov bx,10
xor dx,dx
div bx
mov bl,dl
test ax,ax
jz trace_next1
mov cx,[bp+10]
sub cx,4
push cx
push word [bp+8]
push ax
push word [bp+4]
call trace
trace_next1:
xor bh,bh
shl bx,1
add bx,numbers
mov bx,[bx]
mov cx,[bx]
add bx,2
trace_loop2:
push cx
mov ax,[bp+10]
add ax,[bx]
mov cx,[bp+8]
add cx,[bx+2]
push ax
push cx
push word [bp+4]
call point
add bx,4
pop cx
loop trace_loop2
pop bx
mov sp,bp
pop bp
retn 8
numbers dw n0,n1,n2,n3,n4,n5,n6,n7,n8,n9
n0 dw 12, 1,0, 2,0, 3,0, 1,1, 1,2, 1,3, 1,4, 2,4, 3,4, 3,3, 3,2, 3,1
n1 dw 9, 1,0, 2,0, 3,0, 1,4, 2,4, 3,4, 2,1, 2,2 ,2,3
n2 dw 11, 1,0, 2,0, 3,0, 1,4, 2,4, 3,4, 1,2, 2,2, 3,2, 3,1, 1,3
n3 dw 11, 1,0, 2,0, 3,0, 1,4, 2,4, 3,4, 1,2, 2,2, 3,2, 3,1, 3,3
n4 dw 9, 1,0, 1,1, 1,2, 3,0, 3,1, 3,2, 3,3, 3,4, 2,2
n5 dw 11, 1,0, 2,0, 3,0, 1,4, 2,4, 3,4, 1,2, 2,2, 3,2, 3,3, 1,1
n6 dw 12, 1,0, 2,0, 3,0, 1,4, 2,4, 3,4, 1,2, 2,2, 3,2, 3,3, 1,1, 1,3
n7 dw 7, 1,0, 2,0, 3,0, 3,1, 3,2, 3,3, 3,4
n8 dw 13, 1,0, 2,0, 3,0, 1,4, 2,4, 3,4, 1,2, 2,2, 3,2, 3,3, 1,1, 1,3, 3,1
n9 dw 12, 1,0, 2,0, 3,0, 1,4, 2,4, 3,4, 1,2, 2,2, 3,2, 3,3, 1,1, 3,1