S19 FILE STRUCTURE FOR MC9S08QE128

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S19 FILE STRUCTURE FOR MC9S08QE128

2,268 Views
Obiwan
Contributor I
Hello friends, I am new to the forum.
Can somebody help me understand the structure of an .S19 file related to QE128 MCU ?

One of my doubts: if the original S19 file addresses 64 K memory space ( the old MikBug 4 digit address field) , how can I have a single S19 file containing more than that amount of data ?

Another question: could I create an S19 file containing data to program just one single page of the paged memory space ?

Some information about this will be very much appreciated.

 
Labels (1)
0 Kudos
2 Replies

508 Views
tonyp
Senior Contributor II
For format details, start here.

S19 is good for 64K address space, only.  With the QE128, you still have 16-bit addresses, but you also have an 8-bit PPAGE.  This extra byte can be viewed as the most significant byte of a 24-bit address, but not necessarily.

It all depends on your assembler or compiler output.  If you compiler outputs S28 format (3-byte addresses), write a loader for that.  If you only get S19 files, you'll have no choice but to break up your project into as many separately compiled modules as needed and load the resulting S19 files, the main one and at least one more for each of pages 4 thru 7, as needed.

S19 files, being pure ASCII, can be combined into a single file very easily, after compilation (e.g.,  COPY PAGE0.S19+PAGE3.S19+FILE4.S19 IMAGE.S19).  With MAKE files, this is a write-once nuisance.

I have written a rather comprehensive bootloader and use its commands to switch pages as the file is loaded.  But, there are other simpler schemes:

An assembly language example for the pages outside the default 64K range:

org PPAGE;should appear at the very top of the file (as it must be the first byte in the corresponding S19)
 fcb PPAGE_FOR_THIS_MODULE

 org PAGE_START ;all ppage'd modules will have the same start point.
<data and code for this module>

Very simple, very efficient.
0 Kudos

508 Views
MrBean
Contributor I
S1 record uses 2 address bytes.
S2 record uses 3 address bytes.
S3 record uses 4 address bytes.
 
0 Kudos