'=========================================================================== ' Subject: LCD COUNTER DIGITS Date: 04-24-97 (10:42) ' Author: Nick Kochakian Code: QB, QBasic, PDS ' Origin: NickK@worldnet.att.net Packet: GRAPHICS.ABC '=========================================================================== DECLARE SUB lightlet (x3!, y3!, ltr$) DECLARE SUB lightdigit (x3!, y3!, num!) DECLARE SUB lightpart (x3!, y3!, let$) DECLARE SUB cleardigit (x3!, y3!) 'LCD counter digits ' '4/8/97 '1997 By: - Nick Kochakian - 'I'll make a better verison of this that will support high res. and all the 'letters! ' 'Any comments or questions should be e-mailed to: nickK@worldnet.att.net ' ___a.___ ' | | 'b. | | c. ' | | ' ---d.--- ' | | 'e. | | f. ' |___g.___| ' ' 'Recommended: '+15 on X3 for each space right '-15 on X3 for each space left '+25 on Y3 for each space down '-25 on Y3 for each space up SCREEN 13 'cleardigit SUB -> CALL cleardigit (x of digit, y of digit) 'lightdigit SUB -> CALL lightdigit (x of digit, y of digit, number for digit <1-0>) 'lightlet SUB -> CALL lightlet (x of digit, y of digit, letter) 'Note: not all letters will work with the lightlet SUB! 'lightpart SUB -> CALL lightpart (x of digit, y of digit, digit letter ) CALL cleardigit(1, 1) CALL cleardigit(15, 1) CALL cleardigit(30, 1) CALL cleardigit(45, 1) CALL cleardigit(60, 1) CALL cleardigit(75, 1) CALL cleardigit(90, 1) CALL cleardigit(105, 1) CALL cleardigit(120, 1) CALL cleardigit(135, 1) 'CALL lightlet(1, 1, "z") CALL lightdigit(1, 1, 1) CALL lightdigit(15, 1, 2) CALL lightdigit(30, 1, 3) CALL lightdigit(45, 1, 4) CALL lightdigit(60, 1, 5) CALL lightdigit(75, 1, 6) CALL lightdigit(90, 1, 7) CALL lightdigit(105, 1, 8) CALL lightdigit(120, 1, 9) CALL lightdigit(135, 1, 0) CALL cleardigit(1, 25) CALL cleardigit(15, 25) CALL cleardigit(30, 25) CALL cleardigit(45, 25) CALL cleardigit(60, 25) CALL cleardigit(75, 25) CALL cleardigit(90, 25) CALL cleardigit(105, 25) CALL cleardigit(120, 25) CALL cleardigit(135, 25) CALL lightlet(1, 25, "h") CALL lightlet(15, 25, "e") CALL lightlet(30, 25, "l") CALL lightlet(45, 25, "l") CALL lightlet(60, 25, "o") SUB cleardigit (x3, y3) col = 19 x = 1 'b. y = 10 x2 = 1 y2 = 3 x = x + x3 y = y + y3 x2 = x2 + x3 y2 = y2 + y3 LINE (x, y)-(x2, y2), col x = 10 'a. y = 1 x2 = 3 y2 = 1 x = x + x3 y = y + y3 x2 = x2 + x3 y2 = y2 + y3 LINE (x, y)-(x2, y2), col x = 12 'c. y = 10 x2 = 12 y2 = 3 x = x + x3 y = y + y3 x2 = x2 + x3 y2 = y2 + y3 LINE (x, y)-(x2, y2), col x = 10 'd. y = 12 x2 = 3 y2 = 12 x = x + x3 y = y + y3 x2 = x2 + x3 y2 = y2 + y3 LINE (x, y)-(x2, y2), col x = 1 'e. y = 20 x2 = 1 y2 = 13 x = x + x3 y = y + y3 x2 = x2 + x3 y2 = y2 + y3 LINE (x, y)-(x2, y2), col x = 12 'f. y = 20 x2 = 12 y2 = 13 x = x + x3 y = y + y3 x2 = x2 + x3 y2 = y2 + y3 LINE (x, y)-(x2, y2), col x = 10 'd. y = 22 x2 = 3 y2 = 22 x = x + x3 y = y + y3 x2 = x2 + x3 y2 = y2 + y3 LINE (x, y)-(x2, y2), col END SUB SUB lightdigit (x3, y3, num) ' ___a.___ ' | | 'b. | | c. ' | | ' ---d.--- ' | | 'e. | | f. ' |___g.___| ' ' IF num = 1 THEN CALL lightpart(x3, y3, "c") CALL lightpart(x3, y3, "f") END IF IF num = 2 THEN CALL lightpart(x3, y3, "a") CALL lightpart(x3, y3, "c") CALL lightpart(x3, y3, "d") CALL lightpart(x3, y3, "e") CALL lightpart(x3, y3, "g") END IF IF num = 3 THEN CALL lightpart(x3, y3, "a") CALL lightpart(x3, y3, "c") CALL lightpart(x3, y3, "d") CALL lightpart(x3, y3, "f") CALL lightpart(x3, y3, "g") END IF IF num = 4 THEN CALL lightpart(x3, y3, "b") CALL lightpart(x3, y3, "d") CALL lightpart(x3, y3, "c") CALL lightpart(x3, y3, "f") END IF IF num = 5 THEN CALL lightpart(x3, y3, "a") CALL lightpart(x3, y3, "b") CALL lightpart(x3, y3, "d") CALL lightpart(x3, y3, "f") CALL lightpart(x3, y3, "g") END IF IF num = 6 THEN CALL lightpart(x3, y3, "a") CALL lightpart(x3, y3, "b") CALL lightpart(x3, y3, "d") CALL lightpart(x3, y3, "e") CALL lightpart(x3, y3, "g") CALL lightpart(x3, y3, "f") END IF IF num = 7 THEN CALL lightpart(x3, y3, "a") CALL lightpart(x3, y3, "c") CALL lightpart(x3, y3, "f") END IF IF num = 8 THEN CALL lightpart(x3, y3, "a") CALL lightpart(x3, y3, "b") CALL lightpart(x3, y3, "c") CALL lightpart(x3, y3, "d") CALL lightpart(x3, y3, "e") CALL lightpart(x3, y3, "f") CALL lightpart(x3, y3, "g") END IF IF num = 9 THEN CALL lightpart(x3, y3, "a") CALL lightpart(x3, y3, "b") CALL lightpart(x3, y3, "d") CALL lightpart(x3, y3, "c") CALL lightpart(x3, y3, "f") END IF IF num = 0 THEN CALL lightpart(x3, y3, "a") CALL lightpart(x3, y3, "b") CALL lightpart(x3, y3, "e") CALL lightpart(x3, y3, "g") CALL lightpart(x3, y3, "f") CALL lightpart(x3, y3, "c") END IF END SUB SUB lightlet (x3, y3, ltr$) ltr$ = UCASE$(ltr$) ' ___a.___ ' | | 'b. | | c. ' | | ' ---d.--- ' | | 'e. | | f. ' |___g.___| ' ' IF ltr$ = "A" THEN CALL lightpart(x3, y3, "a") CALL lightpart(x3, y3, "b") CALL lightpart(x3, y3, "c") CALL lightpart(x3, y3, "d") CALL lightpart(x3, y3, "e") CALL lightpart(x3, y3, "f") END IF IF ltr$ = "C" THEN CALL lightpart(x3, y3, "a") CALL lightpart(x3, y3, "b") CALL lightpart(x3, y3, "e") CALL lightpart(x3, y3, "g") END IF IF ltr$ = "E" THEN CALL lightpart(x3, y3, "a") CALL lightpart(x3, y3, "b") CALL lightpart(x3, y3, "d") CALL lightpart(x3, y3, "e") CALL lightpart(x3, y3, "g") END IF IF ltr$ = "F" THEN CALL lightpart(x3, y3, "a") CALL lightpart(x3, y3, "b") CALL lightpart(x3, y3, "d") CALL lightpart(x3, y3, "e") END IF IF ltr$ = "H" THEN CALL lightpart(x3, y3, "b") CALL lightpart(x3, y3, "e") CALL lightpart(x3, y3, "d") CALL lightpart(x3, y3, "f") CALL lightpart(x3, y3, "c") END IF IF ltr$ = "J" THEN CALL lightpart(x3, y3, "c") CALL lightpart(x3, y3, "f") CALL lightpart(x3, y3, "g") CALL lightpart(x3, y3, "e") END IF IF ltr$ = "L" THEN CALL lightpart(x3, y3, "b") CALL lightpart(x3, y3, "e") CALL lightpart(x3, y3, "g") END IF IF ltr$ = "O" THEN CALL lightpart(x3, y3, "a") CALL lightpart(x3, y3, "b") CALL lightpart(x3, y3, "e") CALL lightpart(x3, y3, "g") CALL lightpart(x3, y3, "f") CALL lightpart(x3, y3, "c") END IF IF ltr$ = "P" THEN CALL lightpart(x3, y3, "a") CALL lightpart(x3, y3, "b") CALL lightpart(x3, y3, "d") CALL lightpart(x3, y3, "c") CALL lightpart(x3, y3, "e") END IF IF ltr$ = "S" THEN CALL lightpart(x3, y3, "a") CALL lightpart(x3, y3, "b") CALL lightpart(x3, y3, "d") CALL lightpart(x3, y3, "f") CALL lightpart(x3, y3, "g") END IF IF ltr$ = "U" THEN CALL lightpart(x3, y3, "b") CALL lightpart(x3, y3, "e") CALL lightpart(x3, y3, "g") CALL lightpart(x3, y3, "f") CALL lightpart(x3, y3, "c") END IF END SUB SUB lightpart (x3, y3, let$) let$ = UCASE$(let$) col = 12 IF let$ = "B" THEN x = 1 'b. y = 10 x2 = 1 y2 = 3 x = x + x3 y = y + y3 x2 = x2 + x3 y2 = y2 + y3 LINE (x, y)-(x2, y2), col END IF IF let$ = "A" THEN x = 10 'a. y = 1 x2 = 3 y2 = 1 x = x + x3 y = y + y3 x2 = x2 + x3 y2 = y2 + y3 LINE (x, y)-(x2, y2), col END IF IF let$ = "C" THEN x = 12 'c. y = 10 x2 = 12 y2 = 3 x = x + x3 y = y + y3 x2 = x2 + x3 y2 = y2 + y3 LINE (x, y)-(x2, y2), col END IF IF let$ = "D" THEN x = 10 'd. y = 12 x2 = 3 y2 = 12 x = x + x3 y = y + y3 x2 = x2 + x3 y2 = y2 + y3 LINE (x, y)-(x2, y2), col END IF IF let$ = "E" THEN x = 1 'e. y = 20 x2 = 1 y2 = 13 x = x + x3 y = y + y3 x2 = x2 + x3 y2 = y2 + y3 LINE (x, y)-(x2, y2), col END IF IF let$ = "F" THEN x = 12 'f. y = 20 x2 = 12 y2 = 13 x = x + x3 y = y + y3 x2 = x2 + x3 y2 = y2 + y3 LINE (x, y)-(x2, y2), col END IF IF let$ = "G" THEN x = 10 'g. y = 22 x2 = 3 y2 = 22 x = x + x3 y = y + y3 x2 = x2 + x3 y2 = y2 + y3 LINE (x, y)-(x2, y2), col END IF END SUB