// How to play
Two geography questions. Type the letter of your answer and press Enter; after the second one the program gives you its verdict. It compares exactly what you type, so use lower case. An empty answer ends the program. When it ends, press any key to run it again. On a phone, use the keys under the window (⌨ opens the full keyboard).
// Revisited
Rebuilt from QUIZ.BAS (April 2001), which QuickBASIC 4.5 saved in its binary, tokenized format rather than as text. A small detokenizer written for this port decoded the whole program: every opcode was identified, the 76 lines match the line count QB stored in the file, and an independent decoder (qb45detok) gives the same listing. The JavaScript follows that listing line by line, with the original line numbers as GOTO targets and the original variable names (d, c, e, a$).
The texts are the original ones, typed on a Catalan DOS setup in code page 850. That is why the first verdict reads PATÀN and IMBÈCIL. The page imitates CLS, PRINT, INPUT and SLEEP: keys typed early wait in the keyboard buffer, and a waiting key cuts the next SLEEP short. INPUT "Resposta: ", a$ uses a comma, so QuickBASIC showed no ? after the prompt.
Quirks kept as they were: on the first question d jumps to the same line as b (lines 4 and 5 are never reached), anything unexpected at question 1 scores as wrong, and at question 2 falls through to the Russia branch and scores as right. There is also a fifth answer the screen never lists; the top verdict tells you how you must have found it. The only thing added is what happens after END: like the QuickBASIC environment, the page shows Press any key to continue, and here a key runs the quiz again.