·汇编源码--BRK
·汇编源码--CLOCK
·汇编源码--BURNOUT
·汇编源码--DOSSYM
·汇编源码--circle
·汇编源码--DEV
·汇编源码--getspace
·汇编源码--CLEAR
·汇编源码--col
·汇编源码--gameport
;BASLOAD.ASM 07/09/84 - DKeels
;----------------------------------------------------------------------------
;This program provides BASIC programs with accessto the program loader (LOAD)
;by passing parameters via the system parameter area (SYSPARM).
;
;Inputs:
; FILE SPEC 1- A string (len <= 80) with the complete name, including
; path, of the file to be loaded and executed.
; Example: 'MAINMENU.EXE' or 'C:\FORMAT.COM'
; PARAMETER 1 - A string (len <= 80) with the command line parameters
; to be passed to the program specified in FILE SPEC 1.
; Example: '' or 'A:'
; FILE SPEC 2 - Same as 1.
; PARAMETER 2 - Same as 1.
;
;Outputs:
; This program gives control to LOAD.
;----------------------------------------------------------------------------
CODESEGMENT 'CODE'
ASSUMECS:CODE
PUBLICBASLOAD;make known to BASIC at link time
BASLOADPROCFAR
;prologue
PUSHBP;save BP
MOVBP,SP;set base for parm list
PUSHDS;DS -> basic work area
PUSHES;ES -> basic work area
MOVDX,'dk';interrupt verification switch
INT77H;get seg address of sysparm area in AX
MOVES,AX;ES -> sysparm area
CLD;set direction for all moves
;move file spec 1 to sysparm
MOVBX,SS:[BP+12];get addr of string descriptor
MOVCX,DS:[BX];get length of string into CX
MOVSI,DS:[BX+2];get addr of string into SI
MOVDI,0;offset into sysparm
REPMOVSB;move string
MOVBYTE PTR ES:[DI],0;make it asciiz string
;move parameter 1 to sysparm
MOVBX,SS:[BP+10];get addr of string descriptor
MOVCX,DS:[BX];get length of string into CX
MOVSI,DS:[BX+2];get addr of string into SI
MOVDI,81;offset into sysparm
INCCL;adjust for cr to be added at end
MOVBYTE PTR ES:[DI],CL;1st byte is length of string
DECCL;re-adjust for move operation
INCDI
REPMOVSB;move string
MOVBYTE PTR ES:[DI],13;add cr to end
;move file spec 2 to sysparm
MOVBX,SS:[BP+8];get addr of string descriptor
MOVCX,DS:[BX];get length of string into CX
MOVSI,DS:[BX+2];get addr of string into SI
MOVDI,163;offset into sysparm
REPMOVSB;move string
MOVBYTE PTR ES:[DI],0;make it asciiz string
;move parameter 2 to sysparm
MOVBX,SS:[BP+6];get addr of string descriptor
MOVCX,DS:[BX];get length of string into CX
MOVSI,DS:[BX+2];get addr of string into SI
MOVDI,244;offset into sysparm
INCCL;adjust for cr to be added at end
MOVBYTE PTR ES:[DI],CL;1st byte is length of string
DECCL;re-adjust for move operation
INCDI
REPMOVSB;move string
MOVBYTE PTR ES:[DI],13;add cr to end
;exit to BASIC
POPES
POPDS
POPBP
RET8
BASLOADENDP
CODEENDS
ENDBASLOAD
进入讨论组讨论。