From: 3843416 (carlosofcascade_at_gmx.net)
Date: 2003-04-20 17:11:25
i have a problem with a specific linker config.
i want to display grafic on the screen, so i want to reserve memory for
the bitmap.
i want to reserve this 8000 bytes at the adress $2000. so i wrote
following linker cfg:
MEMORY {
ZP: start = $02, size = $1A, type = rw;
RAMLO: start = $07ff, size = $1800, define = yes, file = %O;
BMP: start = $2000, size = $1f40, define = yes, file = %O;
RAM: start = $3f3e, size = $4000, define = yes, file = %O;
}
SEGMENTS {
BITMAP: load = BMP, type = bss;
STARTUP: load = RAMLO, type = wprot;
CODE: load = RAMLO, type = wprot;
RODATA: load = RAMLO, type = wprot;
DATA: load = RAM, type = rw;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
}
FEATURES {
CONDES: segment = RODATA,
type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__;
CONDES: segment = RODATA,
type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__;
}
SYMBOLS {
__STACKSIZE__ = $800; # 2K stack
}
then i used following assembly prg to reserve storage in the
BITMAP segment:
.segment "BITMAP"
.res 8000,0
the rest was done in c. i expect malloc to reserve storage in this
segment, so that the program crashes. yes, that is what it does.
without using this memory configuration the program ran already.
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2003-04-20 18:13:50 CEST