-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathppp.asm
More file actions
76 lines (61 loc) · 627 Bytes
/
Copy pathppp.asm
File metadata and controls
76 lines (61 loc) · 627 Bytes
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
66
67
68
69
70
71
72
73
74
75
76
.model small
putchar macro l
mov ah,2
mov dl,l
int 21h
endm
.data
n dw 5
r dw 1
ncr dw 0
.code
mov ax,@data
mov ds,ax
mov ax,n
mov bx,r
call ncrpro
mov ax,ncr
mov dx,ax
call convdisp
mov ah,4ch
int 21h
ncrpro proc
cmp bx,ax
je r1
cmp bx,0
je r1
cmp bx,1
je rn
dec ax
cmp bx,ax
je r2
push ax
push bx
call ncrpro
pop bx
pop ax
dec ax
push ax
push bx
call ncrpro
pop bx
pop ax
ret
r1: inc ncr
ret
r2: inc ncr
rn: add ncr,ax
ret
ncrpro endp
convdisp proc
;mov al,ncr
aam
add ax,3030h
mov bx,ax
putchar bh
putchar bl
mov ah,4ch
int 21h
ret
convdisp endp
end