Re: [cc65] Label file

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2001-08-03 11:27:30


On Fri, Aug 03, 2001 at 04:50:04AM -0400, Keates, Mark wrote:
> I think you misunderstdod me, I meant a symbol in the label file,
> not in the assembler source.
> e.g. 'al' = add label, 'ac' could be add constant.
> (I personally would ignore constants within an emulator)

It seems we misunderstood each other. I've already stated that I will flag the
symbol types in the label file (or a combined file) once a program can really
make use of it, so I was talking about the assembler here, and how the
assembler will disinguish both.

> As a matter of thought, what happens with structures,
> e.g. __vic.spr0_x, or .res blocks? I feel the label file
> should hold the size of a variable such that the offset
> can be given in the debugger. This would be true for self-
> modifying code (slap my wrist for mentioning it!)

It is sometimes not possible to determine the size of a data type in a module.
Think about a declaration like

        extern char Name[];

Apart from that, information about variables is not part of the current
implementation and this will stay so for a while. There is currently not a
single program using the line info generated by ld65 (it's a new feature,
admitted), and only one that uses the symbol info (with some support by me). I
don't see an advantage in adding lots of features no one uses.

> 	LDY #<my_routine
> 	LDX #>my_routine
> 	STY launch+1
> 	STX launch+2
> launch: (assume address = $0900)
> 	JSR $FFFF
[...]
> 	STY $0901
> 	STX $0902
> launch:
> 	JSR $FFFF

This a frequent problem in a much more common place:

	foo:    .word   $1234
		...
		lda	foo
		ldx	foo+1
	
The disassembler will generate:

      	lda     foo
      	ldx	$9221

To work around this really common problem, I've	added code to the VICE
disassembler to search for a symbol for value-1 if a symbol for value was not
found.

Both cases are actually arguments for source level debugging, even when
debugging assembler code. With source level debugging, this problem and
several others just vanish.

Regards


        Uz


--
Ullrich von Bassewitz                                  uz_at_musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:40 CET