Some of you young folks been saying to me Hey Pops, what you mean 'What a wonderful world'?" How about all them wars all over the place? You call them wonderful? And how about hunger and pollution? That ain't so wonderful either. Well how about listening to old Pops for a minute. Seems to me, it aint the world that's so bad but what we're doin' to it. - Louis Armstrong (August 4, 1901 -- July 6, 1971), nicknamed Satchmo or Pops
source
compile
sandbox
issues?
back to examples
DEFINE STRING SPACE 512
DEFINE STRING COUNT 64
DEFINE TASK COUNT 2
TILEMAP ENABLE(16)
COLOR BORDER WHITE
CLS WHITE
GLOBAL soundtrack
PROCEDURE sountrackLoad ON VIC20
soundtrack := LOAD MUSIC("what_a_wonderful_world.mid")
MUSIC soundtrack
END PROC
PARALLEL PROCEDURE rotatingEarth ON VIC20
earth := LOAD IMAGES("earth_128x128_2colors.gif") FRAME SIZE AUTO
POSITIVE CONST centerX = ( SCREEN WIDTH - 128 ) \ #2
POSITIVE CONST frameMax = FRAMES(earth) - 1
DIM frame AS BYTE
DIM t AS WORD
DIM delay AS WORD
t = TIMER
delay = ( TICKS PER SECOND / 5 )
DO
WAIT WHILE ( TIMER - t ) < delay
t = TIMER
PUT IMAGE earth FRAME frame AT centerX, 0
ADD frame, 1, 0 TO frameMax
LOOP
END PROC
PARALLEL PROCEDURE printLyrics ON VIC20
DIM line AS BYTE
DIM t AS WORD
DIM delay AS WORD
t = TIMER
delay = 2 * TICKS PER SECOND
DO
WAIT WHILE ( TIMER - t ) < delay
t = TIMER
LOCATE 0, SCREEN ROWS - 2
CLINE
LOCATE 0, SCREEN ROWS - 3
CLINE
INK RED
SELECT CASE line
CASE 0
CENTER "I see trees of green";
CASE 1
CENTER "Red roses too";
CASE 2
CENTER "I see them bloom";
CASE 3
CENTER "For me and you";
CASE 4
CENTER "And I think to myself";
CASE 5
CENTER "What a wonderful world!";
CASE 7
CENTER "I see skies of blue";
CASE 8
CENTER "And clouds of white";
CASE 9
CENTER "The bright blessed day";
CASE 10
CENTER "The dark sacred night";
CASE 11
CENTER "And I think to myself";
CASE 12
CENTER "What a wonderful world";
CASE 13
CENTER "The colors of the rainbow";
CASE 14
CENTER "So pretty in the sky";
CASE 15
CENTER "Are also on the faces";
CASE 16
CENTER "Of people going by";
CASE 17
CENTER "I see friends shaking hands";
CASE 18
CENTER "Saying, How do you do?";
CASE 19
CENTER "They're really saying";
CASE 20
CENTER "I love you...";
CASE 21
CENTER "I hear babies cry";
CASE 22
CENTER "I watch them grow";
CASE 23
CENTER "They'll learn much more";
CASE 24
CENTER "Than I'll ever know";
CASE 26
CENTER "And I think to myself";
CASE 27
CENTER "What a wonderful world";
CASE 28
CENTER "Yes, I think to myself";
CASE 30
CENTER "What a wonderful world";
CASE 32
CENTER "Ooh, yes...";
ENDSELECT
INC line
LOOP
END PROC
sountrackLoad[] ON VIC20
SPAWN rotatingEarth ON VIC20
SPAWN printLyrics ON VIC20
The instructions here refer to compiling the example from the command line. For Microsoft Windows
users we suggest using UGBASIC-IDE, which allows
you to download and compile each single example with just one click.
Are instructions for your specific home computer / console missing? First of all, check if your computer
is supported by clicking here. If so, since ugBASIC is a language which does not provide abstractions, it is possible
that this example will not work on your target. If you think this is an issue, please click here.
In order to compile the example, type this command on the command line:
Linux
ugbc.vic20 -O prg -o contrib_what_a_wonderful_world.prg contrib_what_a_wonderful_world.bas
Windows
ugbc.vic20.exe -O prg -o contrib_what_a_wonderful_world.prg contrib_what_a_wonderful_world.bas
For Microsoft Windows users we suggest using UGBASIC-IDE, which allows
you to download and compile this example with just one click.
If you have found a problem trying to run this example, if you think there is a bug or, more
simply, you would like it to be improved, open an issue for this example on GitHub.
Thank you!
open an issue
BACK TO EXAMPLES