News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

RadASM - NASM

Started by theflarenet, October 26, 2012, 10:44:30 AM

Previous topic - Next topic

theflarenet

Hi everyone!

I'm beginning to learn assembly language under NASM and it's quite a pain to build/link every time I want to test. I found RedASM to quickly edit my code and successfully build it however I cannot get it to link the file correctly.

Within the nasm.ini file in the RedASM folder, I've edited a line to
Quote3=$.exe,O,$B\gcc -o,$,$.o,driver.c,asm_io.o
so I can get something close to
Quotegcc -o filename filename.o driver.c asm_io.o

When I run RedASM and begin linking my code, it outputs
QuoteC:\DJGPP\Bin\gcc -o "C:\DJGPP\pcasm\firstprogram.asm" "C:\DJGPP\pcasm\firstprogram.o" "driver.c" "asm_io.o"

I have bolded the problem above. I would like the "$" to only output the filename without any extension. It adds ".asm" automatically and I can't figure out how to remove that. Any ideas to fix this or use alternative programs? I'm pretty new to this.

Gunther

Hi theflarenet,

I'm not familiar with RadASM, but it has probably to do with driver.c. That won't work, because it should be driver.o.

By the way, welcome to the forum.

Gunther
You have to know the facts before you can distort them.

DarkWolf

looks like to me he is trying to build a mixed code program.
He is compiling a C source file with assembler object code (well any object code .o doesn't indicate the original language).

As far as I know gcc can do that so the problem isn't there.

For some reason radasm ini converts the $ macro to $.asm instead which is wierd.

3=$.exe,O,$B\gcc -o,$,$.o,driver.c,asm_io.o

if  $  is a placeholde for filename then the gcc line should be as he expected

gcc -o filename filename.o driver.c asm_io.o

unless radasm doesn't like files without extensions (I haven't used radasm for years)

What I don't understand is the use of gcc, radasm, djgpp and hla ??
is this the correct board where he meant to post this and is it a windows or linux project ?

I am confused by the mixed tool chain.

Sergyov

Quote from: DarkWolf on February 28, 2013, 05:28:53 AM
looks like to me he is trying to build a mixed code program.
He is compiling a C source file with assembler object code (well any object code .o doesn't indicate the original language).

As far as I know gcc can do that so the problem isn't there.

For some reason radasm ini converts the $ macro to $.asm instead which is wierd.

3=$.exe,O,$B\gcc -o,$,$.o,driver.c,asm_io.o

if  $  is a placeholde for filename then the gcc line should be as he expected

gcc -o filename filename.o driver.c asm_io.o

unless radasm doesn't like files without extensions (I haven't used radasm for years)

What I don't understand is the use of gcc, radasm, djgpp and hla ??
is this the correct board where he meant to post this and is it a windows or linux project ?

I am confused by the mixed tool chain.

DarkWolf  I think it's not bad to have mixed code  that do everything you want .