CSEG segment assume CS CSEG DS CSEG ES CSEG SS CSEG org 100h _start mo

 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
CSEG segment
assume CS:CSEG, DS:CSEG, ES:CSEG, SS:CSEG
org 100h
_start:
mov ax, 0B800h
mov es, ax
mov al, 1
mov ah, 31
mov cx, 254
_next_screen:
mov di, 0
call Out_chars
inc al
loop _next_screen
mov ah, 10h
int 16h
int 20h
Out_chars proc
mov dx, cx
mov cx, 2000
_next_char:
mov es:[di], ax
add di, 2
loop _next_char
mov cx, dx
ret
Out_chars endp
CSEG ends
end _start