summaryrefslogtreecommitdiff
path: root/v4.0/src/MAPPER/SFILEMOD.ASM
diff options
context:
space:
mode:
authorGravatar Mark Zbikowski2024-04-25 21:24:10 +0100
committerGravatar Microsoft Open Source2024-04-25 22:32:27 +0000
commit2d04cacc5322951f187bb17e017c12920ac8ebe2 (patch)
tree80ee017efa878dfd5344b44249e6a241f2a7f6e2 /v4.0/src/MAPPER/SFILEMOD.ASM
parentMerge pull request #430 from jpbaltazar/typoptbr (diff)
downloadms-dos-main.tar.gz
ms-dos-main.tar.xz
ms-dos-main.zip
MZ is back!HEADmain
Diffstat (limited to 'v4.0/src/MAPPER/SFILEMOD.ASM')
-rw-r--r--v4.0/src/MAPPER/SFILEMOD.ASM61
1 files changed, 61 insertions, 0 deletions
diff --git a/v4.0/src/MAPPER/SFILEMOD.ASM b/v4.0/src/MAPPER/SFILEMOD.ASM
new file mode 100644
index 0000000..ecc3009
--- /dev/null
+++ b/v4.0/src/MAPPER/SFILEMOD.ASM
@@ -0,0 +1,61 @@
1;0
2page 80,132
3
4title CP/DOS DosSetFileMode mapper
5
6dosxxx segment byte public 'dos'
7 assume cs:dosxxx,ds:nothing,es:nothing,ss:nothing
8
9;**********************************************************************
10;*
11;* MODULE: dossetfilemode
12;*
13;* FUNCTION: Set file mode
14;*
15;* CALLING SEQUENCE:
16;*
17;* push@ asciiz file path name
18;* push word new attribute
19;* push dword reserved
20;* call dossetfilemode
21;*
22;* MODULES CALLED: PC-DOS Int 21h, ah=43h, change file mode
23;*
24;*********************************************************************
25
26 public dossetfilemode
27 .sall
28 .xlist
29 include macros.inc
30 .list
31
32
33str struc
34old_bp dw ?
35return dd ?
36Rsrvd dd ? ; reserved
37Attrib dw ? ; file attribute
38Path dd ? ; path name pointer pointer
39str ends
40
41dossetfilemode proc far
42 Enter dossetfilemode ; push registers
43
44 lds dx,[bp].path ; set pointer to path
45 mov cx,[bp].attrib
46
47 mov ax,4301h
48 int 21h ; change file mode
49 jc exit ; jump if error, return DOS error in ax
50
51 xor ax,ax ; set good return code
52 jmp short exit ; return
53
54exit: mexit ; pop registers
55 ret size str - 6 ; return
56
57dossetfilemode endp
58
59dosxxx ends
60
61 end