This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

Eclipse to make ASM filtes - tips needed

Eclipse to make ASM filtes - tips needed
by on (#198430)
First thank to all the people who helped me so far. I've been hacking for almost 10 years and I always coded with FCEUXD (debugger). I recently decided to use easier program, and I ask advices from people here. I got a lot of help and useful informations. I ended up picking Eclipse to code, it answered my needs.

However, I have few more points for which I would need help if possible. I will write few small questions:

Related with Eclipse (ASM6 to compile):

1-) Is there a way to comment all selected line and decomment them, like with Visual Studio?
2-) If I use multiple document, for example I will have main file which will include everything. I will first include the variables, then for example, a boss file. However the boss files has no include but uses variable from the file loaded before in the main file.

Is there a way to see the variable in Eclipse to the right when I edit the boss file even if it has no include?

3-) I would like Eclipse to propose me the variable to the right when I start typing, like visual studio. Is it possible?

4-) Considering I have a main file that does all the include like mentionned above, can I have private labels?

For example, in every boss file, I will have labels at each RTS for the BEQ, BNE, JMP, etc...

RTS0:
RTS
.
.
.
RTS1:
RTS

But these label would refer to different things in every boss file. Is there a way to be able to use labels as RTS0, RTS1 as private in every file?
Re: Eclipse to make ASM filtes - tips needed
by on (#198431)
Which assembler are you using? In ca65, labels are private by default.
Re: Eclipse to make ASM filtes - tips needed
by on (#198433)
tepples wrote:
Which assembler are you using? In ca65, labels are private by default.


ASM6, added it to description!!
Re: Eclipse to make ASM filtes - tips needed
by on (#198434)
Can't help you with eclipse, but for private labels, try making local labels with @.
Code:
@loop: jmp @loop
bla:
@loop: jmp @loop

The above shold work okay. Well, should.
Re: Eclipse to make ASM filtes - tips needed
by on (#198438)
nicklausw wrote:
Can't help you with eclipse, but for private labels, try making local labels with @.
Code:
@loop: jmp @loop
bla:
@loop: jmp @loop

The above shold work okay. Well, should.


doesn't seem to work for ASM6. Any label with @ is not recognised
Re: Eclipse to make ASM filtes - tips needed
by on (#198443)
ASM6's README.TXT cleary states these are valid local labels:

Quote:
Labels beginning with '@' are local labels. They have limited scope,
visible only between non-local labels. Names of local labels may be reused.
Re: Eclipse to make ASM filtes - tips needed
by on (#198445)
tokumaru wrote:
ASM6's README.TXT cleary states these are valid local labels:

Quote:
Labels beginning with '@' are local labels. They have limited scope,
visible only between non-local labels. Names of local labels may be reused.


I saw this too... but when I do this it doesn't work. For example:

@a:
RTS
LDA spriteAnimation,X
CMP #drillManSprite_StandingFacingScreenRotatingDrills_FinalAnimatino
BNE @a

or

BNE a

Both don't work and I don't see in the README more detail about this...
Re: Eclipse to make ASM filtes - tips needed
by on (#198446)
Have you tried a name other than "a"? It may be interpreting that "a" as the accumulator.
Re: Eclipse to make ASM filtes - tips needed
by on (#198447)
unfortunately yes, but I always get unknown label...
Re: Eclipse to make ASM filtes - tips needed
by on (#198449)
Oh well, I never use local labels with ASM6 anyway, so I can't say what's going on. I use temporary labels instead:

Code:
-loop: jmp -loop
;something here
-loop: jmp -loop
Re: Eclipse to make ASM filtes - tips needed
by on (#198450)
tokumaru wrote:
Oh well, I never use local labels with ASM6 anyway, so I can't say what's going on. I use temporary labels instead:

Code:
-loop: jmp -loop
;something here
-loop: jmp -loop


Using those ones also, they are better but in rare case a local variable would be useful, but I can do withouth
Re: Eclipse to make ASM filtes - tips needed
by on (#198457)
If you are using the WUDSN IDE make sure its definitely associated with the right assembler...
Re: Eclipse to make ASM filtes - tips needed
by on (#198464)
yes it is!!

anyway for now I compile it with ASM6, not through Eclipse
Re: Eclipse to make ASM filtes - tips needed
by on (#198482)
Ok just checking.

I remember I had to make this change in the IDE preferences to get it to work right.

Under Window->preferences->Editors->File Associations

MADS was the default editor for *.asm files. I had to remove it as the default and make ASM6 the default editor for that file type.