2021-06-16 15:12:47 +00:00
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$
2021-06-16 15:20:11 +00:00
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
2021-06-12 04:21:56 +00:00
700 HOME : VTAB 8
2021-06-16 15:12:47 +00:00
710 PRINT "BYTE MODE:" : PRINT "ENTER UP TO 78 ASCII CHARACTERS:"
2021-06-12 04:21:56 +00:00
730 GOTO 1000
800 HOME : VTAB 8
2021-06-16 15:12:47 +00:00
810 PRINT "ALPHANUMERIC MODE:" : PRINT "ENTER UP TO 114 CHARACTERS:"
820 VTAB 16 : INVERSE: PRINT "VALID CHARACTERS:" : PRINT "A-Z 0-9 $ % * + - . / : (SPACE)" : NORMAL
2021-06-12 04:21:56 +00:00
1000 VTAB 12 : INPUT ">" ; S$
2021-06-16 15:12:47 +00:00
1010 IF ( ( M$ = "A" AND LEN ( S$ ) > 114 ) OR ( M$ = "B" AND LEN ( S$ ) > 78 ) ) THEN ? "MESSAGE TOO LONG." : GOTO 1000
2021-06-16 04:14:21 +00:00
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