Why is NESASM bad?

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

Moderator: Moderators

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

Post by tepples »

albailey wrote:I would like to propose a page on the wiki that talks about the pros and cons of each of the different NES assemblers.
I would start one, but I cannot seem to log in to the wiki with Firefox or with Opera. See my post in the wiki forum.
User avatar
beneficii
Posts: 127
Joined: Tue Jul 12, 2005 4:37 pm

Post by beneficii »

loopy wrote:
beneficii wrote:My only problem with ASM6 is that there doesn't seem to be a way to force 8-bit addresses to be compiled as 16-bit (maybe I should tell loopy about this?)
You're right, it doesn't let you force the address size. It always uses small addresses when possible. Is there a standard way of forcing address size? I'd be happy to add it in.
(edit) sorry for threadjacking, I guess this doesn't have much to do with nesasm.
I don't think there really is a standard. Most commonly I see a directive like 16BIT attached to parentheses around the value in question. Perhaps it could be written as that or BIT16 or something?

Still, I really like how your PAD function allows you to cause an area of code/data to end at a certain address without worrying about where it begins. I wonder how your program implements that when you don't even know the starting address of the code in question. Does it automatically know that it doesn't know the starting address and so tries to find the length of the code in question from the starting label to the ending label?

Like you have:

ending = $e000

.pad ending - (finished - starting)

starting:

code

finished:

--------
So it knows that since it doesn't know the value of starting, it goes to calculate the length of the body of code from starting to finished?

EDIT: How about LONG notation?
User avatar
loopy
Posts: 403
Joined: Sun Sep 19, 2004 10:52 pm
Location: UT

Post by loopy »

Last edited by loopy on Wed Aug 20, 2008 11:33 am, edited 1 time in total.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

beneficii wrote:I don't think there really is a standard. Most commonly I see a directive like 16BIT attached to parentheses around the value in question. Perhaps it could be written as that or BIT16 or something?
Or do like C does:

Code: Select all

.p02
LDA (char)$00  ; read from zero page
LDA (short)$00  ; read from absolute address

.p816
LDA (char)$00  ; read from direct page
LDA (short)$00  ; read from current data bank
LDA (long)$00  ; read from absolute address
Post Reply