[cc65] unnamed labels and selfmod

From: MagerValp <MagerValp1cling.gu.se>
Date: 2007-06-19 13:59:23
The following code:

  .C:1117   EE 32 11   INC $1132
  .C:111a   D0 08      BNE $1124
  .C:111c   AD 33 11   LDA $1133
  .C:111f   49 03      EOR #$03
  .C:1121   8D 33 11   STA $1133
  .C:1124   EE 35 11   INC $1135
  .C:1127   D0 08      BNE $1131
  .C:1129   AD 36 11   LDA $1136
  .C:112c   49 07      EOR #$07
  .C:112e   8D 36 11   STA $1136
  .C:1131   AE 7B C1   LDX $C17B
  .C:1134   AD 7B C3   LDA $C37B

with an info file like this:

  LABEL { NAME "animate_title"; ADDR $1117; };
  LABEL { NAME ""; ADDR $1124; };
  LABEL { NAME ""; ADDR $1131; };
  RANGE { START $1131; END $1136; TYPE Code; };
  LABEL { NAME "@anim_pos"; ADDR $1132; SIZE 2; };
  LABEL { NAME "@anim_tile"; ADDR $1135; SIZE 2; };

generates:

  animate_title:
	inc	@anim_pos			; 1117
	bne	:+				; 111A
	lda	@anim_pos+1			; 111C
	eor	#$03				; 111F  C
	sta	@anim_pos+1			; 1121
  :	inc	@anim_tile			; 1124
	bne	:+				; 1127
	lda	@anim_tile+1			; 1129
	eor	#$07				; 112C  G
	sta	@anim_tile+1			; 112E
  :@anim_pos	:= * + 1
	ldx	$C2FF				; 1131
  @anim_tile	:= * + 1
	lda	$C4FF				; 1134

It looks wonky but amazingly enough it still assembles correctly :)

-- 
    ___          .     .  .         .       . +  .         .      o   
  _|___|_   +   .  +     .     +         .  Per Olofsson, arkadspelare
    o-o    .      .     .   o         +          MagerValp@cling.gu.se
     -       +            +    .     http://www.cling.gu.se/~cl3polof/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Jun 19 13:59:34 2007

This archive was generated by hypermail 2.1.8 : 2007-06-19 13:59:37 CEST