home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Phoenix CD 2.0
/
Phoenix_CD.cdr
/
24b
/
machine.zip
/
MACHINE.ASM
Wrap
Assembly Source File
|
1989-03-20
|
3KB
|
61 lines
;
; Machine Identification
;
id_base equ 0f000h ;segment for machine id
id_off equ 0fffeh ;offset for machine id
pc_id equ 0ffh ;id for IBM PC
xt_id equ 0feh ;id for XT and Portable
jr_id equ 0fdh ;id for PCjr
at_id equ 0fch ;id for PC AT
code segment public
assume cs:code,ds:code
org 100h ;set up as a COM file
start: jmp begin
pc_msg db 'System is an IBM PC','$'
xt_msg db 'System is an IBM PC XT or Portable PC','$'
jr_msg db 'System is an IBM PCjr','$'
at_msg db 'System is an IBM PC AT','$'
no_msg db 'System is not an IBM computer','$'
;
; Check machine identification at location FOOO:FFFE
;
begin: mov ax,cs ;set up ds
mov ds,ax ; to same segment as cs
mov dx,id_base ;move base of machine id
mov es,dx ; into es
mov al,es:id_off ;get machine id
cmp al,pc_id ;is it an IBM PC?
je pc ; yes
cmp al,xt_id ;is it an XT / Portable?
je xt ; yes
cmp al,jr_id ;is it a PCjr?
je jr ; yes
cmp al,at_id ;is it an AT?
je at ; yes
mov dx,offset no_msg ;print not an IBM msg
jmp print ;
pc: mov dx,offset pc_msg ;print IBM PC msg
jmp print ;
xt: mov dx,offset xt_msg ;print XT / Portable msg
jmp print ;
jr: mov dx,offset jr_msg ;print PCjr msg
jmp print ;
at: mov dx,offset at_msg ;print AT msg
print: mov ah,09h ;dos 9: print string
int 21h ;call dos function
mov ah,4ch ;dos terminate program
int 21h ;call dos function
code ends ;
end start ;start is entry point