🔒 Locked
Calling Another Program using Asembly
Advertisement
Original Post
How to call Another Program using Asembly?
Ummmmm... I'm new in Assembly Language... I use TASM 2.0... And also not an English man...
1.) What is "invoke"?
2.) What is "shell function"?
1.) What is "invoke"?
2.) What is "shell function"?
you do not directly "call another program". instead, you call functions provided to you by the operating system / runtime library. no matter what language you use (including assembly) you will be calling these functions, not doing it yourself. so your question is really two questions:
1) what functions should you call?
2) how do you call the function from (1) in assembly?
(2) is easy. for (1), if you are working with win32 (MS Windows), check out the msdn documentation on
creating processes and interprocess communication.
1) what functions should you call?
2) how do you call the function from (1) in assembly?
(2) is easy. for (1), if you are working with win32 (MS Windows), check out the msdn documentation on
creating processes and interprocess communication.
Now, I know that, INT 21H/AH=4BH is the function for "LOADING AND/OR EXECUTING A PROGRAM". I tried to look at Ralph Brown's Interrupt List (http://www.ctyme.com/intr/rb-2939.htm) but it was so many things! It confused me! So, I tried to "verbatimly" put the code in my program, but it still don't work. Here's my code: (I'm using TASM for DOS-based Programs)
Also, is the
Right?
.MODEL TINY
.CODE
ORG 0100H
MAIN:
JMP START
ProgramName DB "TEST.COM$"
ParamBlock DB "$"
START:
mov ah,4bh ;Function 4bh
mov al,0 ;0 = load and execute
mov dx,offset ProgramName ;Pointer to the program name
mov bx,offset ParamBlock ;Pointer to the parameter block
mov DS,DX
mov es,BX
INT 21H
INT 20H
END MAIN
END
Also, is the
mov DS,DX
mov es,BX
Right?
Thanks everyone! Ok now I'll just have to DIGEST everything... =) Thanks guys! I'll just post if I got a problem...
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement