TRSE icon indicating copy to clipboard operation
TRSE copied to clipboard

ASM blocks do not indent first line

Open AndyHOvine opened this issue 3 years ago • 4 comments

If you write:

		asm
		
		ldy #39

		end;

it appears in the assembler file with no indentation as:

ldy #39

This causes an error for Orgasm as it thinks ldy is a label in this case. The workaround is to start the first line with a dummy label. The rest of the asm block will be indented correctly.

AndyHOvine avatar Apr 04 '21 09:04 AndyHOvine

Fixed! I simply added a tab "\t" at the start of the asm. Nobody in their right mind would start with a label here.. I hope

leuat avatar Apr 08 '21 15:04 leuat

That would be a problem too :)

procedure WaitVblStart(); begin

asm

waitVblStart lda $e840 and #%00100000 ;cmp #%00100000 beq waitVblStart

end;

end;

Is there another solution that could preserve the actual content of the asm block? I can work around the problem by putting in a comment with ; as the first line but this issue will catch people out it would be good to fix it.

AndyHOvine avatar Apr 09 '21 11:04 AndyHOvine

well you always have the asm(" ") option.. everything inside "" will be treated verbatim. Problem is that the parser doesn't "see" spaces or tabs.. hm.. I have to think about this

leuat avatar Apr 09 '21 12:04 leuat

I've been raking my head, but unfortunately I'm unable to come up with any good ways to fix this.. you can always put in a ";" as the first line, but there is currently no way to get the full thing working in TRSE. One option would be to simply remove the possibility of having inline assembler without "".. What do you say?

leuat avatar May 26 '21 10:05 leuat

Closing

AndyHOvine avatar May 18 '23 15:05 AndyHOvine