wla-65816 assembler confusion

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
wla-65816 assembler confusion
by on (#223723)
I've attempted assembling an .obj from my .asm file on two separate operating systems, I'm not getting any output from my assembler. I'm following a pretty basic tutorial which I feel like I am understanding pretty well, however when trying to assemble I'm not seeing any results.

I realize this could be categorized as "Other Retro Dev" stuff, but I figured some of you guys are using wla-6502, and it would operate very similarly. I feel like I'm just noob-ing out and missing something. Here is a photo for a better explanation.
Re: wla-65816 assembler confusion
by on (#223724)
Usually when a utility outputs usage information, it's because it couldn't parse the command line you gave it.

In particular you seem to have combined -v and -o into -vo? Maybe just separate those? Some programs accept that kind of flag combining, but this is not a universal behaviour.
Re: wla-65816 assembler confusion
by on (#223729)
I figured out my issue, turns out I was misunderstanding the wording. A ".asm" file is just a text file saved as a ".asm". Not a file ending in .asm. The header and initialization files are included in the first few lines of code in the main .asm's code. (Just keep them in the same directory during assembly)

For example in conjunction with the photograph, I should have been using this:
Double edit:
wla-65816 -vo first.asm first.obj (Wrong)
wla-65816 -v -o first.obj first.asm(Use this example, read replies for explanation)
Sorry, I knew it was something noob.
Re: wla-65816 assembler confusion
by on (#223766)
rainwarrior wrote:
In particular you seem to have combined -v and -o into -vo? Maybe just separate those? Some programs accept that kind of flag combining, but this is not a universal behaviour.

The option grouping is "standard" behavior. In fact, it is a recommended guideline in POSIX (per section 12.2, Utility Syntax Guidelines, guideline 5). As such, it's normal to expect it to work.

It seems in this particular example that the error reporting could be improved. Also, from the understanding of the command-line options, it should rather be invoked like this:
Code:
wla-65816 -vo snes.obj snes.asm

Note the inversion of arguments: that's because snes.obj belongs to the -o flag, whereas snes.asm is the command's operand, which corresponds to <ASM FILE> in the command's help message.
Re: wla-65816 assembler confusion
by on (#224372)
Jarhmander wrote:
rainwarrior wrote:
In particular you seem to have combined -v and -o into -vo? Maybe just separate those? Some programs accept that kind of flag combining, but this is not a universal behaviour.

The option grouping is "standard" behavior. In fact, it is a recommended guideline in POSIX (per section 12.2, Utility Syntax Guidelines, guideline 5). As such, it's normal to expect it to work.

It seems in this particular example that the error reporting could be improved. Also, from the understanding of the command-line options, it should rather be invoked like this:
Code:
wla-65816 -vo snes.obj snes.asm

Note the inversion of arguments: that's because snes.obj belongs to the -o flag, whereas snes.asm is the command's operand, which corresponds to <ASM FILE> in the command's help message.

You are exactly correct, thank you for this explanation. I was actually confused as to how it was working backwards!
Turns out the assembler doesn't allow grouped flags. Jarhmander your tip is appreciated, I tried separating them, it works and I feel pretty confident with the flags now.
Much love to you both!