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


				page 80,132
				
				title CP/DOS DosQFileMode mapper
				
 0000				dosxxx	segment byte public 'dos'
					assume	cs:dosxxx,ds:nothing,es:nothing,ss:nothing
				;
				;**********************************************************************
				;*
				;*   MODULE:   dosqfilemode	Read file attribute
				;*
				;*   FUNCTION:	Query file mode
				;*
				;*   CALLING SEQUENCE:
				;*
				;*	 push@	   asciiz   file path name
				;*	 push@	   word     attribute return area
				;*	 push	   dword    reserved
				;*	 call	   dosqfilemode
				;*
				;*   MODULES CALLED:  PC-DOS Int 21h, ah=43h, change file mode
				;*
				;*********************************************************************
				
					    public   dosqfilemode
					    .sall
					    .list
				
 = 0002				error_code  equ      0002h
				
				str	    struc
 0000  0000			old_bp	    dw	     ?
 0002  00000000			return	    dd	     ?
 0006  00000000			rsrvd	    dd	     ?
 000A  00000000			Attrib	    dd	     ?	     ; current attribute pointer
 000E  00000000			Path	    dd	     ?	     ; file path name pointer
 0012				str	    ends
				
 0000				dosqfilemode proc    far
					    Enter    dosqfilemode	 ; push registers
				
 000C  C5 56 0E				    lds      dx,[bp].path	 ; set path name
				
 000F  B8 4300				    mov      ax,4300h		 ; set op code
 0012  CD 21				    int      21h		 ; get file mode
 0014  72 09				    jc	     error		 ; jump if error
				
 0016  C5 76 0A				    lds      si,[bp].attrib	 ; setup return data area
 0019  89 0C				    mov      word ptr [si],cx	 ; save attribute there
 001B  2B C0				    sub      ax,ax		 ; set good return code
 001D  EB 03				    jmp      short exit 	 ; return
				
 001F  B8 0002			error:	    mov      ax,error_code	 ; set error code
				
 0022				exit:	    mexit			 ; pop registers
 002E  CA 000C				    ret      size str - 6	 ; return
				
 0031				dosqfilemode endp
				
 0031				dosxxx	    ends
				
					    end

Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:13
CP/DOS DosQFileMode 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  . . . . . . . . . . . . . .  	0012	0005
  OLD_BP . . . . . . . . . . . .  	0000
  RETURN . . . . . . . . . . . .  	0002
  RSRVD  . . . . . . . . . . . .  	0006
  ATTRIB . . . . . . . . . . . .  	000A
  PATH . . . . . . . . . . . . .  	000E

Segments and Groups:

                N a m e         	Length	 Align	Combine Class

DOSXXX . . . . . . . . . . . . .  	0031	BYTE	PUBLIC	'DOS'

Symbols:            

                N a m e         	Type	 Value	 Attr

dosqfilemode . . . . . . . . . .  	F PROC	0000	DOSXXX	Global	Length = 0031

ERROR  . . . . . . . . . . . . .  	L NEAR	001F	DOSXXX
ERROR_CODE . . . . . . . . . . .  	NUMBER	0002	
EXIT . . . . . . . . . . . . . .  	L NEAR	0022	DOSXXX

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


    110 Source  Lines
    134 Total   Lines
     21 Symbols

  47474 + 317003 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
