Author Topic: ASM SMC in shells  (Read 4200 times)

0 Members and 3 Guests are viewing this topic.

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
ASM SMC in shells
« 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?

Ashbad

  • Guest
Re: ASM SMC in shells
« Reply #1 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 ;)
« Last Edit: June 05, 2011, 07:02:27 pm by Ashbad »

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: ASM SMC in shells
« Reply #2 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.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: ASM SMC in shells
« Reply #3 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?

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: ASM SMC in shells
« Reply #4 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. :)

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: ASM SMC in shells
« Reply #5 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?
« Last Edit: June 06, 2011, 09:38:00 am by Deep Thought »




Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: ASM SMC in shells
« Reply #6 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.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: ASM SMC in shells
« Reply #7 on: June 05, 2011, 09:57:30 pm »
Oh, it does? Never mind then, whoops ;D




Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: ASM SMC in shells
« Reply #8 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.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: ASM SMC in shells
« Reply #9 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)
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: ASM SMC in shells
« Reply #10 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)

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: ASM SMC in shells
« Reply #11 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.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: ASM SMC in shells
« Reply #12 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).