You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
110 COMPUTEI May, 1982. 1s.sue 24<br />
110 COMPUTE! May. 1982. Issue 24<br />
Parti: I:<br />
Machine<br />
Language:<br />
First Steps<br />
Jim Butterfield<br />
Butferfield<br />
Toronto, Canada<br />
Toronto, Canada<br />
Let's do a simple machine language project from<br />
Let's do a simple machine language project from<br />
ground zero and try to follow all the steps. We'll<br />
pick something very easy, and our coding will be<br />
for the CBM/PET. And we'll write it in BASIC first<br />
to make our objeClives objectives - and the flow of logic —<br />
clear.<br />
clear.<br />
Programmer F. R. Vescent Vescelll wallls wants to draw a bar<br />
graph of several numbers to the screen. He wallls<br />
wants<br />
to output the graph as a series of decimal digits so<br />
that the viewer can n see at a glance the length of a<br />
bar (for example, a bar 39 units long will end in a 9<br />
digit). In BASIC, he codes:<br />
200 DATA 15,10,30,35,28,28,15,0<br />
t5, tO,30,35,28,28,I5,O<br />
210 READV:IFV=OGOT0300<br />
= 0GOTO 220 J ]=48:FOR = K= 1 TOJ TO]<br />
230 J=J+1:IFJ ]=] + I:IF] = =58 58THENJ=48<br />
] 240 PRINT CHR$