How to use ASM6

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

Post Reply
moorhsum
Posts: 4
Joined: Fri Jun 03, 2022 11:22 pm

How to use ASM6

Post by moorhsum »

Hi, I can't seem to find any sort of info on how to use ASM6 for assembling an NES rom. Currently when I try to do it through the command prompt (like this: filedirectory/asm6.exe sourcefile.asm output.nes) it says "cant read file". I dont know almost anything about how to use assemblers or the structure of making an nes rom, nor can I seem to find any good info on it either. Im tired and kind of want to bash my head through my monitor so I would really appreciate some help before I commit some sort of crime against humanity.
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: How to use ASM6

Post by Dwedit »

Maybe a bit more details about how you actually phrased the command, and what directory you ran it from?
Paths are relative to the directory you are inside of whenever you run any program. Since "sourcefile.asm" is a relative path, it must exist in whatever the current directory is at the time you ran the program.

Just asking because you specified "filedirectory/asm6.exe", which suggests being in a different directory.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
moorhsum
Posts: 4
Joined: Fri Jun 03, 2022 11:22 pm

Re: How to use ASM6

Post by moorhsum »

im not good with command prompt like at all so i dont really know how to change directories for it or things like that. Both asm6.exe and the source file are in the same area, I just opened up command prompt and put that there. I tried finding half decent info on what exactly people mean by directories in the case of command prompt but i cant seem to find anything.
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: How to use ASM6

Post by Dwedit »

First, make sure that Windows has file extensions turned on. You really don't want file extensions hidden. You might even have an ".asm.txt" file sitting around somewhere if you never turned off "Hide File Extensions".

Try making a batch file (.bat)

asm6.exe "file.asm" "file.nes"
pause

Save it as "build.bat". If you include quotation marks when you save it, it won't be named as a .txt file.

Put it in the same directory as your source code and asm6, then run that.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
moorhsum
Posts: 4
Joined: Fri Jun 03, 2022 11:22 pm

Re: How to use ASM6

Post by moorhsum »

i have file extensions turned on, i think it might be an issue with the asm file. Do you know any sort of demo file i could use and then assemble so I can know its not an issue with the asm file itself
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: How to use ASM6

Post by Dwedit »

I just wrote a Hello World program...
Attachments
hello.zip
(3.3 KiB) Downloaded 68 times
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: How to use ASM6

Post by Pokun »

moorhsum wrote: Sat Jun 04, 2022 1:42 pm I tried finding half decent info on what exactly people mean by directories in the case of command prompt but i cant seem to find anything.
A directory is the same in the command prompt as in a desktop environment. Windows calls directories "folders" though.
unregistered
Posts: 1318
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: How to use ASM6

Post by unregistered »

https://www.computerhope.com/ is an excellent site to research Windows’ command prompt.



For myself, I’ve usually run a duckduckgo search “command prompt something computerhope”.

Be sure to replace that “something” with whatever command/word(s) you are researching.


On the other hand, you can use the search box at the linked page… just type in the “command prompt something” part there. Or, even shorter, try “cmd something”; Windows command prompt is cmd.exe. :)
moorhsum
Posts: 4
Joined: Fri Jun 03, 2022 11:22 pm

Re: How to use ASM6

Post by moorhsum »

Dwedit wrote: Sat Jun 04, 2022 7:22 pm I just wrote a Hello World program...
thank you, this was really helpful. The issue was definitely the asm file. Also helpful for understanding whats needed for the compiler to actually work, now that i know i have asm6 working il start learning how to actually make asm files and stuff.
Post Reply