-
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 :D
-
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).
-
Oh, I thought it was the zero token (stupid newbies :D) . That should be the error. I will go and try this and thank you very much.
-
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 ***??
-
Solved it.. my fault :D
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.
-
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 :)
-
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 :D