The forum will NOT disappear in April 2023 please check this topic!
Started by Chris!, March 22, 2011, 06:48:37 AM
mov r0,#25 ; this is an example wherever you store the up/down counter (either +1 or -1 (FF) -> you have to store it there first !!) mov r1,#26 ; this is an example wherever you store the coordinate mov a,@r0 mov r2,a ; contains now +1 / -1 (FF) mov a,@r1 add a, r2 ; increase / decrease the position mov @r1,a ; and write it back; now see if we need to change the counter as we hit a border xrl a,#1Fh ; e.g. left border jz ChangeCounter mov a,@r1 xrl a,#99 ; e.g. right border jz ChangeCounterDone retChangeCounter mov a,r2 ; get the counter cpl a ; invert it and add 1 -> 1 -> FF, FF-> 1 add a,1 mov @r0,a ; and write it back jmp Done
Quote from: Chris! on September 19, 2011, 09:29:49 PMOK, I got problem #1 and #3 solved on my own, but still need help on problem #2.
Quote from: Chris! on September 21, 2011, 05:55:40 AMWhere can you get v1.81? I think I have 1.18