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

📄 execve.asm

📁 Microsoft MS-DOS6.0 完整源代码
💻 ASM
字号:
	title	execve	-- stub to disable C execs and spawns

;--------------------------------------------------------------------------
;
;	Microsoft C Compiler Runtime for MS-DOS
;
;	(C)Copyright Microsoft Corporation, 1985, 1985, 1986
;
;--------------------------------------------------------------------------
;
;	Purpose
;
;	This routine is used to disable all forms of C execs and spawns
;	for BASIC.  BASIC will trap the attempt and issue an advanced
;	feature error.	All forms of the C exec function filter through
;	_execve.  All forms of spawn, and system() filter into _spawnve.
;
;----------------------------------------------------------------------------

?DF=		1			; this is special for c startup
include version.inc
.xlist
include cmacros.inc
.list

createSeg	_TEXT,	code,	byte,	public, CODE,	<>

?PLM = 1
externP B$ERR_AFE			;BASIC advance feature error
sBegin	code
assumes cs,code

;	_spawnve, _execve
;
;	The BASIC runtime cannot coexist peacefully with the
;	C exec, spawn, and system functions.  All of these
;	functions filter their way into either _spawnve or
;	_execve.  We will trap the attempt and issue an
;	ADVANCED feature error to the BASIC program.

labelP	<PUBLIC,_spawnve>
cProc	_execve,<PUBLIC,FORCEFRAME>,<>
cBegin
	PUSH	SS		;[2] set DS = SS = DGROUP
	POP	DS		;[2]
	JMP	B$ERR_AFE	; let BASIC print the error message
cEnd	nogen

sEnd	code
	end

⌨️ 快捷键说明

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