[TI-OS] A bug?

Got questions? Got answers? Go here for both.

Moderator: MaxCoderz Staff

Post Reply
User avatar
driesguldolf
Extreme Poster
Posts: 395
Joined: Thu 17 May, 2007 4:49 pm
Location: $4080
Contact:

[TI-OS] A bug?

Post by driesguldolf »

Yay found an insignificant bug in tios. :mrgreen:

When you're trying to make some art on the graph screen weird stuff can happen: sometimes when you switch from text to pt-change (not as commands but when you use them when the graph screen is on, could be the other way around (not sure)) it draws a pixel at the point where the cursor is...
It does not happen on all the areas of the screen...

Strange... Has this happened to anyone else?

Bug found in ti83+ latest os
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

It hasn't happened to me, I'll mess around some more and see if I can make it happen as well :)


Oh and upon seeing that quiz: depending on whether SP was odd or even to start with, you will end up CALLing $9D9D and crash (JP $CA9D) or you will end up executing SBC A,L and then JP $CA9D where you can not execute so crash. To top it all, before the crash you will have killed all data between the old SP and $9DCA.
At least, that is what I think would happen, and it only works this way when you can not execute from $C000 to $FFFF as is normally the case.
edit: fixed typos
Last edited by King Harold on Tue 21 Aug, 2007 10:47 am, edited 2 times in total.
User avatar
driesguldolf
Extreme Poster
Posts: 395
Joined: Thu 17 May, 2007 4:49 pm
Location: $4080
Contact:

Post by driesguldolf »

It was a while ago that I found that bug (the period that I made graphics during class to use them in never finshed projects, ya know...)
King Harold wrote:Oh and upon seeing that quiz: depending on whether SP was odd or even to start with, you will end up CALLing $9D9D and crash (can not execute there) or you will end up executing SBC A,L JP $CA9D where you can not execute so crash. To top it all, before the crash you will have killed all data between the old SP and $9DCA.
At least, that is what I think would happen, and it only works this way when you can not execute from $8000 to $FFFF as is normally the case.
I wanted to have some sort of instruction that could survive a stack overflow but as I see now, It is not possible... I'll think of a better one. :D
And by the way, it is perfectly safe to execute from $0000 to $C000, how else could you execute an asm prog? :P
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

Oh yes wasn't really awake..
It will still crash: depending on whether SP was odd or even to start with, you will end up CALLing $9D9D and crash (JP $CA9D) or you will end up executing SBC A,L and then JP $CA9D where you can not execute so crash. To top it all, before the crash you will have killed all data between the old SP and $9DCA.

It seems to me that it should be possible to have an instruction that survives it's own stack overflow..
User avatar
KermMartian
Calc Wizard
Posts: 549
Joined: Tue 05 Jul, 2005 11:28 pm
Contact:

Post by KermMartian »

But if you execute at or above $c000, you get an instant crash anyway...
Image Image Image
User avatar
driesguldolf
Extreme Poster
Posts: 395
Joined: Thu 17 May, 2007 4:49 pm
Location: $4080
Contact:

Post by driesguldolf »

Ok I think we got a bit off topic,

hmmm I realized... I don't think this really belongs in programming help does it? Sorry, my mistake, I think it fits better in general ti discussion. Could someone move it please?

Damn got off topic...
Goplat
New Member
Posts: 12
Joined: Mon 16 Jul, 2007 2:46 pm

Post by Goplat »

9D95: di
9D96: ld bc,$E9C5 ; push bc \ jp (hl)
9D99: ld hl,$9D97
9D9C: jp (hl)
This will overwrite itself, but the 2-byte loop stays the same and keeps going.
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

That is insane :worship:
way to go man, how on earth did you think of it?
User avatar
Dwedit
Maxcoderz Staff
Posts: 579
Joined: Wed 15 Dec, 2004 6:06 am
Location: Chicago!
Contact:

Post by Dwedit »

not that hard, just make sure it overwrites the two bytes with the same two bytes.
You know your hexadecimal output routine is broken when it displays the character 'G'.
Post Reply