home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / compiler / pascal2 / include / pashead.inc < prev    next >
Text File  |  1993-11-08  |  4KB  |  160 lines

  1. ; ASM 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.     QUIRKS
  20. CODE    SEGMENT PAGE PUBLIC FLAT 'CODE'
  21. CODE    ENDS
  22.  
  23. DATA    SEGMENT PAGE PUBLIC FLAT 'DATA'
  24. DATA    ENDS
  25.  
  26. CONST   SEGMENT PAGE PUBLIC FLAT 'CONST'
  27. CONST   ENDS
  28.  
  29. BSS     SEGMENT PAGE PUBLIC FLAT 'BSS'
  30. BSS     ENDS
  31.  
  32. STACK   SEGMENT PAGE STACK FLAT 'STACK'
  33. STACK   ENDS
  34.  
  35. DGROUP  GROUP DATA,CONST,BSS,STACK
  36.         ASSUME CS:FLAT,DS:FLAT,ES:FLAT,SS:FLAT
  37.  
  38. ENDIF
  39.  
  40. ;  Typical assembler stuff for TASM
  41. IFDEF TASM
  42.         MODEL FLAT
  43.         MASM
  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.         
  85.         ;  Defined in the paslib
  86.         GLOB  $$Stdodd:PROC
  87.         GLOB  $$Stdintabs:PROC
  88.         
  89.         GLOB  $$StdInit:PROC
  90.         GLOB  $$StdExit:PROC
  91.         ;  From the I/O Lib
  92.         ;  These names need to be rerouted since the backend uses the normal
  93.         ;  generated names, but The library uses these descriptors.
  94.         
  95.         ;
  96.         ;  Routines
  97.         GLOB  $$StdWriteInt:PROC
  98.         GLOB  $$StdWriteChar:PROC
  99.         GLOB  $$StdWriteln:PROC
  100.         GLOB  $errorlib:PROC
  101.         GLOB  $errorlibcode:PROC
  102.         GLOB  $$stdwriteln:PROC
  103.         GLOB  $$stdwritechar:PROC
  104.         GLOB  $$stdwritestring:PROC
  105.         GLOB  $$stdwriteboolean:PROC
  106.         GLOB  $$stdwritebin:PROC
  107.         GLOB  $$stdreadln:PROC
  108.         GLOB  $$stdreadchar:PROC
  109.         GLOB  $$stdreadstring:PROC
  110.         GLOB  $$stdreadint:PROC
  111.         GLOB  $$stdreadbin:PROC
  112.         GLOB  $$stdassign:PROC
  113.         GLOB  $$STDRESET:PROC
  114.         GLOB  $$stdrewrite:PROC
  115.         GLOB  $$stdeoln:PROC
  116.         GLOB  $$stdeof:PROC
  117.         GLOB  $$stdget:PROC
  118.         GLOB  $$stdput:PROC
  119.         ;
  120.         ;  Routines from writelib.pas for very "elementary testing"
  121.         ;  Some part of the testset only needs wrtoke,wrtwrong.
  122.         ;  And they could even be implemented in assembler.
  123.         GLOB  $wrtwrong:PROC
  124.         GLOB  $wrtoke:PROC
  125.  
  126.         ;  From heaplib.pas
  127.         GLOB  $_heap_start:DWORD
  128.         GLOB  $_heap_size:DWORD
  129.         GLOB  $$Stdnew:PROC
  130.         GLOB  $$Stddispose:PROC
  131.         
  132.         ;  From Setlib.pas
  133.         GLOB  $$SetInit:PROC
  134.         GLOB  $$SetExit:PROC
  135.         GLOB  $$StdGetSetConst:PROC
  136.         GLOB  $$StdReleaseSetConst:PROC
  137.         GLOB  $$StdSetSet:PROC
  138.         GLOB  $$StdSetCpy:PROC
  139.         GLOB  $$StdSetRange:PROC
  140.         GLOB  $$StdSetUnion:PROC
  141.         GLOB  $$StdSetDiff:PROC
  142.         GLOB  $$StdSetInter:PROC
  143.         GLOB  $$StdSetIn:PROC
  144.         GLOB  $$StdSetEqual:PROC
  145.         GLOB  $$StdSetIncl:PROC
  146.         GLOB  $$StdWriteSet:PROC
  147.  
  148.         .data
  149.         GLOB $$displ:DWORD
  150.  
  151.         .data?
  152.         ;  File handles for the three files standard available in PASCAL
  153. $output equ $_out_descr
  154. $input  equ $_in_descr
  155. $errout equ $_err_descr
  156.         GLOB  $_out_descr:BYTE
  157.         GLOB  $_in_descr:BYTE
  158.         GLOB  $_err_descr:BYTE
  159.         
  160.