You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server

[CWick#1] iv.bat ~ Invalidating itself since 2015

b/Contests Started by brentmaas, September 24, 2015, 07:12:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

u/Dream of Omnimaga October 07, 2015, 03:22:29 AM
On a side note, did you guys know that self-modifying code is possible on calculators too? :P (eg in Axe and ASM to store highscores)
u/c4ooo October 08, 2015, 07:31:52 PM
You generally dont want to use SMC, if you use it to store high scores or something, then you will have to do program write back, which isnt even suported in no stub programs, IIRC. Plus writing the program back will take extra time, as well as saturate your archive faster. Lastly you cant even do SMC in apps. SMC is good however for small optimization in programs - where the code modification is destroyed after the program exits (no write back)
u/Snektron October 08, 2015, 07:33:41 PM
You can use SMC if you're writing an AI that improves itself :P
u/Yuki October 08, 2015, 07:40:42 PM
I actually considered making SMC a theme of a future contest, would it be too hard to do on calc? If so I guess I'll just do something else, I guess.
u/Snektron October 08, 2015, 07:50:52 PM
You need some pretty high asm knowlege for that, so only like 3 people would participate...
u/Yuki October 08, 2015, 07:56:02 PM
Figured, you'd have to find the right program in the VAT and modify it correctly, you'd need quite some knowledge. Same for PC languages to a certain extent, if you want to do something fancy, although @brentmaas' program is pretty much the simplest thing you can do in terms of SMC.
u/c4ooo October 08, 2015, 08:02:36 PM
Well.. as long as you allow the program to be destroyed after run then it wont be so hard, but its almost imposible to do (My brain auto-corrects to "do to" :P ) byte-by-byte SMC in axe. You could however swap out something like Goto XXXX with goto YYYY quiet easely if you know a thing or two about how axe works under the hood. Yet once again- not all people know that much. Further more, SMC will basicly prevent basic users from competing.
Last Edit: October 09, 2015, 10:24:51 AM by c4ooo
u/Dream of Omnimaga October 09, 2015, 06:06:50 AM
Quote from: c4ooo on October 08, 2015, 07:31:52 PM
You generally dont want to use SMC, if you use it to store high scores or something, then you will have to do program write back, which isnt even suported in no stub programs, IIRC. Plus writing the program back will take extra time, as well as saturate your archive faster. Lastly you cant even do SMC in apps. SMC is good however for small optimization in programs - where the code modification is destroyed after the program exits (no write back)
Yeah that's the main issue. You need to make the program require a shell and I hate when it garbage-collects every three minutes because of program writeback.
Website statistics


MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators
Powered by EzPortal