DIM ROW As BYTE
DIM POSITION As BYTE
DIM ANSWER As BYTE
'MAIN
DO
'do whatever math or offsets you need to figure out which element
'equates to the row and column your answer resides in.
ROW = something
POSITION = something else etc.
'subtract one because the DATA statement is zero based
DECR POSITION
SELECT CASE ROW
CASE 1
ANSWER = LOOKUP(POSITION, ROW_1)
CASE 2
ANSWER = LOOKUP(POSITION, ROW_2)
'...
END SELECT
'if ROW equaled 1 (dec) and POSITION equaled 20 (dec) then ANSWER would be &H4C
LOOP
END
ROW_1: 'lookup table
DATA &H08 , &HFE , &H54 , &HFE , &H59 , &H01 , &HFE , &H41 , &HFE , &H58 , &H20 , &H41 , &H4D , &H45 , &H52 , &H49 ,
DATA &H20 , &H41 , &H49 , &H52 , &H4C , &H49 , &H4E , &H45 , &H53 , &HA0 , &H02 , &H64 , &H03 , &H08 , &H07 , &H03
ROW_2:
DATA &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 ,
DATA &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00
ROW_3:
DATA &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 ,
DATA &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00
