Fedora Linux Support Community & Resources Center
  #1  
Old 9th April 2008, 02:57 PM
nspmangalore's Avatar
nspmangalore Offline
Registered User
 
Join Date: Nov 2006
Location: Mangalore, India
Posts: 241
not able to compile in nasm

i have a few .asm files which i want to compile. i get these errors when i try to compile using nasm
Code:
[nspmangalore@localhost XINU-PC-BOOK-CODE]$ nasm -f elf -o ctxsw.o ctxsw.asm 
ctxsw.asm:3: error: parser: instruction expected
ctxsw.asm:11: error: parser: instruction expected
ctxsw.asm:30: error: parser: instruction expected
ctxsw.asm:46: error: symbol `_ctxsw' redefined
ctxsw.asm:46: error: parser: instruction expected
[nspmangalore@localhost XINU-PC-BOOK-CODE]$
i have attached an archive containing the files.
it would be gr8 if someone found a way to compile it, and tell me how.

thanks in advance...
Attached Files
File Type: gz fedoraforumAttach.tar.gz (872 Bytes, 72 views)
__________________
Linux user #452049 :D
Reply With Quote
  #2  
Old 9th April 2008, 04:52 PM
stevea's Avatar
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,300
The directives are all wrong for nasm.

Forget the dos.asm file - it's pointless.
Start with these changes at line 3:
;; %include "dos.asm" ;
%define dseg SECTION .data
%define endds
%define pseg SECTION .text
%define endds


Then these diffs:
- _ctxsw proc near
- push bp
+ ;; _ctxsw: proc near
+ _ctxsw: push bp

and
- _ctxsw endp
+ ;;_ctxsw endp
Reply With Quote
  #3  
Old 9th April 2008, 06:24 PM
nspmangalore's Avatar
nspmangalore Offline
Registered User
 
Join Date: Nov 2006
Location: Mangalore, India
Posts: 241
actually, the files i have to compile range over 30 such asm files. so, editing them by hand is not feasible.
these .asm were written for a masm compiler. just wondered if i could compile it for linux.
__________________
Linux user #452049 :D
Reply With Quote
Reply

Tags
compile, nasm

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
x64 F9 Nasm thomamd Using Fedora 14 30th March 2009 04:09 AM
xoscope compile problem on F9 - compile with gcc3.3? tmort Using Fedora 0 28th August 2008 04:35 PM
nasm compile error nspmangalore Programming & Packaging 9 1st May 2008 06:26 AM
NASM Fedora 7 boflo971 Using Fedora 2 22nd June 2007 02:29 AM
NASM and Gnome/GTK+ Pegasus Programming & Packaging 1 4th January 2005 10:19 PM


Current GMT-time: 13:19 (Monday, 20-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat