ebook img

Basic Subroutines For Commodore Computers PDF

323 Pages·1983·27.809 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Basic Subroutines For Commodore Computers

BASIC SUBROUTINES FOR COMMODORE COMPUTERS COMMODORE 64 VIC-20 PET EDDIE ADAMIS BASIC SUBROUTINES FOR COMMODORE COMPUTERS Adamis Wiley Press BASIC Subroutines for Commodore Computers MORE THAN TWO MILLION PEOPLE HAVE LEARNED TO PROGRAM, USE, AND ENJOY MICROCOMPUTERS WITH WILEY PRESS GUIDES. LOOK FOR THEM ALL AT YOUR FAVORITE BOOSKHOP OR COMPUTER STORE. ANS COBOL, 2nd ed., Ashley Apple® BASIC: Data File Programming, Finkel & Brown Apple II® Assembly Language Exercises, Scanlon 8080/Z80 Assembly Language, Miller 6502 Assembly Language Programming, Fernandez, Tabler, & Ashley ATARI® BASIC, Albrecht, Finkel, & Brown ATARI® Sound and Graphics, Moore, Lower, & Albrecht Background Math for a Computer World, 2nd ed., Ashley BASIC, 2nd ed., Albrecht, Finkel, & Brown BASIC for Home Computers, Albrecht, Finkel, & Brown BASIC for the Apple II®, Brown, Finkel, & Albrecht BASIC Key Words: A User’s Guide, Adamis BASIC Programmer’s Guide to Pascal, Borgerson BASIC Subroutines for Commodore Computers, Adamis Byteing Deeper into Your Timex Sinclair 1000, Harrison Color Computer® Applications, Grillo & Robertson CP/M® for the IBM: Using CP/M-86, Fernandez & Ashley Data File Programming In BASIC, Finkel & Brown FAST BASIC: Beyond TRS-80® BASIC, Gratzer Flowcharting, Stern FORTRAN IV, 2nd ed., Friedman, Greenberg, & Hoffberg Genie in the Computer: Programming Graphics on the TRS-80®, Kohl, Karp, & Singer Golden Delicious Games for the Apple® Computer, Franklin, Finkel, & Koltnow Graphics for the IBM PC, Conklin How to Buy the Right Small Business Computer System, Smolin IBM PC: Data File Programming, Brown & Finkel Introduction to 8080/8085 Assembly Language Programming, Fernandez & Ashley Introduction to Data Processing, 2nd ed., Harris Job Control Language, Ashley & Fernandez Mastering the VIC-20®, Jones, Coley, & Cole Microcomputers: A Parents’ Guide, Goldberg & Sherwood More Subroutine Sandwich, Grillo & Robertson More TRS-80® BASIC, Inman, Zamora, & Albrecht PC DOS: Using the IBM PC Operating System, Ashley & Fernandez Problem-Solving on the TRS-80® Pocket Computer, Inman & Conlan Structured COBOL, Ashley Subroutine Sandwich, Grillo & Robertson Successful Software for Small Computers, Beech Timex Sinclair 2000 Explored, Hartnell TRS-80® BASIC, Albrecht, Inman & Zamora TRS-80® Color Basic, Albrecht TRS-80® Means Business, Lewis TRS-80® Model III Users’ Guide, Finkel & Bove UNIX® Operating System Book, Banahan & Rutter Using CPM®, Fernandez & Ashley Using Programmable Calculators for Business, Hohenstein Using VisiCalc®: Getting Down to Business, Klitzner & Plociak What Can I Do with My Timex Sinclair? Lots!, Valentine Why Do You Need a Personal Computer? Leventhal & Stafford Apple® is a registered trademark of Apple Computer, Inc. ATARI® is a registered trademark of Atari, Inc. CP/M® is a registered trademark of Digital Research. TRS—80® and Color Computer® are trademarks of Tandy Corp. UNIX® is a trademark of Bell Laboratories. VIC-20® is a registered trademark of Commodore International. VisiCalc® is a registered trademark of VisiCorp. BASIC Subroutines for Commodore Computers Eddie Adamis A Wiley Press Book John Wiley & Sons, Inc. New York • Chichester • Brisbane • Toronto • Singapore Copyright © 1983 by John Wiley & Sons, Inc. All rights reserved. Published simultaneously in Canada. Reproduction or translation of any part of this work beyond that permitted by Section 107 or 108 of the 1976 United States Copyright Act without the permission of the copyright owner is unlawful. Requests for permission or further information should be addressed to the Permissions Department, John Wiley & Sons, Inc. Library of Congress Cataloging in Publication Data Adamis, Eddie, 1921-— Basic subroutines for Commodore Computers. Includes index. 1. Commodore (Computer)—Programming. 2. Basic (Computer program language) I. Title. QA76.8.P47A3 1982 001.64’2 82-21874 ISBN: 0-471- 86541-9 Printed in the United States of America 83 84 109876543 Contents CHAPTER 1 INTRODUCTION 1 CHAPTER 2 ANGLES 7 Degrees to grads • Degrees to radians • Grads to degrees • Grads to radians Radians to degrees • Radians to grads CHAPTER 3 AREA 15 Square centimeters to square inches • Square feet to square meters Square inches to square centimeters • Square kilometers to square miles Square meters to square feet • Square meters to square yards Square miles to square kilometers • Square yards to square meters CHAPTER 4 BUSINESS 25 Average purchase cost per unit • Average manufacturing cost per unit Gross profit in percent • Gross profit on purchase cost • Gross profit on purchase cost of a set of items • Gross profit on manufacturing costs • Gross profit on various costs CHAPTER 5 CAPACITY/MEASUREMENT 41 Capacity I U.S. and British liquid measures to liters 42 British gallons to liters • U.S. gallons to liters • British pints to liters U.S. pints to liters • British quarts to liters • U.S. quarts to liters Capacity II Liters to U.S. and British liquid measures 52 Liters to British gallons • Liters to U.S. gallons • Liters to British pints Liters to U.S. pints • Liters to British quarts • Liters to U.S. quarts Capacity III U.S. and British dry measures to liters 60 British bushels to liters • U.S. bushels to liters • British pecks to liters • U.S. pecks to liters British pints to liters • U.S. pints to liters • British quarts to liters • U.S. quarts to liters CHAPTER 6 ENERGY 69 Electron-volts to joules • Ergs to joules Foot-pounds to joules • Kilowatt-hours to joules V vi BASIC Subroutines for Commodore Computers CHAPTER 7 FORCE 79 Dynes to Newtons • Poundals to Newtons • Pounds-force to Newtons Pounds-force to poundals CHAPTER 8 GEOMETRY 85 Geometric progression • Nth term of a progression • Mean of a progression CHAPTER 9 HEAT ENERGY 93 British thermal units to calories • British thermal units to joules • Calories to joules CHAPTER 10 INVESTMENTS 103 Initial investment • Withdrawals • Deposits • Final Capital • Effective interest rate Simple interest • Compounded interest CHAPTER 11 LENGTH 123 Centimeters to inches • Feet to meters • Inches to centimeters • Kilometers to miles Meters to feet • Meters to yards • Miles to kilometers • Yards to meters CHAPTER 12 LOANS 137 Maximum amount to be borrowed • Amortization schedule • Duration in years Periodic payment • Last payment • Unpaid balance CHAPTER 13 MASS 157 Kilograms to pounds • Long hundred-weight to kilograms • Long tons to metric tons Metric tons to long tons • Metric tons to short tons • Pounds to kilograms • Short hundred­ weight to kilograms • Short tons to metric tons CHAPTER 14 MATHEMATICS 169 Arithmetic progression • Arithmetic mean • Harmonic series • Harmonic progression Greatest common divisor • Number round off • Summation • Logarithms to any base CHAPTER 15 MATRIX OPERATIONS 185 Addition • Subtraction • Multiplication CHAPTER 16 NUMBER SYSTEMS 201 Binary to decimal • Decimal to binary • Decimal to hexadecimal • Decimal to octal Hexadecimal to decimal • Octal to decimal Contents vii CHAPTER 17 PRESSURE 217 Atmospheres to Newtons per square meter • Bars to Newtons per square meter Dynes per square centimeter to Newtons per square meter • Inches of mercury to Newtons per square meter • Millimeters of mercury to Newtons per square meter Pounds per square inch to Newtons per square meter CHAPTER 18 SCALAR OPERATIONS 227 Addition • Subtraction • Multiplication • Division CHAPTER 19 SORTING NUMBERS AND WORDS 241 By ascending or descending order and by input or data CHAPTER 20 STATISTICS 265 Factorial • Combinations • Permutations • Bar graph • Percentage of recurrence CHAPTER 21 TEMPERATURE 279 Celsius to Fahrenheit • Celsius to Kelvin • Celsius to Rankine • Celsius to Reaumur Fahrenheit to Celsius • Fahrenheit to Kelvin • Fahrenheit to Rankine • Fahrenheit to Reaumur Kelvin to Celsius • Kelvin to Fahrenheit • Kelvin to Rankine • Kelvin to Reaumur Reaumur to Celsius • Reaumur to Fahrenheit • Reaumur to Kelvin • Reaumur to Rankine Rankine to Celsius • Rankine to Fahrenheit • Rankine to Kelvin • Rankine to Reaumur CHAPTER 22 VOLUME 301 Cubic centimeters to cubic inches • Cubic feet to cubic meters • Cubic inches to cubic centimeters • Cubic meters to cubic feet • Cubic meters to cubic yards Cubic yards to cubic meters NOTE: The programs in this book were developed on a PET®; but they have also been tested and will run on a VIC-20® or Commodore 64. A few programs require more memory than the VIC-20’s standard 5K. PET® and VIC-20® are registered trademarks of Commodore International.

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.