27.01.2015 Views

titus-larsen-titus-1981-apple-interfacing

titus-larsen-titus-1981-apple-interfacing

titus-larsen-titus-1981-apple-interfacing

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

for each value that is input to the computer. This program<br />

strates how the computer can be used to make a decision based<br />

on a value. In some cases, the value of an individual bit may be<br />

d as the basis for a decision. The binary conversion program proed<br />

in Experiment No. 4 allowed you to see a binary equivalent for<br />

decimal value. This program made decisions based upon the value<br />

individual bits, so that it could determine whether to display a<br />

e in each bit position.<br />

tep 4<br />

Jn this step, the basic binary-display routine will be used, but<br />

ther than display ones and zeros, the computer will display "ON,"<br />

ta logic one and "OFF," for a logic zero. You should be able to<br />

odify the program from Experiment No. 4 to do this, just by changg<br />

the PRINT statements, but the following program is provided for<br />

Note that the program from Experiment No. 4 has been<br />

" or relocated to higher line numbers. Before you enter this<br />

remember to delete the old one, if you have not already<br />

so by turning off the power. The NEW command may be used<br />

the old program. Simply type NEW and then press the<br />

key.<br />

INPUT A$: HOME: A 128<br />

B = PEEK (49319)<br />

FOR Q = l TO 8<br />

IF B-A

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

Saved successfully!

Ooh no, something went wrong!