home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.update.uu.se
/
ftp.update.uu.se.2014.03.zip
/
ftp.update.uu.se
/
pub
/
rainbow
/
msdos
/
misc
/
make.lzh
/
EXEC.ASM
< prev
next >
Wrap
Assembly Source File
|
1986-01-19
|
896b
|
47 lines
;EXECute a process - DOS call 4B
;Call:
; exec (seg, fspec, param)
;where
; seg = segment containing next two args
; fspec = offset of filespec of program to run
; param = offset of parameter block for DOS call 4B
public exec, childcode
code segment public
assume cs:code
exec: push bp
mov bp,sp
push ds
push es
mov cs:savess,ss ;save regs trashed by 4B call
mov cs:savesp,sp
mov ax,4[bp] ;segment containing args
mov ds,ax
mov es,ax
mov dx,6[bp] ;filespec
mov bx,8[bp] ;parameter block
mov ax,4B00H
int 21H
jc fail
mov ax,0 ;success indicator
fail: mov ss,cs:savess
mov sp,cs:savesp
pop es
pop ds
pop bp
ret
savess: dw (?)
savesp: dw (?)
childcode:
mov ah,4DH
int 21H
ret
code ends
end