Commodore User


Commodore 64 Computing

Categories: Review: Book
Publisher: Granada
Machine: Commodore 64

 
Published in Commodore User #1

Commodore 64 Computing

Commodore user manuals leave plenty of scope for independent writers to fill in the details, and Mr. Sinclair has been quick to cover the C64. The book is a paperback of some 130 pages and the preface promises a serious approach to BASIC programming with a bias towards data processing for business applications, but is this promise met?

The first chapter starts with detailed instructions on how to set up the C64 and tune in the television. This is followed by the usual tour of the keyboard (yawn) and details of loading and saving to tape and disk.

There's not much in this chapter that isn't in the first twenty pages of the User Manual, except a comment concerning use of the RUN/STOP and RESTORE keys. These keys must be "tapped sharply" to restore the program. Until I read this I though the contacts on my RESTORE key needed cleaning!

The second chapter starts the reader's instruction in Basic beginning with immediate mode and the ubiquitous PRINT statement. This section deviates from the User Manual by also introducing the TAB and SPC commands and their use in positioning text and centering titles. The different types of variables are covered, but we picked up a flaw - Ian Sinclair says the C64 works on integer variables faster than floating point. This is incorrect; all Commodore computers convert integer variables into floating point before operating on them and change them back into integer format afterwards, so there is no increase in speed. Integer variables only save memory, not processing time.

Good On DEF

Data input is then covered with the use of INPUT, READDATA and GET statements accompanied by good advice on preventing incorrect data entry by the user of 'mug traps'.

All good stuff from where the book moves on to arithmetic operations and their priority. This discussion includes the oft-forgotten function definition (DEF FN), very useful for repetitive calculations like VAT or rounding-up operations and normally neglected by book writers. The remainder of the chapter covers string manipulations (LEN, VAL, LEFT$, etc) and uses several useful practical examples to display their effectiveness - GETA$ instead of GETA is encouraged, and we'll go along with that as a way to avoid incorrect data input.

Chapter four leads on to branching and loops. Rounding errors and their effects on conditional branching is explained: the user of FOR-NEXT loops for timing, counting and repeating operations leads on logically enough to subscripted variables, although the fact that subscripted integer variables take up much less space than subscripted *floating-point* variables is not emphasised. Matrices and data storage finishes this chapter using magazine articles and their contents as examples.

'Data processing' is the subject of Chapter Five, and again that flow son smoothly from the previous one. The use and design of menus in data processing programs is covered, and ON-GOING and ON-GOSUB statements are introduced. Together with that section on the GET statement, this reinforces the preferences, prejudices and lessons learned in previous chapters: hooray for structured programming!

'Total' program design using the top-down approach is discussed, and Ian Sinclair stresses the need for standard subroutines. The overall feeling is that disciplined programming as A. Good. Thing, and it is.

So far so good.

Total Design

'Total' program design using the top-down approach is discussed, and Ian Sinclair stresses the need for standard subroutines. The overall feeling is that disciplined programming A Good Thing, and it is.

So far so good. The sixth chapter, 'Introducing Graphics', prompted thoughts of hi-res and multi-colour plotting: but it was not to be. This chapter deals only with the graphics characters available from the keyboard and how they can be combined into strings to draw titles, borders and bar charts. How disappointing.

At least Mr. Sinclair follows his own implied views about discipline. When reading a Commodore program listing it is often difficult to remember which key represents which graphics symbol without scanning the whole keyboard, and sometimes the number of spaces required can be misleading. Ian Sinclair overcomes this problem by using the Computing Today standards for special function keys. Vic Computing and Commodore User are also introducing their own standard to make program listings more legible.

Animation using strings is briefly covered here, and the POKE command is introduced together with some good advice about SAVEing a program with POKEs in it before RUNning it in case the computer crashes. Practical rather than earthshaking stuff.

Sprite Disappointment

In fact the chapters up to now have covered any Commodore computer, not just the C64. Chapter Seven, however, deals with sprites: and instantly there are problems. The section on sprite priority is confusing - and in parts incorrect.

For instance, Sinclair says that POKEing 0 into address 53269 (the sprite enable address) will give the sprite level 0 priority: in fact it will disable all sprites.

Again, moving sprites is covered: but the origin of a Sprite is given as its bottom left corner when it is actually the top left.

Multi-colour sprites are mentioned: but Ian Sinclair attributes this only to sprites 0 and 1 - when all eight sprites can be multi-coloured. Nor does he explain how to use the multi-colour registers to create such sprites.

In addition to its graphics capabilities, the other starring quality of the C64 is the now-famous SID synthesiser chip. 'Function Keys and Sound Generator' comes next. Well, the section on function keys isn't worth much: and the piece on sound capabilities are limited to warning notes to prompt responses during DP programs - an application which hardly strains the best synthesiser chip currently implemented in a home computer.

At least there is a useful table which gives the real duration time against attack, decay and release settings.

The ninth chapter is a miscellaneous collection of the commands not yet covered, like FRE, SGN, ABS and SORT. The main theme is on debugging programs by using the STOP and CONT commands and by printing variables or dumping them to tape to check that they are consistent with those expected. You also get the C64's real-time clock and its uses for alarms, timers and the like: and a useful-looking digital clock subroutine is included.

The final chapter deals briefly with peripherals, such as printers, joysticks, digitisers and light pens and their applications. The cartridges like Simon's Basic, Pascal and Forth (which are available or not as the case may be) are also mentioned just to whet your appetite.

The one and only appendix gives a rather incomplete set of Basic equivalents, comparing Commodore's statements to ZX and Atom computers so you can convert programs.

Lord knows why you should want to run a ZX81 program on a C64, still less a C64 program on a ZX81. A Vic-vs-C64-vs-Pet converter might have been more useful, or perhaps a Spectrum-Dragon-BBC conversion chart.

Overall impressions? The book is technically good. It's well-written, readable and logically presented - you don't need to sit hunched over your computer, book in one hand while you stab the keyboard with the other. The example programs are short and professional, which reduces typing time and the attendant possibility of errors.

The promise of a data processing bias is met, but the book deals mainly with the input and output of data and not the important bit in the middle - i.e. the data processing. The nearest we get is a crude alphabetic sorting routine.

But I think the title is misleading. "Commodore 64 Computing" conjures up thoughts of high-resolution multi-colour graphics with sprites, user-definable characters, horizontal and vertical scrolling, better-than Moog music synthesis, and clever ways with joysticks. Hardly any of these features are covered in depth: the bulk of the book is general and could be applied to any Commodore computer.

If you're a game/graphics/sound freak, this book is not for you. If you are in business and want to have a crack at data processing, the book offers a sound introduction to the subject. But in general it sadly falls well short of being a complete work.

Other Reviews Of Commodore 64 Computing For The Commodore 64


Commodore 64 Computing (Granada)
The preface promises a serious approach to Basic programming with a bias towards data processing for business applications. Is this promise met?