Programming Forums
User Name Password Register
 

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

Reply
 
Thread Tools Display Modes
Old Dec 14th, 2005, 11:57 AM   #1
Rojon
Newbie
 
Join Date: Dec 2005
Posts: 2
Rep Power: 0 Rojon is on a distinguished road
File format not recognized

Greetings all,

I've started to work through the pdf book available online by Paul Carter..

http://www.drpaulcarter.com/pcasm/index.php

After doing the first example i seem to be running into problems. Here is my error:
bash-2.05b$ nasm -f coff first.asm
bash-2.05b$ gcc -o first first.o driver.c asm_io.o
first.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status
bash-2.05b$
At the top of the example code it says:
; file: first.asm
; First assembly program. This program asks for two integers as
; input and prints out their sum.
;
; To create the executable using djgpp:
; nasm -f coff first.asm
; gcc -o first first.o driver.c asm_io.o

%include "asm_io.inc"
So i downloaded the 'djgpp' file and placed my first.asm file in the same folder. The first command line using nasm seems to work but the second one is giving me problems, even though all the files are in the same folder.

Java is my first language so this is a little new to me. If anyone has any ideas where i am going wrong then i would really appreciate it.

Cheers
Rojon is offline   Reply With Quote
Old Dec 14th, 2005, 5:34 PM   #2
Rojon
Newbie
 
Join Date: Dec 2005
Posts: 2
Rep Power: 0 Rojon is on a distinguished road
Think this is solved now, i should be using 'elf' instead of 'coff' apparently.
Rojon 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 11:29 AM.

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