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

Create successful ePaper yourself

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

None of the outputs should be active, since device address 49325 has<br />

not been implemented in the circuit. Furthermore, address 49325 is<br />

not readily available on the breadboard. Of the addresses in the<br />

block 49312 through 49327, only addresses 49312 through 49319 are<br />

available at the ADDRESS socket.<br />

Change line 10 in the program so that it is now<br />

10 A=PEEK(49318):B=PEEK(49319)<br />

Where do you observe the pulses in the circuit when you run the<br />

· odified program<br />

u should find that outputs A and B are active. Output C is not ace<br />

since it is an output control pulse, and there are no output<br />

OKE) commands in the program.<br />

Make another modification to your program. Change line 10 so<br />

at you can control output device 49318. Your statement at line 10<br />

ould look like this:<br />

u can use any data value that is between 0 and 255, inclusive. Now<br />

your program and test outputs A, B, and C. Which output do you<br />

pect to be active Is this what you found<br />

tput C is active, since the POKE command is an output-type comnd,<br />

and the address, 49318, corresponds to the "6" output pin from<br />

decoder. You are probably surprised to see that the B output is<br />

active. When a POKE instruction is executed by the BASIC inreter<br />

in the Apple, the computer system does a read-before-write<br />

!')ration, so that the selected address is read from, before being<br />

95

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

Saved successfully!

Ooh no, something went wrong!