ISOLATION JOKES - for all CPCs - by G Camp, 2020
Short programme to load/display jokes to help through these social isolation
times. A little laughter helps, and just putting joke file together has
helped with my sanity.
"JOKES.BAS" is the main file and runs in mode 2. "JOKES1.BAS" is an early mode
1 version and is included here for those that prefer that resolution, but it
does have limitations - longer jokes may scroll off the screen, you are stuck
with the colour scheme I programmed it with!
Joke files are loaded at random and jokes are displayed in a random order. A
new joke file loaded every 10 jokes to give a better chance of variety.
Colour scheme can be changed on the intro screen and also when ever the screen
is not actively being written to - press 0-9.
All jokes are kid safe, ie sexual jokes have not been included. Some jokes may
offend some groups as some humour is based on stereotypes - appologies for
offending anyone.
There is no 'QUIT' shortcut - just press escape!
PROGRAMME ADJUSTMENTS:
You can add your own joke files in a format as described below. Any files must
be sequentually named with no gaps else loading errors may occur.
Edit line 120 after you have added a joke file to the disc:
'jfiles'=number of joke files available
'jmx'=number of jokes told before a new joke file is loaded
Colour schemes choices can be changed by editing lines 530-610
JOKE FILES:
Jokes are held in files named "j1.bin" to "j??.bin" and are loaded at &6800
Format is:
1st byte - number of jokes in the file
Jokes Address Table - 2 byte pointer of adress of each joke - in order
jokes - jokes!
- If first byte is 0 the joke is a Q/A joke
- if Q/A joke then Answer stars with a 255 byte
- All jokes end with a 255 byte
- A '1' byte in the middle of a joke means "print to a new line here"
- A '2' byte in the middle of a joke means "print a double line space"
Easiest was to make a joke file is to use an assembler (there is no programming
involved, just editing text - winAPE is good for this as you can cut/paste from
a text file/the internet/etc while in windows. A sample .asm file is on this disc.
A collection of .asm files used to make the joke files on this disc is included
in this zip file.
Test your joke files by running JOKETEST.BAS - after you have edited the joke
file name in line 1, This a cut down version of the jokes programme that will
show each joke in a file in order so that any errors in the files can be found
and any improvements in a jokes layout can be edited. HINT: You can use this
to look at all the jokes in any of the included joke files.
ENJOY and KEEP SAFE