How do I use multiple op codes on one line in WLA?

Started by Videogamer555, February 02, 2011, 05:24:08 PM

Previous topic - Next topic

Videogamer555

I tried like this
lda #$01 : sta $0001
as someone else showed me. But WLA compiler didn't like it and spat out an error. How do I do it in WLA DX (the latest version of WLA, the version I have)?

Ryusui

Why do you need to?

I'd imagine you'd use a semicolon to denote end-of-command, as per C-like languages (it's typically optional in ASM, though).
In the event of a firestorm, the salad bar will remain open.

Videogamer555

Quote from: Ryusui on February 02, 2011, 06:31:25 PM
Why do you need to?

I'd imagine you'd use a semicolon to denote end-of-command, as per C-like languages (it's typically optional in ASM, though).

It's nice for LDA STA pairs as indeed they very often come in pairs, and it would help me to see the workings of my program better if I could do this.

BRPXQZME

It depends on the assembler. I'm pretty sure most assemblers don't support multiple opcodes on one line (even the ones that play fast and loose with syntax like Microsoft's MASM). WLA's documentation doesn't seem to indicate any such functionality.

Most assembly coders organize their code using comments and whitespace, for what it's worth.

The semicolon is used for commenting in WLA (a fairly common convention for assemblers, but it's not universal).
we are in a horrible and deadly danger

Nightcrawler

Quote from: Videogamer555 on February 02, 2011, 05:24:08 PM
I tried like this
lda #$01 : sta $0001
as someone else showed me. But WLA compiler didn't like it and spat out an error. How do I do it in WLA DX (the latest version of WLA, the version I have)?

Dd you read the WLA documentation? If you can't find it there, it probably DOESN'T do that. Not many assemblers do. If you need to use that syntax, you can in xkas. However, that's a different assembler and thus will work slightly differently than WLA.
TransCorp - Over 20 years of community dedication.
Dual Orb 2, Wozz, Emerald Dragon, Tenshi No Uta, Glory of Heracles IV SFC/SNES Translations