Hello.
I've created a large "font" from custom definable LCD characters, which look quite good. But to use with them with real software, I need a code which will translate some variable into these digit display. So to accomplish this, I've created two arrays, one for top row and one for bottom, which hold appropriate number of corresponding custom chars for the digit display. So to display the required char, I simply read values from arrays from index at that position and pass it to display. The code is as follows:

Code:
DTOP VAR BYTE[10] 'array for top line
DBOT VAR BYTE[10] 'array for bottom line
DTOP[0]=21 '0
DBOT[0]=37
DTOP[1]=96 '1 9 REPLACES 16
DBOT[1]=96
DTOP[2]=05 '2
DBOT[2]=24
DTOP[3]=05 '3
DBOT[3]=47
DTOP[4]=37 '4
DBOT[4]=96
DTOP[5]=20 '5
DBOT[5]=45
DTOP[6]=20 '6
DBOT[6]=35
DTOP[7]=81 '7
DBOT[7]=96
DTOP[8]=25 '8
DBOT[8]=25
DTOP[9]=25 '9
DBOT[9]=96


QROMA:
FOR CNT=0 TO 9
LCDOUT $FE,$01,DTOP[CNT] DIG 1, DTOP[CNT] DIG 0
LCDOUT $FE,$C0,DBOT[CNT] DIG 1, DBOT[CNT] DIG 0
PAUSE 1000
NEXT
GOTO QROMA
But I run into problem, since I'm using "space" for some characters shape, namely 4, 7 and 9 and DEC code for space is 16, I can't put it into that arrays. In fact I can put it, but when I read array like I do in example code, with DIG statement, it will get ,messed, because say I need to display space at left and 6th custom char at right. If I put 166 into array (16 for space and 6 for that custom char), when I read it, the DIG 1 will return 6, not 16.

So what can I do? One way I see is to use individual array elements, and omit usage of DIG, but this doubles array size.

Any other ideas?
Name:  CHARGEN.jpg
Views: 1864
Size:  185.7 KB