Author Topic: can't assemble 32 bit nasm code to rdf format using versions above 2.12.02  (Read 5180 times)

Offline johntk123

  • Jr. Member
  • *
  • Posts: 5
   In response to your answer from my last post.  You are right I really don't need the rdf format.  I am developing on windows and I could not use the elf format but I finally managed to get a gcc cross compiler which includes the elf cross linker, ld.exe, without having to compile it from source which looked like a pain, so I am working with the elf format now but I still like to play around with other output formats.  Is elf the only format used for writing operating systems??  I thought that rdf was a great idea since it was designed for os. development where elf is a more general format used for writing linux programs.  Is one format better than the other??  If I want to use the rdf format I can just use nasm version 2.12.02 but I like using the latest versions of things and I thought that the people who are writing the nasm assembler would have an idea of what has changed between versions.  I could always write my own custom output format as described in the url links below:

http://f.osdev.org/viewtopic.php?f=1&t=23559&start=0
http://forum.osdev.org/viewtopic.php?f=15&t=26614

   I understood most of the code and I thought it was pretty cool because you are diving a little bit deeper on how it really works.  Would you know anything about this??  I may need help with something like this in the future.

   I see that nasm is being updated almost every day so I can just keep trying the latest development version to see if the problem gets fixed and if not I was thinking that I could try to assemble a little test program starting from scratch and adding code statements until I find the one that makes it fail.  At least that way we would have a better idea of what exactly is the code statements that are making it fail.  Hopefully I will have the time to try this along with everything else that I am working on.  If I find something I will let you know.  Also is there any way that I could email you directly??  Assuming you would have time to talk to me.  I promise I won't bother you to much.

John.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Hi John,

Yeah, you can email me fbkotler(pig's tail)myfairpoint(decimal point)net but it probably won't do you any good. I got as far as being able to write a bootloader and having it load a second stage and/or "kernal". Then I asked myself, "How is my OS going to be better than 'doze, 'nix, etc?". I realized I didn't know, and that was the end of my OS development. You're better off with the OSdev folks - there's a newsgroup too. Their advice is "read, read, read, and read some more" before you write a line of code. I see some folks saying, "I'm going to write an OS as soon as I figure out how to display a number." Be serious!

As far as the "-f rdf" problem goes, you're going to want a "minimal example" that displays the problem. Either start from scratch and add code until it breaks, as you suggest, or start with what you've got and subtract code until it "unbreaks". The latter might be easier(?). Post that up to bugzilla and you might get some action.

As I recall, rdoff was originally a kind of debugging aid to the original authors of Nasm, then someone figured out that you could make an executable out of it. I don't think it's ever been used much. I haven't even downloaded the latest version yet - that's how far away from "development" I've gotten...

Best,
Frank


Offline johntk123

  • Jr. Member
  • *
  • Posts: 5
I tried a minimal example and I got the same problem.  Here is the .bat and .asm files.  And yes I will be joining the osdev forum.  No one said this was going to be easy but I want to learn something and it will be rewarding in the end.
John.

@echo off
rem nasm .\MYOS\rdftest\rdftest.asm -o .\MYOS\rdftest\rdftest.rdf -f rdf

nasm C:\WebSites\MyWebSite\MYOS\rdftest\rdftest.asm -o C:\WebSites\MyWebSite\MYOS\rdftest\rdftest.rdf -f rdf
echo rdftest.rdf created.
pause


; Filename ".\MYOS\rdftest\rdftest.asm"

use32
segment .data      ; data section.

segment .text      ; code section.

segment .bss      ; bss section.



Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Well... that's a minimal enough "minimal example"! :)

Not much has changed since nasm-2.12.2 "rdf2_set_info" has been replaced by "nasm_do_legacy_output" - a NULL pragma list at the end. I haven't tracked down what that does. I really hope that the current development team can handle it (I'm sure they can when they get time). I really don't want to get back into development! I really don't!

Best,
Frank