Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

help for int 21,4b function.

128 views
Skip to first unread message

Bulent Unalmis

unread,
Oct 9, 1996, 3:00:00 AM10/9/96
to


Hello,


I wrote small asm program for pc. I want to call anather program.
(same the shell command of basic)

I didnt use int 21,4b exec/load function.

Can you send me any simple program. or tricks of this dos function.
(I dont now details of psp, ...)

At my applicaton, main program approx. only 2 kbyt and com. type.
I want to call 100 kbyt exe program.

thank you.

tms...@worldnet.fr

brr

unread,
Oct 12, 1996, 3:00:00 AM10/12/96
to Bulent Unalmis

program below uses AX=4b00 int 21h to exec.
brr

----cut here----
.model tiny
.code

ExecBlk Struc
Psp dw ?
Cmdline dw ?
CmdSeg dw ?
FCB1 dw ?
FCB1seg dw ?
FCB2 dw ?
FCB2seg dw ?
ExecBlk ends

org 100h

main proc
lea bx,pspblk
mov sp,bx
call resize

mov execb.psp,0 ; copy our environment
mov execb.cmdline,80h ; pass command line as is
mov execb.FCB1,5ch
mov execb.FCB2,6ch
mov execb.cmdseg,cs
mov execb.FCB1seg,cs
mov execb.FCB2seg,cs
lea dx,execf
push ds
pop es
lea bx,execb
mov ax,4b00h
int 21h
merr:
mov ax,4c00h
int 21h
main endp
resize proc
add bx,15
mov cl,4
shr bx,cl
mov ax,cs
add bx,ax
mov ah,4ah
int 21h
jc merr
ret
resize endp


execf db "PAT.COM",0 ; ASCIIZ pathname of file to be
execd
execb ExecBlk <>
_stack dw 1000h dup(?)

pspblk label byte

end main
----cut here----

brr

unread,
Oct 12, 1996, 3:00:00 AM10/12/96
to Bulent Unalmis

org 100h

Ray Moon

unread,
Oct 14, 1996, 3:00:00 AM10/14/96
to Bulent Unalmis, Ray Moon

Bulent Unalmis wrote:

> I wrote small asm program for pc. I want to call anather program.
> (same the shell command of basic)
>
> I didnt use int 21,4b exec/load function.
>
> Can you send me any simple program. or tricks of this dos function.
> (I dont now details of psp, ...)
>
> At my applicaton, main program approx. only 2 kbyt and com. type.
> I want to call 100 kbyt exe program.

Bulent,

I wrote a demonstration program for the FAQ of this newsgroup to
demonstrate how to redirect stderr to a file. This program does
a little funny stuff and, then, loads and executes the program
passed on the command line. The program code is well documented
it comes with good documentation explaining what is happening and
what is needed.

You can get this program by downloading it from my shareware page.
See my .sig below.

Hope that this helps.

Ray
=====================================================================
Ray Moon
ray...@moonware.dgsys.com
http://www2.dgsys.com/~raymoon/moonware.html
Home of MoonWare Shareware and the x86 Assembly Language FAQ
Come steal my pages... Well, not steal but come and see!

0 new messages