home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast.iso
/
pcmag
/
vol10n20.zip
/
CHKCPU.ZIP
/
CHECKCPU.ASM
< prev
next >
Wrap
Assembly Source File
|
1991-08-30
|
2KB
|
101 lines
title CHECKCPU.ASM - Report CPU type
page 55,132
; CHECKCPU.ASM - Report CPU Type
; Copyright (c) 1991 Ray Duncan
stdout equ 1 ; standard output handle
cr equ 0dh ; ASCII carriage return
lf equ 0ah ; ASCII line feed
_DATA segment word public 'DATA'
msg1 db cr,lf,'The CPU type is '
msg1_len equ $-msg1
msg2 db 'unknown.',cr,lf
msg2_len equ $-msg2
msg86 db '8086 or 8088.',cr,lf
msg86_len equ $-msg86
msg286 db '80286.',cr,lf
msg286_len equ $-msg286
msg386 db '80386SX or 80386DX.',cr,lf
msg386_len equ $-msg386
msg486 db '80486SX or 80486DX.',cr,lf
msg486_len equ $-msg486
_DATA ends
_TEXT segment word public 'CODE'
extrn cputype:near
assume cs:_TEXT,ds:_DATA,ss:_STK
chkcpu proc far
mov ax,_DATA ; make our data addressable
mov ds,ax
mov es,ax
mov ah,40h
mov bx,stdout
mov cx,msg1_len
mov dx,offset _DATA:msg1
int 21h
call cputype
cmp ax,86h
jne chk1
mov cx,msg86_len
mov dx,offset _DATA:msg86
jmp chk9
chk1: cmp ax,286h
jne chk2
mov cx,msg286_len
mov dx,offset _DATA:msg286
jmp chk9
chk2: cmp ax,386h
jne chk3
mov cx,msg386_len
mov dx,offset _DATA:msg386
jmp chk9
chk3: cmp ax,486h
jne chk4
mov cx,msg486_len
mov dx,offset _DATA:msg486
jmp chk9
chk4: mov cx,msg2_len
mov dx,offset _DATA:msg2
chk9: mov ah,40h
mov bx,stdout
int 21h
mov ax,4c00h
int 21h
chkcpu endp
_TEXT ends
_STK segment para stack 'STACK'
db 128 dup (?)
_STK ends
end chkcpu