home *** CD-ROM | disk | FTP | other *** search
- ; pciscpq.asm
- ;
- ; 12/13/88 by Ted
- ;
- ; Low level function for Oakland pc mode detection.
- ;
- ; Copyright (c) 1988, 1989 Oakland Group Inc.
- ; ALL RIGHTS RESERVED
- ;
- ;------------------------REVISION HISTORY--------------------------------------;
- ;
- ; 6/29/89 ted Converted vga_getinfo to C, renamed from pcinfo.asm
- ;
- ;------------------------------------------------------------------------------;
- include PCDECL.MAC
-
- DSEG
- compaq_str db 'COMPAQ'
- ENDDS
- compaqlen equ 6
- ;------------------------------------------------------------------------------;
- PSEG
- ;------------------------------------------------------------------------------;
- ROMSEG = 0F000h
- ROMOFFS = 0A000h
- ROMLEN = (06000h - 1 - compaqlen)
-
- pubproc pc_IsCompaq
- pushm <ds, es, si, di>
-
- mov cx, ROMLEN
- mov di, ROMOFFS
- mov ax, ROMSEG
- mov es, ax
-
- IF FAR_DATA
- mov ax, seg DGROUP:compaq_str
- mov ds, ax
- ENDIF
- mov al, ds:compaq_str[0]
- cld
- tryagain:
- ; find an occurrence of the first char in the string
- repne scasb
- jne notfound
-
- ; search for the rest of the string
- push cx
- push di
-
- mov cx, compaqlen-1
- mov si, offset DGROUP:compaq_str + 1
- repe cmpsb
-
- pop di
- pop cx
-
- jne tryagain
-
- mov ax, 1
- jmp short icret
- notfound:
- mov ax, 0
- icret:
- popm <di, si, es, ds>
- ret
- endproc pc_IsCompaq
- ;------------------------------------------------------------------------------;
- ENDPS
- end
- ;------------------------------------------------------------------------------;
-