-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLB4.ASM
82 lines (55 loc) · 1.31 KB
/
LB4.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
org 100h
Start:
mov ah, 09h
mov dx, StartStr
int 21h
mov ah, 02h
mov dl, 10
int 21h
mov ah, 02h
mov dl, 13
int 21h
mov bx, 0
mov dx, 0
.Sycle:
mov cl, 0
mov cl, byte[ArrayOfInt + bx]
push bx
mov ax, 0000
mov al, cl ; Äåëèìîå â ðåãèñòð al
mov bl, 3 ; Äåëèòåëü â ðåãèñòð bl
div bl
pop bx
cmp ah, 0
je .multiple
Inc bx
cmp bx, 5
jl .Sycle
cmp bx, 5
je .Exit
.multiple:
add dx, 1
push dx
mov dl, byte[ArrayOfInt + bx]
add dx, 48
mov ah, 02h
int 21h
pop dx
Inc bx
cmp bx, 5
je .Exit
jmp .Sycle
.Exit:
push dx
mov ah, 02h
mov dl, 10
int 21h
pop dx
add dx, 48
mov ah, 02h
int 21h
mov ah, 08h
int 21h
ret
StartStr db 'Array is $'
ArrayOfInt db 9, 6, 5, 3, 6