-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathScreen.asm
More file actions
177 lines (124 loc) · 2.51 KB
/
Screen.asm
File metadata and controls
177 lines (124 loc) · 2.51 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
;-------------------PrintColor Module------------------
cPrintString:
;pusha
mov bh,0 ;page
mov cx,1
lodsb
cmp al,0h
je cDone
inc dl
mov ah,0x02
int 10h
mov ah,0x09
int 10h
jmp cPrintString
cDone:
;popa
ret
;-----------------End PirntColor Module------------------
;-------------------PrintColor Char Module---------------
cPrintChar:
pusha
mov bh,0
mov cx,1
mov ah,0x02
int 10h
mov ah,0x09
int 10h
popa
ret
;--------------------------------------------------------
;---------------------Clear Screen----------------------------
ClearScreen:
;Top White Line
;Setting Cursor At Top
push ax
mov bh,0 ;page
mov dh,0 ;row
mov dl,0 ;coloum
mov ah,0x02
int 10h
;Drawing Top Border
mov al,' ' ;char
mov bl,0xff ;color
mov cx,80 ;times to print
mov ah,0x09
int 10h
;Changing Rows
pop ax
mov dh,1
Loop:
mov ah,0x02
int 10h
;Drawing BG
mov ah,0x09
mov bl,al
int 10h
inc dh
cmp dh,25
jne Loop
push ax
;Drawing Bottom Border
mov al,' ' ;char
mov bl,0xff ;color
mov ah,0x09
int 10h
mov dh,24
mov dl,68
mov bl,0xf0
mov si,_WaaS_OS
call cPrintString
pop ax
ret
;------------------END Clear Screen---------------------------
;---------------------OS Box---------------------------
OS_Box:
pusha
OS_Box.Loop:
push bx
mov bh,0
mov ah,0x02
int 10h
mov al,' '
mov ah,0x09
int 10h
pop bx
dec bh
inc dh
cmp bh,0
jne OS_DBox.Loop
popa
ret
;-------------------------------------------------------------
;---------------------OS Dialod Box---------------------------
OS_DBox:
pusha
push bx
mov bh,0
mov ah,0x02
int 10h
mov al,' '
mov bl,0x00
mov ah,0x09
int 10h
inc dh
pop bx
OS_DBox.Loop:
push bx
mov bh,0
mov ah,0x02
int 10h
mov al,' '
mov ah,0x09
int 10h
pop bx
dec bh
inc dh
cmp bh,0
jne OS_DBox.Loop
popa
ret
;-------------------------------------------------------------
;--------------------Variables--------------------------------
_WaaS_OS db "WaaS-OS vI",0
;-------------------------------------------------------------