executing programs....

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Collin

executing programs....

Post by Collin »

How would one execute a program in x86 asm code?

Thanks.

Collin
Chase

RE:executing programs....

Post by Chase »

>On 2001-05-02 15:03:22, Collin wrote:
>How would one execute a program in x86 asm code?

Most likely there are some OS specific issues that you
need to take care of. What OS are you trying to run under?
Collin

RE:executing programs....

Post by Collin »

>On 2001-05-03 10:21:53, Chase wrote:
>>On 2001-05-02 15:03:22, Collin wrote:
>>How would one execute a program in x86 asm code?
>
>Most likely there are some OS specific issues that you
>need to take care of. What OS are you trying to run under?

I was actually asking in general, sort of the principle
behind it, as I wanted to have external programs with my OS.
Do you know how this might be done? I think that maybe I would
jmp to it, but I'm not sure.

Thanks,
Collin

P.S. I want to "hardwire" the execution code into the shell, if
you are wondering how this is on-topic.
Chase

RE:executing programs....

Post by Chase »

>On 2001-05-03 15:13:43, Collin wrote:
>>Most likely there are some OS specific issues that you
>>need to take care of. What OS are you trying to run under?
>
>I was actually asking in general, sort of the principle
>behind it, as I wanted to have external programs with my OS.
>Do you know how this might be done? I think that maybe I would
>jmp to it, but I'm not sure.

If you output to flat binary then you could jmp to it(after loading) if your
enviroment was already setup to the way you coded your asm (ex: 32 flat pmode).
Of course you'd either need to have your stack/segments set or set them
in the beginning of your asm code.

Otherwise you could output a known file format type and have your OS
support that or create your own format and linker/converter.
Post Reply