Changes

Jump to: navigation, search

Cassette data information

47 bytes added, 05:44, 3 December 2012
/* Example of a typical loading system */ formatting was borked
;;
;; B = &F5 (I/O address of PPI 8255 input port B)
;; C = previous data read from PPI port B ld d,0 ;; initialise count to 0 .loop inc d ;; increment count in a,(c) ;; read input to PPI 8255 port B xor c ;; exclusive-or with previous data read from PPI 8255 port B and %10000000 ;; isolate bit 7
;; if result is 0, then the state of bit 7 that has
;; been read is the same as the previous state. i.e. bit 7 has not changed state.
;; if result is not 0, then the state of bit 7 has changed.
;; e.g. if bit 7 was previously 1, it is now 0. if bit 7 was previously 0, it is now 1. jr z,loop
;; when execution reaches here we know that bit 7 has changed state and D
;; contains the number of tests.
25
edits