Re: argh ! 255 charcters only on the TI-92


[Prev][Next][Index][Thread]

Re: argh ! 255 charcters only on the TI-92



Excerpts from netnews.bit.listserv.calc-ti: 6-Dec-96 argh ! 255
charcters only o.. by Labaye Denis@club-intern
> Hi
>
> I need to convert a sequence of bits into string file.
>
> 1) I convert 8 bits into decimal number
> 2) I convert decimal number into character (with char(x))
> BUT there is only 255 char so I have to manage the 256th in a different
> way.
>
> Someone have a simple solution ? (it could be using something different
> that string or something with Fargo)
>
> Denis


Are ti92 strings null terminated? If not then you can probably just make
your data into a string with no tricks, because a non null-terminated
string is just like an array of bytes, where each entry can be a full 8
bits (all 256 combinations). This is because an array of bytes has its
length infomation stored separately as an integer, while a null
terminated string reserves the number 00000000b to indicate the end of
the string.

If using strings won't work, there are tricks that shouldn't be too
painful. For example, you could try to write your data to a picture
variable (hopefully the 92 has these-- the 85 does). The data within a
picture variable is enterpreted as a long list of ones and zeros which
correspond to pixels on the screen. The 92 won't care what combination
of ones and zeros appear inside a picture variable, so you would be free
to store 8 bits of data per 8 bits of RAM.


-Jonathan





+-----------------------------------------------+
| Jonathan Samuel       jsamuel+@andrew.cmu.edu |
| Electrical and Computer Engineering Student   |
| at Carnegie Mellon University                 |
| http://jsamuel.res.cmu.edu/~jsamuel   -or-    |
| http://www.contrib.andrew.cmu.edu/usr/jsamuel |
+-----------------------------------------------+


Follow-Ups: References: