RE: [stella] DASM Wish List

Subject: RE: [stella] DASM Wish List
From: "Bob Colbert" <rcolbert@xxxxxxx>
Date: Sat, 20 Aug 2005 22:13:13 -0400
DASM has two types of local labels, the dot notation mentioned below and
the $ notation.  The dot notation is not limited to macros and the label
is valid between subroutine statements:

		CHARLIE subroutine
			ldx #10
		.1	dex
			bne .1
		BEN	subroutine
			ldx #20
		.1	dex
			bne .1

The $ notation is as follows:

			ldx #10
		1$	dex
			bne 1$
			ldx #20
		1$	dex
			bne 1$

The labels can be reused and the label is only valid until a
non-temporary label is encountered (ABC in the example above).


> -----Original Message-----
> From: B. Watson [mailto:atari@xxxxxxxxxxxxxx]
> Sent: Friday, August 19, 2005 7:43 PM
> To: stella@xxxxxxxxxxxxxxxxxx
> Subject: re: [stella] DASM Wish List
> > Things get hard to read, especially with gas, which allows up to
> anonymous
> > labels (numbered from 0 to 9). f0 searches the nearest label 0
> b9
> > the nearest label backward. Anyway, that's up to the programmer
> he
> > wants to use this feature or not.
> I bet it becomes a maintenance nightmare if you use enough of them to
> actually need 10 of them at once... every time you add one, it throws
> off the numbering of all the existing ones.
> The simple version of it (the original proposal without the numbers)
> seems like it'd be easier to use, even if it's less flexible, and it
> would solve the problem of coming up with unique names when you can't
> think of a meaningful name to use (loop, loop1, myloop, etc. aren't
> that meaningful anyway).
> > An advantage of this mechanism is that it gives you macro local
> (can
> > dasm do this ? don't think so...) for free.
> DASM does have macro-local labels. You start them with a period:
>   mac aroni
>   ldx #{1}
> .cheese
>   dex
>   bne .cheese
>   endm
> In the symbol and listing output, the label will appear as "1.cheese"
> the first time the macro's used, "2.cheese" the second, etc. I don't
> know whether it's possible to reference "1.cheese" from outside the
> (it seems like it wouldn't be, but I never tried it).
> --
> B.
> Archives (includes files) at
> Unsub & more at

Archives (includes files) at
Unsub & more at

Current Thread