⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ssint.inc

📁 Dos6.0
💻 INC
📖 第 1 页 / 共 2 页
字号:
extrn	SsFrameType:near	;Report nesting error
extrn	DescanTerm:near 	;Descan loop termination address
extrn	DescanX:near		;Rude descan loop termination address
endif				;ife SSSCAN_ASM

;======================================================================
;Entrypoints defined in ssid.asm
;
ife	SSID_ASM
extrn	SsGetISFC:near		;Id opcode to executor scope resolution
extrn	GetCxISFC:near
endif				;ife SSID_ASM

;======================================================================
;Entrypoints defined in ssaid.asm
;
ife	SSAID_ASM
extrn	SsIndexType:near	;Index into executor map based on oType
extrn	SsIndexTypeCx:near	;Index into executor map based on oTyp in cx
extrn	SsIndexISFC:near	;Index into executor map based on ISFC
extrn	SsEmitExecutor:near	;Get executor from map and emit with operand

extrn	MakeArrayRef:near	; Convert AIdLd to AdRf.
endif				;ife SSAID_ASM

;======================================================================
;Entrypoints defined in sstxutil.asm
;
ife	SSTXUTIL_ASM
extrn	SsMakeGap:near		;Create initial gap between source and emit pcode
extrn	SsEnsureGap:near	;Ensure a gap between source and emit pcode
endif				;ife SSTXUTIL_ASM

;======================================================================
;Labels in exconv.asm
ife	EXCONV_ASM
extrn	tImpCo:word	;Table of implicit coercion executors
endif				;EXCONV_ASM

;========================================================================
;Tables and entrypoints defined in SsRules.asm
;
ife	SSRULES_ASM
extrn	EnsureArgType:near	;Ensure top stack argument is of correct type
extrn	SsCoerceReg:near	;Coercion handler (args in registers)
extrn	SsCoerceN:Near		;Coercion handler for n stack entries
extrn	TMError:near		;Type Mismatch Error
extrn	TMErrorNZ:near		;Type Mismatch Error if ZF not set
extrn	tRuleByte:byte		;Rule byte - usually an emitted type
extrn	tRuleWord:word		;Rule word - usually a coercion table address
extrn	mpOpRule:byte		;Opcode to rule table
extrn	Insert:near		;Insert into text
extrn	InsertCx:near		;Insert into text
extrn	InsertBranchBos:near	;Insert branch after opBos
extrn	InsertBranch:near	;Insert into text
extrn	Insert1Op:near		;Insert into text
endif			;ife SSRULES_ASM

;======================================================================
;SSBOS resident routines
;
ife	SSBOS_ASM
extrn	EmitExCopyOps:near	;Emit executor and copy operands
extrn	CopyOperands:near	;Copy operands for opcode bx from si to di
extrn	LabelBindCur:near	;Bind a label reference to current scope
extrn	SsBosStack:word		;SP-2 at start of statement
endif				;SSBOS_ASM

;========================================================================
;Scanner specific tables built by OPTABLER
;
extrn	mpOpExe:word		;Opcode to executor (or executor map) table
extrn	mpOpAtr:byte		;Opcode to atribute table
extrn	mpOpScanDisp:word	;Opcode to scanner dispatch table


;======================================================================
;Scanner internal entrypoint declarations for ssdescan.asm
;
ife	SSDESCAN_ASM
extrn	SsLabelRefDebind:near
extrn	SsD_NOps:near
endif				;SSDESCAN_ASM
sEnd	SCAN			

;======================================================================
;Scanner internal entrypoint declarations for ssif.asm
;
ife	SSIF_ASM
extrn	MapOpToExeNumeric:near
endif				;SSIF_ASM

;======================================================================
;Scanner internal entrypoint declarations for ssoperat.asm
;
ife	SSOPERAT_ASM
extrn	MSdFs:near
endif				;SSOPERAT_ASM

;======================================================================
;Scanner internal entrypoint declarations for ssmisc.asm
;
ife	SSMISC_ASM
extrn	GetRuleInfo:near
extrn	FindFrame:near
extrn	CbFrameSTYPCx:near
extrn	SsAllocOFrame:near
extrn	BindExit:near
extrn	BindExitCur:near
extrn	CbTypOTypSCAN:near	
extrn	CbTypOTypOMrsSCAN:near	
endif				;SSMISC_ASM

;=============================================================================
;Scanner internal entrypoint declarations for ssproc.asm
;
ife	ssproc_asm
extrn	ByValMarker:abs		;Rule table entries for BYVAL
extrn	SegMarker:abs		;   and SEG

extrn	SsCallFunc:near		;Entry point to SSPROC from SSID and SSAID
				;   for function calls
extrn	SsReLinkDecl:near	;Adjust PRS_otxDef and copy operands
extrn	SsReLinkNoCopy:near	;Adjust PRS_otxDef
extrn	SsFindOpNoList1:near	;Find NoList pcodes
extrn	CopyOps:near		;Copy operands and dispatch
endif				;SSPROC_ASM

;=============================================================================
;Scanner internal entrypoint declarations for ssrec.asm
;
ife	ssrec_asm
extrn	MakeRef:near
endif				;SSREC_ASM

;=============================================================================
;Scanner internal entrypoint declarations for ssrefarg.asm
;
ife	ssrefarg_asm
extrn	AllocTemp:near
extrn	SsRefArg:near		;Handle all reference argument problems
endif				;SSREFARG_ASM


;=============================================================================
;Scanner internal entrypoint declarations for ssdeclare.asm
;
ife	ssdeclare_asm
extrn	SetArrayType:near
endif				;SSDECLARE_ASM

;=============================================================================
;Scanner Macros and equates
;

;Scan Routine entry point definition

SsProcRude	EQU -4		;Rude mode scan and descan dispatch
SsProcParse	EQU -2		;Parse mode descan dispatch

	;Scan to SS_EXECUTE mode dispatch declaration macro

SsProc	MACRO	ScanNam,Rude,Local
ifnb	<&Rude>
extrn	SsV_&ScanNam:near
	DW	scanOFFSET SsV_&ScanNam
endif
public	Ss_&ScanNam
ifb	<&Local>
extrn	SsD_&ScanNam:near
endif
	DW	scanOFFSET SsD_&ScanNam
Ss_&ScanNam&:
	ENDM

	;Rude mode dispatch point declaration macro


SsVProc MACRO	ScanNam
	public	SsV_&ScanNam
SsV_&ScanNam&:
	ENDM


	;Descan to SS_PARSE mode dispatch point declaration macro


SsDProc MACRO	ScanNam
	public	SsD_&ScanNam
SsD_&ScanNam&:
	ENDM


	;Pcode location macros

PTRTX	equ	<word ptr es:>

LODSWTX equ	<lods word ptr es:[si]>
STOSWTX equ	<stos word ptr es:[si]>
MOVSWTX equ	<movs word ptr es:[si],word ptr es:[di]>

TEXTSEG equ	<db 26h>


sBegin	CODE	;DWEXT needs codeOFFSET defined, and this does it
sEnd	CODE


DWEXT	MACRO	pex,fDefine
	ifb	<fDefine>		;; fDefine specified?
	    extrn   pex:far		;; No, generate offset
	    dw	    codeOFFSET pex
	elseif	    fDefine		;; Yes, use specified fDefine
	    extrn   pex:far
	    dw	    codeOFFSET pex
	endif
	ENDM


DWFILL	MACRO	fDefine
	ifb	<fDefine>		;; fDefine specified?
	    dw	    ?			;; No, Assume true
	elseif	fDefine 		;; Yes, use specified fDefine
	    dw	    ?
	endif
	ENDM



DWIF	MACRO	wData,fDefine		;
	if	fDefine 		;
	    dw	    wData		;
	endif				;
	ENDM				;


DBIF	MACRO	bData,fDefine		;
	if	fDefine 		;
	    db	    bData		;
	endif				;
	ENDM				;


;***
;PUSH_ES, POP_ES, REFRESH_ES macros
;
;Purpose:
;	There are a number of places in the scanner where we can simply
;	push the text segment prior to a far call and pop it on return in
;	non-windows versions (i.e., the called routine promises to cause
;	no heap movement).  In windows versions, however, the far call could
;	cause a thunk and thus heap movement.  PUSH_ES/POP_ES allow us
;	to generate the minimal required code for either case.
;
;	REFRESH_ES is similar, but for the case where the called routine
;	itself preserves ES.
;
;	Added as part of revision [3].
;****


PUSH_ES     equ     <push es>
POP_ES	    equ     <pop es>
REFRESH_ES  equ     <>



;===========================================================================
;Scanner Debug Macros and equates
;


SsDbStackIni	equ	<>
SsDbStackEmpty	equ	<>

SsDbStackPush	MACRO	type
		ENDM

SsDbStackPop	MACRO	type
		ENDM

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -