Shop OBEX P1 Docs P2 Docs Learn Events
SX/B Crossing Page Boundaries — Parallax Forums

SX/B Crossing Page Boundaries

RonWRonW Posts: 39
edited 2006-09-22 15:41 in General Discussion
With earlier versions of SX/B I had a few problems with code crossing page boundaries. For instance, if the assembly code for a PAUSE crossed a page boundary, there was a problem. Since then I routinely added ADDRESS directives so that no code would execute across a page boundary.

I believe at least some of those problems have gone away. Have those issues all been resolved? Is there any reason to worry about crossing page boundaries with SX/B now?

Thanks.

Comments

  • BeanBean Posts: 8,129
    edited 2006-09-22 14:45
    Ron,
    · You don't have to worry about page boundaries at all as long as you declare your subroutines with SUB all is taken care of by the compiler.

    The only thing that can cause problems is if you have a large interrupt routine. Since the interrupt code MUST be before the SUB definitions, alot of interrupt code can push them out of the page. Then you will get an assembly error.

    The solution is to make your interrupt a single "GOTO HandleInt", then define your SUBs then put the "HandleInt:" label and your interrupt code.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com

    There are only two guaranteed ways to become weathy.
    Spend less than you make.
    Make more than you spend.
    ·
  • cbmeekscbmeeks Posts: 634
    edited 2006-09-22 15:41
    Bean is correct. I believe that happened to me. My VGA circuit uses interrupts and even though I have shortened the code considerably, my main loop stopped working.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Coders' Hangout
    A place for programmers to hangout!
    http://www.codershangout.com

    METROID?
    Metroid Classic
Sign In or Register to comment.