home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / basic / library / qb_pds / qb_sub / vpage.sub < prev    next >
Encoding:
Text File  |  1987-07-14  |  2.5 KB  |  56 lines

  1. '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. '%  (C) 1987 HUMBLEWARE Custom Programming    Author: Lawrence A. Westhaver  %
  3. '%        247 Paul Martin Drive,  Baltimore MD  21227  (301) 799-1975        %
  4. '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  5. '%                                                                           %
  6. '%     FILENAME: VPAGE.SUB                       LAST UPDATE: 05-24-1987     %
  7. '%                                                                           %
  8. '%  DESCRIPTION: Sets the "Visual" page of the CGA. This subroutine is an    %
  9. '%               adjunct to the QuickBASIC SCREEN statement. QuickBASIC      %
  10. '%               version 2.0 has a bug that causes the "Visual page"         %
  11. '%               parameter of the SCREEN statement to be ignored.            %
  12. '%                                                                           %
  13. '%         CALL: CALL VPAGE(PAGE%)                                           %
  14. '%                                                                           %
  15. '%       INPUTS: PAGE% = Video page, 0-4 for 80 column mode or 0-8 for 40    %
  16. '%                       column mode.                                        %
  17. '%                                                                           %
  18. '%      OUTPUTS: None.                                                       %
  19. '%                                                                           %
  20. '%         NOTE: The Microsoft QuickBASIC INT86 assembly routine must be     %
  21. '%               linked into your program at compile time or it must be      %
  22. '%               present in the QuickBASIC USERLIB.EXE file before this      %
  23. '%               routine can be used.                                        %
  24. '%                                                                           %
  25. '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  26.  
  27.  
  28. SUB VPAGE(PAGE%) Static
  29.  
  30.  
  31. 'dim parameter storage for INT86 call
  32.  
  33.     DIM PARMIN%(7),PARMOUT%(7)
  34.  
  35.  
  36. 'declare indexes for INT86 calls
  37.  
  38.     AXREG%=0    'AX register
  39.     BXREG%=1    'BX register
  40.     CXREG%=2    'CX register
  41.     DXREG%=3    'DX register
  42.     BPREG%=4    'BP register
  43.     SIREG%=5    'SI register
  44.     DIREG%=6    'DI register
  45.     FLAGS%=7    'Flags
  46.  
  47.  
  48. 'set visual page
  49.  
  50.     POKE VARPTR(PARMIN%(AXREG%))+0,PAGE%  'set visual page
  51.     POKE VARPTR(PARMIN%(AXREG%))+1,&H05   'set DOS function
  52.     CALL INT86(&H10,VARPTR(PARMIN%(0)),VARPTR(PARMOUT%(0)))
  53.  
  54.  
  55. END SUB 'vpage
  56.