home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c185 / 2.ddi / OWLSRC.EXE / CSCAPE / SOURCE / PCISCPQ.ASM < prev    next >
Encoding:
Assembly Source File  |  1989-06-29  |  1.5 KB  |  73 lines

  1. ; pciscpq.asm
  2. ;
  3. ; 12/13/88 by Ted
  4. ;
  5. ; Low level function for Oakland pc mode detection.
  6. ;
  7. ; Copyright (c) 1988, 1989 Oakland Group Inc.
  8. ; ALL RIGHTS RESERVED
  9. ;
  10. ;------------------------REVISION HISTORY--------------------------------------;
  11. ;
  12. ;     6/29/89 ted    Converted vga_getinfo to C, renamed from pcinfo.asm
  13. ;
  14. ;------------------------------------------------------------------------------;
  15. include    PCDECL.MAC
  16.  
  17. DSEG
  18. compaq_str        db 'COMPAQ'
  19. ENDDS
  20. compaqlen equ    6
  21. ;------------------------------------------------------------------------------;
  22.     PSEG
  23. ;------------------------------------------------------------------------------;
  24. ROMSEG  = 0F000h
  25. ROMOFFS = 0A000h
  26. ROMLEN    = (06000h - 1 - compaqlen)
  27.  
  28. pubproc    pc_IsCompaq
  29.     pushm <ds, es, si, di>
  30.  
  31.     mov cx, ROMLEN
  32.     mov di, ROMOFFS
  33.     mov ax, ROMSEG
  34.     mov es, ax
  35.  
  36. IF FAR_DATA
  37.     mov ax, seg DGROUP:compaq_str
  38.     mov ds, ax
  39. ENDIF
  40.     mov al, ds:compaq_str[0]
  41.     cld
  42. tryagain:
  43. ; find an occurrence of the first char in the string
  44.     repne scasb
  45.     jne notfound
  46.  
  47. ; search for the rest of the string
  48.     push cx
  49.     push di
  50.  
  51.     mov cx, compaqlen-1
  52.     mov si, offset DGROUP:compaq_str + 1
  53.     repe cmpsb
  54.  
  55.     pop di
  56.     pop cx
  57.  
  58.     jne tryagain
  59.  
  60.     mov ax, 1
  61.     jmp short icret
  62. notfound:
  63.     mov ax, 0
  64. icret:
  65.     popm <di, si, es, ds>
  66.     ret
  67. endproc    pc_IsCompaq
  68. ;------------------------------------------------------------------------------;
  69.     ENDPS
  70.     end
  71. ;------------------------------------------------------------------------------;
  72.  
  73.