From: Royce & S. P. <be...@et...> - 2003-03-22 19:56:01
|
Hi, I have a working project which I had compiled successfully with 2.3.3. But when I tried to compile the same project using sdcc 2.3.4 the same command line options, sdcc complained I was 97 bytes short! When I checked the asm file, I found this: I have some arrays of pointers to functions like this: void (*code do_gen[])()= { gen_rdy, gen_start, gen_flty, gen_fail, gen_on, gen_stop }; In 2.3.3 this array was correctly initialised in code memory. But in 2.3.4, the array is initialised in Data memory! I get: _do_gen:: .ds 12 and later.... ;gates.c:2800: void (*code do_gen[])()= ; genPointerSet ; genNearPointerSet ; genDataPointerSet mov _do_gen,#_gen_rdy mov (_do_gen + 1),#(_gen_rdy >> 8) ; genPointerSet ; genNearPointerSet ; genDataPointerSet mov (_do_gen + 0x0002),#_gen_start mov ((_do_gen + 0x0002) + 1),#(_gen_start >> 8) ; genPointerSet etc..... How to solve this problem using 2.3.4? This presents a problem to compile old code with higher versions of sdcc. Thanks, --Royce. |