Hello,
Amateur programmer starting to work with assembly language, here, and I'm having a bit of a problem.
Whenever I try to create an object file in nasm, I get the error that it was unable to open the input file. However, just a few minutes ago I was up and running without a hitch. I have no idea what happened.
After searching around, I came across this thread: http://forum.osdev.org/viewtopic.php?f= ... open+input
This leads me to believe that notepad is formatting the file in some strange way or something, I just have no idea how to fix it.
I'd really appreciate any help I can get, as this is quite frustrating
Thanks!
Nasm: unable to open input file (all of a sudden)
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Nasm: unable to open input file (all of a sudden)
Hello Inflater,
Do you know where the power button is? I have the idea it might help you (hint)
Do you know where the power button is? I have the idea it might help you (hint)
Re: Nasm: unable to open input file (all of a sudden)
Thanks for the quick response, but I'm afraid restarting didn't help.
Here's a bit more info if it helps:
When I run nasm16.exe, I get the response that it doesn't have an input file. Okay, that's good.
Then, I try: nasm16 -f obj hello.asm -o hello.obj
And get: nasm: unable to open file 'hello.nasm'.
I'm currently looking for an editor other than notepad, so hopefully that'll help.
EDIT: Same problem with another editor. Arghh.
Here's a bit more info if it helps:
When I run nasm16.exe, I get the response that it doesn't have an input file. Okay, that's good.
Then, I try: nasm16 -f obj hello.asm -o hello.obj
And get: nasm: unable to open file 'hello.nasm'.
I'm currently looking for an editor other than notepad, so hopefully that'll help.
EDIT: Same problem with another editor. Arghh.
Re: Nasm: unable to open input file (all of a sudden)
Holy **** I got it working.
I'm not exactly sure what was wrong. After changing the directories around, I was getting a new error saying label or instruction expected at the start of the line.'
Turns out there was a space before the [BITS 16] instruction, and after deleting that, viola.
Thanks for responding, and hopefully this will help somebody in the future (though I kinda doubt it :p)
I'm not exactly sure what was wrong. After changing the directories around, I was getting a new error saying label or instruction expected at the start of the line.'
Turns out there was a space before the [BITS 16] instruction, and after deleting that, viola.
Thanks for responding, and hopefully this will help somebody in the future (though I kinda doubt it :p)
Re: Nasm: unable to open input file (all of a sudden)
You could post this as a bug on the nasm site, as this may be an error handling bug.
First try the latest nasm build to see if it does the same.
First try the latest nasm build to see if it does the same.
Re: Nasm: unable to open input file (all of a sudden)
did u checked the file extension.
sometimes notepad saves a file named as example.asm.txt instead of example.asm.
sometimes notepad saves a file named as example.asm.txt instead of example.asm.
- Firestryke31
- Member
- Posts: 550
- Joined: Sat Nov 29, 2008 1:07 pm
- Location: Throw a dart at central Texas
- Contact:
Re: Nasm: unable to open input file (all of a sudden)
Seeing that you're using Windows, you might consider Programmer's Notepad 2. It has syntax highlighting for x86 ASM (among many others), and can run NASM (or my preferred assembler, YASM) if you set it up to. Also, it lets you choose the extension rather than just adding .txt.
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?