]>
wirehaze git hosting - MS-DOS.git/blob - v4.0/src/MAPPER/DEVCONFG.ASM
4 title CP
/DOS DosDevConfig mapper
6 dosxxx
segment byte public 'dos'
7 assume
cs:dosxxx
,ds:nothing
,es:nothing
,ss:nothing
9 ;**********************************************************************
11 ;* MODULE: dosdevconfig
13 ;* FILE NAME: dos013.asm
17 ;* push@ other returned info address
18 ;* push word item type being queried
19 ;* push word reserved parm(must be 0)
22 ;* MODULES CALLED: ROM BIOS Int 11, Equipment check
24 ;*********************************************************************
37 item dw ?
; item number
38 data dd ?
; returned information
42 Enter dosdevconfig
; push registers
44 mov ax,[bp].rsrvd
; reserved parm must
46 jne error
; if not zero, jump
48 mov ax,[bp].item
; range check
50 jl error
; if not zero, jump
52 cmp ax,3 ; covered by Int 11?
54 mov bx,ax ; ax destroyed by int
56 int 11h
; get peripherals on the system
58 xchg ax,bx ; restore ax
60 cmp ax,0 ; check number of printers??
61 jg notprint
; jump if not
62 mov cl,14 ; else, setup print bits
63 shr bx,cl ; in returned data
64 jmp short exit
; then return
66 notprint: cmp ax,1 ; check for RS232 adapters??
67 jg diskchk
; jump if not
68 mov cl,4 ; else, setup RS232 bits
69 shl bx,cl ; clear top bits
71 shr bx,cl ; shift back
74 diskchk: cmp ax,2 ; check for disk request??
75 jg math
; jump, if not
76 mov cl,8 ; else setup disk bits
77 shl bx,cl ; clear top bits
79 shr bx,cl ; and shift back
80 inc bl ; 0=1 drive, etc.
83 math: cmp ax,3 ; check for math coprocessor
84 jg notint11
; jump, if not
85 mov cl,14 ; else, setup math coprocessor
86 shl bx,cl ; bits in return data
91 notint11: cmp ax,4 ; check for other valid item
93 cmp ax,5 ; check for PC type ??
94 jg error
; jump if not so
95 push es ; else check for PC type
96 mov dx,0f000h ; read model byte from RAM
98 mov al,es:model_byte
;model byte
100 sub al,0fch ;AT value = FC
101 jmp short exit
;all done, return
103 error: mov ax,inv_parm
106 exit: sub ax,ax ; set good return code
107 lds si,[bp].data ; set return data area address
108 mov byte ptr [si],bl ; save bit pattern in return
110 exit1: Mexit
; pop registers
111 ret size
str - 6 ; return