wla-65816 assembler confusion

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
ihugmyself
Posts: 5
Joined: Mon Aug 06, 2018 8:13 am

wla-65816 assembler confusion

Post by ihugmyself »

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.
Attachments
Untitledasm.png
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: wla-65816 assembler confusion

Post by rainwarrior »

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.
ihugmyself
Posts: 5
Joined: Mon Aug 06, 2018 8:13 am

Re: wla-65816 assembler confusion

Post by ihugmyself »

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.
Last edited by ihugmyself on Mon Aug 27, 2018 8:42 am, edited 3 times in total.
User avatar
Jarhmander
Formerly ~J-@D!~
Posts: 569
Joined: Sun Mar 12, 2006 12:36 am
Location: Rive nord de Montréal

Re: wla-65816 assembler confusion

Post by Jarhmander »

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: Select all

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.
((λ (x) (x x)) (λ (x) (x x)))
ihugmyself
Posts: 5
Joined: Mon Aug 06, 2018 8:13 am

Re: wla-65816 assembler confusion

Post by ihugmyself »

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: Select all

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!
Post Reply