Archived

This topic is now archived and is closed to further replies.

running a program in assembly.

This topic is 5044 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

well to start off i am rusty in assembly. google only had a froum post in a forum that needs a pay subscription to read . well i need to run 3 programs then exit in the NASM specification of asembly.

Share this post


Link to post
Share on other sites
What do you mean? Do you mean:
a.) that you have three programs written in assembly, and you want to execute them (optionally from a fourth program), in which case you need to assembly and link them; or
b.) that you have three external programs that you wish to spawn from assembly, in which case you''re clinically insane and should be committed right now.

Share this post


Link to post
Share on other sites
quote:
Original post by Oluseyi
What do you mean? Do you mean:
a.) that you have three programs written in assembly, and you want to execute them (optionally from a fourth program), in which case you need to assembly and link them; or
b.) that you have three external programs that you wish to spawn from assembly, in which case you''re clinically insane and should be committed right now.


its b. and it cant happen? umm ok .


Share this post


Link to post
Share on other sites
quote:
Original post by klajntib
couldn''t he import windows'' fucntion for running apps (forgot what the exact name was)? I''m just guessing here


i forgot to metion it has to be crossplatform.


Share this post


Link to post
Share on other sites
quote:
Original post by DerAnged
this is for my study in OSes. i need to execute two programs then my kernel in my assembly bootloader.
Bootloader? You should have said so! It''s a little different.

A bootable program differs markedly from a non-bootable one; with a bootable program you can basically set the stack and return pointers and "let nature take its course."

Share this post


Link to post
Share on other sites
Are you sure you mean "programs" and not just "subroutines" or "functions"?

To execute a stand-alone program FROM A BOOT LOADER, you have to talk to the hard disk, send it commands to read data from blocks where the programs live (and send commands to parse the file system to figure this out), then load and relocate that data, then jump to it.

Reading the hard disk at boot time is typically done by setting up interrupts and calling into the BIOS to load specific physical blocks of the disk.

Typically, the boot loader is only 256 bytes, which finds the bootable partition by calling the BIOS to read the partition table. It then loads the first few sectors of THAT, and jumps to it. That part knows how to parse the file system it lives on, enough to find the bootable kernel. It loads the kernel, and jumps to THAT. The kernel knows enough to relocate itself, and parse the file system to find native drivers for all devices, etc.

Booting is hard.

Share this post


Link to post
Share on other sites
quote:
Original post by hplus0603
Are you sure you mean "programs" and not just "subroutines" or "functions"?

To execute a stand-alone program FROM A BOOT LOADER, you have to talk to the hard disk, send it commands to read data from blocks where the programs live (and send commands to parse the file system to figure this out), then load and relocate that data, then jump to it.

Reading the hard disk at boot time is typically done by setting up interrupts and calling into the BIOS to load specific physical blocks of the disk.

Typically, the boot loader is only 256 bytes, which finds the bootable partition by calling the BIOS to read the partition table. It then loads the first few sectors of THAT, and jumps to it. That part knows how to parse the file system it lives on, enough to find the bootable kernel. It loads the kernel, and jumps to THAT. The kernel knows enough to relocate itself, and parse the file system to find native drivers for all devices, etc.

Booting is hard.



yes they are programms actual external programms and no im not using 256b im using 512b.

its been years since ive touched asm .

edit: so late that i mixed bytes and megabytes




[edited by - DerAngeD on February 20, 2004 12:57:55 AM]

Share this post


Link to post
Share on other sites