marcobarison

HS12 define a segmented jump

Discussion created by marcobarison on Jun 17, 2016
Latest reply on Jun 22, 2016 by Radek Sestak

Good morning,

 

I am using a MC9S12E256

The program is done in absolute assembler

In my application I am trying to create a macro that runs the code according to the page on which it is executed

 

Macro jump to address --> PAGE  and PC  ...change the page only if it is different from the point of jumping

 

JMPS  MACRO

       if ((*>>16) != PAGE(\1))         ;<-------------error...  how should I do?

       MOVB #PAGE(\1),PPAGE

       endif

       JMP    (\1 & $FFFF)

      ENDM

...........

         org    $0000C000

JMPS      MyProgramPage

...........

         org    $00308000

MyProgramPage

        JMPS MyProgram2

.............

MyProgram2

............

 

Problem:

Error: A2314 Expression must be absolute

 

How can I remove the error ?

 

Thanks for your help

Outcomes