Ali2006

HC08: Filling unused memory,and getting the code to "compile" properly

Discussion created by Ali2006 on Sep 13, 2006
Latest reply on Sep 15, 2006 by Ali2006
Hello All,
 
I'm new to the code warrior assembly software programming so please excuse my ignorance.
 
I'm trying to create a simple assembly file that's been converted from an old HC05 code. 
The file uses ORG's to set the locations of the code and vectors etc.
 
I'm trying to get the code warrior software to give me the correct outputs.
and I'm also trying to Fill the unused CODE space with SWI's, which in my case is a 0x83
I'm using the HCS08QG8 processor.
 
I setup my project from the start as an Absolute Assembly project with the Full chip emulator choosen as the target and got everything to compile just fine, but there was no S records, no listing generated, and no map file.
 
I then found out about the .prm files and am using the following..
Code:
/* Define Starting Point for filt*/INIT RESETNAMES END /* CodeWarrior will pass all the needed files to the linker by command line. But here you may add your own files too. */SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */    ROM                      =  READ_ONLY    0xE000 TO 0xFFAD FILL 0x83;                                     Z_RAM                    =  READ_WRITE   0x0060 TO 0x00FF;    RAM                      =  READ_WRITE   0x0100 TO 0x025F;    ROM1                     =  READ_ONLY    0xFFC0 TO 0xFFCF;ENDPLACEMENT /* Here all predefined and user segments are placed into the SEGMENTS defined above. */    DEFAULT_RAM                          INTO  RAM;    DEFAULT_ROM, ROM_VAR, STRINGS        INTO  ROM; /* ROM1 In case you want to use ROM1 as well, be sure the option -OnB=b is passed to the compiler. */    _DATA_ZEROPAGE, MY_ZEROPAGE          INTO  Z_RAM;ENDSTACKSIZE 0x50VECTOR 0 RESET /* Reset vector: this is the default entry point for an application. */

 
Now when I compile the code I do get the .sx file, but it's filled with all 0x83's and nothing else.   If I don't use the FILL command my .sx file result isn't all that much better.  It only contains one S1 line which sets the reset vector to E000.
 
I tried to enter a SECTION name in the assembly file and then a new name in the PLACEMENT section, but they system told me that this was an absolute assembly file and I couldn't do that.
 
Obvioulsy I must be doing something wrong, but since I'm new to this I have no idea what..
 
Any assistance will be greatly appreciated.
 
P.S. I  saw on some other message that you need to have the Interrupt vectors secified in both the prm file and the assembly file.. Is that correct? Or is the RESET vector sufficient for setting the system up.
 

Message Edited by CrasyCat on 2007-04-13 02:17 PM

Outcomes