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


				page 80,132
				
				title CP/DOS DosRead mapper   * * *
				
 0000				dosxxx  segment byte public 'dos'
				        assume  cs:dosxxx,ds:nothing,es:nothing,ss:nothing
				
				;**********************************************************************
				;*
				;*   MODULE:   dosreade
				;*
				;*   FUNCTION: Read a specified number of bytes from the file
				;*
				;*   CALLING SEQUENCE:
				;*
				;*       push      word     file handle
				;*       push@     other    buffer area
				;*       push      word     buffer length
				;*       push@     word     bytes read
				;*       call      dosread
				;*
				;*   MODULES CALLED:  PC-DOS Int 21h, ah=3fh,
				;*
				;*********************************************************************
				
				            public   dosread
				            .sall
				            .list
				
				str         struc
 0000  0000			old_bp      dw       ?
 0002  00000000			return      dd       ?
 0006  00000000			Written     dd       ?       ; number of bytes actually read
 000A  0000			Bufflng     dw       ?       ; number of bytes to be read
 000C  00000000			Buffer      dd       ?       ; read buffer
 0010  0000			Handle      dw       ?       ; handle
 0012				str         ends
				
 0000				dosread     proc     far
				            Enter    Dosread           ; save registers
				
 000C  8B 5E 10			            mov      bx,[bp].handle    ; fill registers for
 000F  C5 56 0C			            lds      dx,[bp].buffer    ; function call
 0012  8B 4E 0A			            mov      cx,[bp].bufflng   ; number of bytes to read
				
 0015  B4 3F			            mov      ah,3fh            ; load opcode
 0017  CD 21			            int      21h               ; read from file
 0019  72 07			            jc       exit              ; jump if error
				
 001B  C5 76 06			            lds      si,[bp].written   ; else, set return data area
 001E  89 04			            mov      word ptr [si],ax  ; save number of bytes read
 0020  2B C0			            sub      ax,ax             ; set good return code
				
 0022				exit:       mexit                      ; pop registers
 002E  CA 000C			            ret      size str - 6      ; rturn
				
 0031				dosread     endp
				
 0031				dosxxx      ends
				
				            end

Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:13
CP/DOS DosRead 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	0006
  OLD_BP . . . . . . . . . . . .  	0000
  RETURN . . . . . . . . . . . .  	0002
  WRITTEN  . . . . . . . . . . .  	0006
  BUFFLNG  . . . . . . . . . . .  	000A
  BUFFER . . . . . . . . . . . .  	000C
  HANDLE . . . . . . . . . . . .  	0010

Segments and Groups:

                N a m e         	Length	 Align	Combine Class

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

Symbols:            

                N a m e         	Type	 Value	 Attr

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

EXIT . . . . . . . . . . . . . .  	L NEAR	0022	DOSXXX

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


    109 Source  Lines
    133 Total   Lines
     20 Symbols

  47508 + 314919 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
