Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .org $e00 ;this is where last 1K defs go
- ;.db " ", $0d
- .db ": not 0= if one else zero endif ; : cn constant ; : d. depth . ; : v variable ; ", $0d ;all handy
- .db ": 1= 0= not ;", $0d ;actuall any non zero stk value will be true.
- .db "0058 cn TIFR : TOVO 0001 TIFR ; 0036 cn PINB 0053 cn TCCR0B v c1 v c2 0037 cn DDRB" ,$0d
- .db ": pushdown TOVO setbit ; : 1+ one + ; : inc dup @ 1+ swap ! ; 0052 cn TCNT0 : inputVal 0001 PINB bit@ ;" , $0d
- .db ": setUpT0 zero dup c1 ! c2 ! ; : startT0 0005 TCCR0B c! ; : stopT0 0000 TCCR0B c! ; " ,$0d
- .db ": waitPinHi begin 0001 PINB bit@ 1= until ; ",$0d
- .db ": waitPinLo begin 0001 PINB bit@ 0= until ; ",$0d
- .db ": bmpctr c1 inc c1 @ 0000 = if c2 inc endif ; ", $0d
- .db ": chkoverflow TOVO bit@ 1= if pushdown bmpctr endif ; : inputval 0001 PINB bit@ ; ", $0d
- .db ": bigloop begin chkoverflow inputVal 1= until stopT0 ; : showcnt CR c2 @ . space c1 @ . ;",$0d
- .db ": start waitPinHi waitPinLo startT0 ; : timeSqWave setUpT0 start bigloop showcnt ; ", $0d
- ;.db " zero bumpctr ", $0d
- ;.db "testingstopper",$0d ;only used during testing.No effect otherwise
- .db "finishblock",$0d
Advertisement
Add Comment
Please, Sign In to add comment