home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / c / djgpp / libsrc / pc / screen2.s < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.5 KB  |  75 lines

  1. /* This is file SCREEN2.S */
  2. /*
  3. ** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
  4. **
  5. ** This file is distributed under the terms listed in the document
  6. ** "copying.dj", available from DJ Delorie at the address above.
  7. ** A copy of "copying.dj" should accompany this file; if not, a copy
  8. ** should be available from where this file was obtained.  This file
  9. ** may not be distributed without a verbatim copy of "copying.dj".
  10. **
  11. ** This file is distributed WITHOUT ANY WARRANTY; without even the implied
  12. ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. */
  14.  
  15. _ScreenPrimary = 0xe00b8000
  16. _ScreenSecondary = 0xe00b0000
  17.     .globl    _ScreenPrimary
  18.     .globl    _ScreenSecondary
  19.  
  20.     .globl    _ScreenSetCursor /* row, col */
  21. _ScreenSetCursor:
  22.     pushl    %ebp
  23.     movl    %esp,%ebp
  24.     pushl    %ebx
  25.     pushl    %esi
  26.     pushl    %edi
  27.     movb    $0x02,%ah
  28.     movb    $0,%bh
  29.     movb    8(%ebp),%dh
  30.     movb    12(%ebp),%dl
  31.     int    $0x10
  32.     popl    %edi
  33.     popl    %esi
  34.     popl    %ebx
  35.     popl    %ebp
  36.     ret
  37.  
  38.     .globl    _ScreenGetCursor /* &row, &col */
  39. _ScreenGetCursor:
  40.     pushl    %ebp
  41.     movl    %esp,%ebp
  42.     pushl    %ebx
  43.     pushl    %esi
  44.     pushl    %edi
  45.     movb    $0x03,%ah
  46.     movb    $0,%bh
  47.     pushl    %ebp
  48.     int    $0x10
  49.     popl    %ebp
  50.     movl    8(%ebp),%esi
  51.     movzbl    %dh,%eax
  52.     movl    %eax,(%esi)
  53.     movl    12(%ebp),%esi
  54.     movzbl    %dl,%eax
  55.     movl    %eax,(%esi)
  56.     popl    %edi
  57.     popl    %esi
  58.     popl    %ebx
  59.     popl    %ebp
  60.     ret
  61.  
  62.     .globl    _ScreenClear
  63. _ScreenClear:
  64.     pushl    %edi
  65.     movl    $0xe0000400,%edi
  66.     movzwl    0xe000044a,%ecx
  67.     movzbl    0xe0000484,%eax
  68.     imull    %eax,%ecx
  69.     movl    $0xe00b8000,%edi
  70.     movw    $0x0720,%ax
  71.     rep
  72.     stosw
  73.     popl    %edi
  74.     ret
  75.