Shop OBEX P1 Docs P2 Docs Learn Events
Address XXX is not within lower half of memory page....waaa? — Parallax Forums

Address XXX is not within lower half of memory page....waaa?

T'SaavikT'Saavik Posts: 60
edited 2007-04-03 17:42 in General Discussion
Was converting Example #7 of the stampworks project and ran into 7 of these errors.
They happen on every gosub. I *DO* plan on converting the gosubs to normal subs,
but didn't want to deviate too much while its still broken. I did a search and looked through
the online help but wasn't able to find a description of this compile error.

What the heck did i do?

Here is the code, i don't understand some of it, The index into data is confusing to me,
and i don't really understand the Amax, Bmax, etc stuff. I was hoping to abuse "watch" to learn
its mysterious ways. If you see something that looks wrong/weird/dumb it most likely is, please tell me [noparse]:D[/noparse]

Thanks all!

p.s. Anyone have a "BUTTON" (the pbasic command) sub they have already written. Thinking of trying to make one
but don't want to re-invent a square wheel).

Post Edited (T'Saavik) : 4/3/2007 6:30:07 AM GMT

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-04-03 07:44
    In the assembly file, just before label Read_Speed,
    enter org $200, and the file will assemble.
    or put the following in the sxb file
    '
    [noparse][[/noparse] Gosubs ]
    \org $200

    regards peter

    Post Edited (Peter Verkaik) : 4/3/2007 7:49:13 AM GMT
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-04-03 12:18
    You will also get this error if you do not declare your subroutines and functions·before your Start: and after the PROGRAM Start.·· See the SX/B Help file and SX/B Template.

    ' =======================================
    · PROGRAM Start
    ' =======================================


    '
    ' Subroutine Declarations
    '

    Read_Speed······· SUB···· 0

    ModeA················ SUB···· 0

    ModeB················ SUB···· 0

    ModeC················ SUB···· 0

    ModeD················ SUB···· 0

    ModeE··················SUB···· 0

    Breaks················· SUB···· 0



    '
    ' Program Code
    '

    Start:

    ' Initialization code here

    Main:

    'Your main body code here


    Goto Main

    '
    ' Subroutine Code
    '
    ·
  • JonnyMacJonnyMac Posts: 8,943
    edited 2007-04-03 13:56
    In the SX/B help file there is a program very much like the one you're trying to produce -- see the example associated with BRANCH.

    And if I may... at least try to reinvent wheels as that's how one learns. Think of where we'd be today if after the first wheel man invented everyone else just stopped....
  • T'SaavikT'Saavik Posts: 60
    edited 2007-04-03 17:42
    Thanks peter and T&E. I added the sub declarations (since i want to convert it to subs anyways) and it compiled perfectly.

    I had read about sub "headers" needing to be in the first page, but i had no idea i had filled a page already! I figured it would take ALOT more code to do that.
    JonnyMac said...
    In the SX/B help file there is a program very much like the one you're trying to produce -- see the example associated with BRANCH.

    Thanks Jonny, that example program is MUCH cleaner then my conversion. A little tooling about in the mess i made and mulling over of that example code and i think I'll have it all figured out soon [noparse]:D[/noparse]
    JonnyMac said...
    And if I may... at least try to reinvent wheels as that's how one learns. Think of where we'd be today if after the first wheel man invented everyone else just stopped....

    Oh i will, i just thought I could look at someone else's and add rubber [noparse]:D[/noparse]
    Now stop helping my fool self and finish your book /whip lol.gif
Sign In or Register to comment.