Introduction
Assembly Routine
Content by David L. Beem (original HERE). Modified by Tomáš Slavotínek.
Last update: 04 Apr 2021 (synced with David's version dated 30 Mar 2021).
Introduction
In many of the PS/2 routines you may need to check if the system is a Micro
Channel computer. This routine does that check, setting the Carry flag if the
system does not have the Micro Channel bus. If it is a Micro Channel system, the
Carry flag is clear and the AL register holds the number of Micro Channel
'slots'. Be aware that some of the system planar resources may be identified as
a 'slot'.
This routine becomes harder in BASIC or QB (the version included with MS-DOS)
with the lack of the CALL INTERRUPT statement. IBM moved the "Get Configuration"
table on some of the PS/2s (it started at F000:E6F5h on older IBM systems),
otherwise a PEEK at the the particular bit in BIOS could be used. One possible
way around this is to POKE an Assembly routine into memory and then execute it.
Assembly Routine
;----------------------------------------------
; CheckMCA Assembly routine
;
; This routine checks whether the system has a
; Micro Channel (MCA) bus.
;
; Entry:
; None
;
; Exit:
; Carry flag clear if Micro Channel bus
; AL = Number of MCA slots
; Carry flag set if not Micro Channel bus
; AL = 0
;
;----------------------------------------------
CheckMCA proc near
mov AH,C0h
int 15h
mov AL,0
jc Finish ; Call supported?
stc
test byte ptr ES:[BX+05],02 ; MCA flag bit?
jne Finish
cmp byte ptr ES:[BX+02],FC ; IBM 286?
jne Slots
cmp byte ptr ES:[BX+03],06 ; 7552 Gearbox?
je Finish
Slots: clc
cli
out 75h,01
mov AL,8Eh
out 74h,AL
in AL,76h
cmp AL,08
jbe Finish
mov AL,04
Finish: sti
CheckMCA endp
Note: The
IBM 7552 "Gearbox" (BIOS Model
FCh, Submodel 06h) falsely claims to be a Micro Channel system. The PS/2 Model
50, 50Z, and 55SX, as well as the Industrial Model 7541 (based on a Model 50Z
planar) lack the 2KB extended CMOS RAM ("NVRAM") that is used for a Micro
Channel configuration of more than four adapters.
|