This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's z80 & ez80 Assembly subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Z80 & 68k Assembly => z80 & ez80 Assembly
Author Message


Joined: 15 Jul 2003
Posts: 7

Posted: 17 Jul 2003 07:48:25 pm    Post subject:

I was just wondering (self-modifying code) SMC is used to write back to your prgm to change the code> If so then it is possible for calculators to learn!>The same way we do. We learn what we cannot do because we get reinforcement for our behavior. well what if the calcs (prgms i mean) take a keypress as reinforcement well then can it go back, delete the code that was punished and optimize the code that was reinforced!>> Can the calc learn not to do something by input and therefore never do it again. Can the calc come up with it's own "behavior" patterns to suit the user. I mean imagine if someone wrote an amazing code for an Flash App that would allow a program to change>delete unused code because after a certain amount of times the program was used certain settings were not changed. Or if the calculator could resemble three dots on a screen with a large square in the middle. Let's say that the calculator stores all the information about the three dots. Now these dots move in random directions.when the three dots all move toward the large square (kinda pushing it altogether) the square will move. now this will be seen to the calculator as acheiving a goal>cause that's the code that the programmer put there< since the calc sees that if all three dots move in one direction it can use tries to see if that will always cause the block to move. if not it will see what other patterns are in the dots info. all three are pushing in one direction and touching the large square. the calc can try all these to see if it is true. if not it will try other random things to achieve its goals. put together all the info for the dots in where it achieved the goals to look for patterns to achieve the goal right away. after a few hundred tries, it sees that all three dots have to move toward the square(not beside or infront of it),touch the square, and go in the same direction; the calculator can change its behavioral code to only do that, that way it will achieve its goal. in this way calculators may be able to learn what do you guys think? Very Happy
Back to top


Joined: 15 Jul 2003
Posts: 7

Posted: 17 Jul 2003 08:03:00 pm    Post subject:

Rolling Eyes This would be the best and most complicated tool ever!
It would be great for three reasons and many more

1) Shells that optimize for each users specifications
2) Programs that use several "dots/agents" that work together
3) Programs that need to change themselves midplay>like a game having an alternate ending depending on what you did because it could delete unnecessary code and create necessary code!

It would also be hard to do for these main reasons Wink

1)Figure out how to add and delete code
2)Figure out how to add clean,good, and optimized code
3)Figure out when and why to change the code
4)Figure out how to find patterns in data
5)Figure out what should be added or deleted

I know some of you are extremely sceptical about this idea!
I am kinda unsure if it is even possible>I don't even know about Self-Modifying code
One thing i am sure of is if United-Ti could figure out a way to write code like this our games, shells whatever would be at the top of the line. I mean Texas Instruments could hire you guys as employees! not that any of you are not yet? i don't know
Even if you are sceptical i really want to here your opinion about Cool

0)What exactly is Self-Modifying Code
1)Why should you start on this project
2)Why couldn't you finish the project > codewise (not i'm going to clean my room this evening LOL)
3)How could you get over any barriers and write code to let the calculator learn!
4)What would be the outcome (think positive)
5)Could we get as many programming groups as possible to help us! United-Ti>Birthplace of calculator Psychology! LOL Very Happy
Back to top

Active Member

Joined: 30 Jun 2003
Posts: 720

Posted: 18 Jul 2003 02:18:35 am    Post subject:

What you are talking about has nothing to do with SMC. SMC is used for two purposes:

1. On old CPU's you can do things that the limited instruction set wouldn't let you do otherwise. E. g. on the i8085 CPU the port addresses are fixed in the I/O instructions, you cannot use registers to address I/O devices. However, with SMC you can modify the address during runtime. This argument doesn't hold for newer (less than 20 years old) processors though, because they know everything you need.

2. Speed or size optimisation. Speed example: if you have a variable which is constant during a loop in which you have to recall it, you can hack its value directly into the code of the loop before entering it, so you can get rid of a superfluous memory reference. Size example: you have an OR sprite routine. You can turn it into an XOR sprite routine by modifying an instruction in it, so you don't have to keep two almost identical routines in your code, just make sure that it's always the way you want before calling it.

Learning is a completely different issue, it's just data manipulation that doesn't require your code to change itself.
Back to top
aka Tianon


Joined: 02 Jun 2003
Posts: 1874

Posted: 18 Jul 2003 09:11:11 am    Post subject:

thank you CoBB! that was a very nice explanation... i think he wants it to learn, and stay learned... SMC would be good then...
Back to top


Joined: 15 Jul 2003
Posts: 7

Posted: 18 Jul 2003 03:46:04 pm    Post subject:

ok, so forget smc. Let's say that you guys build your own tool to change code in the middle of a program is that even possible. I mean it sounds like there is a possible way to change the code during runtime. I think you guys could figure it out! Neutral
Back to top


Joined: 15 Jul 2003
Posts: 7

Posted: 18 Jul 2003 03:48:12 pm    Post subject:

I mean even if it can't change it's code midway through a program you could probably still make the program learn from what is happening couldn't you? Confused
Back to top


Joined: 10 Jul 2003
Posts: 165

Posted: 19 Jul 2003 03:53:25 am    Post subject:

Well, I don't know much about this, but I do think that this would be possible, but wouldn't you be essentially editing the OS to do this? I mean, you talked about deleting unecessary stuff, but couldn't that be rather dangerous? But I do agree, I think that enough thinking could make the idea possible.

But you did say:
~It is impossible for everything to be possible!

yet I *think* I disagree with that.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» View previous topic :: View next topic  
Page 1 of 1 » All times are GMT - 5 Hours