Omnimaga
Calculator Community => TI Calculators => ASM => Topic started by: Hot_Dog on January 01, 2011, 08:41:44 pm
-
I'm wondering: If an asm program is archived, does the calculator make sure that it doesn't go across two pages unless absolutely necessary? If that's the case, running larger ASM programs without SMC is theortically possible, as long as they are archived
-
No guarantee of that at all AFAIK. It can't cross sector boundaries, but there is no guarantee it won't cross page boundaries.
Even for programs that don't, you have to deal with the fact that they could be at any address, and you need to write localized code. (which, on the z80, is somewhat inconvenient. No direct calls or jumps, for instance. It's not impossible, though)
-
No. Each archive sector is a separate "box" that can hold up to 64k of variables. So a single variable can't cross a sector boundary. But the OS will pack variables as tightly as it can into each box, not worrying about the internal page boundaries.
Also, the archive area is restricted; if you try to execute code there, the calculator will reset, just as if you try to execute code on RAM page zero.
-
No. Each archive sector is a separate "box" that can hold up to 64k of variables. So a single variable can't cross a sector boundary. But the OS will pack variables as tightly as it can into each box, not worrying about the internal page boundaries.
Also, the archive area is restricted; if you try to execute code there, the calculator will reset, just as if you try to execute code on RAM page zero.
Then why are applications able to run? Do they fall under "not archive?"
-
Right. The OS adjusts the limits whenever you install or delete an application. On the SE/84+, the "archive area" is defined by ports 22 and 23; on the 83+ BE, pages can be individually enabled or disabled using port 16. All these ports are protected so that user programs can't (normally) modify them.
-
Could one theoretically unlock flash, write a routine to output to protected ports to a privileged page, and adjust those ports? Will the OS change them outside of receiving/deleting apps?
On a related note, WikiTI's Port $05 page (http://wikiti.brandonw.net/index.php?title=83Plus:Ports:05) makes it seem like, on a regular TI-83+, the execution protection could be removed. Do you know if this is possible?
-
Could one theoretically unlock flash, write a routine to output to protected ports to a privileged page, and adjust those ports?
Yes, theoretically, that should be possible. The simplest way to adjust the Flash execution limits, though, is to use the BCALL 80CF.
Will the OS change them outside of receiving/deleting apps?
I don't think so, but I'm not sure.
On a related note, WikiTI's Port $05 page (http://wikiti.brandonw.net/index.php?title=83Plus:Ports:05) makes it seem like, on a regular TI-83+, the execution protection could be removed. Do you know if this is possible?
I believe so.
-
That's rather simple :)
What of executing on RAM page 0 on an 83+? Or was that what you answered yes to?
-
So theoretically, one could pirate applications as ASM programs :angel:
By the way, couldn't one simply change the application header to make an application valid without needing a certificate (therefore making it free)?
-
So theoretically, one could pirate applications as ASM programs :angel:
By the way, couldn't one simply change the application header to make an application valid without needing a certificate (therefore making it free)?
I don't think so. I know that there is a patch that makes all apps seem valid when receiving, though.
-
The 8 KB limit was added to prevent the conversion of paid APPs to 8xp files, right?
-
Supposedly, although who knows with TI :/ Maybe it was an accident, and they don't know how to fix it :P
-
Supposedly, although who knows with TI :/ Maybe it was an accident, and they don't know how to fix it :P
I'm pretty sure it was done intentionally. A processor that "locks up" to prevent larger sizes is no coincidence from TI, because Zilog would have been sued for something like that.
-
Lol i was half joking, but yeah i know what you mean
-
Oops, of course :-[
-
Haha its fine, it happens round the nets :)
-
Supposedly, although who knows with TI :/ Maybe it was an accident, and they don't know how to fix it :P
I'm pretty sure it was done intentionally. A processor that "locks up" to prevent larger sizes is no coincidence from TI, because Zilog would have been sued for something like that.
Also, on the TI-73, there's no such limit. This calc also cannot natively run ASM programs (no Asm() command). You have to hack it the same way we did back in the '90s with the TI-82, 85 and 92 series. Coincidence? I don't think so. Due to lack of an Asm() command, no need to add a limit. As a result, if you use Chameleon on a 73 (by BrandonW) to convert it into a TI-83+, you get a TI-83+ that lacks the 8 KB limit.
-
By the way, I just though about this... you *could* run a contiguous program of 32kb on the calculator. Its easy too. In a 2 page app, just swap the 2nd page of the app into the $8000-$BFFF region and that's it! Unfortunately though, you wouldn't be able to call any OS bcalls or use self modifying code, but other than that, it would work.
-
By the way, I just though about this... you *could* run a contiguous program of 32kb on the calculator. Its easy too. In a 2 page app, just swap the 2nd page of the app into the $8000-$BFFF region and that's it! Unfortunately though, you wouldn't be able to call any OS bcalls or use self modifying code, but other than that, it would work.
Wouldn't jumps have an issue if you had to jump to a different page? It would mean a lot of ram page swapping, wouldn't it?
-
Do you mean we would need to carry an additional 32 KB APP that contains the code to be copied in the 8xp program?
-
Wouldn't jumps have an issue if you had to jump to a different page? It would mean a lot of ram page swapping, wouldn't it?
Nope, if its only 2 pages, there are no other pages. Page 1 is $4000-$7FFF and page 2 is $8000-$BFFF. A jump to say... $9001 would simply be jp $9001. You just have to have your orgin on page 2 to .org $8000 and .org $4000 on page 1.
-
Wouldn't jumps have an issue if you had to jump to a different page? It would mean a lot of ram page swapping, wouldn't it?
Nope, if its only 2 pages, there are no other pages. Page 1 is $4000-$7FFF and page 2 is $8000-$BFFF. A jump to say... $9001 would simply be jp $9001. You just have to have your orgin on page 2 to .org $8000 and .org $4000 on page 1.
Note that a bunch of routines wouldn't be available in this mode. Interrupts as well.