Jump to content
IGNORED

XB CALL LOADs


atrax27407

Recommended Posts

I wonder if that has something to do with the suddenly-unavailable memory expansion.

 

It would be interesting to see what these do, exactly, to help determine if these could have some other hidden benefits or other cracks in the armor.

Link to comment
Share on other sites

Historically these lists of CALL LOADs have been collections of interesting mixed with useful mixed with hacks mixed with myths. ;) It seems many were determined by chance rather than reason, and this looks like a good one.

 

 

CALL LOAD(-31866,x) Does not allow the full access of 32K (x=1 to 159).

 

-31866 is >8386, which is the second part of a pair of memory expansion pointers XB uses:

 

>8384 - top of 24k RAM block (near as I can tell)

>8386 - last free address in 24k RAM block

 

As you add program code, the second pointer there counts down.

 

The starting value for >8386 (and >8384) is >FFE7, and the CALL LOAD modifies the /high/ byte. (Which makes the range 1-159 very strange, since the initial value is 255! CALL PEEK it and see for yourself!)

 

1-159 means you're setting the last free address in high memory from >01E7 (which is down in ROM) to >9FE7 (which is in I/O space). Interestingly, if you then add a line of code, the value immediately gets overwritten with the correct top of memory. So it's not used during program entry. It also gets reset on RUN, so it's not used there either.

 

It DOES stay if set during a running program, though. It does confuse the heck out of SIZE though. It would appear this point indicates where dynamic RAM for the running program ends.

 

(Edit: Strings always live in VDP. Duh. ;) )

 

All that said, though, I'd say the valid values for that are actually 160-255 (>A0 to >FF), with 159 or less simply claiming that 24k is full. It's also 16 bits wide, you can set the full address, although higher than >FFE7 may cause other issues. It's a temporary value, though, and not suitable for reserving blocks of RAM for other tasks (for that, move the line number table down ;) ). Probably mostly a curiosity.

Edited by Tursi
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...