-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBBB.ASM
91 lines (77 loc) · 2.16 KB
/
BBB.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
83
84
85
86
87
88
89
90
91
org 100h
mov ax, 0013h
int 10h
push $A000
pop es
xor di, di ;óêàçàòåëü íà 00 ïèêñåëü
mov cx, 200 ;÷èñëî çàêðàøèâàåìûõ ñòðîê
mov al, $0F ;fill screen with color
C_1:
push cx
mov cx, 200 ;200 ïèêñåëåé â ñòðîêå
rep stosb
add di, 120 ;320 - 200 = 120 - ïåðåõîä ê íîâîé ñòðîêå
pop cx
loop C_1
xor di, di
mov al, 12h ;;
mov bx, 20 ;äëèíà çàêðàøèâàåìîé ïîëîñû
mov cx, 10 ;÷èñëî ñòðîê
C_2:
push cx
mov cx, bx ;÷èñëî çàêðàøèâàåìûõ ïèêñåëåé äëÿ ñòîñ
inc bx ;óâåëè÷èâàåì ÷èñëî ïèêñåëåé íà 1
push cx
rep stosb
pop cx
add di, 320 ;ïåðåõîä ê íîâîé ñòðîêå
sub di, cx ;ñäâèã íà cx ê íà÷àëó ñòðîêè
pop cx
loop C_2
mov di, 10 * 320 ;0p 10str - íà÷àëî ðèñîâàíèÿ
mov cx, 190 ;÷èñëî ñòðîê
mov bx, 30 ;äëèíà ïîëîñû
Cycle:
push cx
mov cx, bx ;÷èñëî çàêðàøèâàåìûõ ïèêñåëåé
push cx
rep stosb
pop cx
add di, 320 ;next line
sub di, cx ;ñäâèã ê íà÷àëó ñòðîêè
add di, 1 ;ñìåùåíèå îò íà÷àëà ñòðîêè íà 1
pop cx
loop Cycle
;;;------------------------
mov di, 320
mov al, 20h
mov bx, 30
mov cx, 10
C_3:
push cx
mov cx, bx
inc bx
push cx
rep stosb
pop cx
add di, 320
sub di, cx
pop cx
loop C_3
mov di, 195 * 10 ;10p 10str
mov cx, 190
mov bx, 30
Cycle_2:
push cx
mov cx, bx
push cx
rep stosb
pop cx
sub di, 320 ;next line
sub di, cx
add di, 1
pop cx
loop Cycle_2
mov ah, 08h
int 21h
ret