home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / asmutil / usoftpd.zip / BIOS.INC < prev    next >
Text File  |  1987-07-31  |  2KB  |  167 lines

  1. ; BIOS Interface Macros    - Version 1.0 -    for Microsoft Macro Assembler 5.0
  2. ; (C) Copyright    Microsoft Corporation, 1987.
  3.  
  4. .XCREF
  5. .XLIST
  6. IF1
  7. ; 0Fh
  8. @GetMode    MACRO
  9.         mov    ah,0Fh
  10.         int    10h
  11.         ENDM
  12. ; 00h
  13. @SetMode    MACRO    mode
  14.         mov    al,mode
  15.         xor    ah,ah
  16.         int    10h
  17.         ENDM
  18. ; 0Bh
  19. @SetColor    MACRO    color
  20.         sub    bh,bh
  21.         mov    bl,color
  22.         mov    ah,0Bh
  23.         int    10h
  24.         ENDM
  25. ; 0Bh
  26. @SetPalet    MACRO    color
  27.         mov    bh,1
  28.         mov    bl,color
  29.         mov    ah,0Bh
  30.         int    10h
  31.         ENDM
  32. ; 05h
  33. @SetPage    MACRO    page
  34.         mov    al,page
  35.         mov    ah,05h
  36.         int    10h
  37.         ENDM
  38. ; 03h
  39. @GetCur        MACRO    page
  40.         IFNB    <page>
  41.         mov    bh,page
  42.         ELSE
  43.         xor    bh,bh
  44.         ENDIF
  45.         mov    ah,03h
  46.         int    10h
  47.         ENDM
  48. ; 02h
  49. @SetCurPos    MACRO    column,row,page
  50.         IFNB    <column>
  51.         mov    dl,column
  52.         ENDIF
  53.         IFNB    <row>
  54.         mov    dh,row
  55.         ENDIF
  56.         IFNB    <page>
  57.         mov    bh,page
  58.         ELSE
  59.         xor    bh,bh
  60.         ENDIF
  61.         mov    ah,02h
  62.         int    10h
  63.         ENDM
  64. ; 01h
  65. @SetCurSz    MACRO    first,last
  66.         mov    ch,first
  67.         mov    cl,last
  68.         mov    ah,01h
  69.         int    10h
  70.         ENDM
  71. ; 08h
  72. @GetChAtr    MACRO    page
  73.         IFNB    <page>
  74.         mov    bh,page
  75.         ELSE
  76.         sub    bh,bh
  77.         ENDIF
  78.         mov    ah,08h
  79.         int    10h
  80.         ENDM
  81. ; 09h
  82. @PutChAtr    MACRO    char,atrib,page,repeat
  83.         IFNB    <char>
  84.         mov    al,char
  85.         ENDIF
  86.         IFNB    <atrib>
  87.         mov    bl,atrib
  88.         ENDIF
  89.         IFNB    <page>
  90.         mov    bh,page
  91.         ELSE
  92.         xor    bh,bh
  93.         ENDIF
  94.         IFNB    <repeat>
  95.         mov    cx,repeat
  96.         ELSE
  97.         mov    cx,1
  98.         ENDIF
  99.         mov    ah,09h
  100.         int    10h
  101.         ENDM
  102. ; 0Ah
  103. @PutCh        MACRO    char,atrib,page,repeat
  104.         IFNB    <char>
  105.         mov    al,char
  106.         ENDIF
  107.         IFNB    <atrib>
  108.         mov    bl,atrib
  109.         ENDIF
  110.         IFNB    <page>
  111.         mov    bh,page
  112.         ELSE
  113.         xor    bh,bh
  114.         ENDIF
  115.         IFNB    <repeat>
  116.         mov    cx,repeat
  117.         ELSE
  118.         mov    cx,1
  119.         ENDIF
  120.         mov    ah,0Ah
  121.         int    10h
  122.         ENDM
  123. ; 06h and 07h
  124. @Scroll        MACRO    distance,atrib,upcol,uprow,downcol,downrow
  125.         IFDEF    upcol
  126.         mov    cl,upcol
  127.         ENDIF
  128.         IFDEF    uprow
  129.         mov    ch,uprow
  130.         ENDIF
  131.         IFDEF    upcol
  132.         mov    dl,upcol
  133.         ENDIF
  134.         IFDEF    updownrow
  135.         mov    dh,downrow
  136.         ENDIF
  137.         IFDEF    atrib
  138.         mov    bh,atrib
  139.         ELSE
  140.         mov    bh,07h
  141.         ENDIF
  142.         IF    distance LE 0
  143.         mov    ax,0600h + (-(distance)    AND 0FFh)
  144.         ELSE
  145.         mov    ax,0700h + (distance AND 0FFh)
  146.         ENDIF
  147.         int    10h
  148.         ENDM
  149. ; 08h, 06h, and    02h
  150. @Cls        MACRO
  151.         @GetChAtr
  152.         mov    bl,bh
  153.         mov    bh,ah
  154.         sub    cx,cx
  155.         mov    dx,184Fh
  156.         mov    ax,0600h
  157.         int    10h
  158.         mov    bh,bl
  159.         sub    dx,dx
  160.         mov    ah,02h
  161.         int    10h
  162.         ENDM
  163. ENDIF
  164. .CREF
  165. .LIST
  166.  
  167.