??? 06/28/06 15:47 Read: times |
#119269 - exchange Responding to: ???'s previous message |
hi,
Jan Waclawek said:
in '51, you cannot mov one register into another.
Since this is correct I think Kai means just an idea. In case of strong assembler inside an interupt I would use XCH for this. So replacing mov r7,r6 ;save r6 mov r6,r5 ;save r5 mov r5,r4 ;save r4 mov r4,r3 ;save r3 mov r3,r2 ;save r2 mov a,p1 ;take a new sample mov r2,a ;store it in r2..with something like MOV R7,A MOV A,P1 XCH A,R2 XCH A,R3 XCH A,R4 XCH A,R5 XCH A,R6 XCH A,R7does speed up with correct way. P.S. Then I preffer to use a fixed register bank for the purpose. As a note: It is possible to use circle buffer with defined states` jumps as well (if free code space does allow it). "There are may ways to do same thing" even with assembler (= Regards, Oleg |
Topic | Author | Date |
Multiple switch debouncing | 01/01/70 00:00 | |
Otherways | 01/01/70 00:00 | |
Vertical counters | 01/01/70 00:00 | |
vertical conters in C | 01/01/70 00:00 | |
and here | 01/01/70 00:00 | |
vertical counter with press detection | 01/01/70 00:00 | |
debounce and denoise needed | 01/01/70 00:00 | |
You are right of course, but... | 01/01/70 00:00 | |
Reminds me... (off topic) | 01/01/70 00:00 | |
XRL P2,A | 01/01/70 00:00 | |
some hair-splitting | 01/01/70 00:00 | |
exchange | 01/01/70 00:00 | |
thanx Kai ... | 01/01/70 00:00 | |
my way | 01/01/70 00:00 | |
exactly! | 01/01/70 00:00 | |
Spot on. | 01/01/70 00:00 | |
Two samples enough? | 01/01/70 00:00 | |
varies with design | 01/01/70 00:00 | |
Conditional executing versus branching | 01/01/70 00:00 | |
KEY RELEASE SUBROUTINE ... | 01/01/70 00:00 | |
Not really... | 01/01/70 00:00 | |
a TOTAL misconception or -very annoying | 01/01/70 00:00 | |
He does not | 01/01/70 00:00 | |
Beer o'clock | 01/01/70 00:00 | |
Yes, good idea | 01/01/70 00:00 | |
never did, never will | 01/01/70 00:00 | |
Agree![]() | 01/01/70 00:00 |