Reader:

` ``//Define the hex value mapping {0,0,0,0→HEX0 {1,0,0,0→HEX1 {0,1,0,0→HEX2 {0,0,1,0→HEX3 {0,0,0,1→HEX4 {1,1,0,0→HEX5 {1,0,1,0→HEX6 {1,0,0,1→HEX7 {0,1,1,0→HEX8 {0,1,0,1→HEX9 {0,0,1,1→HEXA {1,1,1,0→HEXB {1,1,0,1→HEXC {1,0,1,1→HEXD {0,1,1,1→HEXE {1,1,1,1→HEXF {0,0,0,0→READ "?→Str0 //Define the screen size //This example is for a monochrome calculator such as the TI-84 0→Xmin:94→Xmax 0→Ymin:62→Ymax For(Y,Ymin,Ymax-2,2 For(X,Xmin,Xmax-2,2 pxl-Test(Y,X→ʟREAD(1 pxl-Test(Y,X+1→ʟREAD(2 pxl-Test(Y+1,X→ʟREAD(3 pxl-Test(Y+1,X+1→ʟREAD(4 Pxl-Change(Y,X If 0=sum(ʟREAD:Str0+"0→Str0 If 1=sum(ʟREAD:Then If not(sum(ʟREAD≠ʟHEX1:Str0+"1→Str0 If not(sum(ʟREAD≠ʟHEX2:Str0+"2→Str0 If not(sum(ʟREAD≠ʟHEX3:Str0+"3→Str0 If not(sum(ʟREAD≠ʟHEX4:Str0+"4→Str0 End If 2=sum(ʟREAD:Then If not(sum(ʟREAD≠ʟHEX5:Str0+"5→Str0 If not(sum(ʟREAD≠ʟHEX6:Str0+"6→Str0 If not(sum(ʟREAD≠ʟHEX7:Str0+"7→Str0 If not(sum(ʟREAD≠ʟHEX8:Str0+"8→Str0 If not(sum(ʟREAD≠ʟHEX9:Str0+"9→Str0 If not(sum(ʟREAD≠ʟHEXA:Str0+"A→Str0 End If 3=sum(ʟREAD:Then If not(sum(ʟREAD≠ʟHEXB:Str0+"B→Str0 If not(sum(ʟREAD≠ʟHEXC:Str0+"C→Str0 If not(sum(ʟREAD≠ʟHEXD:Str0+"D→Str0 If not(sum(ʟREAD≠ʟHEXE:Str0+"E→Str0 End If 4=sum(ʟREAD:Str0+"F→Str0 Pxl-Change(Y,X End End sub(Str0,2,length(Str0)-1→Str0`

Printer:

` ``//Define the hex value mapping {0,0,0,0→HEX0 {1,0,0,0→HEX1 {0,1,0,0→HEX2 {0,0,1,0→HEX3 {0,0,0,1→HEX4 {1,1,0,0→HEX5 {1,0,1,0→HEX6 {1,0,0,1→HEX7 {0,1,1,0→HEX8 {0,1,0,1→HEX9 {0,0,1,1→HEXA {1,1,1,0→HEXB {1,1,0,1→HEXC {1,0,1,1→HEXD {0,1,1,1→HEXE {1,1,1,1→HEXF {0,0,0,0→PRNT //Define the screen size //This example is for a monochrome calculator such as the TI-84 0→Xmin:94→Xmax 0→Ymin:62→Ymax ClrDraw AxesOff GridOff Full Str0→Str2 For(Y,Ymin,Ymax-2,2 For(X,Xmin,Xmax-2,2 Pxl-Change(Y,X sub(Str2,1,1→Str1 Pxl-Change(Y,X If Str1="0":Goto S If Str1="1":ʟHEX1→ʟPRNT If Str1="2":ʟHEX2→ʟPRNT If Str1="3":ʟHEX3→ʟPRNT If Str1="4":ʟHEX4→ʟPRNT If Str1="5":ʟHEX5→ʟPRNT If Str1="6":ʟHEX6→ʟPRNT If Str1="7":ʟHEX7→ʟPRNT If Str1="8":ʟHEX8→ʟPRNT If Str1="9":ʟHEX9→ʟPRNT If Str1="A":ʟHEXA→ʟPRNT If Str1="B":ʟHEXB→ʟPRNT If Str1="C":ʟHEXC→ʟPRNT If Str1="D":ʟHEXD→ʟPRNT If Str1="E":ʟHEXE→ʟPRNT If Str1="F":ʟHEXF→ʟPRNT Pxl-Change(Y,X If ʟPRNT(1:Then:Pxl-On(Y,X:Else:Pxl-Off(Y,X:End If ʟPRNT(2:Then:Pxl-On(Y,X+1:Else:Pxl-Off(Y,X+1:End If ʟPRNT(3:Then:Pxl-On(Y+1,X:Else:Pxl-Off(Y+1,X:End If ʟPRNT(4:Then:Pxl-On(Y+1,X+1:Else:Pxl-Off(Y+1,X+1:End Lbl S If length(Str2)>1:sub(Str2,2,length(Str2)-1→Str2 End End`

The way I did it is probably not the fastest or cleanest, but it works and shows what I was trying to say

]]>Another option might be run length encoding, but would be hard to make it reliably fall within the 999 limit of lists. Basically, you record the state at which the pixel is, and how many in a row there are. The wikipedia article on it explains it fairly well.

]]>` ``00 00 10 00 01 00 00 10 00 01 11 00 10 10 10 01 01 10 01 01 00 11 11 10 11 01 10 11 01 11 11 11`

If you scan the screen in this way, you cut the number of rows and columns in half. You then read those 4 pixels, and determine the layout. Then you take the hex equivalent for that point layout and store it to a string.

This would mean a string like: “0A15F” would correspond to the following points, where 1 is on and 0 is off:

` ``0000010011 0011000111`

Repeat for each group of pixels. You also then only are limited by string memory, and not list memory. ]]>

` ``ClrHome 1→dim(L₁ 1→dim(L₂ For(Y,0,164 For(X,0,264 If pxl-Test(Y,X Then augment(L₁,{X→L₁ augment(L₂,{Y→L₂ End End End ClrDraw For(X,2,dim(L₁ Pxl-On(L₂(X),L₁(X),BLACK End`