4 title CP
/DOS DosSetFileMode mapper
6 dosxxx
segment byte public 'dos'
7 assume
cs:dosxxx
,ds:nothing
,es:nothing
,ss:nothing
9 ;**********************************************************************
11 ;* MODULE: dossetfilemode
13 ;* FUNCTION: Set file mode
17 ;* push@ asciiz file path name
18 ;* push word new attribute
19 ;* push dword reserved
20 ;* call dossetfilemode
22 ;* MODULES CALLED: PC-DOS Int 21h, ah=43h, change file mode
24 ;*********************************************************************
37 Attrib dw ?
; file attribute
38 Path dd ?
; path name pointer pointer
41 dossetfilemode proc
far
42 Enter dossetfilemode
; push registers
44 lds dx,[bp].path
; set pointer to path
48 int 21h
; change file mode
49 jc exit
; jump if error, return DOS error in ax
51 xor ax,ax ; set good return code
52 jmp short exit
; return
54 exit: mexit
; pop registers
55 ret size
str - 6 ; return