home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warptlk3.zip / TOOLKIT / INC / VDMM.INC < prev    next >
Text File  |  1995-08-24  |  35KB  |  1,013 lines

  1. ;       SCCSID = @(#)vdmm.inc    6.1 92/03/25
  2. ;***    VDMM.INC
  3. ;
  4. ;
  5. ;
  6. ;       Copyright (c) IBM Corporation 1987, 1992
  7. ;
  8. ;       All Rights Reserved
  9. ;       For include file hierarchy, see MVDM.INC
  10. ;
  11. ;       Title:
  12. ;               VDMM exports
  13. ;
  14. ;       Description:
  15. ;               VDM Manager Exported Definitions
  16. ;
  17.  
  18. ;***************************************
  19. ;            VDMM Defines
  20. ;***************************************
  21.  
  22.  
  23. CURRENT_VDM     EQU     (0)
  24.  
  25. ;***    VDHAllocMem: flOptions
  26.  
  27. VDHAM_FIXED     EQU     00000h
  28. VDHAM_SWAPPABLE         EQU     00001h
  29.  
  30.  
  31.  
  32. ;***    VDHAllocPage: flOptions values
  33.  
  34. VDHAP_SPECIFIC  EQU     00001h
  35. VDHAP_SYSTEM    EQU     00002h
  36. VDHAP_FIXED     EQU     00004h
  37. VDHAP_SWAPPABLE         EQU     00000h
  38. VDHAP_PHYSICAL  EQU     00008h
  39.  
  40.  
  41.  
  42. ;***    VDHMapPages: flOptions values
  43.  
  44. VDHMT_INVALID   EQU     00001h
  45. VDHMT_LINEAR    EQU     00002h
  46. VDHMT_PHYSICAL  EQU     00003h
  47. VDHMT_BLACK_HOLE        EQU     00004h
  48.  
  49.  
  50. ;***    VDHInstallFaultHook: flOptions values
  51.  
  52. VDHIFH_ADDR     EQU     00001h
  53.  
  54.  
  55. ;***    VDHAllocMem Flags: flOptions Value
  56.  
  57. VDHCBP_SWAPPABLE        EQU     00001h
  58.  
  59.  
  60. ;***    VDHSetPriority: flClass values
  61.  
  62. VDHSP_NO_CHANGE         EQU     000000000h
  63. VDHSP_IDLE      EQU     000000001h
  64. VDHSP_REGULAR   EQU     000000002h
  65. VDHSP_TIME_CRITICAL     EQU     000000003h
  66. VDHSP_SERVER    EQU     000000004h
  67. VDHSP_SIMULATED_INTERRUPT       EQU     000000005h
  68.  
  69. VDHSP_CLASS_MASK        EQU     00000ffffh
  70. VDHSP_NUM_CLASSES       EQU     5
  71.  
  72. VDHSP_DEFAULT_ACTION    EQU     000000000h
  73. VDHSP_START_USE         EQU     000010000h
  74. VDHSP_CONTINUE_USE      EQU     000020000h
  75. VDHSP_END_USE   EQU     000030000h
  76.  
  77. VDHSP_ACTION_MASK       EQU     0ffff0000h
  78.  
  79.  
  80. ;***    VDHYield - flags
  81.  
  82. VDH_YIELD_TIME_CRITICAL         EQU     1
  83.  
  84.  
  85. ;***    VDHLockMem flags - flOptions
  86.  
  87. VDHLM_RESIDENT  EQU     00000h
  88. VDHLM_READ      EQU     00001h
  89. VDHLM_WRITE     EQU     00002h
  90. VDHLM_CONTIGUOUS        EQU     00004h
  91. VDHLM_NOBLOCK   EQU     00008h
  92. VDHLM_16M       EQU     00010h
  93.  
  94. VDHLM_NO_ADDR   EQU     -1
  95.  
  96.  
  97. VDH_FAILURE     EQU     0
  98. VDH_SUCCESS     EQU     1
  99.  
  100. ;***    VDM States and VDD Exit defines
  101. ;
  102. ;   These are VDM states for which VDDs get notification. Few of them
  103. ;   like PDB_* are not truely VDM state changes but they are useful
  104. ;   events for which few VDDs may be intereseted. For arguments passed
  105. ;   and callable contexts see VDHInstallUserHook.
  106. ;
  107.  
  108. VDM_CREATE      EQU     0   ;A VDM is being created
  109. VDM_TERMINATE   EQU     1   ;A VDM is being terminated
  110. VDM_FOREGROUND  EQU     2   ;A VDM coming to foreground
  111. VDM_BACKGROUND  EQU     3   ;A VDM going to background
  112. VDD_EXIT        EQU     4   ;MVDM shutting down
  113. VDM_VDD_CREATE_DONE     EQU     5   ;Called Soon after VDM_CREATE
  114. VDM_PDB_DESTROY         EQU     6   ;A PDB destroyed in a VDM
  115. VDM_PDB_CHANGE  EQU     7   ;A new PDB is switched to
  116. VDM_CODEPAGE_CHANGE     EQU     8   ;A new code page is activated
  117. VDM_TITLE_CHANGE        EQU     9   ;VDM Title change event
  118. VDM_MEMORY_MAPPED_IN    EQU     10  ;Memory mapped in
  119. VDM_MEMORY_UN_MAPPED    EQU     11  ;Memory unmapped
  120. VDM_CREATE_DONE         EQU     12  ;VDM created successfully
  121.  
  122.  
  123. ;***    VDHPopup Flags
  124.  
  125. VDHP_FAIL       EQU     00001h
  126. VDHP_TERMINATE_SESSION  EQU     00002h
  127. VDHP_RETRY      EQU     00004h
  128. VDHP_IGNORE     EQU     00008h
  129.  
  130.  
  131. ;***    VDHOpen: ActionTaken Flags
  132.  
  133. VDHOPEN_FILE_EXISTED    EQU     00001h
  134. VDHOPEN_FILE_CREATED    EQU     00002h
  135. VDHOPEN_FILE_TRUNCATED  EQU     00003h
  136.  
  137.  
  138. ;***    VDHOpen: FileAttribute Flags
  139.  
  140. VDHOPEN_FILE_NORMAL     EQU     00000h
  141. VDHOPEN_FILE_READONLY   EQU     00001h
  142. VDHOPEN_FILE_HIDDEN     EQU     00002h
  143. VDHOPEN_FILE_SYSTEM     EQU     00004h
  144. VDHOPEN_FILE_DIRECTORY  EQU     00010h
  145. VDHOPEN_FILE_ARCHIVED   EQU     00020h
  146.  
  147.  
  148. ;***    VDHOpen: OpenFlag Flags
  149.  
  150. VDHOPEN_FILE_OPEN       EQU     00001h
  151. VDHOPEN_FILE_REPLACE    EQU     00002h
  152. VDHOPEN_FILE_CREATE     EQU     00010h
  153.  
  154. ;     this nibble applies if file already exists                      xxxx
  155.  
  156. VDHOPEN_ACTION_FAIL_IF_EXISTS   EQU     00000h     ;---- ---- ---- 0000
  157. VDHOPEN_ACTION_OPEN_IF_EXISTS   EQU     00001h     ;---- ---- ---- 0001
  158. VDHOPEN_ACTION_REPLACE_IF_EXISTS        EQU     00002h     ;---- ---- ---- 0010
  159.  
  160. ;     this nibble applies if file does not exist                 xxxx
  161.  
  162. VDHOPEN_ACTION_FAIL_IF_NEW      EQU     00000h     ;---- ---- 0000 ----
  163. VDHOPEN_ACTION_CREATE_IF_NEW    EQU     00010h     ;---- ---- 0001 ----
  164.  
  165.  
  166. ;***    VDHOpen: OpenMode Flags
  167.  
  168. VDHOPEN_ACCESS_READONLY         EQU     00000h     ;---- ---- ---- -000
  169. VDHOPEN_ACCESS_WRITEONLY        EQU     00001h     ;---- ---- ---- -001
  170. VDHOPEN_ACCESS_READWRITE        EQU     00002h     ;---- ---- ---- -010
  171. VDHOPEN_SHARE_DENYREADWRITE     EQU     00010h     ;---- ---- -001 ----
  172. VDHOPEN_SHARE_DENYWRITE         EQU     00020h     ;---- ---- -010 ----
  173. VDHOPEN_SHARE_DENYREAD  EQU     00030h     ;---- ---- -011 ----
  174. VDHOPEN_SHARE_DENYNONE  EQU     00040h     ;---- ---- -100 ----
  175. VDHOPEN_FLAGS_NOINHERIT         EQU     00080h     ;---- ---- 1--- ----
  176. VDHOPEN_FLAGS_NO_LOCALITY       EQU     00000h     ;---- -000 ---- ----
  177. VDHOPEN_FLAGS_SEQUENTIAL        EQU     00100h     ;---- -001 ---- ----
  178. VDHOPEN_FLAGS_RANDOM    EQU     00200h     ;---- -010 ---- ----
  179. VDHOPEN_FLAGS_RANDOMSEQUENTIAL  EQU     00300h     ;---- -011 ---- ----
  180. VDHOPEN_FLAGS_NO_CACHE  EQU     01000h     ;---1 ---- ---- ----
  181. VDHOPEN_FLAGS_FAIL_ON_ERROR     EQU     02000h     ;--1- ---- ---- ----
  182. VDHOPEN_FLAGS_WRITE_THROUGH     EQU     04000h     ;-1-- ---- ---- ----
  183. VDHOPEN_FLAGS_DASD      EQU     08000h     ;1--- ---- ---- ----
  184. VDHOPEN_FLAGS_NONSPOOLED        EQU     000040000h
  185.  
  186.  
  187. ;***    VDHSeek: ultype options
  188.  
  189. VDHSK_ABSOLUTE  EQU     0
  190. VDHSK_CURRENT_POSITION  EQU     1
  191. VDHSK_END_OF_FILE       EQU     2
  192.  
  193.  
  194. ;***    VDHPhysicalDisk: functions
  195.  
  196. VDHPHYD_GET_DISKS       EQU     1
  197. VDHPHYD_GET_HANDLE      EQU     2
  198. VDHPHYD_RELEASE_HANDLE  EQU     3
  199.  
  200.  
  201. ;***    VDHCreateSem Flags
  202.  
  203. VDH_EVENTSEM    EQU     00000h
  204. VDH_MUTEXSEM    EQU     00001h
  205.  
  206.  
  207. ;***    VDHArmTimerHook Flags
  208.  
  209. VDH_TIMER_INTERRUPT_HOOK        EQU     (1)
  210. VDH_TIMER_GLOBAL_CONTEXT        EQU     (-1)
  211.  
  212. ;***    VDHQuerySysValue ordinals
  213.  
  214. ; Global Values          Ordinal      Type   Units      Range
  215.  
  216. VDHGSV_DAY      EQU     0   ;ULONG  days       1 <= x <= 31
  217. VDHGSV_MONTH    EQU     1   ;ULONG  months     1 <= x <= 12
  218. VDHGSV_YEAR     EQU     2   ;ULONG  years   1980 <= x <= MAXULONG
  219. VDHGSV_DAYOFWEEK        EQU     3   ;ULONG  days       0 <= x <= 6
  220. VDHGSV_HOUR     EQU     4   ;ULONG  hours      0 <= x <  24
  221. VDHGSV_MINUTE   EQU     5   ;ULONG  minutes    0 <= x <  60
  222. VDHGSV_SECOND   EQU     6   ;ULONG  secs       0 <= x <  60
  223. VDHGSV_HUNDREDTH        EQU     7   ;ULONG  1/100s     0 <= x <  100
  224. VDHGSV_SECONDS1970      EQU     8   ;ULONG  secs       0 <= x <= MAXULONG
  225. VDHGSV_TIMEZONE         EQU     9   ;ULONG  minutes    0 <= x <= MAXULONG
  226. VDHGSV_MSECSBOOT        EQU     10   ;ULONG  ms         0 <= x <= MAXULONG
  227. VDHGSV_TIMERINTERVAL    EQU     11   ;ULONG  ms         0 <= x <= 1000
  228. VDHGSV_DYNVARIATION     EQU     12   ;BOOL              TRUE/FALSE
  229. VDHGSV_MAXWAIT  EQU     13   ;ULONG  secs       0 <= x <= MAXULONG
  230. VDHGSV_MINTIMESLICE     EQU     14   ;ULONG  ms         0 <= x <= MAXULONG
  231. VDHGSV_MAXTIMESLICE     EQU     15   ;ULONG  ms         0 <= x <= MAXULONG
  232. VDHGSV_YIELD    EQU     16   ;BOOL              TRUE/FALSE
  233. VDHGSV_TCYIELD  EQU     17   ;BOOL              TRUE/FALSE
  234. VDHGSV_VERMAJOR         EQU     18   ;ULONG             0 <= x <= MAXULONG
  235. VDHGSV_VERMINOR         EQU     19   ;ULONG             0 <= x <= MAXULONG
  236. VDHGSV_VERREVISION      EQU     20   ;CHAR              A <= x <= Z
  237. VDHGSV_MACHINETYPE      EQU     21   ;ULONG             MACHINE_TYPE_*
  238. VDHGSV_BLACKHOLEADDR    EQU     22   ;PVOID  bytes      0 <= x <= MAXULONG
  239. VDHGSV_BLACKHOLESIZE    EQU     23   ;ULONG  bytes      0 <= x <= MAXULONG
  240. VDHGSV_FGNDSESSIONID    EQU     24   ;ULONG             0 <= x <  MAXSESSIONS
  241. VDHGSV_MAXFPSESSIONS    EQU     25   ;ULONG            ;TO BE DELETED
  242. VDHGSV_MAXWPSESSIONS    EQU     26   ;ULONG            ;TO BE DELETED
  243. VDHGSV_MAXPMSESSIONS    EQU     27   ;ULONG            ;TO BE DELETED
  244. VDHGSV_RESERVESESSIONS  EQU     28   ;Reserved         ;TO BE DELETED
  245. VDHGSV_ARPLADDR         EQU     29   ;ULONG
  246. VDHGSV_MACHINEINFO      EQU     30   ;ULONG ptr to System Configuration Table
  247. VDHGSV_PPOSREGS         EQU     31   ;ULONG pointer to POS Regs structure
  248. VDHGSV_PICMASK  EQU     32   ;ULONG original PIC mask values   6.13
  249. VDHGSV_IRETADDR         EQU     33   ;ULONG address of IRET in ROM
  250. ; if you add a new entry, please update GSVMAX in src\dos\mvdm\vdmvdh.inc
  251.  
  252. ; Local Values           Ordinal      Type   Units      Range
  253.  
  254. VDHLSV_HVDM     EQU     4096   ;HVDM
  255. VDHLSV_PID      EQU     4097   ;PID
  256. VDHLSV_PCRF     EQU     4098   ;PCRF
  257. VDHLSV_SESSIONID        EQU     4099   ;ULONG             N <= x <  MAXSESSIONS
  258. VDHLSV_FOREGROUND       EQU     4100   ;BOOL              TRUE/FALSE
  259. VDHLSV_RMSIZE   EQU     4101   ;ULONG  kbytes     0 <  x <= 640
  260. VDHLSV_CODEPAGEID       EQU     4102   ;ULONG             See DosGetCP
  261. VDHLSV_PRIORITYCLASS    EQU     4103   ;ULONG             See VDHSetPriority
  262. VDHLSV_PRIORITYLEVEL    EQU     4104   ;ULONG             See VDHSetPriority
  263. VDHLSV_VPICBASE         EQU     4105   ;UCHAR[4]
  264.  
  265.  
  266. ;  Locations of base vectors in PIC base vector array returned from
  267. ;     VDHQuerySysValue
  268. ;
  269.  
  270. VPMMASTER_PORT_INDEX    EQU     0
  271. VPMSLAVE_PORT_INDEX     EQU     1
  272.  
  273.  
  274.  
  275. ;***    Return values for VDHGSV_MACHINETYPE
  276.  
  277. MACHINE_TYPE_AT         EQU     1
  278. MACHINE_TYPE_PS2        EQU     2
  279. MACHINE_TYPE_PARKCITY   EQU     3
  280.  
  281.  
  282. ;***    Timeout values for semaphore services
  283.  
  284. SEM_INDEFINITE_WAIT     EQU     -1
  285. SEM_IMMEDIATE_RETURN    EQU     0
  286.  
  287.  
  288. ;***    VDD-to_PDD commands (used internally during VDHOpenPDD)
  289.  
  290. PDDCMD_REGISTER         EQU     0   ;to register VDD entry point with PDD
  291. PDDCMD_DEREGISTER       EQU     1   ;To deregister a VDD at MVDM shutdown
  292.  
  293.  
  294. ;*** VDHDecodeProperty defines **
  295. VDH_DP_DECIMAL  EQU     10
  296. VDH_DP_HEX      EQU     16
  297.  
  298.  
  299. ;***************************************
  300. ;          VDMM Data Types
  301. ;***************************************
  302.  
  303.  
  304. ;***    MISC VDMM data types
  305. ;
  306. DefType HVDM,HANDLE
  307. DefType PHVDM,dd
  308. DefType HBLOCK,HANDLE                   ;Block pool handle
  309. DefType HLOCK,ULONG                     ;Memory lock handle
  310. DefType HVDD,ULONG                      ;VDD Handle
  311. DefType PPSZ,dd                 ;Pointer to PSZ
  312. DefType PHVDD,dd                        ;VDD Handle Pointer
  313. DefType VDHSEM,ULONG                    ;It should be VOID
  314. DefType HVDHSEM,dd                      ;but vddvdh.inc has
  315. DefType PHVDHSEM,dd                     ;problems with it
  316. DefType PFAULTHOOK,dd
  317. DefType PTIMERHOOK,dd
  318.  
  319.  
  320. ;***    HHOOK - hook handle
  321. ;
  322. ;       This is the handle return from the VDHAllocHook and used with
  323. ;       the VDHArm functions.
  324. ;
  325.  
  326. DefType HHOOK,PVOID                     ;hook handle
  327. DefType PHHOOK,dd                       ;pointer to hook handle
  328.  
  329.  
  330.  
  331. ;***    Pointer types for VDD-PDD communication and V86 address manipulation
  332. ;
  333.  
  334. DefType F16PVOID,dd                     ;f16p (pseudo 16:16 pointer)
  335.  
  336. FARV86  EQU     <NEAR>                  ;(pseudo-V86 modifier)
  337. DefType VPVOID,dd                       ;vp (pseudo-V86 pointer)
  338. DefType PVPVOID,dd                      ;pvp
  339.  
  340.  
  341.  
  342.  
  343. ;***    FNPDD - PDD function for "standard" VDD-to-PDD communication
  344. ;
  345. ;   ENTRY
  346. ;       ulFun - function code
  347. ;
  348. ;       ul1   - function-specific
  349. ;               if a pointer, it will generally be 16:16, and
  350. ;               will generally be an input buffer, the first
  351. ;               word of which is the length of the entire buffer
  352. ;
  353. ;       ul2   - function-specific
  354. ;               if a pointer, it will generally be 16:16, and
  355. ;               will generally be an output buffer, the first
  356. ;               word of which is the length of the entire buffer
  357. ;
  358. ;       if uFunc == PDDCMD_REGISTER (from VDM Manager during VDHOpenPDD)
  359. ;           ul1.off == VDD's CS
  360. ;           ul1.sel == zero
  361. ;           ul2.off == low 16-bits of EIP for VDD entry point
  362. ;           ul2.sel == high 16-bits of EIP for VDD entry point
  363. ;
  364. ;   EXIT
  365. ;       SUCCESS
  366. ;           !0
  367. ;       FAILURE
  368. ;            0 (the nature of the failure, such as an error code,
  369. ;               if needed, should be returned in the ul2 output buffer)
  370. ;
  371. ;   CALLING CONVENTIONS
  372. ;       32-bit PASCAL calling conventions.  More specifically:
  373. ;
  374. ;       Parameters are pushed on the stack from left to right, and are
  375. ;       removed by the callee.  The callee preserves EBX, ESI, EDI, EBP,
  376. ;       DS and ES.  Assuming the PDD function is completely 16-bit
  377. ;       (with the exception of any 16:32 calls back to the VDD, and the
  378. ;       16:32 RETFD to return to the VDD), the high words of all the
  379. ;       extended registers are preserved by virtue of being unused by the
  380. ;       PDD.  Therefore, only BX, SI, DI, BP, DS and ES need to be explicitly
  381. ;       preserved.
  382. ;
  383. ;       Furthermore, the PDD is responsible for loading its own DS.  To
  384. ;       do this, it must have a word in its code segment fixed-up to contain
  385. ;       its data segment selector.
  386. ;
  387. ;       The return code from the PDD must be in AX  0 implies failure,
  388. ;       whereas a non-zero (generally meaningful) value implies success.
  389. ;
  390.  
  391. DefType FPFNPDD,dq                      ;fpfnpdd
  392.  
  393.  
  394. ;***    FNVDD - VDD function for "standard" PDD-to-VDD communication
  395. ;
  396. ;   ENTRY
  397. ;       ulFun - function code
  398. ;
  399. ;       ul1   - function-specific
  400. ;               if a pointer, it will generally be 16:16, and
  401. ;               will generally be an input buffer, the first
  402. ;               word of which is the length of the entire buffer
  403. ;
  404. ;       ul2   - function-specific
  405. ;               if a pointer, it will generally be 16:16, and
  406. ;               will generally be an output buffer, the first
  407. ;               word of which is the length of the entire buffer
  408. ;
  409. ;   EXIT
  410. ;       SUCCESS
  411. ;           !0
  412. ;       FAILURE
  413. ;            0 (the nature of the failure, such as an error code,
  414. ;               if needed, should be returned in the ul2 output buffer)
  415. ;
  416. ;   CALLING CONVENTIONS
  417. ;       32-bit PASCAL calling conventions.  More specifically:
  418. ;
  419. ;       Parameters are pushed on the stack from left to right, and are
  420. ;       removed by the callee.  The callee must preserve EBX, ESI, EDI, EBP,
  421. ;       DS and ES.
  422. ;
  423. ;       Furthermore, the VDD is responsible for loading its own DS and ES.
  424. ;       In C, this would be a "_loadds" function (or any function in a module
  425. ;       compiled with the Au rather than Aw option).
  426. ;
  427. ;       The return code from the VDD must be in AX  0 implies failure,
  428. ;       whereas a non-zero (generally meaningful) value implies success.
  429. ;
  430.  
  431. DefType FPFNVDD,dq                      ;fpfnvdd
  432.  
  433.  
  434.  
  435. VDDREQ_PASS     EQU     -1
  436.  
  437. ;***    FNSYSREQ - DOS32RequestVDD VDD function-type
  438. ;
  439. ;   ENTRY
  440. ;       sgid  - screen group
  441. ;       ulFun - function code
  442. ;       nbIn  - Input buffer size, in bytes (0 if no input buffer)
  443. ;       pIn   - Input buffer
  444. ;       nbOut - Output buffer size, in bytes (0 if no output buffer)
  445. ;       pOut  - Output buffer
  446. ;   EXIT
  447. ;       SUCCESS
  448. ;           Zero
  449. ;       FAILURE
  450. ;           Error code, or -1 to pass control to next VDD
  451. ;
  452. ;   CALLING CONVENTIONS
  453. ;       32-bit small-model PASCAL calling conventions.  More specifically:
  454. ;
  455. ;       Parameters are pushed on the stack from left to right, and are
  456. ;       removed by the callee.  The callee will preserve EBX, ESI, EDI, EBP,
  457. ;       DS and ES.  DS is assumed to contain the callee's DGROUP selector
  458. ;       on entry.  EAX must be set to the return code on exit.
  459. ;
  460.  
  461. DefType PFNSYSREQ,dd
  462.  
  463.  
  464. ;***    FNDEVREQ - VDHRequestVDD VDD function-type
  465. ;
  466. ;   ENTRY
  467. ;       hvdm  - handle to vdm
  468. ;       ulFun - function code
  469. ;       ul1   - function-specific
  470. ;               if a pointer, it will generally be 0:32, and
  471. ;               will generally be an input buffer  if the size of the
  472. ;               buffer is not implied, the first dword of the buffer should
  473. ;               contain a total size
  474. ;       ul2   - function-specific
  475. ;               if a pointer, it will generally be 0:32, and
  476. ;               will generally be an output buffer  if the size of the
  477. ;               buffer is not implied, the first dword of the buffer should
  478. ;               contain a total size
  479. ;   EXIT
  480. ;       SUCCESS
  481. ;           Non-zero value (other than -1)
  482. ;       FAILURE
  483. ;           FALSE, or -1 to pass control to next VDD (in the first case,
  484. ;           the VDD should use VDHSetError to describe the error condition)
  485. ;
  486. ;   CALLING CONVENTIONS
  487. ;       32-bit small-model PASCAL calling conventions.  More specifically:
  488. ;
  489. ;       Parameters are pushed on the stack from left to right, and are
  490. ;       removed by the callee.  The callee will preserve EBX, ESI, EDI, EBP,
  491. ;       DS and ES.  DS is assumed to contain the callee's DGROUP selector
  492. ;       on entry.  EAX must be set to the return code on exit.
  493. ;
  494.  
  495. DefType PFNDEVREQ,dd
  496.  
  497.  
  498.  
  499. ;***    PFNVDHRP - VDD property function
  500. ;
  501. ;       This function performs property setting and validation.
  502. ;
  503. ;       The set operation may be requested at any time after a VDM is created.
  504. ;
  505. ;       The Validation operation may be requested at any time (even before
  506. ;       the a VDM is created.  Validation will be requested only for
  507. ;       VDMP_STRING and VDMP_MLSTR types, since all other types can be
  508. ;       validated using the information supplied by VDHRegisterProperty.
  509. ;
  510. ;       ENTRY op   = Operation to perform (enumeration)
  511. ;                    VDHPROP_VALIDATE
  512. ;                        Validate property for any process.  Only called
  513. ;                        for VDMP_STRING and VDMP_MLSTR properties.
  514. ;                    VDHPROP_SET
  515. ;                        Set an already validated property for specified
  516. ;                        HVDM.  The return code is ignored.
  517. ;             hvdm = Handle of VDM.  Undefined if op = VDHPROP_VALIDATE.
  518. ;             cb   = Count of bytes pointed to by pch.
  519. ;                    Value depends upon proptype:
  520. ;                      VDMPROP_BOOL
  521. ;                         Undefined.
  522. ;                      VDMPROP_INT
  523. ;                         Undefined.
  524. ;                      VDMPROP_ENUM
  525. ;                         Length of ASCIIZ string, including NULL terminator.
  526. ;                      VDMPROP_STRING
  527. ;                         Length of ASCIIZ string, including NULL terminator.
  528. ;                      VDMPROP_MLSTR
  529. ;                         Length of ASCIIZ string, including NULL terminator.
  530. ;
  531. ;             pch  = Value to set/validate.
  532. ;                    The format depends on the proptype:
  533. ;                      VDMPROP_BOOL
  534. ;                         pch is interpreted as a BOOL.
  535. ;                         Value 0 is FALSE !0 is TRUE.
  536. ;                      VDMPROP_INT
  537. ;                         pch is interpreted as a ULONG. It is guaranteed
  538. ;                         to meet the registered bounds.
  539. ;                      VDMPROP_ENUM
  540. ;                         pch points to an ASCIIZ string. It is guaranteed
  541. ;                         to be one of the registered enumeration strings.
  542. ;                      VDMPROP_STRING
  543. ;                         pch points to an ASCIIZ string.  It is guaranteed
  544. ;                         to be less than or equal to the registered maximum
  545. ;                         string length.
  546. ;                      VDMPROP_MLSTR
  547. ;                         pch points to an ASCIIZ string.  Multiple lines
  548. ;                         are separated by a line feed (00Ah).  It is
  549. ;                         guaranteed to be less than or equal to the
  550. ;                         registered maximum string length.
  551. ;
  552. ;
  553. ;       EXIT-SUCCESS
  554. ;           returns 0
  555. ;
  556. ;       EXIT-FAILURE
  557. ;           returns non-zero error code
  558. ;               ERROR_INVALID_DATA
  559. ;                   This should be returned if the value is not valid.
  560. ;
  561. ;       CONTEXT
  562. ;           Task
  563. ;
  564.  
  565. DefType PFNVDHRP,dd
  566.  
  567.  
  568.  
  569. ;***    PENUMHOOK - VDD hooks for VDHEnumerateVDMs
  570. ;
  571. ;   ENTRY
  572. ;       hvdm  - VDM handle
  573. ;       ulData - Handler data
  574. ;
  575. ;   EXIT
  576. ;       SUCCESS
  577. ;           TRUE
  578. ;       FAILURE
  579. ;            FALSE
  580. ;
  581. ;   CALLING CONVENTIONS
  582. ;       32-bit small-model PASCAL calling conventions.  More specifically:
  583. ;
  584. ;       Parameters are pushed on the stack from left to right, and are
  585. ;       removed by the callee.  The callee will preserve EBX, ESI, EDI, EBP,
  586. ;       DS and ES.  DS is assumed to contain the callee's DGROUP selector
  587. ;       on entry.  EAX must be set to the return code on exit.
  588. ;
  589.  
  590. DefType PENUMHOOK,dd                    ;penumh
  591.  
  592.  
  593.  
  594. ;***    USERHOOK - VDD user-event-hook function
  595. ;
  596. ;   ENTRY
  597. ;       hvdm  - VDM handle
  598. ;
  599. ;   EXIT
  600. ;       SUCCESS
  601. ;           !0
  602. ;       FAILURE
  603. ;            0 (failure is only support for the VDM_CREATE hook, and
  604. ;               implies that the VDD cannot support/sustain another VDM).
  605. ;
  606. ;   CALLING CONVENTIONS
  607. ;       32-bit small-model PASCAL calling conventions.  More specifically:
  608. ;
  609. ;       Parameters are pushed on the stack from left to right, and are
  610. ;       removed by the callee.  The callee will preserve EBX, ESI, EDI, EBP,
  611. ;       DS and ES.  DS is assumed to contain the callee's DGROUP selector
  612. ;       on entry.  EAX must be set to the return code on exit.
  613. ;
  614.  
  615. DefType PUSERHOOK,dd                    ;puserh
  616.  
  617.  
  618.  
  619. ;***    VDHPAGELIST - structure to describe dis-contiguous physical ranges
  620. ;                     for VDHLockMem
  621. ;
  622. ;       vdhpl_paddr - base physical address of one range
  623. ;       vdhpl_cb    - bytes contiguously mapped from vdhpl_paddr
  624. ;
  625. DefStruc ,VDHPageList_s                 ;vdhpl
  626.     ULONG     vdhpl_paddr
  627.     ULONG     vdhpl_cb
  628. EndStruc VDHPAGELIST
  629. DefType PVDHPAGELIST,dd                 ;pvdhpl
  630.  
  631.  
  632. ;***    VDHMAPTARGET - target area definition for VDHMapPages
  633. ;
  634. ;       vdhmt_laddr - Target address in V86-space (0 <= vdhmt_laddr < 1M+64K)
  635. ;                     to be mapped.
  636. ;       vdhmt_cpg   - Count of pages to map
  637. ;       vdhmt_hmap  - Mapping handle
  638. ;
  639. DefStruc ,VDHMapTarget_s                        ;vdhmt
  640.     ULONG     vdhmt_laddr  ;address in v86-space for mapping
  641.     ULONG     vdhmt_cpg    ;count of pages to map
  642.     ULONG     vdhmt_hmap   ;handle of mapping.  Must be zero on first call
  643.                             ;to VDHMapPages for region.
  644. EndStruc VDHMAPTARGET
  645. DefType PVDHMAPTARGET,dd                        ;pvdhmt
  646.  
  647.  
  648.  
  649. ;***    VDHMAPSOURCE - source area definition for VDHMapPages
  650. ;
  651. ;       vdhms_laddr - Source address to be mapped.
  652. ;       vdhms_hobj  - Object handle.
  653. ;
  654. DefStruc ,VDHMapSource_s                        ;vdhms
  655.     ULONG   vdhms_laddr    ;linear address of source memory object
  656.     ULONG   vdhms_hobj     ;memory object handle
  657. EndStruc VDHMAPSOURCE
  658. DefType PVDHMAPSOURCE,dd                        ;pvdhms
  659.  
  660.  
  661.  
  662. ;***    VDHQuerySem: SemState structure
  663.  
  664. DefStruc ,VDHSemState_s
  665.         UCHAR   vss_SemType         ;VDH_EVENTSEM/VDH_MUTEXSEM
  666.         UCHAR   vss_fOwned          ;0 -> Not Owned; 1 -> Owned
  667.         USHORT  vss_fWaiter         ;0 -> No one waiting; 1 -> Waiting
  668.         USHORT  vss_cRequest        ;request count in mutex case
  669.         TID     vss_tid             ;tid of the owner if owned
  670. EndStruc VDHSEMSTATE
  671.  
  672. DefType PVDHSEMSTATE,dd
  673.  
  674.  
  675. ; Defines for POS Registers
  676. POS_MAX_SIZE    EQU     8     ;Count of POS registers
  677. POS_MAX_SLOT    EQU     8     ;Maximum number of slots in machine
  678. POS_CEN_ARB_REG         EQU     090h     ;Central Arbitration register
  679. POS_SEL_FDBK_REG        EQU     091h     ;Card Selected Feedback
  680. POS_SYS_CTRLA_REG       EQU     092h     ;System Control Port A
  681. POS_SYS_SETUP_REG       EQU     094h     ;System setup/enable register
  682. POS_ADP_SETUP_REG       EQU     096h     ;Adapter setup/enable register
  683. POS_BASE_REG    EQU     0100h     ;Base POS register
  684. POS_TOP_REG     EQU     0107h     ;Highest POS Register
  685. POS_NULLPORT    EQU     0FFh     ;null value for ports not active
  686. POS_CARDFEEDBACK        EQU     0FEh     ;pretend to send back card selected
  687. POS_PLANAR_SELECT       EQU     080h     ;port 94 bit value to select planar
  688. POS_VIDEO_SELECT        EQU     020h     ;port 94 bit value to select video
  689. POS_OPTION_SELECT       EQU     008h     ;port 96 bit value to select card
  690.  
  691. ; Structure for POS Registers
  692.  
  693. DefStruc ,_POS_s
  694.   _BYTE    aPOSReg,,POS_MAX_SIZE
  695. EndStruc POS_s
  696. DefType PPOS,dd
  697.  
  698. DefStruc ,_POSREGS
  699.   POS_s   VideoPOS                     ;Video POS data
  700.   POS_s   PlanarPOS                    ;Planar POS data
  701.   POS_s   SlotPOS,,POS_MAX_SLOT        ;Adapter POS data
  702.   _BYTE    Port90                       ;Central Arbiter
  703.   _BYTE    Port92                       ;System Control Port A
  704.   _BYTE    Port94                       ;System setup/enable reg
  705.   _BYTE    Port96                       ;Adapter setup/enable reg
  706. EndStruc POSREGS
  707. DefType PPOSREGS,dd
  708.  
  709. DefStruc ,_SYS_CONFIG_TABLE
  710.   USHORT  Reserve                      ;Reserved
  711.   _BYTE    Model                        ;Model byte
  712.   _BYTE    Submodel                     ;Submodel byte
  713.   _BYTE    BIOS_revision                ;BIOS revision level
  714.   _BYTE    Reserve1                     ;Reserved
  715.   _BYTE    Reserve2                     ;Reserved
  716.   _BYTE    Reserve3                     ;Reserved
  717.   _BYTE    Reserve4                     ;Reserved
  718.   _BYTE    Reserve5                     ;Reserved
  719. EndStruc SYS_CONFIG_TABLE
  720. DefType PSYS_CONFIG_TABLE,dd
  721.  
  722. ; VDD initialization routine prototype
  723.  
  724. EXPENTRY VDDInit                <PSZ>
  725.  
  726.  
  727. ;***************************************
  728. ;            VDMM Macros
  729. ;***************************************
  730.  
  731.  
  732. ;  Accessing VDM data:
  733. ;
  734. ;   If the context is the desired VDM, then the following works for
  735. ;   ROM BIOS data area access, using the dynamically-fixed-up-to-zero
  736. ;   VDMBase data structure:
  737. ;
  738. ;       VDMBase.rb_field = 0
  739. ;
  740. ;   For instance data, if you put all of it inside a structure, the instance
  741. ;   of which is VDMData, and create a type, PVDMDATA, that points to such a
  742. ;   structure, you can reference instance data like so:
  743. ;
  744. ;       VDMData.fFgnd = TRUE
  745. ;
  746. ;   And if you have a PVOID (p) created with PFROMVP or PFROMVADDR, use:
  747. ;
  748. ;       *(PBYTE)p = 0
  749. ;
  750. ;
  751. ;   If the context is NOT the desired VDM, then you have to use the
  752. ;   VDM's handle (hvdm).  For ROM BIOS data area access, use the "pVDMBase"
  753. ;   macro:
  754. ;
  755. ;       pVDMBase(hvdm)->rb_field = 0
  756. ;
  757. ;   For instance data, reference similarly with the "pVDMData" macro:
  758. ;
  759. ;       pVDMData(hvdm)->fFgnd = TRUE
  760. ;
  761. ;   And if you have a PVOID (p) created with PFROMVP or PFROMVADDR, you can
  762. ;   use the "pVDM" macro to convert the pointer to one that is valid for the
  763. ;   given VDM and of the given type:
  764. ;
  765. ;       *pVDM(hvdm,PBYTE,p) = 0
  766. ;
  767. ;   An alternative to "pVDMData" (but not preferred, because it is less
  768. ;   maintainable and overrides type-checking) if you don't want to put all
  769. ;   your instance data in a structure, is:
  770. ;
  771. ;       REFHVDM(hvdm,BOOL,VDMData.fFgnd) = TRUE
  772. ;
  773. ;   Note that for any *resident* instance data, the same guidelines apply
  774. ;   simply substitute VDMRESDATA for VDMDATA.
  775. ;
  776.  
  777.  
  778. ifdef VDHSTRICT
  779.       ASSERTTASK        macro
  780.                   PCall VDHAssertTask
  781.                   endm
  782.       ASSERTVDMTASK     macro
  783.                   PCall VDHAssertVDMTask
  784.                   endm
  785.       ASSERTTASKONLY    macro
  786.                   PCall VDHAssertTaskOnly
  787.                   endm
  788.       ASSERTVDMTASKONLY macro
  789.                   PCall VDHAssertVDMTaskOnly
  790.                   endm
  791.       ASSERTINITONLY    macro
  792.                   PCall VDHAssertInitOnly
  793.                   endm
  794.       CHECKHVDM         macro hvdm
  795.                   PCall VDHCheckHVDM, hvdm
  796.                   endm
  797. else
  798.       ASSERTTASK        macro
  799.                         endm
  800.       ASSERTVDMTASK     macro
  801.                         endm
  802.       ASSERTTASKONLY    macro
  803.                         endm
  804.       ASSERTVDMTASKONLY macro
  805.                         endm
  806.       ASSERTINITONLY    macro
  807.                         endm
  808.       CHECKHVDM         macro hvdm
  809.                         endm
  810. endif
  811.  
  812.  
  813. ;***************************************
  814. ;      VDMM Function Prototype
  815. ;***************************************
  816.  
  817.  
  818. ;     Memory Management Function Prototypes
  819.  
  820. VDHENTRY VDHAllocMem            <ULONG cb, ULONG flOptions>
  821. VDHENTRY VDHFreeMem             <PVOID>
  822. VDHENTRY VDHAllocDosMem         <ULONG cb>
  823. VDHENTRY VDHCreateBlockPool             <ULONG cbBlock, ULONG flOptions>
  824. VDHENTRY VDHAllocBlock          <HBLOCK>
  825. VDHENTRY VDHFreeBlock           <HBLOCK,PVOID>
  826. VDHENTRY VDHDestroyBlockPool            <HBLOCK>
  827. VDHENTRY VDHCopyMem             <PVOID,PVOID,ULONG>
  828. VDHENTRY VDHExchangeMem         <PVOID,PVOID,ULONG>
  829. VDHENTRY VDHLockMem             <PVOID,ULONG,ULONG,PVOID,PVOID>
  830. VDHENTRY VDHUnlockMem           <HLOCK>
  831. VDHENTRY VDHQuerySel            <PVOID>
  832. VDHENTRY VDHQueryLin            <F16PVOID>
  833. VDHENTRY VDHCreateSel           <PVOID,ULONG>
  834. VDHENTRY VDHDestroySel          <SEL>
  835. VDHENTRY VDHGetCodePageFont             <ULONG,ULONG,PPVOID>
  836. VDHENTRY VDHReleaseCodePageFont         <PVOID>
  837.  
  838. ;     Page Management Function Prototypes
  839.  
  840. VDHENTRY VDHAllocPages          <PVOID,ULONG,ULONG>
  841. VDHENTRY VDHReallocPages                <PVOID,ULONG,ULONG>
  842. VDHENTRY VDHFreePages           <PVOID>
  843. VDHENTRY VDHFindFreePages               <PVOID,PULONG>
  844. VDHENTRY VDHGetDirtyPageInfo            <HVDM,PVOID,ULONG>
  845. VDHENTRY VDHQueryFreePages              <VOID>
  846. VDHENTRY VDHReservePages                <PVOID,ULONG>
  847. VDHENTRY VDHUnreservePages              <PVOID,ULONG>
  848. VDHENTRY VDHMapPages            <PVDHMAPSOURCE,PVDHMAPTARGET,ULONG>
  849. VDHENTRY VDHInstallFaultHook            <HVDM,PVOID,ULONG,PFAULTHOOK,BOOL>
  850. VDHENTRY VDHRemoveFaultHook             <HVDM,PVOID,ULONG,PFAULTHOOK>
  851. VDHENTRY VDHAllocDMABuffer              <ULONG,BOOL,PULONG>
  852. VDHENTRY VDHFreeDMABuffer               <PVOID>
  853.  
  854.  
  855. ;     Inter-DD Communication Function Prototypes
  856.  
  857. VDHENTRY VDHOpenPDD             <PSZ,FPFNVDD>
  858. VDHENTRY VDHRegisterVDD         <PSZ,PFNSYSREQ,PFNDEVREQ>
  859. VDHENTRY VDHOpenVDD             <PSZ>
  860. VDHENTRY VDHCloseVDD            <HVDD>
  861. VDHENTRY VDHRequestVDD          <HVDD,HVDM,ULONG,PVOID,PVOID>
  862. VDHENTRY VDHGetError            <VOID>
  863. VDHENTRY VDHSetError            <ULONG>
  864. VDHENTRY VDHInstallUserHook             <ULONG,PUSERHOOK>
  865. VDHENTRY VDHEnumerateVDMs               <PENUMHOOK,ULONG>
  866. VDHENTRY VDHHandleFromSGID              <SGID>
  867. VDHENTRY VDHHandleFromPID               <PID>                     ;TO BE DELETED
  868. VDHENTRY VDHQuerySysValue               <HVDM,ULONG>
  869. VDHENTRY VDHPutSysValue         <ULONG,ULONG>
  870. VDHENTRY VDHOpen                <PSZ,PHFILE,PULONG,ULONG,ULONG,ULONG,ULONG,PVOID>
  871. VDHENTRY VDHClose               <HFILE>
  872. VDHENTRY VDHRead                <HFILE,PVOID,ULONG>
  873. VDHENTRY VDHWrite               <HFILE,PVOID,ULONG>
  874. VDHENTRY VDHSeek                <HFILE,ULONG,ULONG>
  875. VDHENTRY VDHDevIOCtl            <HFILE,ULONG,ULONG,PVOID,ULONG,PULONG,PVOID,ULONG,PULONG>
  876. VDHENTRY VDHPhysicalDisk                <ULONG,PULONG,ULONG,PULONG,ULONG>
  877.  
  878. ;     Semaphore Function Prototypes
  879.  
  880. VDHENTRY VDHCreateSem           <PHVDHSEM, ULONG>
  881. VDHENTRY VDHDestroySem          <HVDHSEM>
  882. VDHENTRY VDHQuerySem            <HVDHSEM,PVDHSEMSTATE>
  883. VDHENTRY VDHResetEventSem               <HVDHSEM>
  884. VDHENTRY VDHPostEventSem                <HVDHSEM>
  885. VDHENTRY VDHWaitEventSem                <HVDHSEM,ULONG>
  886. VDHENTRY VDHRequestMutexSem             <HVDHSEM,ULONG>
  887. VDHENTRY VDHReleaseMutexSem             <HVDHSEM>
  888.  
  889. ;     Timer Function Prototypes
  890.  
  891. VDHENTRY VDHArmTimerHook                <HHOOK,ULONG,HVDM>
  892. VDHENTRY VDHDisarmTimerHook             <HHOOK>
  893.  
  894. ;     Sound Function Prototypes
  895.  
  896. VDHENTRY VDHDevBeep             <ULONG, ULONG>
  897.  
  898. ;     Property Function Prototypes
  899.  
  900. VDHENTRY VDHRegisterProperty            <PSZ,PSZ,ULONG,VPTYPE,VPORD,ULONG,PVOID,PVOID,PFNVDHRP>
  901. VDHENTRY VDHQueryProperty               <PSZ>
  902. VDHENTRY VDHDecodeProperty              <PPSZ,PULONG,PULONG,ULONG>
  903.  
  904. ;     Process Control Function Prototypes
  905.  
  906. VDHENTRY VDHPopup               <PSZZ,ULONG,ULONG,PULONG,ULONG,PSZ>
  907. VDHENTRY VDHKillVDM             <HVDM>
  908. VDHENTRY VDHHaltSystem          <VOID>
  909. VDHENTRY VDHSetPriority         <HVDM,ULONG,LONG>           ;TO BE "FIXED"
  910. VDHENTRY VDHFreezeVDM           <HVDM>
  911. VDHENTRY VDHThawVDM             <HVDM>
  912. VDHENTRY VDHIsVDMFrozen         <HVDM>
  913. VDHENTRY VDHYield               <BOOL>
  914.  
  915. ;     Perfview Prototypes
  916.  
  917. VDHENTRY VDHRegisterPerfCtrs            <PBYTE,PBYTE,ULONG>
  918.  
  919. ;     Miscellaneous Function Prototypes (for kernel debugging only)
  920.  
  921. VDHENTRY VDHAssertTask          <VOID>
  922. VDHENTRY VDHAssertVDMTask               <VOID>
  923. VDHENTRY VDHAssertTaskOnly              <VOID>
  924. VDHENTRY VDHAssertVDMTaskOnly           <VOID>
  925. VDHENTRY VDHAssertInitOnly              <VOID>
  926. VDHENTRY VDHCheckHVDM           <HVDM>
  927. CENTRY VDHPanic         <PCHAR, ...>
  928. VDHENTRY VDHSetTimer0           <ULONG>
  929.  
  930.  
  931. ;*** PANICXX - Issue a panic if condition XX is set
  932.  
  933. ;   ENTRY
  934. ;       msg    quoted error message
  935.  
  936. ;   EXAMPLES
  937. ;       PANIC  <"VPICSetVIRR: invalid handle %u">,<h>
  938.  
  939. ;     or
  940.  
  941. ;       IFDEF  VDDSTRICT
  942. ;       or     ebx,ebx
  943. ;       PANICZ <"em86ReflectInt: null pointer">
  944. ;       ENDIF
  945.  
  946.  
  947. ?PANIC  macro   cond,msg,args
  948.         local   l1,szMsg
  949.         ifndef  VDHPanic
  950.         DefCode IMPORT,GLOBAL,C
  951.         DefFn   VDHPanic
  952.         EndCode
  953.         endif
  954.         ifnb    <cond>
  955.         j&cond  short l1
  956.         endif
  957.         ?a substr <msg>,1,1
  958.         % ifidn <?a>,<">
  959.         DefData LOCAL,CONST,C
  960.         SZ      szMsg,<msg,0>
  961.         EndData
  962.         CallFn  VDHPanic,<FLAToffset szMsg>,args
  963.         else
  964.         CallFn  VDHPanic,<FLAToffset msg>,args
  965.         endif
  966.         ifnb    <cond>
  967. l1:
  968.         endif
  969.         endm
  970.  
  971. PANIC   equ     <?PANIC ,>
  972. PANICC  equ     <?PANIC nc,>
  973. PANICNC equ     <?PANIC c,>
  974. PANICZ  equ     <?PANIC nz,>
  975. PANICNZ equ     <?PANIC z,>
  976. PANICE  equ     <?PANIC ne,>
  977. PANICNE equ     <?PANIC e,>
  978. PANICB  equ     <?PANIC ae,>
  979. PANICBE equ     <?PANIC a,>
  980. PANICA  equ     <?PANIC be,>
  981. PANICAE equ     <?PANIC b,>
  982.  
  983. ifdef  VDDDEBUG
  984.  
  985. CENTRY printf           <PCHAR, ...>
  986.  
  987.  
  988. PRINTDEBUG macro msg,args
  989.         local   szMsg
  990.         ifndef  printf
  991.         DefCode IMPORT,GLOBAL,C
  992.         DefFn   printf
  993.         EndCode
  994.         endif
  995.         ?a substr <msg>,1,1
  996.         % ifidn <?a>,<">
  997.         DefData LOCAL,CONST,C
  998.         SZ      szMsg,<msg,0>
  999.         EndData
  1000.         CallFn  printf,< <FLAToffset szMsg>,<args> >
  1001.         else
  1002.         CallFn  printf,< <FLAToffset msg>,<args> >
  1003.         endif
  1004.         endm
  1005.  
  1006. else
  1007.  
  1008.  
  1009. PRINTDEBUG macro msg
  1010.       endm
  1011.  
  1012. endif
  1013.