Eclipse to make ASM filtes - tips needed

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
User avatar
MartsINY
Posts: 66
Joined: Sun Jun 11, 2017 5:39 pm

Eclipse to make ASM filtes - tips needed

Post by MartsINY » Sun Jun 18, 2017 3:27 pm

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?
Last edited by MartsINY on Sun Jun 18, 2017 4:12 pm, edited 1 time in total.

tepples
Posts: 21750
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Eclipse to make ASM filtes - tips needed

Post by tepples » Sun Jun 18, 2017 4:07 pm

Which assembler are you using? In ca65, labels are private by default.

User avatar
MartsINY
Posts: 66
Joined: Sun Jun 11, 2017 5:39 pm

Re: Eclipse to make ASM filtes - tips needed

Post by MartsINY » Sun Jun 18, 2017 4:12 pm

tepples wrote:Which assembler are you using? In ca65, labels are private by default.
ASM6, added it to description!!

User avatar
nicklausw
Posts: 371
Joined: Sat Jan 03, 2015 5:58 pm
Location: ...
Contact:

Re: Eclipse to make ASM filtes - tips needed

Post by nicklausw » Sun Jun 18, 2017 4:20 pm

Can't help you with eclipse, but for private labels, try making local labels with @.

Code: Select all

@loop: jmp @loop
bla:
@loop: jmp @loop
The above shold work okay. Well, should.

User avatar
MartsINY
Posts: 66
Joined: Sun Jun 11, 2017 5:39 pm

Re: Eclipse to make ASM filtes - tips needed

Post by MartsINY » Sun Jun 18, 2017 5:27 pm

nicklausw wrote:Can't help you with eclipse, but for private labels, try making local labels with @.

Code: Select all

@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

User avatar
tokumaru
Posts: 11465
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Eclipse to make ASM filtes - tips needed

Post by tokumaru » Sun Jun 18, 2017 7:04 pm

ASM6's README.TXT cleary states these are valid local labels:
Labels beginning with '@' are local labels. They have limited scope,
visible only between non-local labels. Names of local labels may be reused.

User avatar
MartsINY
Posts: 66
Joined: Sun Jun 11, 2017 5:39 pm

Re: Eclipse to make ASM filtes - tips needed

Post by MartsINY » Sun Jun 18, 2017 7:18 pm

tokumaru wrote:ASM6's README.TXT cleary states these are valid local labels:
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...

User avatar
tokumaru
Posts: 11465
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Eclipse to make ASM filtes - tips needed

Post by tokumaru » Sun Jun 18, 2017 7:20 pm

Have you tried a name other than "a"? It may be interpreting that "a" as the accumulator.

User avatar
MartsINY
Posts: 66
Joined: Sun Jun 11, 2017 5:39 pm

Re: Eclipse to make ASM filtes - tips needed

Post by MartsINY » Sun Jun 18, 2017 7:22 pm

unfortunately yes, but I always get unknown label...

User avatar
tokumaru
Posts: 11465
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Eclipse to make ASM filtes - tips needed

Post by tokumaru » Sun Jun 18, 2017 7:29 pm

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

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

User avatar
MartsINY
Posts: 66
Joined: Sun Jun 11, 2017 5:39 pm

Re: Eclipse to make ASM filtes - tips needed

Post by MartsINY » Sun Jun 18, 2017 7:31 pm

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

-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

hackfresh
Posts: 100
Joined: Sun May 03, 2015 8:19 pm

Re: Eclipse to make ASM filtes - tips needed

Post by hackfresh » Sun Jun 18, 2017 9:37 pm

If you are using the WUDSN IDE make sure its definitely associated with the right assembler...

User avatar
MartsINY
Posts: 66
Joined: Sun Jun 11, 2017 5:39 pm

Re: Eclipse to make ASM filtes - tips needed

Post by MartsINY » Mon Jun 19, 2017 3:14 am

yes it is!!

anyway for now I compile it with ASM6, not through Eclipse

hackfresh
Posts: 100
Joined: Sun May 03, 2015 8:19 pm

Re: Eclipse to make ASM filtes - tips needed

Post by hackfresh » Mon Jun 19, 2017 9:43 am

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.

Post Reply