home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pasos2c1.zip / include / pashead.inc < prev    next >
Text File  |  1993-12-16  |  5KB  |  161 lines

  1. ; MASM code to be used in every module assembled.
  2. ; define the default used segments
  3. ; and give them a name.
  4.         .386
  5.         includelib p
  6.     includelib doscalls
  7.  
  8. ; Do some assembler dependant stuff.        
  9. GLOB   MACRO text
  10.   IFNDEF TASM
  11.        EXTERNDEF text
  12.   ELSE
  13.        GLOBAL text
  14.   ENDIF
  15.        ENDM
  16. ;  Typical assembler stuff for MASM
  17. IFDEF MASM
  18.         .MODEL FLAT,OS_OS2
  19. CODE    SEGMENT PAGE PUBLIC FLAT 'CODE'
  20. CODE    ENDS
  21.  
  22. DATA    SEGMENT PAGE PUBLIC FLAT 'DATA'
  23. DATA    ENDS
  24.  
  25. CONST   SEGMENT PAGE PUBLIC FLAT 'CONST'
  26. CONST   ENDS
  27.  
  28. BSS     SEGMENT PAGE PUBLIC FLAT 'BSS'
  29. BSS     ENDS
  30.  
  31. STACK   SEGMENT PAGE STACK FLAT 'STACK'
  32. STACK   ENDS
  33.  
  34. DGROUP  GROUP DATA,CONST,BSS,STACK
  35.         ASSUME CS:FLAT,DS:FLAT,ES:FLAT,SS:FLAT
  36.  
  37. ENDIF
  38.  
  39. ;  Typical assembler stuff for TASM
  40. IFDEF TASM
  41.         MODEL FLAT
  42.         MASM
  43.     QUIRKS
  44.         VERSION M520
  45.  
  46. _STACK   SEGMENT PAGE STACK USE32 'STACK'
  47. _STACK   ENDS
  48.  
  49. DGROUP  GROUP _DATA,_BSS,_STACK
  50.         ASSUME CS:FLAT,DS:FLAT,ES:FLAT,SS:FLAT
  51.  
  52. ENDIF
  53.  
  54. ; includes the standard available things
  55.         include  macros.inc
  56.         .code
  57.         ;  These are defined in the startup module
  58.         ;  Variables allocated in the startup.
  59.         ;
  60.         ;  Routines defined/created in the startup
  61.         ;  The reason for this is that OS/2 routines do not kill the 
  62.         ;  parameters on the stack after they return. 
  63.         ;  The PASCAL std call mechanism does require this.
  64.         GLOB  _$DOS32OPEN:PROC
  65.     GLOB  _$DOS32CLOSE:PROC
  66.     GLOB  _$DOS32QUERYHTYPE:PROC
  67.         GLOB  _$DOS32WRITE:PROC
  68.         GLOB  _$DOS32READ:PROC
  69.         GLOB  _$DOS32EXIT:PROC
  70.         GLOB  _$DOS32ALLOCMEM:PROC
  71.         GLOB  _$DOS32FREEMEM:PROC
  72.         GLOB  _$DOS32SUBALLOC:PROC
  73.         GLOB  _$DOS32SUBFREE:PROC
  74.         GLOB  _$DOS32SUBSET:PROC
  75.         GLOB  _$DOS32SUBUNSET:PROC
  76.  
  77.         GLOB _$$$memcpy:PROC
  78.         GLOB _$$memcpy:PROC
  79.         GLOB _$$memcopy:PROC
  80.         GLOB _$$shl:PROC
  81.         GLOB _$$AndWord:PROC
  82.         GLOB _$$OrWord:PROC
  83.         GLOB _$$InvWord:PROC
  84.     GLOB _$$straddr:PROC
  85.         
  86.         ;  Defined in the paslib
  87.         GLOB _$$Stdodd:PROC
  88.         GLOB _$$Stdintabs:PROC
  89.         
  90.         GLOB  _$$StdInit:PROC
  91.         GLOB  _$$StdExit:PROC
  92.         ;  From the I/O Lib
  93.         ;  These names need to be rerouted since the backend uses the normal
  94.         ;  generated names, but The library uses these descriptors.
  95.         
  96.         ;
  97.         ;  Routines
  98.         GLOB  _$$StdWriteInt:PROC
  99.         GLOB  _$$StdWriteChar:PROC
  100.         GLOB  _$$StdWriteln:PROC
  101.         GLOB  _$errorlib:PROC
  102.         GLOB  _$errorlibcode:PROC
  103.         GLOB  _$$stdwriteln:PROC
  104.         GLOB  _$$stdwritechar:PROC
  105.         GLOB  _$$stdwritestring:PROC
  106.         GLOB  _$$stdwriteboolean:PROC
  107.         GLOB  _$$stdwritebin:PROC
  108.         GLOB  _$$stdreadln:PROC
  109.         GLOB  _$$stdreadchar:PROC
  110.         GLOB  _$$stdreadstring:PROC
  111.         GLOB  _$$stdreadint:PROC
  112.         GLOB  _$$stdreadbin:PROC
  113.         GLOB  _$$stdassign:PROC
  114.         GLOB  _$$stdreset:PROC
  115.         GLOB  _$$stdrewrite:PROC
  116.         GLOB  _$$stdeoln:PROC
  117.         GLOB  _$$stdeof:PROC
  118.         GLOB  _$$stdget:PROC
  119.         GLOB  _$$stdput:PROC
  120.         ;     
  121.         ;  Routines from writelib.pas for very "elementary testing"
  122.         ;  Some part of the testset only needs wrtoke,wrtwrong.
  123.         ;  And they could even be implemented in assembler.
  124.         GLOB  _$wrtwrong:PROC
  125.         GLOB  _$wrtoke:PROC
  126.  
  127.         ;  From heaplib.pas
  128.         GLOB  _$_heap_start:DWORD
  129.         GLOB  _$_heap_size:DWORD
  130.         GLOB  _$$Stdnew:PROC
  131.         GLOB  _$$Stddispose:PROC
  132.         
  133.         ;  From Setlib.pas
  134.         GLOB  _$$SetInit:PROC
  135.         GLOB  _$$SetExit:PROC
  136.         GLOB  _$$StdGetSetConst:PROC
  137.         GLOB  _$$StdReleaseSetConst:PROC
  138.         GLOB  _$$StdSetSet:PROC
  139.         GLOB  _$$StdSetCpy:PROC
  140.         GLOB  _$$StdSetRange:PROC
  141.         GLOB  _$$StdSetUnion:PROC
  142.         GLOB  _$$StdSetDiff:PROC
  143.         GLOB  _$$StdSetInter:PROC
  144.         GLOB  _$$StdSetIn:PROC
  145.         GLOB  _$$StdSetEqual:PROC
  146.         GLOB  _$$StdSetIncl:PROC
  147.         GLOB  _$$StdWriteSet:PROC
  148.  
  149.         .data
  150.         GLOB  _$displ:DWORD
  151.  
  152.         .data?
  153.         ;  File handles for the three files standard available in PASCAL
  154. _$output equ _$_out_descr 
  155. _$input  equ _$_in_descr
  156. _$errout equ _$_err_descr
  157.         GLOB  _$_out_descr:BYTE
  158.         GLOB  _$_in_descr:BYTE
  159.         GLOB  _$_err_descr:BYTE
  160.         
  161.