Hi jackabo,
It seems to me that the lines of code that have given you trouble have been "lifted" from AN3266.
It also seems to me that the code written in AN3266 is meant to be used with a custom .inc file rather than the one that comes with Codewarrior. The .inc file that comes with Codewarrior does not equate HREG and equates the register names to their absolute addresses.
It seems that the .inc file that the AN3266 code would define HREG to $08 (the POR value of PAGESEL) and the start of the high registers.
The equates for the high register would then be defined as (offsets from HREG) + $C0.
This would then allow the code presented in AN3266 to assemble.
There are other registers that require EQU adaption to window offset before this can happen!
You, it seems are having trouble as you are using the code from AN3266 but the .inc file that comes with Codewarrior 5.1.
So then it remains up to you as to whether you prefer:
MOV #HREG, PAGESEL
MOV #(mSOPT_COPE | mSOPT_COPT | mSOPT_STOPE),SOPT
with a equate of $08 to HREG and $C1 to SOPT
_OR_
MOV #HIGH_6_13(SOPT),PAGESEL
MOV #(mSOPT_COPE | mSOPT_COPT | mSOPT_STOPE), MAP_ADDR_6(SOPT)
_OR_
MOV #((SOPT) >> 6 ) & $FF,PAGESEL
MOV #(mSOPT_COPE | mSOPT_COPT | mSOPT_STOPE), (((SOPT) & $3F) + $C0)
all produce the same result and all look equally ugly
Message Edited by peg on 2007-03-2107:13 PM
Message Edited by peg on 2007-03-2107:14 PM
Message Edited by peg on 2007-03-2107:15 PM
Don't worry I'll get it right eventually.......
Message Edited by peg on 2007-03-2107:17 PM
Getting close now.....
Message Edited by peg on 2007-03-2109:16 PM
Surely this is it now...
Message Edited by peg on 2007-03-2109:43 PM