Author Topic: RadASM - NASM  (Read 6645 times)

theflarenet

  • Guest
RadASM - NASM
« on: October 26, 2012, 10:44:30 AM »
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
Quote
3=$.exe,O,$B\gcc -o,$,$.o,driver.c,asm_io.o
so I can get something close to
Quote
gcc -o filename filename.o driver.c asm_io.o

When I run RedASM and begin linking my code, it outputs
Quote
C:\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

  • Member
  • *****
  • Posts: 3515
  • Forgive your enemies, but never forget their names
Re: RadASM - NASM
« Reply #1 on: October 27, 2012, 07:29:33 PM »
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
Get your facts first, and then you can distort them.

DarkWolf

  • Guest
Re: RadASM - NASM
« Reply #2 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.

Sergyov

  • Guest
Re: RadASM - NASM
« Reply #3 on: June 21, 2013, 09:32:28 PM »
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 .