Results 1 to 7 of 7

Thread: Newbie NASM Problems

  1. #1

    Thread Starter
    Member
    Join Date
    May 2002
    Posts
    37

    Angry Newbie NASM Problems

    Hi. I'm a VB programmer and I'm teaching myself Assembler. I just have some problems with the NASM Compiler. I copied and pasted the hello world from the FAQ of this forum to Notepad and saved it as hello.asm.
    Now, if I go to my command prompt and enter
    nasm hello.asm -0 hello.bin
    nasm tells me that -0 is not a valid file. I found it like this in a tutorial on nasm so I don't understand why it isn't working. Please help me out!! Thanks from a newbie

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Should it be "-o" (lowercase)? Most command-line tools normally interpret -o as output, whereas "-O" would signify optimisations (which obviously mean nothing for assembler).
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Member
    Join Date
    May 2002
    Posts
    37
    Oh, I thought it was the zero token (stupid newbies ) . That should be the error. I will go and try this and thank you very much.

  4. #4

    Thread Starter
    Member
    Join Date
    May 2002
    Posts
    37
    Thanks, now it works. I was just trying to compile the hello world from this site, but it gave an error on line 6
    nasm hello.asm -o hello.exe
    does not work. It is copied straight from the FAQ, so ***??

  5. #5

    Thread Starter
    Member
    Join Date
    May 2002
    Posts
    37
    Solved it.. my fault

    Now I've got some more assembler questions (Yes, I've got enthusiastic for it )
    A) Now I was just playing a bit with the CTOS bootstrap from an earlier topic. I was trying to write "Loading.." on the screen, and than, on the next line, "A moment plz", using startmessage, as described in the source
    What's happening?? It flashes loading for 1/1000 of a second and then the 1st line changes in A moment plz. How can I solve this problem?

    B) I think this is really a newbie question..but how can I let that bootstrap start and then switch to a C code file. Do I need to write the assembly inline in my Dev-C++ or do I need to download another compiler, such as GNU C Compiler.

  6. #6
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    Uhh...No way.
    The C program u're creating is most likely to run on Dos platform,
    right? or perhaps on other platforms if u're using different compiler

    C creates EXE(as in MSDOS case), and these EXEs need some
    work done before execution, these work are done by the OS.

    And since u just create a boostrap, u need to create a Kernel
    using ASM, then later on with the Shells...

    And why wouldn't the C code work? Because u're running on
    ur own and have no DOS system loaded
    ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
    Programming is fun, but only if you're not on a tight deadline
    So I consider all those working engineers sad people

    VB FTP class
    3 page PHP crash course
    Crash Course on DX9 Managed with VB.NET covering basics till terrain creation

  7. #7

    Thread Starter
    Member
    Join Date
    May 2002
    Posts
    37
    I already found it out. In your assembler code, you need to load your c kernel in the memory and than execute it. My OS is lovely It does nothing, but that is a fact not interesting

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width