mirror of
https://github.com/option8/A2QR.git
synced 2024-10-31 20:06:29 +00:00
19 lines
1.3 KiB
QBasic
19 lines
1.3 KiB
QBasic
10 HOME : PRINT "ONE MOMENT..." : PRINT CHR$ (4)"BLOAD QRCODE,A$2000"
|
|
20 VTAB 8: PRINT "THIS PROGRAM CREATES AND DISPLAYS A": PRINT "QR CODE OF 33 BY 33 PIXELS.": PRINT "": PRINT "CHOOSE AN ENCODING TYPE:"
|
|
30 HTAB 4: VTAB 14: PRINT "[A] FOR ALPHANUMERIC.": HTAB 4: PRINT "UP TO 114 CHARACTERS. LIMITED": HTAB 4: PRINT "TO UPPER CASE LETTERS, NUMBERS,": HTAB 4: PRINT "$ % * + - . / : AND SPACES."
|
|
40 HTAB 4: VTAB 19: PRINT "[B] FOR BYTES.": HTAB 4: PRINT "LIMITED TO 78 ASCII CHARACTERS."
|
|
50 VTAB 22: INPUT "ENTER A OR B :";M$
|
|
60 IF NOT (M$ = "A" OR M$ = "B" OR M$="a" OR M$="b") THEN GOTO 50
|
|
70 IF (M$ = "B" OR M$ = "b") THEN M$ = "B" : POKE 8,64 : GOTO 700
|
|
80 IF (M$ = "A" OR M$ = "a") THEN M$ = "A" : POKE 8,32 : GOTO 800
|
|
700 HOME : VTAB 8
|
|
710 PRINT "BYTE MODE:": PRINT "ENTER UP TO 78 ASCII CHARACTERS:"
|
|
730 GOTO 1000
|
|
800 HOME : VTAB 8
|
|
810 PRINT "ALPHANUMERIC MODE:": PRINT "ENTER UP TO 114 CHARACTERS:"
|
|
820 VTAB 16: INVERSE: PRINT "VALID CHARACTERS:" : PRINT "A-Z 0-9 $ % * + - . / : (SPACE)": NORMAL
|
|
1000 VTAB 12: INPUT ">";S$
|
|
1010 IF ((M$ = "A" AND LEN(S$)>114) OR (M$ = "B" AND LEN(S$)>78)) THEN ? "MESSAGE TOO LONG.": GOTO 1000
|
|
1020 CALL 8192 : REM IF THIS FAILS, THE MESSAGE CONTAINS SOMETHING OUTSIDE THE ALLOWED RANGE
|
|
1030 HOME : VTAB 5: INVERSE : ? "INVALID CHARACTERS ENTERED. TRY AGAIN.": NORMAL :VTAB 8:GOTO 810
|