prjbrook

blockdefs38 work OK but wrong count

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