i wrote my first C64 program
i wrote my first C64 program
I can't believe it, I learn the basic commands in a day, and in the same day, I write a Commodore 64 program (about 80+ lines of code)..
Tell me what you guys think, it's a Quiz program, to a disney cartoon called "American Dragon"..
i know of atleast one thing I forgot to add, on the title screen for it, it needs the Copywrite to Disney, that way they don't get on my case about it, and at the end, I probably should supply my public email address...
remember, i JUST learned C64 BASIC today (and BASIC all together), so this program is VERY dull, and doesn't even keep score------yet... (if anyone knows how you do that, PLEASE let me know)...
http://blackevilweredragon.spymac.com/adjlquiz.zip
(you don't need to know the answers to the questions if you just want to BETA test it.. just pushing enter/return will give incorrect responses, with the correct answer being displayed..
EDIT: Here's a bug I found, can anyone help me on this one? On questions 8 and 10, just pushing return or enter, yields a "correct" response, not a "incorrect" response.. What gives? I looked at the coding, and from what I see, it's all good..
Tell me what you guys think, it's a Quiz program, to a disney cartoon called "American Dragon"..
i know of atleast one thing I forgot to add, on the title screen for it, it needs the Copywrite to Disney, that way they don't get on my case about it, and at the end, I probably should supply my public email address...
remember, i JUST learned C64 BASIC today (and BASIC all together), so this program is VERY dull, and doesn't even keep score------yet... (if anyone knows how you do that, PLEASE let me know)...
http://blackevilweredragon.spymac.com/adjlquiz.zip
(you don't need to know the answers to the questions if you just want to BETA test it.. just pushing enter/return will give incorrect responses, with the correct answer being displayed..
EDIT: Here's a bug I found, can anyone help me on this one? On questions 8 and 10, just pushing return or enter, yields a "correct" response, not a "incorrect" response.. What gives? I looked at the coding, and from what I see, it's all good..
Look at lines 20 and 30:
These lines force you to type YES, otherwise your program is terminated. When you just hit Enter at the following INPUT commands (line 80, 140, 200, 270, etc.), the variable ANSWER$ still contains the word YES.
Now look at line 610:
This is true when you did not enter anything at the previous questions and line 640 will display the "CORRECT" message.
You can change line 600 to
Code: Select all
20 INPUT ANSWER$
30 IF ANSWER$="YES" THEN GOTO 60
Now look at line 610:
Code: Select all
610 IF ANSWER$="YES" THEN GOTO 640
You can change line 600 to
Code: Select all
600 ANSWER$="":INPUT ANSWER$
ill try and give that a shot... i've never used an input command like that before (heck, i didn't use the input command i DID use before yesterday)..K.C. wrote:Look at lines 20 and 30:These lines force you to type YES, otherwise your program is terminated. When you just hit Enter at the following INPUT commands (line 80, 140, 200, 270, etc.), the variable ANSWER$ still contains the word YES.Code: Select all
20 INPUT ANSWER$ 30 IF ANSWER$="YES" THEN GOTO 60
Now look at line 610:This is true when you did not enter anything at the previous questions and line 640 will display the "CORRECT" message.Code: Select all
610 IF ANSWER$="YES" THEN GOTO 640
You can change line 600 toCode: Select all
600 ANSWER$="":INPUT ANSWER$
thanks for giving a look at the code, and finding out the bug
Use a print statement with a press of the CLR/HOME key in between quotes. You should see an inverted heart. That will clear your screen.
If you're starting out with BASIC programming on the Commodore 64, I would suggest that you have a look at the Commodore 64 Programmer's Reference Guide. It's filled with all kinds of useful information. You might be interested in the Secret Society of Commodore Coders message forum. It's a good place to ask these kinds of questions and get general programming advice, be it about BASIC or machine language (or anything else you can think of).
If you're starting out with BASIC programming on the Commodore 64, I would suggest that you have a look at the Commodore 64 Programmer's Reference Guide. It's filled with all kinds of useful information. You might be interested in the Secret Society of Commodore Coders message forum. It's a good place to ask these kinds of questions and get general programming advice, be it about BASIC or machine language (or anything else you can think of).
Call me Golan; my parents did.
that didn't work quite well..gklinger wrote:Use a print statement with a press of the CLR/HOME key in between quotes. You should see an inverted heart. That will clear your screen.
If you're starting out with BASIC programming on the Commodore 64, I would suggest that you have a look at the Commodore 64 Programmer's Reference Guide. It's filled with all kinds of useful information. You might be interested in the Secret Society of Commodore Coders message forum. It's a good place to ask these kinds of questions and get general programming advice, be it about BASIC or machine language (or anything else you can think of).
when I pushed Clear Home, I saw an inverted S, and when i ran the program, while it did move the cursor up to the top left, the screen didn't clear, and it confused the heck out of the program, as it overlaid the printed text on top of text already there, essentially making the INPUT useless, crashing the program..
Whoops. Hold shift when you press CLR/HOME. That will give you the inverse heart which will clear the screen. Without the shift you get a home (top left corner) without a clear. Sorry about that. The first thing you should do is have a look through the Commodore 64 User Manual which will familiarize you with the basic (no pun intended) operations of the C64 (like clearing the screen). There's also some information about programming the C64 in BASIC.
Call me Golan; my parents did.
-
- Posts: 3
- Joined: Thu Dec 27, 2007 8:11 am
- Location: Minnesota
- Contact: