Re: [cc65] range errors

Date view Thread view Subject view

From: MagerValp (MagerValp_at_cling.gu.se)
Date: 2003-06-11 19:04:40


>>>>> "UvB" == Ullrich von Bassewitz <uz_at_musoftware.de> writes:

UvB> Without an .org statement, the assembler doesn't know the value
UvB> of init, so it assumes that the expression is word sized (while
UvB> it is easy for a human to see that the result is always in the
UvB> range $30..$39, this is not as easy for a dumb computer program).
UvB> If you want a byte sized expression, just tell the assembler:

Thanks. Next one - what the heck is up with this? It assembles to an
18 byte file, despite test.map claiming that music is at $1000.


---test.s---
	.segment "STARTUP"

	.word $0801

	.word $080b
	.word 2003
	.byte $9e, "2061"
	.byte 0
	.word 0

	.code

	jmp music

	.segment "MUSIC"

music:	rts
------------

---test.cfg---
MEMORY {
    ZP: start = $02, size = $1A, type = rw, define = yes;
    LOWRAM: start = $07FF, size = $0801, define = yes, file = %O;
    MSXRAM: start = $1000, size = $1000, define = yes, file = %O;
    HIRAM: start = $2000, size = $0b00, define = yes, file = %O;
    DATARAM: start = $2b00, size = $1600;
    BSSRAM: start = $8000, size = $2000;
}
SEGMENTS {
    STARTUP: load = LOWRAM, type = wprot;
    CODE: load = LOWRAM, type = wprot;
    DATA: load = LOWRAM, type = rw;
    MUSIC: load = MSXRAM, type = wprot;
    HICODE: load = HIRAM, type = wprot, align = 256;
    LOGO: load = DATARAM, type = wprot, start = $2b00;
    CONF: load = DATARAM, type = wprot, start = $3000;
    BSS: load = BSSRAM, type = bss;
    ZEROPAGE: load = ZP, type = zp;
}
-----------

-- 
    ___          .     .  .         .       . +  .         .      o   
  _|___|_   +   .  +     .     +         .  Per Olofsson, arkadspelare
    o-o    .      .     .   o         +          MagerValp_at_cling.gu.se
     -       +            +    .     http://www.cling.gu.se/~cl3polof/
----------------------------------------------------------------------
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 : 2003-06-11 19:06:05 CEST