|
|
How do i get my kernel to load binary programs?
Author |
Message |
DudeOfX
Joined: Sat Jul 25, 2009 9:15 am Posts: 257
|
![Post Post](./styles/serenity/imageset/icon_topic_latest.gif) Re: How do i get my kernel to load binary programs?
well you have quite a dilema cause BASM and TC won't make a far without complaining, you need to change both CS and IP and to do that is to do a far CALL or JMP... BASM seems to only want to jump to labels created within TC so I don't see a way out...
external assembly was the only way I found... dunno what else to tell ya...
|
Sat Oct 10, 2009 6:17 pm |
|
![](./styles/serenity/theme/images/spacer.gif) |
DudeOfX
Joined: Sat Jul 25, 2009 9:15 am Posts: 257
|
![Post Post](./styles/serenity/imageset/icon_topic_latest.gif) Re: How do i get my kernel to load binary programs?
I have a trick up my sleeve that may eliminate the need for exec.asm
make a near call from TC and in stub.asm a.k.a call.asm you issue a far JMP to an address close by that would correct the values of CS and IP and when main returns you make CS and IP back the way it was...
but that is clearly a hack and TC, BASM, TASM and TLINK have all proven effective at ruining something somewhere... anywho I'll try that after the weekend...
|
Sat Oct 10, 2009 6:54 pm |
|
![](./styles/serenity/theme/images/spacer.gif) |
smeezekitty
|
![Post Post](./styles/serenity/imageset/icon_topic_latest.gif) Re: How do i get my kernel to load binary programs?
FIXED IT! i had to change the Code: extern pascal int exec(char *);
to Code: extern "C" pascal int exec(char *);
shit yeah!
|
Sat Oct 10, 2009 7:37 pm |
|
![](./styles/serenity/theme/images/spacer.gif) |
DudeOfX
Joined: Sat Jul 25, 2009 9:15 am Posts: 257
|
![Post Post](./styles/serenity/imageset/icon_topic_latest.gif) Re: How do i get my kernel to load binary programs?
huh what does the "C" mean??? "C" calling convention?? is it possible to have a hybrid pascal+C calling convention??
I don't quite remember well but I believe that it might be possible to specify the OBJ file inside the souce code... but I don't remember if that was turbo pascal or turbo C
|
Sat Oct 10, 2009 8:13 pm |
|
![](./styles/serenity/theme/images/spacer.gif) |
smeezekitty
|
![Post Post](./styles/serenity/imageset/icon_topic_latest.gif) Re: How do i get my kernel to load binary programs?
it works but freezes on return
|
Sat Oct 10, 2009 9:18 pm |
|
![](./styles/serenity/theme/images/spacer.gif) |
smeezekitty
|
![Post Post](./styles/serenity/imageset/icon_topic_latest.gif) Re: How do i get my kernel to load binary programs?
GOT IT! i have to end the child with retf not ret thank you thank you thank you thank you
|
Sat Oct 10, 2009 9:22 pm |
|
![](./styles/serenity/theme/images/spacer.gif) |
smeezekitty
|
![Post Post](./styles/serenity/imageset/icon_topic_latest.gif) Re: How do i get my kernel to load binary programs?
heres the catch now all the external kernel calls have to return far
|
Sat Oct 10, 2009 9:49 pm |
|
|
Who is online |
Users browsing this forum: No registered users and 72 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|