Shop OBEX P1 Docs P2 Docs Learn Events
Address 338 is not withing lower half of memory page? — Parallax Forums

Address 338 is not withing lower half of memory page?

basicstampedebasicstampede Posts: 214
edited 2008-09-23 17:43 in General Discussion
How do I fix this error message?
I attach my file.
It is a modified version of MCP23017 (except that I've expanded the SHIFTIN and SHIFTOUT for learning purpose).
The program does not compile and gives error message about memory.

Can someone please advise how to modify this program so it will compile?

Thanks.

Comments

  • basicstampedebasicstampede Posts: 214
    edited 2008-09-23 16:33
    Sorry.· I attached the wrong file.· This is the file I need help with.
  • BeanBean Posts: 8,129
    edited 2008-09-23 16:55
    You need to declare your subroutines in the beginning of the program.
    Then you don't need to use GOSUB.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    "A government big enough to give you everything you want, is big enough to take away everything you·have."·· Thomas Jefferson

    "It is our choices, Harry, that show what we truly are, far more than our abilities."·Dumbledore from Harry Potter

    www.iElectronicDesigns.com

    ·
  • basicstampedebasicstampede Posts: 214
    edited 2008-09-23 17:43
    Bean, thanks a lot. That did the trick. It now compiles.
    Just out of curiosity: What is the difference between using GOSUB/RETURN vs. SUB / ENDSUB?

    That is, why did this subtle change fix the memory issue?
Sign In or Register to comment.