-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathvd2file.asm
More file actions
39 lines (33 loc) · 768 Bytes
/
vd2file.asm
File metadata and controls
39 lines (33 loc) · 768 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
;vi du ve file 2
;tao 1 tep moi,doc du lieu tu ban phim va luu vao tep
.model small
.stack 50
.data
controf dw ?
tenf db 'ab.txt',0
buff db 100,0, 100 dup('$')
.code
main proc
mov ax, @data
mov ds, ax
mov cx,0 ; cx = 0 binh thuong, 1 chi doc 2 an 4 tap tin he thong
lea dx,tenf
mov ah,3Ch
int 21h
mov controf, ax
mov ah,0Ah
lea dx, buff
int 21h
xor cx,cx
lea dx, buff + 2
mov cl, [buff + 1]
mov bx, controf
mov ah,40h
int 21h
mov ah,3Eh
mov bx,controf
int 21h
mov ah,4Ch
int 21h
main endp
end main