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


				;
				page 80,132
				;0
				title CP/DOS DosChgFilePtr mapper	    * * *
				;
 0000				dosxxx	segment byte public 'dos'
					assume	cs:dosxxx,ds:nothing,es:nothing,ss:nothing
				
				;**********************************************************************
				;*
				;*   MODULE:   doschgfileptr
				;*
				;*   FILE NAME: dos007.asm
				;*
				;*   CALLING SEQUENCE:
				;*
				;*	 push	   word    file handle
				;*	 push	   dword   distance
				;*	 push	   word    move type
				;*	 push@	   dword   new pointer
				;*	 call	   doschgfileptr
				;*
				;*   MODULES CALLED:  PC-DOS Int 21h, ah=42h, move file pointer
				;*
				;*********************************************************************
				
					    public   doschgfileptr
					    .sall
					    .list
				
				str	    struc
 0000  0000			old_bp	    dw	     ?
 0002  00000000			return	    dd	     ?
 0006  00000000			newptr	    dd	     ?	     ; new file pointer
 000A  0000			movtyp	    dw	     ?	     ; move type
 000C  00000000			dstnce	    dd	     ?	     ; distance to be moved
 0010  0000			handle	    dw	     ?	     ; file handle
 0012				str	    ends
				
 0000				doschgfileptr  proc  far
					    Enter    doschgfileptr	 ; push registers
				
 000C  06				    push     es
 000D  C4 56 0C				    les      dx,[bp].dstnce
 0010  8C C1				    mov      cx,es		 ; set distance
 0012  07				    pop      es
 0013  8B 46 0A				    mov      ax,[bp].movtyp	 ; get move type
 0016  8B 5E 10				    mov      bx,[bp].handle	 ; get handle
				
 0019  B4 42				    mov      ah,42h
 001B  CD 21				    int      21h		 ; move file pointer
 001D  72 0A				    jc	     exit		 ; return if error
				
 001F  C5 76 06				    lds      si,[bp].newptr	   ; set pointer
 0022  89 04				    mov      word ptr [si],ax	   ; save the new pointer
 0024  89 54 02				    mov      word ptr [si]+2,dx    ;
 0027  2B C0				    sub      ax,ax		   ; set godd return code
				
 0029				exit:	    mexit		       ;pop registers
 0035  CA 000C				    ret      size str - 6      ;return
				
 0038				doschgfileptr endp
				
 0038				dosxxx	    ends
				
					    end

Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:13
CP/DOS DosChgFilePtr 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
  NEWPTR . . . . . . . . . . . .  	0006
  MOVTYP . . . . . . . . . . . .  	000A
  DSTNCE . . . . . . . . . . . .  	000C
  HANDLE . . . . . . . . . . . .  	0010

Segments and Groups:

                N a m e         	Length	 Align	Combine Class

DOSXXX . . . . . . . . . . . . .  	0038	BYTE	PUBLIC	'DOS'

Symbols:            

                N a m e         	Type	 Value	 Attr

doschgfileptr  . . . . . . . . .  	F PROC	0000	DOSXXX	Global	Length = 0038

EXIT . . . . . . . . . . . . . .  	L NEAR	0029	DOSXXX

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


    114 Source  Lines
    138 Total   Lines
     20 Symbols

  47502 + 308783 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
