00000000: 00 80 5E 55 3A 48 41 43 4B 45 52 0D 0D 0D 20 20 |..^U:HACKER... |
00000010: 20 20 20 20 20 20 20 20 20 20 20 D4 CF D4 C1 CC | .....|
00000020: 20 C3 CF CE D4 D2 CF CC 0D 20 20 20 20 20 20 20 | ........ |
00000030: 20 20 20 20 20 20 20 20 20 20 20 42 59 0D 20 20 | BY. |
00000040: 20 20 20 20 20 20 20 20 20 20 20 20 C7 41 52 59 | .ARY|
00000050: 20 C6 49 45 4C 44 53 0D 0D 0D C3 CF CD CD CF C4 | .IELDS.........|
00000060: CF D2 C5 20 CD C1 C7 C1 DA C9 CE C5 0D CA 55 4C |... ..........UL|
00000070: 59 20 31 39 38 37 0D 0D 0D 20 20 C9 46 20 59 4F |Y 1987... .F YO|
00000080: 55 52 20 57 52 49 54 45 20 59 4F 55 52 20 4F 57 |UR WRITE YOUR OW|
00000090: 4E 20 50 52 4F 47 52 41 4D 53 2C 0D 59 4F 55 20 |N PROGRAMS,.YOU |
000000A0: 50 52 4F 42 41 42 4C 59 20 55 53 45 20 C9 CE D0 |PROBABLY USE ...|
000000B0: D5 D4 20 53 54 41 54 45 4D 45 4E 54 53 0D 41 20 |.. STATEMENTS.A |
000000C0: 47 52 45 41 54 20 44 45 41 4C 20 4F 46 20 54 48 |GREAT DEAL OF TH|
000000D0: 45 20 54 49 4D 45 2E 20 C9 CE D0 D5 D4 0D 53 54 |E TIME. ......ST|
000000E0: 41 54 45 4D 45 4E 54 53 20 50 52 4F 4D 50 54 20 |ATEMENTS PROMPT |
000000F0: 54 48 45 20 55 53 45 52 20 4F 46 20 41 0D 50 52 |THE USER OF A.PR|
00000100: 4F 47 52 41 4D 20 46 4F 52 20 49 4E 46 4F 52 4D |OGRAM FOR INFORM|
00000110: 41 54 49 4F 4E 2E 20 D7 48 45 4E 20 41 4E 0D 41 |ATION. .HEN AN.A|
00000120: 44 56 45 4E 54 55 52 45 20 47 41 4D 45 20 50 52 |DVENTURE GAME PR|
00000130: 4F 4D 50 54 53 20 59 4F 55 20 46 4F 52 20 41 0D |OMPTS YOU FOR A.|
00000140: 44 49 52 45 43 54 49 4F 4E 20 4F 52 20 41 4E 20 |DIRECTION OR AN |
00000150: 45 44 55 43 41 54 49 4F 4E 41 4C 20 50 52 4F 47 |EDUCATIONAL PROG|
00000160: 52 41 4D 0D 41 53 4B 53 20 59 4F 55 20 54 4F 20 |RAM.ASKS YOU TO |
00000170: 45 4E 54 45 52 20 54 48 45 20 43 41 50 49 54 41 |ENTER THE CAPITA|
00000180: 4C 20 4F 46 0D CE 4F 52 54 48 20 C4 41 4B 4F 54 |L OF..ORTH .AKOT|
00000190: 41 2C 20 C9 CE D0 D5 D4 20 53 54 41 54 45 4D 45 |A, ..... STATEME|
000001A0: 4E 54 53 20 41 52 45 0D 50 52 4F 42 41 42 4C 59 |NTS ARE.PROBABLY|
000001B0: 20 44 4F 49 4E 47 20 54 48 45 20 57 4F 52 4B 2E | DOING THE WORK.|
000001C0: 0D 0D 20 20 D5 4E 46 4F 52 54 55 4E 41 54 45 4C |.. .NFORTUNATEL|
000001D0: 59 2C 20 C9 CE D0 D5 D4 20 41 43 43 45 50 54 53 |Y, ..... ACCEPTS|
000001E0: 20 41 4C 4C 20 4F 46 0D 54 48 45 20 4B 45 59 53 | ALL OF.THE KEYS|
000001F0: 20 4F 4E 20 54 48 45 20 36 34 20 4B 45 59 42 4F | ON THE 64 KEYBO|
00000200: 41 52 44 2E 20 20 C1 4E 0D 41 43 43 49 44 45 4E |ARD. .N.ACCIDEN|
00000210: 54 4C 59 20 50 52 45 53 53 45 44 20 43 55 52 53 |TLY PRESSED CURS|
00000220: 4F 52 20 4B 45 59 20 57 49 4C 4C 0D 4D 4F 56 45 |OR KEY WILL.MOVE|
00000230: 20 54 48 45 20 43 55 52 53 4F 52 20 41 4E 44 20 | THE CURSOR AND |
00000240: 4F 46 54 45 4E 20 47 41 52 42 4C 45 20 54 48 45 |OFTEN GARBLE THE|
00000250: 0D 53 43 52 45 45 4E 3B 20 41 20 43 4F 4D 4D 41 |.SCREEN; A COMMA|
00000260: 20 57 49 4C 4C 20 50 52 4F 44 55 43 45 20 41 4E | WILL PRODUCE AN|
00000270: 20 C5 D8 D4 D2 C1 0D C9 C7 CE CF D2 C5 C4 20 4D | ............. M|
00000280: 45 53 53 41 47 45 2E 20 20 D9 4F 55 52 20 4F 54 |ESSAGE. .OUR OT|
00000290: 48 45 52 20 4F 50 54 49 4F 4E 0D 46 4F 52 20 41 |HER OPTION.FOR A|
000002A0: 43 43 45 50 54 49 4E 47 20 55 53 45 52 20 49 4E |CCEPTING USER IN|
000002B0: 50 55 54 2C 20 54 48 45 20 C7 C5 D4 0D 53 54 41 |PUT, THE ....STA|
000002C0: 54 45 4D 45 4E 54 2C 20 41 4C 53 4F 20 48 41 53 |TEMENT, ALSO HAS|
000002D0: 20 4C 49 4D 49 54 41 54 49 4F 4E 53 2E 20 C7 C5 | LIMITATIONS. ..|
000002E0: D4 2C 0D 46 4F 52 20 45 58 41 4D 50 4C 45 2C 20 |.,.FOR EXAMPLE, |
000002F0: 44 4F 45 53 4E 27 54 20 50 52 49 4E 54 20 54 4F |DOESN'T PRINT TO|
00000300: 20 54 48 45 0D 53 43 52 45 45 4E 20 4F 52 20 47 | THE.SCREEN OR G|
00000310: 49 56 45 20 41 20 51 55 45 53 54 49 4F 4E 20 4D |IVE A QUESTION M|
00000320: 41 52 4B 20 50 52 4F 4D 50 54 0D 2D 2D 20 4A 55 |ARK PROMPT.-- JU|
00000330: 53 54 20 54 4F 20 4E 41 4D 45 20 41 20 43 4F 55 |ST TO NAME A COU|
00000340: 50 4C 45 20 4F 46 0D 44 52 41 57 42 41 43 4B 53 |PLE OF.DRAWBACKS|
00000350: 2E 0D 0D 20 20 C7 41 52 59 20 C6 49 45 4C 44 53 |... .ARY .IELDS|
00000360: 27 20 D4 CF D4 C1 CC 20 C3 CF CE D4 D2 CF CC 2C |' ..... .......,|
00000370: 20 41 0D 53 55 42 52 4F 55 54 49 4E 45 20 42 55 | A.SUBROUTINE BU|
00000380: 49 4C 54 20 41 52 4F 55 4E 44 20 54 48 45 20 C7 |ILT AROUND THE .|
00000390: C5 D4 0D 53 54 41 54 45 4D 45 4E 54 2C 20 4F 56 |...STATEMENT, OV|
000003A0: 45 52 43 4F 4D 45 53 20 53 4F 4D 45 20 4F 46 20 |ERCOMES SOME OF |
000003B0: 54 48 45 0D 50 52 4F 42 4C 45 4D 53 20 41 53 53 |THE.PROBLEMS ASS|
000003C0: 4F 43 49 41 54 45 44 20 57 49 54 48 20 C7 C5 D4 |OCIATED WITH ...|
000003D0: 20 41 4E 44 0D C9 CE D0 D5 D4 20 53 54 41 54 45 | AND...... STATE|
000003E0: 4D 45 4E 54 53 20 55 53 45 44 20 41 4C 4F 4E 45 |MENTS USED ALONE|
000003F0: 2E 20 20 CF 55 52 0D 44 45 4D 4F 20 50 52 4F 47 |. .UR.DEMO PROG|
00000400: 52 41 4D 20 53 48 4F 57 53 20 48 4F 57 20 54 48 |RAM SHOWS HOW TH|
00000410: 45 20 53 55 42 52 4F 55 54 49 4E 45 0D 43 41 4E |E SUBROUTINE.CAN|
00000420: 20 42 45 20 55 53 45 44 20 54 4F 20 4C 49 4D 49 | BE USED TO LIMI|
00000430: 54 20 54 48 45 20 4E 55 4D 42 45 52 20 41 4E 44 |T THE NUMBER AND|
00000440: 0D 54 59 50 45 20 4F 46 20 43 48 41 52 41 43 54 |.TYPE OF CHARACT|
00000450: 45 52 53 20 45 4E 54 45 52 45 44 20 42 59 20 54 |ERS ENTERED BY T|
00000460: 48 45 0D 55 53 45 52 2E 0D 0D C6 49 4E 41 4C 20 |HE.USER....INAL |
00000470: CE 4F 54 45 53 0D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D |.OTES.----------|
00000480: 2D 0D 20 20 D5 53 45 20 43 41 55 54 49 4F 4E 20 |-. .SE CAUTION |
00000490: 57 48 45 4E 20 55 53 49 4E 47 20 54 48 45 53 45 |WHEN USING THESE|
000004A0: 0D 56 41 52 49 41 42 4C 45 53 20 49 4E 20 59 4F |.VARIABLES IN YO|
000004B0: 55 52 20 4F 57 4E 20 50 52 4F 47 52 41 4D 3A 20 |UR OWN PROGRAM: |
000004C0: D8 2C 20 CC C5 2C 0D C1 2C 20 CE D5 2C 20 C1 CC |., ..,.., .., ..|
000004D0: 2C 20 C1 24 2C 20 C2 24 2C 20 41 4E 44 20 C3 24 |, .$, .$, AND .$|
000004E0: 2E 20 C2 45 43 41 55 53 45 0D 54 48 45 59 20 41 |. .ECAUSE.THEY A|
000004F0: 52 45 20 55 53 45 44 20 42 59 20 54 48 45 20 53 |RE USED BY THE S|
00000500: 55 42 52 4F 55 54 49 4E 45 2C 0D 54 48 45 49 52 |UBROUTINE,.THEIR|
00000510: 20 56 41 4C 55 45 53 20 43 48 41 4E 47 45 20 45 | VALUES CHANGE E|
00000520: 41 43 48 20 54 49 4D 45 20 54 48 45 0D 52 4F 55 |ACH TIME THE.ROU|
00000530: 54 49 4E 45 20 49 53 20 43 41 4C 4C 45 44 2E 20 |TINE IS CALLED. |
00000540: 20 D4 48 45 53 45 20 56 41 52 49 41 42 4C 45 53 | .HESE VARIABLES|
00000550: 0D 43 41 4E 20 42 45 20 55 53 45 44 20 46 4F 52 |.CAN BE USED FOR|
00000560: 20 54 45 4D 50 4F 52 41 52 59 20 53 54 4F 52 41 | TEMPORARY STORA|
00000570: 47 45 20 49 4E 0D 59 4F 55 52 20 4F 57 4E 20 50 |GE IN.YOUR OWN P|
00000580: 52 4F 47 52 41 4D 2E 0D 0D 0D C4 C9 D3 CB 20 C6 |ROGRAM........ .|
00000590: C9 CC C5 D3 20 D4 C8 C9 D3 20 D0 D2 CF C7 D2 C1 |.... .... ......|
000005A0: CD 20 D5 D3 C5 D3 3A 0D 0D D4 CF D4 C1 CC 20 C3 |. ....:....... .|
000005B0: CF CE D4 D2 CF CC 20 20 20 20 20 20 D4 2E D4 CF |...... ....|
000005C0: D4 C1 CC 20 C3 CF CE D4 D2 CF CC 0D 0D 20 20 20 |... ......... |
000005D0: 20 20 20 20 20 2A 2A 2A 2A 20 C5 4E 44 20 CF 46 | **** .ND .F|
000005E0: 20 D4 45 58 54 20 2A 2A 2A 2A 0D | .EXT ****. |
..^U:HACKER... TOTAL CONTROL
. BY. GARY
FIELDS...COMMODORE MAGAZINE.JULY 1987..
. IF YOUR WRITE YOUR OWN PROGRAMS,.YOU
PROBABLY USE INPUT STATEMENTS.A GREAT DE
AL OF THE TIME. INPUT.STATEMENTS PROMPT
THE USER OF A.PROGRAM FOR INFORMATION. W
HEN AN.ADVENTURE GAME PROMPTS YOU FOR A.
DIRECTION OR AN EDUCATIONAL PROGRAM.ASKS
YOU TO ENTER THE CAPITAL OF.NORTH DAKOT
A, INPUT STATEMENTS ARE.PROBABLY DOING T
HE WORK... UNFORTUNATELY, INPUT ACCEPTS
ALL OF.THE KEYS ON THE 64 KEYBOARD. AN
.ACCIDENTLY PRESSED CURSOR KEY WILL.MOVE
THE CURSOR AND OFTEN GARBLE THE.SCREEN;
A COMMA WILL PRODUCE AN EXTRA.IGNORED M
ESSAGE. YOUR OTHER OPTION.FOR ACCEPTING
USER INPUT, THE GET.STATEMENT, ALSO HAS
LIMITATIONS. GET,.FOR EXAMPLE, DOESN'T
PRINT TO THE.SCREEN OR GIVE A QUESTION M
ARK PROMPT.-- JUST TO NAME A COUPLE OF.D
RAWBACKS... GARY FIELDS' TOTAL CONTROL,
A.SUBROUTINE BUILT AROUND THE GET.STATE
MENT, OVERCOMES SOME OF THE.PROBLEMS ASS
OCIATED WITH GET AND.INPUT STATEMENTS US
ED ALONE. OUR.DEMO PROGRAM SHOWS HOW TH
E SUBROUTINE.CAN BE USED TO LIMIT THE NU
MBER AND.TYPE OF CHARACTERS ENTERED BY T
HE.USER...FINAL NOTES.-----------. USE
CAUTION WHEN USING THESE.VARIABLES IN YO
UR OWN PROGRAM: X, LE,.A, NU, AL, A$, B$
, AND C$. BECAUSE.THEY ARE USED BY THE S
UBROUTINE,.THEIR VALUES CHANGE EACH TIME
THE.ROUTINE IS CALLED. THESE VARIABLES
.CAN BE USED FOR TEMPORARY STORAGE IN.YO
UR OWN PROGRAM....DISK FILES THIS PROGRA
M USES:..TOTAL CONTROL T.TOTAL CONT
ROL.. **** END OF TEXT ****.
×
C64 Image
> CLICK IMAGE PREVIEW FOR FULL MODAL