the code is very simple. but the words: peekcode and poke code are not bolded and capitalized automatically (i.e. they become: PEEKCODE and POKECODE
----------------
CMCON = 1
TRISA = 0
TRISB = 0
I VAR BYTE
OUT_STORAGE VAR WORD ; OUTPUT STORRAGE TEMP.
address VAR WORD
LOOP:
PORTA.1 = 1 ;RESET 4017
PORTA.1 = 0
PORTB = 0 ; set port B all zero
address = $11 ; storage data location beginning here
FOR I = 0 TO 1 ; loop 2 times
peekcode address , OUT_STORAGE ; retrieve data ready for output
PORTB = OUT_STORAGE ; output data by port B
address = address +1 ; fetch the next data
PAUSE 10 ; pause for 10ms
CALL CLOCK ; call clock of 4017
NEXT I
GOSUB LOOP
clock:
porta.0 = 1 ; clock the 4017
@nop
porta.0 = 0
RETURN
END
pokecode @address, $55,$2A
;
;note that the peekcode and pokecode is not capitalized and bolded automatically as the other keywords i.e. PEEK or POKE
Bookmarks