home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / portio.zip / test2.def < prev    next >
Text File  |  1993-05-03  |  2KB  |  39 lines

  1. ; -------------------------------------------------------------------------
  2. ; This definition module will allow linking of a CSET/2 program
  3. ; with the portio.obj assembly language segment, giving the assembly
  4. ; language segment IOPL priveleges.  
  5. ;
  6. ; To data, I have not figured out how to specify the SEGMENT of an
  7. ; assembly language program with alternate attributes through the
  8. ; .DEF module.  However, using "CODE IOPL", the IOPL priveleges can
  9. ; be granted to all segments, and then the privelege taken away from
  10. ; all other segments.  This removal is critical since the 32 bit code
  11. ; segment CANNOT have IOPL priveleges (SYS3175 error on run).
  12. ;
  13. ; Explanation of some statements
  14. ;
  15. ; CODE IOPL                           Default IOPL in segments of class CODE
  16. ; PROTMODE                            This is a protect mode program only
  17. ; SEGMENTS                            Starts list of segment modifiers
  18. ; P@IOCODE  CLASS 'CODE' IOPL ALIAS   Attempt to set IOPL only on P@IOCODE -
  19. ;                                     This fails, hence the CODE IOPL above
  20. ; CODE32    CLASS 'CODE' NOIOPL       Remove IOPL from CSET 32 bit segment
  21. ; CODE16    CLASS 'CODE' NOIOPL       Remove IOPL from CSET 16 bit segment
  22. ; _MSGSEG32 CLASS 'CODE' NOIOPL       Remove IOPL from another CSEG segment
  23. ;
  24. ; This seems to be a full enumeration of the 'CODE' class segments I've run
  25. ; across in CSET/2 programming.
  26. ; ---------------------------------------------------------------------------
  27. NAME test2 WINDOWCOMPAT
  28.  
  29. DESCRIPTION 'Test program statically linked with inp/outp module'
  30.  
  31. PROTMODE
  32. CODE IOPL
  33.  
  34. SEGMENTS
  35. P@IOCODE  CLASS 'CODE' IOPL ALIAS
  36. CODE32    CLASS 'CODE' NOIOPL
  37. CODE16    CLASS 'CODE' NOIOPL
  38. _MSGSEG32 CLASS 'CODE' NOIOPL
  39.