Jump to content
IGNORED

PRINT CHR$(14913) prints "A"


Ed in SoDak

Recommended Posts

Just a quirk of the TI99/4A I'm sure, but thought it interesting, though hardly useful. If you redefine A, it will show up at 14913 the same as CHR$(65). I was messing around and discovered the character set is repeated over and over as you increase the character numbers on upwards, till at some point around 32000 it scrambled part of my line of code I had written to enter and display it.

 

Attempting to redefine char# 14913 or any number other than the usual results in an error. But changing #65 redefines all the repeating A characters wherever they may be, and there's many duplicated character sets as you keep looking.

 

OK, I'm bored, how else to explain? :)

-Ed

Edited by Ed in SoDak
  • Like 1
Link to comment
Share on other sites

Just a quirk of the TI99/4A I'm sure, but thought it interesting, though hardly useful. If you redefine A, it will show up at 14913 the same as CHR$(65). I was messing around and discovered the character set is repeated over and over as you increase the character numbers on upwards, till at some point around 32000 it scrambled part of my line of code I had written to enter and display it.

 

Attempting to redefine char# 14913 or any number other than the usual results in an error. But changing #65 redefines all the repeating A characters wherever they may be, and there's many duplicated character sets as you keep looking.

 

OK, I'm bored, how else to explain? :)

-Ed

 

I suspect the highest number you managed to get ‘A’ to print was 32577. CHR$() will only accept 16-bit positive integers (0 – 32767). Anything else (after rounding) will generate an error message. Though the manual does not say it, I am pretty sure CHR$() only processes the least significant byte (LSB)—making the value processed, 0 – 255. This would be the explanation for the cyclic printing of ‘A’. The highest such value that results in an LSB of 65 is 32577.

 

I am not sure how to explain the corruption of your line of code, however.

 

...lee

  • Like 1
Link to comment
Share on other sites

Thanks Lee, your explanation makes sense. The T/S1000 has several ghosts of the ROM due to incomplete RAM addressing, I thought it may have been something like what happens on that machine. But the LSB truncating is the likely scenario.

 

My "program" was essentially one line of code that used a for/next loop to incrementally display chr$(n). I just kept upping the start/end numbers and running again. After reading your reply, I wasn't able to quickly replicate the scrambled bit of my program line. When it happened the first time around, I was just picking higher numbers out of the air and not really noting what numbers I'd typed when the entered code listing went a bit screwy..

 

It changed the CALL CLEAR in the program line 30 with the for/next loop to a portion of line 20 in my little experiment that wasn't being run since I commented line 20 out with an ! exclamation point. Simply editing the line 30 corrected it and I was able to run it again.

 

Trying to replicate this error, I came across the error report, but the code was not scrambled as before.

 

Like I said odd, but useless. At first I lept to the conclusion I had discovered "hidden" charsets, but doubted that, so I wrote this code to see if I could redefine these high character numbers. You cannot redefine them, they only display or print. No redeeming value to having that "ability."

 

-Ed

Edited by Ed in SoDak
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...