home *** CD-ROM | disk | FTP | other *** search
- page 60,132
- ;
- ; The Greenleaf Comm Library
- ;
- ; Copyright (C) 1988-90 Greenleaf Software Inc. All Rights Reserved.
- ;
-
- .xlist
- include model.h
- include prologue.h
- .list
-
-
- pseg machine
-
- ;**<< M A C H I N E >>**
- ;
- ; unsigned machine()
- ;
- ; Read and return the machine type byte at location ffff:e as documented
- ; in the IBM Personal Computer AT Technical Reference manual.
- ;
- ; Return Value Machine type
- ;
- ; 0x00ff IBM Personal Computer
- ; 0x00fe IBM Personal Computer XT
- ; 0x00fd IBM PC/jr
- ; 0x00fc IBM Personal Computer AT
- ; IBM PC-XT 286
- ; IBM PS/2 model 50 & 60
- ; 0x00f9 IBM PC Convertible
- ; 0x00fa IBM PS/2 model 30
- ; 0x00f8 IBM PS/2 model 80
- ;
- cproc machine
-
- push ds
- push bx
- mov bx,0ffffh
- mov ds,bx
- mov bx,0eh ;ds:bx = ffff:e
- mov al,[bx] ;get value to al
- pop bx
- pop ds
- xor ah,ah
- cproce
-
-
- ;==>-- int submodel(void)
- ;
- ; Return the submodel I.D. of the system, return a (int)-1 if
- ; Return system configuration parameters function of ROM BIOS is
- ; not supported.
- ;
- ; Return Value Machine type
- ; 0xffff (-1) Return system config parameters
- ; not supported.
- ; 0x04 IBM PS/2 model 50 (if machine()=0xfc)
- ; 0x05 IBM PS/2 model 60
- ;
- cproc submodel
- push es
- mov ah,0c0h
- int 15h
- mov ax,-1
- jc subex
- add bx,3
- mov al,es:[bx]
- xor ah,ah
- subex: pop es
- cproce
-
- endps
- end