Hello Sangram,
The segment allocations you have shown could be problematic for the HC908AZ60 too. The range of the read/write segments appears to exceed the available RAM in the device. Also some of the segments cross boundaries of different types of memory. If there have not been problems, presumably it was because the offending segments were never used.
To compare the AZ60 with the 9S08DZ60 -
AZ60: RAM1 0x0050 to 0x044F; RAM2 0x0A00 to 0x0DFF (1K + 1K)
DZ60: RAM 0x0080 to 0x107F (4K)
For the DZ60, Z_RAM start differs, so -
Z_RAM = READ_WRITE 0x0080 TO 0x00FF;
Now to put the stack segment at the top of RAM -
MY_STACK = READ_WRITE 0x1000 TO 0x107F;
I notice that you have a quantity of fifteen separate segments allocated, starting at RAM_3, each with a size of 0x80 (128) bytes. Do you actually need so many segments? This approach is likely to give "wasted" RAM unless the intended data completely fills each of these segments.
I might suggest that you sequentially allocate each of these segments, starting at 0x0100. The RAM_2 segment, which I assume contains the majority of variables, could then start from where the previous segments ended, and continue to 0x0FFF, just below the stack.
I have not done so, but it would be a good idea to also check the ROM segments to see that they are compatible with the DZ60 device.
Regards,
Mac