blob: ecc300978811b1907dcbfae8481e4734f849c561 (
plain) (
blame)
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
|
;0
page 80,132
title CP/DOS DosSetFileMode mapper
dosxxx segment byte public 'dos'
assume cs:dosxxx,ds:nothing,es:nothing,ss:nothing
;**********************************************************************
;*
;* MODULE: dossetfilemode
;*
;* FUNCTION: Set file mode
;*
;* CALLING SEQUENCE:
;*
;* push@ asciiz file path name
;* push word new attribute
;* push dword reserved
;* call dossetfilemode
;*
;* MODULES CALLED: PC-DOS Int 21h, ah=43h, change file mode
;*
;*********************************************************************
public dossetfilemode
.sall
.xlist
include macros.inc
.list
str struc
old_bp dw ?
return dd ?
Rsrvd dd ? ; reserved
Attrib dw ? ; file attribute
Path dd ? ; path name pointer pointer
str ends
dossetfilemode proc far
Enter dossetfilemode ; push registers
lds dx,[bp].path ; set pointer to path
mov cx,[bp].attrib
mov ax,4301h
int 21h ; change file mode
jc exit ; jump if error, return DOS error in ax
xor ax,ax ; set good return code
jmp short exit ; return
exit: mexit ; pop registers
ret size str - 6 ; return
dossetfilemode endp
dosxxx ends
end
|