Reply by zeta_alpha2002 September 20, 20052005-09-20
> What is the right way to do this in paged space? It seems there
ought to
> be a directive I can use to force my pages labels to be two byte values
> ($8000-$BFFF)

Maynot be the right way but instead of Absolute Assembly try
relocatable assembly. Works for me.

In the .PRM you specify where your character string are located. When
time to assemble CW will take care of the rest.



Reply by Dave Sivertsen September 20, 20052005-09-20
I am porting a B32 product to an E128, and migrating to CodeWarrior.
The new product has a nice text/graphics display that is a big
improvement over the cryptic abbreviations I had to cram into a 4x20 LCD.
My plan was to use several pages for constant data -strings and
graphics. and let my display routines set the appropriate PPAGE value.

Most of the code I am porting is selects string display based on a
couple of state variables which point into a table.
ORG $4000
<snip>
LDY #DSPTAB
LDAB _line_ptr
LSLB ;table has word entries
LDY B,Y
JSR TEXTOUT ;sets PPAGE->3A, Y points to null terminated string
RTS
;display table
DSPTAB:
dc.w DSP_DSC_0,DSP_DSC_0a
dc.w DSP_DSC_1,DSP_DSC_1a
dc.w DSP_DSC_2,DSP_DSC_2a
dc.w DSP_DSC_3,DSP_DSC_3a
<snip>

<snip>
org ROM_PAGE3AStart ; equ $003A8000
;**********************Text Page***************************
DSP_DSC_0 dc.b "Line0",0
DSP_DSC_0a dc.b "Line0a",0
DSP_DSC_1 dc.b "Line1",0
DSP_DSC_1a dc.b "Line1a",0
DSP_DSC_2 dc.b "Line2",0
DSP_DSC_2a dc.b "Line2a",0
DSP_DSC_3 dc.b "Line3",0
DSP_DSC_3a dc.b "Line3a",0

Since the assembler generates a 24 bit values for each text label in 3A,
the DSPTAB generates loads of truncation warnings.
1) I could turn off this warning, and potentially miss a different
truncation.
2) I could brute force it: i.e.
DSPTAB dc.b HIGH (DSP_DSC_0),LOW (DSP_DSC_0),HIGH (DSP_DSC_0a),LOW
(DSP_DSC_0a)

What is the right way to do this in paged space? It seems there ought to
be a directive I can use to force my pages labels to be two byte values
($8000-$BFFF) Thanks in advance,
Dave Sivertsen