30.12.2013 Views

May June 1980 - Commodore Computers

May June 1980 - Commodore Computers

May June 1980 - Commodore Computers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

40<br />

4O COMPUTE. MAY/JUNE. MAY/JUNE, 198O. <strong>1980</strong> ISSUE 4. 4.<br />

Review:<br />

Review:<br />

6502 Software<br />

65O2 Software<br />

Design,<br />

Review by<br />

Jim Butterfield<br />

by Leo J . Sca nlon<br />

Howard W. Sams & Co., Inc.,<br />

by Leo J. Scanlon<br />

Howard W. Sams & Co., Inc.,<br />

27O 270 pp. $1O.5O $10.50<br />

This 'T'hi s is is quite quile a pleasant book; it it makes good reading.<br />

.<br />

The title lilie is is misleading: m g: the Ihe book deals with wilh 6502<br />

programming rather than software design. In In fact. ract , 1I<br />

rather r missed m the software design elements: clements: planning<br />

memory, memory. designing data structures, and testing/<br />

debugging g methodology are a rc important impona nt concepts s for lor be·<br />

ginning g programmers. The book expends its s main<br />

efforts on the subjects of o f writing code and handling<br />

interrupts and a nd input/output inpUl/oUlpUl devices.<br />

The book bouk is oriented o enled towards IOwards the Ih e Rockwell AIM A I M<br />

65 microcomputer, m r, but bur not t too lOa heavily. Users of<br />

other Olhcr systems will find it a worthwhile wonhwh ile reference<br />

of text. The book appears a ideal for a programming<br />

course textbook: textbook; it is well organized o and gets into<br />

serious s programming quite quickly. quickly,<br />

ChapterC 1I is partly historical, partly y an a n overview<br />

of popular microprocessors and partly panly a brief plug<br />

for the AIM A I M 65. There's a minor m problem where the<br />

aUlhor describes Ih e 6800/6 502 famil y as cha racler­<br />

author describes the 6800/6502 family as character<br />

ized by b y novel memory-mapped architecture: re: in fact, ,<br />

all microprocessors including Ih thee 8080 and Z-80<br />

can aand do use mcmory memory mapped lIO. 1/0. And I rather<br />

wish that the illlroductio introductionn to the 6502 had mentioned ned<br />

its iis remarkable speed due to pipelining techniques -<br />

a factor r that sc sets it clearly y aahead ooff the earlier<br />

6800.<br />

Chapter 2 gets into the 6502 instruction sel. set.<br />

Similar op codes are grouped aand discussed together,<br />

which helps to develop intuitive ideas of the<br />

machine's capabilities. Numerous us examples of coding<br />

arc are included. The slyle style is generally easy aand<br />

straightforward, rward , but beginners will still find it it slow<br />

going: Ih there's s a 10 lot 1 of malerial material 10 to gel get Ihrough.<br />

through.<br />

SSubroutines utines are covered in chapter I 4, ~,<br />

mostly y in<br />

terms oof f their mechanistic c characteristics. A couple<br />

of time deJay delay subroutines uti aare rc ggiven, aand it it's nice<br />

to to see ti liming m in g qquestions being \\'orked worked through<br />

mel meticulously. iculo usly.<br />

CChapters 4, 4, 5 and 6 get heavily y into coding<br />

questions: list aand lookups, mathematicall routines,<br />

and number-base conversion. Coding is isggiven through ughout<br />

out, , but lhe the emphasis is is oon n algorithms: lhe the aauthor<br />

Ulho r<br />

is is concerned wwith the methods behind d a pa particular<br />

a r<br />

kind oof f computation. A rather unusuall aalgorithm is is<br />

given for for calculating g the square rOOt root of ofan integer;<br />

it it's rather slo slow w compared lO to standard methods, but but<br />

readers may find it it an an interest interesting ing curiosit curiosity.<br />

CChapter i 7 ddiscusses interrupts. In Insixteen pages,<br />

it it's ha hard to tocome to togrips wit with h the whole qucslion question, ,<br />

and a nd coding examples are arc cursory. ry. Chapter C 8 goes g"Oes<br />

into to considerable detail dctail on o n two input/output chips:<br />

the Ihe 6520 and a nd 6522.<br />

There are a re two appendices and a an index. II found<br />

the Iht: index rather sparse: for fur example, "relative " addressing" points you to LO page 40, bill but a more<br />

useful discussion d ion can be found on page 55.<br />

Coding g examples are arc written almost entirely in<br />

assembly b ly language. This T s is is quite q u readable, ble. but b ut II<br />

would vvo have preferred rred to see sec early y coding examples c XCl lllplcs<br />

complete with wilh their machine language nguag-e equivalents.<br />

s .<br />

The Thc overall organization ion of or the t book is good, g"ood t<br />

although a there are a rc inconsistencies within h in chapters: ( rs:<br />

some have summaries, some somc have references, rcfe rl:nccs. and some<br />

have neither. Chapter C r 2 has ait section entitled c ntitkd "How ': Ho\\,<br />

this chapter is arranged"; it appears on 011 the sixth si:..: page of o f the chapter, which seems Seems odd..<br />

..<br />

The coding is good, but there are a rc a few errors.<br />

On page 68. , the author suggests suggesls thai Iha t when n shifting shirting<br />

signed numbers to the left, , the programmer ll llllcr should<br />

arrangea to restore the sign bit in ill case it's shiltecl<br />

ift l'd<br />

out: O llt ; in fact, a change in the lhe sign n bit would be an<br />

overflow ow situation and there would be no repairing<br />

the damaged number. numbcr. Example 5-14 1 ~ ono n page 1391 :$9<br />

should add a value e ofo f two to location Ti 22 rather<br />

than the value e of one shown; shown: most Ill alcrl alert readers<br />

ers<br />

will pick this kind oi of' thing up. u HardwareH re purists<br />

may wince at some of the terminology, such as use usc<br />

ofr the term "grounded'' " instead or of "logic zcro" zero"<br />

or ""low", . bul but everybodyy will understand rstalld wh;u what is<br />

mca meant. n t.<br />

The authorr has a conversational style and

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!