home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / pcmagazi / 1992 / 11 / labnotes / global.bas < prev    next >
BASIC Source File  |  1992-02-28  |  3KB  |  74 lines

  1. 'Global declares and Constants for Visual Basic Labnote demos.
  2. 'Copyright (c) 1992 Jay Munro
  3. 'First Published by PC Magazine in June 16,1992
  4.  
  5. '--- Interrupt function
  6. Declare Function Interrupt% Lib "Labnotes.DLL" (Registers As Any, ByVal IntNum%)
  7.  
  8. '--- MKx$ replacements
  9. Declare Function MKI$ Lib "Labnotes.DLL" (ByVal I%)
  10. Declare Function MKL$ Lib "Labnotes.DLL" (ByVal L&)
  11. Declare Function MKS$ Lib "Labnotes.DLL" (ByVal S!)
  12. Declare Function MKD$ Lib "Labnotes.DLL" (ByVal D#)
  13. Declare Function MKC$ Lib "Labnotes.DLL" (ByVal C@)
  14.  
  15. '--- CVx replacements
  16. Declare Function CVI% Lib "Labnotes.DLL" (I$)
  17. Declare Function CVL& Lib "Labnotes.DLL" (L$)
  18. Declare Function CVS! Lib "Labnotes.DLL" (S$)
  19. Declare Function CVD# Lib "Labnotes.DLL" (D$)
  20. Declare Function CVC@ Lib "Labnotes.DLL" (C$)
  21.  
  22. '--- Variable segment and address functions
  23. Declare Function VarSeg% Lib "Labnotes.DLL" (Var As Any)
  24. Declare Function VarPtr% Lib "Labnotes.DLL" (Var As Any)
  25. Declare Function SSeg% Lib "Labnotes.DLL" (Var$)
  26. Declare Function Sadd% Lib "Labnotes.DLL" (Var$)
  27. Declare Function Seg& Lib "Labnotes.DLL" (Var As Any)
  28.  
  29. '--- Inp and Out replacements
  30. Declare Function Inp% Lib "Labnotes.DLL" (ByVal Port%)
  31. Declare Sub Out Lib "Labnotes.DLL" (ByVal Port%, ByVal Value%)
  32.  
  33. '--- Peek and Poke replacements
  34. Declare Function Peek% Lib "Labnotes.DLL" (ByVal Segment%, ByVal Offset%)
  35. Declare Sub Poke Lib "Labnotes.DLL" (ByVal Segment%, ByVal Offset%, ByVal ByteData%)
  36.  
  37. 'To use Peek or Poke with the Seg function
  38. 'Declare Function Peek% Lib "Labnotes.DLL" (Seg&(Variable))
  39. 'Declare Sub Poke Lib "Labnotes.DLL" (Seg&(Variable), Byval Data%)
  40.  
  41. '--- Common segment access functions
  42. Declare Function GetAbs% Lib "Labnotes.DLL" (ByVal Segment%)
  43.  
  44. '--- Control handle to Window handle function
  45. Declare Function ControlHwnd% Lib "Labnotes.DLL" (hCTL As Control)
  46.  
  47. '--- Windows API SendMessage function
  48. Declare Function SendMessage% Lib "User.EXE" (ByVal CtrhWnd%, ByVal Msg%, ByVal Wp%, ByVal Lp As Any)
  49.  
  50. '--- Type Register structures for Interrupt function
  51.  
  52. Type Regs
  53.   AX As Integer
  54.   BX As Integer
  55.   CX As Integer
  56.   DX As Integer
  57.   BP As Integer
  58.   SI As Integer
  59.   DI As Integer
  60.   Flags As Integer
  61.   DS As Integer
  62.   ES As Integer
  63. End Type
  64.  
  65. '--- Windows Message constants
  66. Global Const WM_User = &H400
  67. 'Global Const WM_Clear = &H303
  68. 'Global Const WM_SetText = &HC
  69. Global Const LB_ResetContent = WM_User + &H5
  70.  
  71. '--- Debugging routines
  72. Declare Sub MonoPrint Lib "Labnotes.DLL" (ByVal Msg$, ByVal Row%, ByVal Col%, ByVal Attr%)
  73.  
  74.