Author |
Message |
|
TKD_01
Advanced Newbie
Joined: 20 Feb 2009 Posts: 51
|
Posted: 29 Jan 2010 12:36:51 pm Post subject: |
|
|
Recently, I have attempted at making a "stand-alone" rip-off-of-an-OS for the TI-83plus. ie. run from the home screen with Asm( token. The program runs fine and ends fine, however, upon ending the program, all of my RAM is gone! Heres a screenshot:
[attachment=3046:memory_error_jnos.gif]
(I dont know what those lines are on the edge of the screen. They did not show up in the emulator)
Therefore, after ending the program, when I attempt to run MirageOS, the emulator (WabbitEmu) displays "ERR: Memory" and locks up:
[attachment=3047:memory_e...s_mirage.gif]
Perhaps I coded my program incorrectly? Here's the file just in case:
[attachment=3048:JNOS.z80]
Any help would be appreciated! |
|
Back to top |
|
|
calc84maniac
Elite
Joined: 22 Jan 2007 Posts: 770
|
Posted: 29 Jan 2010 01:33:18 pm Post subject: |
|
|
Why are you putting your variables at $858F? I'm pretty sure there's some darn important OS stuff there... |
|
Back to top |
|
|
TKD_01
Advanced Newbie
Joined: 20 Feb 2009 Posts: 51
|
Posted: 29 Jan 2010 01:49:55 pm Post subject: |
|
|
calc84maniac wrote: Why are you putting your variables at $858F? I'm pretty sure there's some darn important OS stuff there...
<nervous laugh> hah...yeah....you're right . When I looked at the "ion.inc" file for the saferam locations, I looked at "saferam2"...which isnt very safe, appraently (statram). But thanks for the catch, calc84! Just goes to show that even the smallest mistakes can screw you up . |
|
Back to top |
|
|
calc84maniac
Elite
Joined: 22 Jan 2007 Posts: 770
|
Posted: 29 Jan 2010 05:04:52 pm Post subject: |
|
|
TKD_01 wrote: calc84maniac wrote: Why are you putting your variables at $858F? I'm pretty sure there's some darn important OS stuff there...
<nervous laugh> hah...yeah....you're right . When I looked at the "ion.inc" file for the saferam locations, I looked at "saferam2"...which isnt very safe, appraently (statram). But thanks for the catch, calc84! Just goes to show that even the smallest mistakes can screw you up .
No problem. I think that saferam location might have been only on TI-83, not TI-83+ (since ION was designed for development of programs for both models) |
|
Back to top |
|
|
Mapar007
Advanced Member
Joined: 04 Oct 2008 Posts: 365
|
Posted: 06 Feb 2010 08:58:06 am Post subject: |
|
|
Most coders use AppBackupScreen ($9872 iirc) for temporary storage.
Last edited by Guest on 06 Feb 2010 08:58:22 am; edited 1 time in total |
|
Back to top |
|
|
FloppusMaximus
Advanced Member
Joined: 22 Aug 2008 Posts: 472
|
Posted: 06 Feb 2010 09:48:15 pm Post subject: |
|
|
Heh. Don't use ion.inc.
858F is the address of statVars on the TI-83; Joe W presumably made a mistake copying and pasting somewhere, and now we're stuck with who knows how many programmers thinking that area is safe. This is right up there with "db $BB, 6D" in Greatest Mistakes in Calculator Programming History...
statVars is 8A3A on the 83+, but you shouldn't use statVars anyway, if you can help it, since MirageOS's interrupt handler lives there. (Indeed, Mirage may have been done that because, thanks to the error in ion.inc, Ion programs never actually touched statVars on the 83+.) |
|
Back to top |
|
|
kinkoa
Member
Joined: 28 Jul 2009 Posts: 103
|
Posted: 20 Feb 2010 11:55:26 pm Post subject: |
|
|
so i know not to use that address once i start programming ASM |
|
Back to top |
|
|
brandonw
Advanced Member
Joined: 12 Jan 2007 Posts: 455
|
Posted: 21 Feb 2010 01:25:51 pm Post subject: |
|
|
FloppusMaximus wrote: This is right up there with "db $BB, 6D" in Greatest Mistakes in Calculator Programming History...
What exactly is wrong with this? |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 21 Feb 2010 02:05:20 pm Post subject: |
|
|
Maybe because it's missing a dollar sign, so it would refuse to assemble?
Personally, I find the error in, for example, .db "DarkerLine's amazing RPG" much harder to catch (I'm also not sure if it's a universal one). |
|
Back to top |
|
|
Graphmastur
Advanced Member
Joined: 25 Mar 2009 Posts: 360
|
Posted: 21 Feb 2010 04:20:06 pm Post subject: |
|
|
DarkerLine wrote: Maybe because it's missing a dollar sign, so it would refuse to assemble?
Personally, I find the error in, for example, .db "DarkerLine's amazing RPG" much harder to catch (I'm also not sure if it's a universal one).
Umm.. What's wrong? Oh wait! It needs a terminating 0! This is why I like higher level programming languages. I can actually read them! I tried learning asm a few times, and understand a few concepts, but not much. |
|
Back to top |
|
|
FloppusMaximus
Advanced Member
Joined: 22 Aug 2008 Posts: 472
|
Posted: 21 Feb 2010 05:27:48 pm Post subject: |
|
|
DarkerLine wrote: Maybe because it's missing a dollar sign, so it would refuse to assemble?
Worse than that. Some assemblers, including TASM, allow "D" or "d" as a suffix denoting a decimal number, so "6D" is a perfectly legal way to write the number 6. And as it happens, Ion ignores the first two bytes of the program file, so a program that begins with $BB $06 $C9 $30 will run in Ion, but not in most other shells. (This also happens to be a valid, if unusual, sequence of TI-Basic tokens: "►Eff(sinh-1(0".) |
|
Back to top |
|
|
|