4 title CP
/DOS DosSetFileInfo mapper
7 FileAttributeSegment
segment word public 'fat'
9 extrn FileAttributeTable
:word
11 FileAttributeSegment ends
14 dosxxx
segment byte public 'dos'
15 assume
cs:dosxxx
,ds:nothing
,es:nothing
,ss:nothing
17 ;**********************************************************************
19 ;* MODULE: dossetfileinfo
21 ;* FUNCTION: set file information
25 ;* push word file handle
26 ;* push word info level
27 ;* push@ other file info buffer
28 ;* push word file buffer size
29 ;* call dossetfileinfo
31 ;* MODULES CALLED: PC-DOS Int 21h, ah=57h, set file's date/time
33 ;*********************************************************************
46 BufferSize dw ?
; file info buufer size
47 BufferPtr dd ?
; file info buffer
48 Level dw ?
; file info level
49 Handle dw ?
; file handle
52 dossetfileinfo proc
far
53 Enter dossetfileinfo
; push registers
55 mov bx,[bp].Handle
; fill registers for function call
56 lds si,[bp].BufferPtr
; date/time pointer
57 mov dx,word ptr [si]+8 ; date to be set
58 mov cx,word ptr [si]+10 ; time to be set
62 jc ErrorExit
; check for error
64 ; This code should be un-commented when the attribute can be set from
65 ; the setfileinfo call
67 ; lds si,[bp].BufferPtr
68 ; mov ax,ds:[si].the offset to the attribute word
70 ; mov bx,seg FileAttributeSegment
72 ; assume ds:FileAttributeSegment
77 ; mov FileAttributeTable[bx],ax
79 sub ax,ax ; set good return code
83 ret size
str - 6 ; return