home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / GRLF-C-2.ZIP / GFUNC / GETSYSCO.ASM < prev    next >
Encoding:
Assembly Source File  |  1990-05-30  |  2.2 KB  |  118 lines

  1. ;/*
  2. ;** getsysco.asm
  3. ;** contains: getsysco(), getrdate()
  4. ;*/
  5.  
  6. SYSSERVICE    equ    015h            ;System Service Software Interrupt
  7. GETCONFIGPARMS    equ    0c0h            ;Return System Configuration Parameters
  8.  
  9.  
  10.         include model.h
  11.         include prologue.h
  12.  
  13.         pseg getsysco
  14.  
  15. ;/*
  16. ;**  SYSTEMCONFIG far *
  17. ;** getsysco(void)
  18. ;**
  19. ;** ARGUMENT(s)
  20. ;**  None.
  21. ;**
  22. ;** DESCRIPTION
  23. ;**  Get pointer to system configuration structure.
  24. ;**
  25. ;** RETURNS
  26. ;**  32 bit pointer to system configuration structure, returns 0:0 if
  27. ;**  this call is not supported.
  28. ;**
  29. ;** AUTHOR
  30. ;**  ""   Fri 11-Nov-1988    11:34:34
  31. ;**   Copyright (C)1988-1990 Greenleaf Software Inc. All Rights Reserved.
  32. ;**
  33. ;** MODIFICATIONS
  34. ;**
  35. ;*/
  36.         cproc    getsysco
  37.         push    es
  38.         mov    ah,GETCONFIGPARMS
  39.         int    SYSSERVICE
  40.         jnc    funcsupported
  41.         ifdef    AXBX32
  42.          xor    ax,ax
  43.          xor    bx,bx
  44.         else
  45.          xor    ax,ax
  46.          xor    dx,dx
  47.         endif
  48.         jmp    short gsfuncexit
  49. funcsupported:
  50.         ifdef    AXBX32
  51.          mov    ax,es
  52.         else
  53.          mov    dx,es
  54.          mov    ax,bx
  55.         endif
  56. gsfuncexit:    pop    es
  57.         cproce
  58.  
  59.  
  60.  
  61. ;/*
  62. ;**  void
  63. ;** getrdate(char *buffer)
  64. ;**
  65. ;** ARGUMENT(s)
  66. ;**    buffer        -    pointer to a user buffer to receive the
  67. ;**                string.  This buffer MUST be at least
  68. ;**                nine bytes long.
  69. ;**
  70. ;** DESCRIPTION
  71. ;**  Gets the BIOS version date from the ROM-BIOS.  This function moves
  72. ;**  the ASCII date from F000:FFF5 through F000:FFFC to the users buffer.
  73. ;**  A NULL byte is also put at the end of the string.
  74. ;**
  75. ;**  The IBM Personal System/2 and Personal Computer BIOS Technical
  76. ;**  reference documents (page 1-5) this memory location.
  77. ;**
  78. ;** RETURNS
  79. ;**  void
  80. ;**
  81. ;** AUTHOR
  82. ;**  ""   Fri 11-Nov-1988    12:12:33
  83. ;**   Copyright (C)1988-1990 Greenleaf Software Inc. All Rights Reserved.
  84. ;**
  85. ;** MODIFICATIONS
  86. ;**
  87. ;*/
  88.         cproc    getrdate
  89.         if    _LDATA
  90.          push    ds
  91.          lds    bx,parm1_
  92.         else
  93.          mov    bx,parm1_
  94.         endif
  95.         push    es
  96.         mov    ax,0f000h
  97.         mov    es,ax
  98.         mov    si,0fff5h
  99.         cmp    byte ptr es:[si+2],2fh    ;do we have a slash
  100.         jz    correct
  101.         inc    si            ;some Compaq's start at :FFF6
  102. correct:    mov    cx,8
  103. grdloop:    mov    al,es:[si]
  104.         mov    [bx],al
  105.         inc    bx
  106.         inc    si
  107.         loop    grdloop
  108.         mov    byte ptr [bx],0
  109.         pop    es
  110.         if    _LDATA
  111.          pop    ds
  112.         endif
  113.         cproce
  114.  
  115.  
  116.         endps
  117.         end
  118.