Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: kindermoumoute on November 07, 2010, 12:41:35 pm
-
hello,
I would like to include a subroutine in my drawing program that transforms screen displayed (96*64 pixels) in hexadecimal text then I record in a string.
But I do not know where to start, can anyone help me? ???
-
transforms an image displayed in hexadecimal text then I record in a string.
Sorry, I don't quite know what you mean. Do you mean like converting a picture into hexadecimal text that is stored into a string? Something like this (http://ourl.ca/4832/94254) or this (http://ourl.ca/7776)?
Maybe you can write it in french and someone can translate
-
are you talking about transformations like scale changes and rotations? (affine transformations, for those in geometry).
-
I ask not for a tile image, but all screen. After i'll look yours source.
-
Are you saying that you want to take the image that is currently displayed on the screen, and dump it out as a hex string? It would be pretty straightforward to do that in assembly language; I don't know if there's a simple way to do that with Axe.
-
With pxl-test(X,Y) command, this isn't possible ?
-
With the help of my handy dandy hex display library (http://ourl.ca/4129/124589), this would be fairly simple. For example, this would dump the current contents of L6 into a 1536-byte string pointed to by P:
P-2?B
For(A,L?,L?+767)
{sub(B2H,{A})}??{B+2?B}?
End
If you're not dumping this into an OS string, remember that your string will need to be null-terminated.
-
You want to store the hex of the screen to a TI-BASIC string, right?
-
You want to store the hex of the screen to a TI-BASIC string, right?
Yes.
@runer : :o I don't understand your subroutine.
-
You want to store the hex of the screen to a TI-BASIC string, right?
Yes.
@runer : :o I don't understand your subroutine.
That's the point of libraries, the code is written and is known to work already ;) It's fairly simple though. One subroutine (N2H) converts nibbles into an ASCII character by returning the nth character in the string "0123456789ABCDEF" and another subroutine (B2H) just calls this subroutine for both nibbles in a byte and combines the two.
-
To clarify, since Nibbles were new when SIlver wrote his french version of the Axe command list, 1 nibble is half a byte. It goes from 0 to 15 instead of 0 to 255.
-
:o it work, pretty routine !