Omnimaga

Calculator Community => TI Calculators => ASM => Topic started by: Hot_Dog on June 05, 2011, 06:57:03 pm

Title: ASM SMC in shells
Post by: Hot_Dog on June 05, 2011, 06:57:03 pm
If you run an ASM program without a shell, SMC inside the program does not stay permanent, since the TI-OS just makes a copy of the program.  Does SMC stay permanent in MirageOS, Ion, etc?
Title: Re: ASM SMC in shells
Post by: Ashbad on June 05, 2011, 07:02:05 pm
I know that MOS and forward have smart writeback -- it'll re-write back the program in RAM to the stored program, but only if the two are different.  If they are the same, it doesn't bother to ;)
Title: Re: ASM SMC in shells
Post by: thepenguin77 on June 05, 2011, 07:05:52 pm
Yes, smc will be permanent in shells.

There is a way to get around writeback if the program is in the Archive. But it's not worth talking about it because a program in ram will always be copied back.
Title: Re: ASM SMC in shells
Post by: Hot_Dog on June 05, 2011, 07:19:29 pm
There is a way to get around writeback if the program is in the Archive. But it's not worth talking about it because a program in ram will always be copied back.

Oh, so if the program is archived, SMC isn't permanent?
Title: Re: ASM SMC in shells
Post by: ztrumpet on June 05, 2011, 07:21:16 pm
There is a way to get around writeback if the program is in the Archive. But it's not worth talking about it because a program in ram will always be copied back.

Oh, so if the program is archived, SMC isn't permanent?
If you have a option in MirageOS or CalcUtil deselected. :)
Title: Re: ASM SMC in shells
Post by: Deep Toaster on June 05, 2011, 07:49:33 pm
I know that MOS and forward have smart writeback -- it'll re-write back the program in RAM to the stored program, but only if the two are different.  If they are the same, it doesn't bother to ;)

Correction: DoorsCS is the only shell I know of with smart writeback. In any shell changes are permanent when you run from RAM (since nobody worries about wearing RAM :P); for running from archive, Mirage writes back if and only if it's enabled in Options, while Doors writes back automatically if anything changed in the program.

EDIT: I'm wrong. This post is of no use whatsoever.

EDIT2: Now I'm not sure. Anybody willing to check?
Title: Re: ASM SMC in shells
Post by: thepenguin77 on June 05, 2011, 07:58:56 pm
Correction: DoorsCS is the only shell I know of with smart writeback. In any shell changes are permanent when you run from RAM (since nobody worries about wearing RAM :P); for running from archive, Mirage writes back if and only if it's enabled in Options, while Doors writes back automatically if anything changed inthe program.

Mirage actually runs an 8 bit checksum to see if there is a change and only copies it back if there is. I would assume Doors uses a 16 bit one though.
Title: Re: ASM SMC in shells
Post by: Deep Toaster on June 05, 2011, 09:57:30 pm
Oh, it does? Never mind then, whoops ;D
Title: Re: ASM SMC in shells
Post by: Hot_Dog on June 05, 2011, 11:13:57 pm
Actually, the best kind of shell would check values byte-for-byte.  Even though a 16-bit checksum is good, it's not 100% guranteed.
Title: Re: ASM SMC in shells
Post by: calc84maniac on June 05, 2011, 11:24:09 pm
Wait wait... I think DCS checks byte-by-byte, and MOS doesn't check at all. Using checksums is not a good idea, because there is a possibility that there *was* a change but the checksum is still the same, in which case the changed data will be lost. There's a reason that MOS has an option for archived writeback or not, because it doesn't check automatically (iirc)
Title: Re: ASM SMC in shells
Post by: Hot_Dog on June 06, 2011, 12:08:29 am
Yeah, Kerm is usually good at thinking of that kind of thing (meaning the byte-by-byte thing which is guranteed)
Title: Re: ASM SMC in shells
Post by: Quigibo on June 06, 2011, 01:31:17 am
Wouldn't it take basically the same amount of time to check byte by byte, or possibly even longer than it would to just copy the program back always?  I don't get why it would check unless the program was in archive.
Title: Re: ASM SMC in shells
Post by: Deep Toaster on June 06, 2011, 09:37:17 am
Checks only if the program was in archive, I think. If it was in RAM there's only one copy of the program anyway (the one being run).