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


				;0
				page 60,132
				;
				title CP/DOS DosDevConfig mapper
				;
 0000				dosxxx	segment byte public 'dos'
					assume	cs:dosxxx,ds:nothing,es:nothing,ss:nothing
				;
				;**********************************************************************
				;*
				;*   MODULE:   dosdevconfig
				;*
				;*   FILE NAME: dos013.asm
				;*
				;*   CALLING SEQUENCE:
				;*
				;*	 push@	   other  returned info address
				;*	 push	   word   item type being queried
				;*	 push	   word   reserved parm(must be 0)
				;*	 call	   dosdevconfig
				;*
				;*   MODULES CALLED:  ROM BIOS Int 11, Equipment check
				;*
				;*********************************************************************
				
					    public   dosdevconfig
					    .sall
					    include  macros.inc
			     C	;
			     C	
			     C	
			     C	pushal  macro
			     C	        push    bx
			     C	        push    cx
			     C	        push    dx
			     C	        push    si
			     C	        push    di
			     C	        push    ds
			     C	        push    es
			     C	        push    ss
			     C	        push    bp
			     C	        endm
			     C	;
			     C	popal   macro
			     C	        pop     bp
			     C	        pop     ss
			     C	        pop     es
			     C	        pop     ds
			     C	        pop     di
			     C	        pop     si
			     C	        pop     dx
			     C	        pop     cx
			     C	        pop     bx
			     C	        endm
			     C	;
			     C	Enter   macro   Routine
Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:14
CP/DOS DosDevConfig mapper                                  Page     1-2


			     C	
			     C	        push    bp
			     C	        mov     bp,sp
			     C	        pushal
			     C	
			     C	        endm
			     C	;
			     C	Mexit   macro
			     C	
			     C	        popal
			     C	        mov     sp,bp
			     C	        pop     bp
			     C	
			     C	        endm
			     C	
				
 = 0002				inv_parm    equ      0002h
 = FFFE				model_byte  equ      0fffeh
				
				str	    struc
 0000  0000			old_bp	    dw	     ?
 0002  00000000			return	    dd	     ?
 0006  0000			rsrvd	    dw	     ?	      ; reserved
 0008  0000			item	    dw	     ?	      ; item number
 000A  00000000			data	    dd	     ?	      ; returned information
 000E				str	    ends
				
 0000				dosdevconfig  proc far
					    Enter    dosdevconfig	   ; push registers
				
 000C  8B 46 06				    mov      ax,[bp].rsrvd	   ; reserved parm must
 000F  3D 0000				    cmp      ax,0		   ; be zero
 0012  75 65				    jne      error		   ; if not zero, jump
				
 0014  8B 46 08				    mov      ax,[bp].item	   ; range check
 0017  3D 0000				    cmp      ax,0
 001A  7C 5D				    jl	     error		   ; if not zero, jump
				
 001C  3D 0003				    cmp      ax,3		   ; covered by Int 11?
 001F  7F 3F				    jg	     notint11
 0021  8B D8				    mov      bx,ax		   ; ax destroyed by int
				
 0023  CD 11				    int      11h		   ; get peripherals on the system
				
 0025  93				    xchg     ax,bx		   ; restore ax
				
 0026  3D 0000				    cmp      ax,0		   ; check number of printers??
 0029  7F 06				    jg	     notprint		   ; jump if not
 002B  B1 0E				    mov      cl,14		   ; else, setup print bits
 002D  D3 EB				    shr      bx,cl		   ; in returned data
 002F  EB 4D				    jmp      short exit 	   ; then return
				
 0031  3D 0001			notprint:   cmp      ax,1		   ; check for RS232 adapters??
 0034  7F 0A				    jg	     diskchk		   ; jump if not
 0036  B1 04				    mov      cl,4		   ; else, setup RS232 bits
 0038  D3 E3				    shl      bx,cl		   ; clear top bits
Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:14
CP/DOS DosDevConfig mapper                                  Page     1-3


 003A  B1 0D				    mov      cl,13
 003C  D3 EB				    shr      bx,cl		   ; shift back
 003E  EB 3E				    jmp      short exit
				
 0040  3D 0002			diskchk:    cmp      ax,2		   ; check for disk request??
 0043  7F 0C				    jg	     math		   ; jump, if not
 0045  B1 08				    mov      cl,8		   ; else setup disk bits
 0047  D3 E3				    shl      bx,cl		   ; clear top bits
 0049  B1 0E				    mov      cl,14
 004B  D3 EB				    shr      bx,cl		   ; and shift back
 004D  FE C3				    inc      bl 		   ; 0=1 drive, etc.
 004F  EB 2D				    jmp      short exit
				
 0051  3D 0003			math:	    cmp      ax,3		   ; check for math coprocessor
 0054  7F 0A				    jg	     notint11		   ; jump, if not
 0056  B1 0E				    mov      cl,14		   ; else, setup math coprocessor
 0058  D3 E3				    shl      bx,cl		   ; bits in return data
 005A  B1 0F				    mov      cl,15
 005C  D3 EB				    shr      bx,cl
 005E  EB 1E				    jmp      short exit
				
 0060  3D 0004			notint11:   cmp      ax,4		  ; check for other valid item
 0063  74 14				    je	     error
 0065  3D 0005				    cmp      ax,5		  ; check for PC type ??
 0068  7F 0F				    jg	     error		  ; jump if not so
 006A  06				    push     es 		  ; else check for PC type
 006B  BA F000				    mov      dx,0f000h		  ; read model byte from RAM
 006E  8E C2				    mov      es,dx
 0070  26: A0 FFFE			    mov      al,es:model_byte	  ;model byte
 0074  07				    pop      es
 0075  2C FC				    sub      al,0fch		  ;AT value = FC
 0077  EB 05				    jmp      short exit 	  ;all done, return
				
 0079  B8 0002			error:	    mov      ax,inv_parm
 007C  EB 07				    jmp      short exit1
				
 007E  2B C0			exit:	    sub      ax,ax		  ; set good return code
 0080  C5 76 0A				    lds      si,[bp].data	  ; set return data area address
 0083  88 1C				    mov      byte ptr [si],bl	  ; save bit pattern in return
									  ; data area
 0085				exit1:	    Mexit			  ; pop registers
 0091  CA 0008				    ret      size str - 6	  ; return
				
 0094				dosdevconfig endp
				
 0094				dosxxx	    ends
				
					    end

Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:14
CP/DOS DosDevConfig 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  . . . . . . . . . . . . . .  	000E	0005
  OLD_BP . . . . . . . . . . . .  	0000
  RETURN . . . . . . . . . . . .  	0002
  RSRVD  . . . . . . . . . . . .  	0006
  ITEM . . . . . . . . . . . . .  	0008
  DATA . . . . . . . . . . . . .  	000A

Segments and Groups:

                N a m e         	Length	 Align	Combine Class

DOSXXX . . . . . . . . . . . . .  	0094	BYTE	PUBLIC	'DOS'

Symbols:            

                N a m e         	Type	 Value	 Attr

DISKCHK  . . . . . . . . . . . .  	L NEAR	0040	DOSXXX
dosdevconfig . . . . . . . . . .  	F PROC	0000	DOSXXX	Global	Length = 0094

ERROR  . . . . . . . . . . . . .  	L NEAR	0079	DOSXXX
EXIT . . . . . . . . . . . . . .  	L NEAR	007E	DOSXXX
EXIT1  . . . . . . . . . . . . .  	L NEAR	0085	DOSXXX

INV_PARM . . . . . . . . . . . .  	NUMBER	0002	

MATH . . . . . . . . . . . . . .  	L NEAR	0051	DOSXXX
MODEL_BYTE . . . . . . . . . . .  	NUMBER	FFFE	

NOTINT11 . . . . . . . . . . . .  	L NEAR	0060	DOSXXX
NOTPRINT . . . . . . . . . . . .  	L NEAR	0031	DOSXXX

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

Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:14

CP/DOS DosDevConfig mapper                                  Symbols-2






    163 Source  Lines
    187 Total   Lines
     27 Symbols

  47474 + 292427 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
