home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
pascal
/
compiler
/
pascal2
/
include
/
pashead.inc
< prev
next >
Wrap
Text File
|
1993-11-08
|
4KB
|
160 lines
; ASM code to be used in every module assembled.
; define the default used segments
; and give them a name.
.386
includelib p
includelib doscalls
; Do some assembler dependant stuff.
GLOB MACRO text
IFNDEF TASM
EXTERNDEF text
ELSE
GLOBAL text
ENDIF
ENDM
; Typical assembler stuff for MASM
IFDEF MASM
.MODEL FLAT,OS_OS2
QUIRKS
CODE SEGMENT PAGE PUBLIC FLAT 'CODE'
CODE ENDS
DATA SEGMENT PAGE PUBLIC FLAT 'DATA'
DATA ENDS
CONST SEGMENT PAGE PUBLIC FLAT 'CONST'
CONST ENDS
BSS SEGMENT PAGE PUBLIC FLAT 'BSS'
BSS ENDS
STACK SEGMENT PAGE STACK FLAT 'STACK'
STACK ENDS
DGROUP GROUP DATA,CONST,BSS,STACK
ASSUME CS:FLAT,DS:FLAT,ES:FLAT,SS:FLAT
ENDIF
; Typical assembler stuff for TASM
IFDEF TASM
MODEL FLAT
MASM
VERSION M520
_STACK SEGMENT PAGE STACK USE32 'STACK'
_STACK ENDS
DGROUP GROUP _DATA,_BSS,_STACK
ASSUME CS:FLAT,DS:FLAT,ES:FLAT,SS:FLAT
ENDIF
; includes the standard available things
include macros.inc
.code
; These are defined in the startup module
; Variables allocated in the startup.
;
; Routines defined/created in the startup
; The reason for this is that OS/2 routines do not kill the
; parameters on the stack after they return.
; The PASCAL std call mechanism does require this.
GLOB $DOS32OPEN:PROC
GLOB $DOS32CLOSE:PROC
GLOB $DOS32QUERYHTYPE:PROC
GLOB $DOS32WRITE:PROC
GLOB $DOS32READ:PROC
GLOB $DOS32EXIT:PROC
GLOB $DOS32ALLOCMEM:PROC
GLOB $DOS32FREEMEM:PROC
GLOB $DOS32SUBALLOC:PROC
GLOB $DOS32SUBFREE:PROC
GLOB $DOS32SUBSET:PROC
GLOB $DOS32SUBUNSET:PROC
GLOB $$$memcpy:PROC
GLOB $$memcpy:PROC
GLOB $memcopy:PROC
GLOB $$shl:PROC
GLOB $$AndWord:PROC
GLOB $$OrWord:PROC
GLOB $$InvWord:PROC
; Defined in the paslib
GLOB $$Stdodd:PROC
GLOB $$Stdintabs:PROC
GLOB $$StdInit:PROC
GLOB $$StdExit:PROC
; From the I/O Lib
; These names need to be rerouted since the backend uses the normal
; generated names, but The library uses these descriptors.
;
; Routines
GLOB $$StdWriteInt:PROC
GLOB $$StdWriteChar:PROC
GLOB $$StdWriteln:PROC
GLOB $errorlib:PROC
GLOB $errorlibcode:PROC
GLOB $$stdwriteln:PROC
GLOB $$stdwritechar:PROC
GLOB $$stdwritestring:PROC
GLOB $$stdwriteboolean:PROC
GLOB $$stdwritebin:PROC
GLOB $$stdreadln:PROC
GLOB $$stdreadchar:PROC
GLOB $$stdreadstring:PROC
GLOB $$stdreadint:PROC
GLOB $$stdreadbin:PROC
GLOB $$stdassign:PROC
GLOB $$STDRESET:PROC
GLOB $$stdrewrite:PROC
GLOB $$stdeoln:PROC
GLOB $$stdeof:PROC
GLOB $$stdget:PROC
GLOB $$stdput:PROC
;
; Routines from writelib.pas for very "elementary testing"
; Some part of the testset only needs wrtoke,wrtwrong.
; And they could even be implemented in assembler.
GLOB $wrtwrong:PROC
GLOB $wrtoke:PROC
; From heaplib.pas
GLOB $_heap_start:DWORD
GLOB $_heap_size:DWORD
GLOB $$Stdnew:PROC
GLOB $$Stddispose:PROC
; From Setlib.pas
GLOB $$SetInit:PROC
GLOB $$SetExit:PROC
GLOB $$StdGetSetConst:PROC
GLOB $$StdReleaseSetConst:PROC
GLOB $$StdSetSet:PROC
GLOB $$StdSetCpy:PROC
GLOB $$StdSetRange:PROC
GLOB $$StdSetUnion:PROC
GLOB $$StdSetDiff:PROC
GLOB $$StdSetInter:PROC
GLOB $$StdSetIn:PROC
GLOB $$StdSetEqual:PROC
GLOB $$StdSetIncl:PROC
GLOB $$StdWriteSet:PROC
.data
GLOB $$displ:DWORD
.data?
; File handles for the three files standard available in PASCAL
$output equ $_out_descr
$input equ $_in_descr
$errout equ $_err_descr
GLOB $_out_descr:BYTE
GLOB $_in_descr:BYTE
GLOB $_err_descr:BYTE