Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 24th, 2005, 10:17 AM   #1
stevenup7002
Newbie
 
stevenup7002's Avatar
 
Join Date: Aug 2005
Posts: 17
Rep Power: 0 stevenup7002 is on a distinguished road
Exclamation How do I load a C program within assembler?

Hi, I'm using emu8086 as my assembler program and I need to know, how do you load a C program in assembler? cos im making a bootable C program and im making it in assembler, how do I do it in emu8086?
stevenup7002 is offline   Reply With Quote
Old Aug 24th, 2005, 10:19 AM   #2
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 4 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to Dizzutch
turn the .c file into a .S file with gcc -S filename.c and then load it into your asembler.
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline   Reply With Quote
Old Aug 24th, 2005, 10:26 AM   #3
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
you also can use inline assembly, to put lines of assembly code between your c code.
Polyphemus_ is offline   Reply With Quote
Old Aug 24th, 2005, 10:29 AM   #4
stevenup7002
Newbie
 
stevenup7002's Avatar
 
Join Date: Aug 2005
Posts: 17
Rep Power: 0 stevenup7002 is on a distinguished road
and how do I load an S file in assembler, sorry, i'm a newbie to assembler
stevenup7002 is offline   Reply With Quote
Old Aug 24th, 2005, 10:29 AM   #5
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 4 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to Dizzutch
i have no idea, read the help files that came with your assembler.
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline   Reply With Quote
Old Aug 24th, 2005, 10:35 AM   #6
stevenup7002
Newbie
 
stevenup7002's Avatar
 
Join Date: Aug 2005
Posts: 17
Rep Power: 0 stevenup7002 is on a distinguished road
wait, I need to know how to load an .exe file in assembler that was made in C
stevenup7002 is offline   Reply With Quote
Old Aug 24th, 2005, 10:45 AM   #7
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 4 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to Dizzutch
oh, you want to DEassemble. you'll need some third party software for that, search google.
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline   Reply With Quote
Old Aug 24th, 2005, 10:50 AM   #8
stevenup7002
Newbie
 
stevenup7002's Avatar
 
Join Date: Aug 2005
Posts: 17
Rep Power: 0 stevenup7002 is on a distinguished road
no, I want to leave the exe file made in C intact, but load it from assembler, is that what ya mean?
stevenup7002 is offline   Reply With Quote
Old Aug 24th, 2005, 10:53 AM   #9
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 4 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to Dizzutch
and what would you want to accomplish doing that?
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline   Reply With Quote
Old Aug 24th, 2005, 10:55 AM   #10
stevenup7002
Newbie
 
stevenup7002's Avatar
 
Join Date: Aug 2005
Posts: 17
Rep Power: 0 stevenup7002 is on a distinguished road
to load an exe, made in C from assembler
stevenup7002 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:27 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC