Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:13
CP/DOS DosSetFileMode mapper                                Page     1-1


				;0
				page 80,132
				
				title CP/DOS DosSetFileMode mapper
				
 0000				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
					    .list
				
				
				str	struc
 0000  0000			old_bp	dw	?
 0002  00000000			return	dd	?
 0006  00000000			Rsrvd	dd	?	; reserved
 000A  0000			Attrib	dw	?	; file attribute
 000C  00000000			Path	dd	?	; path name pointer  pointer
 0010				str	ends
				
 0000				dossetfilemode proc  far
					    Enter    dossetfilemode	   ; push registers
				
 000C  C5 56 0C				    lds      dx,[bp].path	   ; set pointer to path
 000F  8B 4E 0A				    mov      cx,[bp].attrib
				
 0012  B8 4301				    mov      ax,4301h
 0015  CD 21				    int      21h		   ; change file mode
 0017  72 04				    jc	     exit		   ; jump if error, return DOS error in ax
				
 0019  33 C0				    xor      ax,ax		   ; set good return code
 001B  EB 00				    jmp      short exit 	   ; return
				
 001D				exit:	    mexit			   ; pop registers
 0029  CA 000A				    ret      size  str - 6	   ; return
				
 002C				dossetfilemode endp
				
 002C				dosxxx	    ends
				
					    end

Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:13
CP/DOS DosSetFileMode mapper                                Symbols-1


Macros:

		N a m e			Lines

ENTER  . . . . . . . . . . . . .  	   3
MEXIT  . . . . . . . . . . . . .  	   3
POPAL  . . . . . . . . . . . . .  	   9
PUSHAL . . . . . . . . . . . . .  	   9

Structures and Records:

                N a m e                 Width   # fields
                                        Shift   Width   Mask    Initial

STR  . . . . . . . . . . . . . .  	0010	0005
  OLD_BP . . . . . . . . . . . .  	0000
  RETURN . . . . . . . . . . . .  	0002
  RSRVD  . . . . . . . . . . . .  	0006
  ATTRIB . . . . . . . . . . . .  	000A
  PATH . . . . . . . . . . . . .  	000C

Segments and Groups:

                N a m e         	Length	 Align	Combine Class

DOSXXX . . . . . . . . . . . . .  	002C	BYTE	PUBLIC	'DOS'

Symbols:            

                N a m e         	Type	 Value	 Attr

dossetfilemode . . . . . . . . .  	F PROC	0000	DOSXXX	Global	Length = 002C

EXIT . . . . . . . . . . . . . .  	L NEAR	001D	DOSXXX

@CPU . . . . . . . . . . . . . .  	TEXT  0101h		
@FILENAME  . . . . . . . . . . .  	TEXT  sfilemod		
@VERSION . . . . . . . . . . . .  	TEXT  510		


    107 Source  Lines
    131 Total   Lines
     19 Symbols

  47510 + 308775 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
