VIC-20 Listings

Books > 101 Programming Tips & Tricks (US)


101 Programming Tips & Tricks For the VIC-20 and Commodore 64 (US)
Howard Adler
ARCsoft Publishers, 1983

Download all programs from this book on one disk:


101 Prog Tips.d64

101 programs (100% complete)

Fun & Games

Program Author Requirements Files Info
Coin Toss

Page 16.
Howard Adler Unexpanded coin toss.prg
Screenshot
Toss a coin and display whether it came up heads or tails.

Controls:
Return (toss coin).
Traditional Dice Roll

Pages 16-17.
Howard Adler Unexpanded trad dice roll.prg
Screenshot
Roll two dice and display the numbers.

Controls:
Return (roll dice).
See Two Dice

Pages 17-18.
Howard Adler Unexpanded see two dice.prg
Screenshot
Roll two dice and display the numbers similar to real dice.

Controls:
Return (roll dice).
See Four Dice

Pages 18-19.
Howard Adler Unexpanded see four dice.prg
Screenshot
Roll four dice and display the numbers similar to real dice.

Controls:
Return (roll dice).
Secret Message

Pages 19-20.
Howard Adler Unexpanded secret message.prg
Screenshot
Displays a random number beside each letter of the alphabet. Could be used to write secret messages.

Controls:
Return (run again).
Sound Off

Page 20.
Howard Adler Unexpanded sound off.prg
Screenshot
Beeps ten times, by turning the volume on and off.

Controls:
None.
R2D2 Sound Effect

Page 21.
Howard Adler Unexpanded r2d2 sound fx.prg
Screenshot
Robotic sound effect, similar to R2D2 from the Star Wars films.

Controls:
None.
Piano

Pages 21-22.
Howard Adler Unexpanded piano.prg
Screenshot
Piano program, use the computer as a musical keyboard.

Controls:
A-G (play note).
Mystery Clues

Pages 22-23.
Howard Adler Unexpanded mystery clues.prg
Screenshot
Solve a murder mystery by naming who did it. The program only offers one clue.

Controls:
Type your suspect.
Original Hi/Lo Game

Pages 23-25.
Howard Adler Unexpanded hi-lo game.prg
Screenshot
Number guessing game. Guess a random number from 1-100.

Controls:
Type your guess.
Code Groups

Pages 25-26.
Howard Adler Unexpanded code groups.t64
Screenshot
Two programs that display strings of five random letters. Perhaps to generate passwords or use in Morse code practice? One outputs to the screen, the other outputs to the printer.

Controls:
None.
60-Second Timer

Pages 26-27.
Howard Adler Unexpanded 60-second timer.prg
Screenshot
Counter that ticks the seconds, then rings an alarm. Possibly useful for board games etc.

Controls:
None.
Find Highest/Lowest

Page 28.
Howard Adler Unexpanded find hi-lo.prg
Screenshot
Enter a list of names & scores, to find out who had the lowest & highest score.

Controls:
Enter each name & score. Press Return (enter a blank name) when finished.
Sorting Scores

Pages 28-30.
Howard Adler Unexpanded sorting scores.prg
Screenshot
Enter a list of scores, to find out the lowest & highest values.

Controls:
Enter each number. Enter 0 when finished.
Keeping Game Scores

Pages 30-31.
Howard Adler Unexpanded keeping scores.prg
Screenshot
A wealthy Duke has been murdered. Can you guess who did it?

Controls:
Enter your guess.
Batting Average

Pages 31-32.
Howard Adler Unexpanded batting average.prg
Screenshot
Calculate your batting average.

Controls:
Follow on-screen prompts.
Computer Rating Service

Pages 32-33.
Howard Adler Unexpanded computer rating.prg
Screenshot
Calculate your batting average & rating.

Controls:
Follow on-screen prompts.
Box Score

Pages 33-34.
Howard Adler Unexpanded box score.prg
Screenshot
Enter some text (exactly 10 characters) and it will be displayed in a box.

Controls:
Enter 10 characters.

Text On Text

Program Author Requirements Files Info
Create a Quiz

Pages 36-37.
Howard Adler Unexpanded create a quiz.prg
Screenshot
Quiz, test your knowledge of American presidents.

Controls:
Enter the answer.
Killing Time

Pages 37-38.
Howard Adler Unexpanded killing time.prg
Screenshot
Calculate the total of all numbers between 1 and N.

Controls:
Enter a number.
Word-Error Trapping

Pages 38-39.
Howard Adler Unexpanded word-error trap.prg
Screenshot
How to error-trap string inputs.

Controls:
Enter 'yes' or 'no'.
Character Numbers

Page 39.
Howard Adler Unexpanded char numbers.prg
Screenshot
Displays a list of characters and their ASCII codes.

Controls:
None.
One-Time Password

Page 40.
Howard Adler Unexpanded one-time psw.prg
Screenshot
Add a password to a program. It gives you one attempt to enter the correct password.

Controls:
Enter the password (elephant).
Three-Tries Password

Pages 40-41.
Howard Adler Unexpanded three-tries psw.prg
Screenshot
Add a password to a program. It gives you three attempts to enter the correct password.

Controls:
Enter the password (elephant).
Multiple Passwords

Pages 41-42.
Howard Adler Unexpanded multiple psw.prg
Screenshot
Add a username & password to a program. There are four account numbers, each with a different password. You have three attempts to enter the correct password.

Controls:
Enter the account number and password.
Name in a Box

Pages 42-43.
Howard Adler Unexpanded name in a box.prg
Screenshot
Type a name (max 19 chars) and it will be displayed in a box.

Controls:
Enter a name.
Entering: Letter Stop

Pages 43-44.
Howard Adler Unexpanded enter ltr stop.prg
Screenshot
Calculate the total of a list of numbers.

Controls:
Enter the numbers, then enter 'X' to finish.
Entering: Zero Stop

Pages 44-45.
Howard Adler Unexpanded enter zero stop.prg
Screenshot
Calculate the total of a list of numbers.

Controls:
Enter the numbers, then enter '0' to finish.
Super Reverser

Page 45.
Howard Adler Unexpanded super reverser.prg
Screenshot
Enter a number or string, and it will be reversed.

Controls:
Enter some text.
Marching Numbers

Page 46.
Howard Adler Unexpanded march numbers.prg
Screenshot
Fills the screen with the numbers 1-9.

Controls:
None.
Super Decision Maker

Pages 46-47.
Howard Adler Unexpanded decision maker.prg
Screenshot
Decision maker, randomly displays one of eight responses.

Controls:
None.
Sentence Writer

Page 47.
Howard Adler Unexpanded sentence writer.prg
Screenshot
The computer will write a sentence.

Controls:
Enter a plural noun, a verb and a singular noun.
Categorizing

Pages 48-51.
Howard Adler Unexpanded categorizing.prg
Screenshot
Summarize and categorize essay scores. Enter the score of each essay that you mark, and it will display the min, max, mean and median scores. It also lists how many essays scored A (90-100), B (80-89), C (71-79), D (60-69) or F (0-59).

Controls:
Enter the scores, and type 'X' when finished.
Alphabet Soup

Pages 51-52.
Howard Adler Unexpanded alphabet soup.prg
Screenshot
Lists random letters and their position in the alphabet (A=1, B=2... Z=26).

Controls:
None.
Create a Table

Pages 52-53.
Howard Adler Unexpanded create a table.prg
Screenshot
Each column shows how many times it had to use the random number generator to obtain a value greater than fifty.

Controls:
None.
Question & Answer

Pages 53-54.
Howard Adler Unexpanded question answer.prg
Screenshot
Quiz. Test your knowledge of the calendar, by answering how many days are in each month.

Controls:
Enter the correct answer to each question.

Gee Whiz

Program Author Requirements Files Info
Gee Whiz I: Smart Adder

Page 56.
Howard Adler Unexpanded smart adder.prg
Screenshot
Add up all the values between 1 and a selected number.

Controls:
Enter a number.
Gee Whiz II: Three-Digit Mystery

Page 57.
Howard Adler Unexpanded three-digit mys.prg
Screenshot
Choose a three-digit number where all three digits are the same (e.g. 777). Tell the computer the sum of those digits (e.g. 7 + 7 + 7 = 21) and it will calculate your number.

Controls:
Enter a number.
Gee Whiz III: Yes/No Decision Maker

Pages 57-58.
Howard Adler Unexpanded yes-no decision.prg
Screenshot
Make a yes/no decision using random numbers.

Controls:
Press any key.
Gee Whiz IV: First Alphabet Spotter

Page 58.
Howard Adler Unexpanded first alphabet.prg
Screenshot
Find out what letter is at a specific position in the alphabet, e.g. letter 17 is Q.

Controls:
Enter a number.
Gee Whiz V: Second Alphabet Spotter

Page 59.
Howard Adler Unexpanded second alphabet.prg
Screenshot
Another program to find out what letter is at a specific position in the alphabet, e.g. letter 17 is Q. This uses a different method to calculate the answer.

Controls:
Enter a number.
Gee Whiz VI: Guess The Number

Pages 59-60.
Howard Adler Unexpanded guess number.prg
Screenshot
Another number guessing game. The computer picks a random number from 1-100. Can you work out what it is?

Controls:
Enter your guess.

Number Crunching

Program Author Requirements Files Info
Memory Tester

Page 62.
Howard Adler Unexpanded memory tester.prg
Screenshot
Memory game. A random number is briefly shown on the screen, which you must repeat without making any mistakes. The number gets longer after each correct answer.

Controls:
Enter the number.
Number Reverser

Page 63.
Howard Adler Unexpanded number reverser.prg
Screenshot
Enter a three-digit number, and it will be shown in reverse order.

Controls:
Enter a three-digit number.
Exam Score Sorter

Pages 63-64.
Howard Adler Unexpanded exam score sort.prg
Screenshot
When marking essays, quickly work out how many papers have been given each grade.

Controls:
Enter the grade of each paper by pressing A, B, C, D or F. Press X to finish.
Number-Error Trap

Pages 64-65.
Howard Adler Unexpanded number-err trap.prg
Screenshot
How to error trap number inputs. It only accepts numbers between 10-100.

Controls:
Enter a number.
Standard Deviation

Pages 65-66.
Howard Adler Unexpanded std deviation.prg
Screenshot
Calculate the sum, mean, variance and standard deviation for a set of numbers.

Controls:
Enter the numbers, and press 999999999 (nine nines) when finished.
Percentages

Pages 66-67.
Howard Adler Unexpanded percentages.prg
Screenshot
Convert percentages into their equivalent decimal amount.

Controls:
Enter a percentage.
Logic Functions

Pages 67-68.
Howard Adler Unexpanded logic func.t64
Screenshot
Two programs demonstrating logic with variables.

Controls:
None.
Above & Below a Line

Pages 68-69.
Howard Adler Unexpanded above below.prg
Screenshot
Enter some numbers between 1-100, and the computer will display how many were below 50 and how many were above 50.

Controls:
Enter some numbers, and use 0 when finished.
Factoring

Pages 69-70.
Howard Adler Unexpanded factoring.prg
Screenshot
Calculate the factors of a number, i.e. all the numbers it can be divided by except 1 and itself.

Controls:
Enter a number.
Which is Smallest?

Page 70.
Howard Adler Unexpanded which smallest.prg
Screenshot
Find the smallest value from a set of numbers.

Controls:
Enter some numbers, and use 0 when finished.
Which is Largest?

Page 71.
Howard Adler Unexpanded which largest.prg
Screenshot
Find the largest value from a set of numbers.

Controls:
Enter some numbers, and use 0 when finished.
Reciprocals

Pages 71-72.
Howard Adler Unexpanded reciprocals.prg
Screenshot
Calculate the reciprocal of a number.

Controls:
Enter a number.
Dump the Integer

Page 72.
Howard Adler Unexpanded dump integer.prg
Screenshot
Displays the fractional part of a number.

Controls:
Enter a number.
Averages

Page 73.
Howard Adler Unexpanded averages.prg
Screenshot
Find the mean of a set of numbers.

Controls:
Enter some numbers, and use 0 when finished.
Mid-Range Number

Pages 73-74.
Howard Adler Unexpanded mid-range num.prg
Screenshot
Find the median of a set of numbers.

Controls:
Enter some numbers, and use 0 when finished.
Rounding Off

Pages 74-75.
Howard Adler Unexpanded rounding off.t64
Screenshot
Two programs for rounding decimal numbers. Prog1 rounds .5 down to the lower integer value, and prog2 rounds .5 up to the next integer value.

Controls:
Enter a number.
Two-Digit Round Off

Pages 75-76.
Howard Adler Unexpanded two-digit round.prg
Screenshot
Round a number to two decimal places.

Controls:
Enter a number.
Percent to Decimal

Pages 76-77.
Howard Adler Unexpanded percent decimal.prg
Screenshot
Add sales tax to a transaction.

Controls:
Enter the purchase price and tax percentage.
Every 10th Answer

Page 77.
Howard Adler Unexpanded every 10th answ.prg
Screenshot
Generates random numbers from 0-999, but only displays every tenth number generated.

Controls:
None.
Random Sampler

Pages 77-78.
Howard Adler Unexpanded random sampler.prg
Screenshot
Generates 100 random numbers, and reports how many of them were below 50 and above 50.

Controls:
None.
Random Numbers: Zero to Nine

Pages 78-79.
Howard Adler Unexpanded random num 0-9.prg
Screenshot
Generates random numbers from 0-9.

Controls:
None.
Random Numbers: Distribution

Pages 79-80.
Howard Adler Unexpanded random num dist.prg
Screenshot
Generates 100 random numbers from 0-9, and displays their distribution.

Controls:
None.
Random Numbers: Averages

Page 81.
Howard Adler Unexpanded random num ave.prg
Screenshot
Generates 100 random numbers from 0-9, and calculates the total & average values.

Controls:
None.
Random Numbers: Sorting High/Low

Pages 81-82.
Howard Adler Unexpanded random num hilo.prg
Screenshot
Generates 100 random numbers from 0-999, and displays the lowest & highest values.

Controls:
None.

Money Matters

Program Author Requirements Files Info
Money Grows

Pages 84-85.
Howard Adler Unexpanded money grows.prg
Screenshot
Calculate the monthly compound interest on a deposit.

Controls:
Enter the principal amount, interest rate, and number of months.
Shopper's Friend

Pages 85-86.
Howard Adler Unexpanded shoppers friend.prg
Screenshot
Calculate the price/unit for two items, to see which is the best value.

Controls:
Enter the brand, quantity and price of two items.
Car Payments

Pages 87-88.
Howard Adler Unexpanded car payments.prg
Screenshot
Calculate how much it would cost to buy a new car.

Controls:
Enter the purchase price, down payment, number of months and interest rate.
To Nearest 95 Cents

Pages 88-89.
Howard Adler Unexpanded nearest 95cents.prg
Screenshot
Calculate the retail price of an item rounded to the nearest 95 cents.

Controls:
Enter the manufacturing cost and pricing multiplier.
To the Nearest Penny

Page 90.
Howard Adler Unexpanded nearest penny.prg
Screenshot
Round prices to the nearest penny.

Controls:
Enter a price.
Mark Up

Page 91.
Howard Adler Unexpanded mark up.prg
Screenshot
Calculate the retail price from a wholesale cost and mark up. For example, if an item retails at $33.25 and you buy it with a 40% discount, then you will be paying $19.95.

Controls:
Enter the wholesale cost and mark up percentage.
Percentage Off

Pages 91-92.
Howard Adler Unexpanded percentage off.prg
Screenshot
Calculate a percentage discount on a retail price.

Controls:
Enter the price and percentage discount.
Dollars & Cents

Pages 92-93.
Howard Adler Unexpanded dollars cents.prg
Screenshot
Displays a price in either dollars or cents.

Controls:
Enter the quantity and total cost of a purchase.
Wages & Hours

Pages 92-93.
Howard Adler Unexpanded wages hours.prg
Screenshot
Calculate your gross weekly wages. Overtime is automatically added at time-and-a-half over 40 hours.

Controls:
Enter the hourly rate and number of hours worked.
Invoicing

Pages 94-95.
Howard Adler Unexpanded invoicing.prg
Screenshot
Calculate the figures needed to write an invoice.

Controls:
Enter the quantity sold, unit price, sales tax percentage and shipping charges.
Unit Price

Pages 95-96.
Howard Adler Unexpanded unit price.prg
Screenshot
Calculate the unit price of an item.

Controls:
Enter the item name, quantity bought and total price paid.
Inventory Counter

Pages 96-99.
Howard Adler Unexpanded inventory count.prg
Screenshot
Calculate how many items are in stock. It can keep track of ten product lines.

Controls:
Enter the item code (1-9) and quantity. Enter item code '0' to view the totals.
Daily Code

Pages 99-100.
Howard Adler Unexpanded daily code.prg
Screenshot
Generate a random 4-digit number for each day of the week.

Controls:
None.
Daily Receipts Adder

Pages 100-102.
Howard Adler Unexpanded daily receipts.prg
Screenshot
Add up your wholesale and retail receipts.

Controls:
Enter each value, and press Return (blank entry) when finished.
Advertising Cost-per-Thousand

Pages 102-103.
Howard Adler Unexpanded ad per thousand.prg
Screenshot
Calculate the most cost-efficient way of placing advertisements by working out how much an advert costs for every 1000 potential customers.

Controls:
Enter the ad cost and circulation.
Advertising Cost-per-Unit

Pages 103-104.
Howard Adler Unexpanded ad per unit.prg
Screenshot
Calculate how much adverts cost in relation to the number of items sold.

Controls:
Enter the ad cost and units sold.
Making Change

Pages 104-106.
Howard Adler Unexpanded making change.prg
Screenshot
Calculate how much change to give to customers.

Controls:
Enter the sale total, and the amount of money tendered by the customer.
Single-Digit Adder

Pages 106-107.
Howard Adler Unexpanded single-digit ad.prg
Screenshot
Adding machine, calculate the total of multiple single-digit numbers using the fewest possible keypresses.

Controls:
1-9 (add that number to the total), C (clear totals).
Currency Converter

Pages 107-109.
Howard Adler Unexpanded currency conv.prg
Screenshot
Convert to/from dollars into another currency.

Controls:
Enter the currency name, direction (from/to), exchange rate and amount.
Fractional Feet

Pages 109-110.
Howard Adler Unexpanded fractional feet.prg
Screenshot
Convert decimal feet into feet & inches.

Controls:
Enter a decimal value.
Simulated RPN Calculator

Pages 110-111.
Howard Adler Unexpanded rpn calculator.prg
Screenshot
Simulates an RPN calculator. For example, if you type "2 + 5 *" then it displays the answer 10. Note: it only displays answers on the screen, not the numbers you type in when entering calculations.

Controls:
Use keys 1-9 and +,-,*,/.
60-Second Timer (v2)

Pages 111-112.
Howard Adler Unexpanded 60-sec timer.prg
Screenshot
Another countdown timer that runs for 60 seconds, then rings an alarm. Possibly useful for board games etc.

Controls:
None.
Stopwatch

Pages 112-113.
Howard Adler Unexpanded stopwatch.prg
Screenshot
Countdown timer. Select how many seconds you want it to run.

Controls:
Enter a duration.
Shipments

Pages 113-115.
Howard Adler Unexpanded shipments.prg
Screenshot
Display a bar chart showing your shipments for 12 months.

Controls:
Enter a value (1-17) for each month.
Marketing Performance

Pages 115-118.
Howard Adler Unexpanded marketing perf.prg
Screenshot
Display a bar chart showing your marketing performance for 12 quarters.

Controls:
Enter a value (0-17) for each quarter.
Cash Receipts Comparer

Pages 118-120.
Howard Adler Unexpanded cash receipts.prg
Screenshot
Display a bar chart showing your cash receipts for six months.

Controls:
Enter a value (0-17) for each month.

Colorful Graphics

Program Author Requirements Files Info
Box

Page 122.
Howard Adler Unexpanded box.prg
Screenshot
Displays a box on the screen.

Controls:
None.
Graphic-Screen Familiarization Tour

Pages 122-123.
Howard Adler Unexpanded gfx-screen fam.prg
Screenshot
POKEs a specific screen location, to show you where it appears on the screen.

Controls:
Enter a screen location (7680-8185).
Graphic-Screen Character Spotter

Pages 123-124.
Howard Adler Unexpanded gfx-screen char.prg
Screenshot
Fills the screen with a specific character.

Controls:
Enter a character code (0-255).
Dancing Spot

Page 124.
Howard Adler Unexpanded dancing spot.prg
Screenshot
Displays a spot that randomly changes colour.

Controls:
None.
Beautiful Braided Rug

Pages 124-125.
Howard Adler Unexpanded braided rug.prg
Screenshot
Fills the screen with a colourful random pattern.

Controls:
None.
Screen Filler

Pages 125-126.
Howard Adler Unexpanded screen filler.t64
Screenshot
Two programs that fill the screen. One uses @ symbols, the other uses random characters.

Controls:
None.
Snowfall

Page 126.
Howard Adler Unexpanded snowfall.prg
Screenshot
Fills the screen with snowflakes.

Controls:
Press * to restart or quit.
Making Things Move

Page 127.
Howard Adler Unexpanded making move.prg
Screenshot
Moves a dot across the screen.

Controls:
None.
Drawing Sketches

Pages 127-128.
Howard Adler Unexpanded draw sketches.prg
Screenshot
Simple art program, draw your own pictures.

Controls:
U (up), D (down), L (left), R (right).

Notes

  1. Slightly different versions of some programs, e.g. Daily Code and Unit Price, were also published in 34 VIC-20 Computer Programs for Home, School & Office.

With thanks to DLH's Commodore Archive for making this book available in PDF format.

VIC-20 Listings <http://www.vic20listings.freeolamail.com/>
Copyright (C) R.M. Smedley 2022, All Rights Reserved.
This page was last updated 27-Aug-2022.