LOOP2.BAS

Go back

Below you'll find the source for the QBasic file LOOP2.BAS.

I've been in doubt if I'd republish this file again. Mainly for a few reasons;
1. The stuff I made as a kid is very childish (which kinda makes sense)
2. Times have changed; what was funny/innovative or sharable in 1997 doesn't meet standards in 2024.
3. Most of the code doesn't run natively anymore on modern operating systems.
4. It's in the Dutch language, where most of my shared content is in English.

Still, I've decided to share this file. Keep in mind the age of this content though.

Download LOOP2.BAS for QBasic

'Declaratie van de functie Kleur
DECLARE FUNCTION Kleur! (blauw!, groen!, rood!)

'Foutmeldingen aan en gaat naar grafisch beeld
ON ERROR GOTO fout1
SCREEN 12
ON ERROR GOTO fout2

'Maakt het beeld op
   FOR gr = 0 TO 360
      c = c + 1: IF c > 11 THEN c = c - 11

      d = c - 1: IF d < 1 THEN d = d + 11
      e = d - 1: IF e < 1 THEN e = e + 11
      f = e - 1: IF f < 1 THEN f = f + 11
      PALETTE f, Kleur(0, 0, 0): PALETTE e, Kleur(63, 0, 0)
      PALETTE d, Kleur(0, 63, 0): PALETTE c, Kleur(0, 0, 63)
      FOR a = 0 TO 360 STEP 20
         DRAW "TA" + STR$(gr) + "BM320,240" + "BU" + STR$(a) + "C" + STR$(c) + "U10R10D10L10BU5BR2P" + STR$(c) + "," + STR$(c) + "TA" + STR$(360 - gr) + "BM320,240" + "BU" + STR$(a + 10) + "C" + STR$(c) + "U10R10D10L10BU5BR2P" + STR$(c) + "," + STR$(c)
      NEXT a
   NEXT gr
      c = 0: gr = 0
      FOR a = 0 TO 230 STEP 20
         DRAW "TA" + STR$(gr) + "BM320,240" + "BU" + STR$(a) + "C" + STR$(c) + "U10R10D10L10BU5BR2P" + STR$(c) + "," + STR$(c) + "TA" + STR$(360 - gr) + "BM320,240" + "BU" + STR$(a + 10) + "C" + STR$(c) + "U10R10D10L10BU5BR2P" + STR$(c) + "," + STR$(c)
      NEXT a
DO
   c = c + 1: IF c > 11 THEN c = 1
   d = c + 1: IF d > 11 THEN d = 1
   e = d + 1: IF e > 11 THEN e = 1
   f = e + 1: IF f > 11 THEN f = 1
   PALETTE d, Kleur(63, 0, 0)
   PALETTE e, Kleur(0, 63, 0)
   PALETTE f, Kleur(0, 0, 63)
   PALETTE c, Kleur(0, 0, 0)
LOOP WHILE INKEY$ = ""

'Einde van de demo (gaat terug naar DOS-scherm)
SCREEN 0
WIDTH 80, 25
PRINT "This demo is made by:"
PRINT , , "Stefan Thoolen"
PRINT , , "-Address removed-"
PRINT , , "48** **  Breda"
PRINT , , "The Netherlands"
SYSTEM

'Foutmeldingen
fout1: PRINT "Uw monitor is niet goed; dit vereist een VGA monitor (SCREEN 12)": SYSTEM
fout2: PRINT "Onverwachte fout nr."; ERR; "gevonden": SYSTEM

FUNCTION Kleur (blauw, groen, rood)
   Kleur = 65536 * blauw + 256 * groen + rood
END FUNCTION