Skip to content

Oracle

C64 · BASIC

Ask a question, get an answer from the machine

6 units

Start with Ask the Oracle Browse lessons
Oracle course capture
Oracle · C64

In Skyline the machine drew. Here it answers. Oracle is a fortune-teller: you type a yes/no question, the C64 mulls it over, and a reply appears — one of many, picked at random, dressed in a mood. The trick at its heart is chance: you write every answer, but the player never knows which one is coming.

A C64 screen with a green border: the question WILL I BE RICH and the Oracle's green answer IT IS CERTAIN.
Where you're headed: a question, a pause while the Oracle thinks, and an answer that arrives in a mood — green for yes, red for no — ready to ask again.

This is your first program that makes a decision. RND is the decision-maker, and you’ll meet it twice: first to pick between answers, then as an index into a whole list of them. A pause and a tone make the Oracle seem to think; colour gives each reply a feeling; and a loop turns a one-shot program into something you consult.

What you’ll build:

  • A question the machine takes with INPUT, and a single fixed answer
  • A reply chosen at random with RND and ON…GOTO
  • A list of eight answers in a string array, picked by RND as an index
  • A thinking pause — a delay and a SID tone — that builds suspense
  • A mood in colour: green for yes, red for no, set before the words appear
  • An ask-again loop, so one sitting holds many questions

6 units. About 5–6 hours. This follows Skyline and builds on Meet C64 BASIC.