| Jan Waclawek 02/16/07 02:09 Modified: 02/16/07 02:47 Read: 441 times Bratislava Slovakia |
#133111 - SDCC Responding to: Christoph Franck's previous message |
The pointer-dereference-postincrement example: ;*a++ = *b++; mov r0,_a mov r1,_b mov ar2,@r1 inc _b mov @r0,ar2 inc _a ret ;------------------------------------------------------------ ;*a = *b; mov r0,_a mov r1,_b mov ar2,@r1 mov @r0,ar2 ;++a; inc _a ;++b; inc _b ret The loop example:
;somechar = 10;
mov _somechar,#0x0A
;while(somechar-- != 0) {
00101$: r2,_somechar
dec _somechar
cjne r2,#0x00,00108$
ret
; i++; // this is the DOSOMETHING :-) (some body of the loop)
00108$: inc _i
sjmp 00101$
;}
;------------------------------------------------------------
;somechar = 10;
mov _somechar,#0x0A
;do {
; i++; // DOSOMETHING
00101$: inc _i
;while(--somechar != 0);
dec _somechar
mov a,_somechar
jz 00108$
sjmp 00101$
00108$: ret
SDCC is Version 2.6.1 #4478 (Nov 23 2006), run with no explicit commandline argument; examples compiled without any explicit pragma. JW |
| Topic | Author | Date |
| Speed Recommendation | David Lewis | 02/14/07 08:00 |
| Time for processing | Lynn Reed | 02/14/07 08:11 |
| Get a 1X Chip | Michael Karas | 02/14/07 08:25 |
| another 485 issue | Erik Malund | 02/14/07 08:36 |
| slightly less | Jan Waclawek | 02/14/07 08:47 |
| who gives a hoot | Erik Malund | 02/14/07 09:04 |
| maybe yes, maybe not... | Jan Waclawek | 02/14/07 09:30 |
| Choose the appropriate tool! | Andy Neil | 02/14/07 08:26 |
| Don't have much of a choice! | David Lewis | 02/15/07 00:46 |
| drop the "coding standards" | Jan Waclawek | 02/15/07 00:53 |
| Yikes. | Christoph Franck | 02/15/07 01:00 |
| down memory lane | Erik Malund | 02/15/07 06:10 |
| a possible compromise... | Jan Waclawek | 02/15/07 06:29 |
| Well... | Christoph Franck | 02/15/07 06:54 |
| The other end of the spectrum ... | Christoph Franck | 02/15/07 07:10 |
| afer quite a few iterations.... | Jan Waclawek | 02/15/07 07:37 |
| The guide to writing unmaintainable code says: | Christoph Franck | 02/15/07 08:28 |
| That's the kind of nonsense... | Andy Neil | 02/15/07 12:30 |
| put some load on the hardware | Jan Waclawek | 02/14/07 08:33 |
| Jan, oh Jan | Erik Malund | 02/14/07 08:43 |
| 9-bit - more work for the hardware! | Andy Neil | 02/14/07 08:43 |
| true, but... | Jan Waclawek | 02/14/07 08:49 |
| It is... | David Lewis | 02/15/07 00:55 |
| calculate the ISR after making the ISR skip | Erik Malund | 02/15/07 06:18 |
| Optimizing C | Christoph Franck | 02/14/07 08:54 |
| just one example | Erik Malund | 02/14/07 09:12 |
| The advantage is... | Andy Neil | 02/14/07 10:01 |
| If the thinking had preceded the coding ... | Richard Erlacher | 02/14/07 12:45 |
| you miss the point | Erik Malund | 02/14/07 13:04 |
| then what's the chance of having him to C-craft? | Jan Waclawek | 02/14/07 15:26 |
| zero | Erik Malund | 02/14/07 15:41 |
| Job security, of course. | Christoph Franck | 02/15/07 01:05 |
| Examples are not equivalent | Chris Kelly | 02/15/07 06:41 |
| Wasn\'t saying that they were. | Christoph Franck | 02/15/07 07:02 |
| I just tried SDCC... | Jan Waclawek | 02/15/07 08:23 |
| Hm, can you post the assembly output ? | Christoph Franck | 02/15/07 08:27 |
| Keil does this | Chris Kelly | 02/15/07 16:41 |
| Interesting. | Christoph Franck | 02/16/07 02:06 |
| Optimizing and Keil/SDCC/Raisonance | Jon Ward | 02/19/07 09:33 |
| Retort | Chris Kelly | 02/19/07 18:14 |
| Register Banks... | Jon Ward | 02/20/07 07:25 |
| benchmarks | Jan Waclawek | 02/20/07 07:40 |
| tools differ | Erik Malund | 02/20/07 08:12 |
| Clarification | Chris Kelly | 02/20/07 15:52 |
| comments | Erik Malund | 02/21/07 06:04 |
| not to write things twice | Jan Waclawek | 02/21/07 06:25 |
| no need | Erik Malund | 02/21/07 06:42 |
| And how does this produce two incarnations? | Jan Waclawek | 02/21/07 06:59 |
| like this | Erik Malund | 02/21/07 07:06 |
| hehe | Jan Waclawek | 02/21/07 07:30 |
| this is no better confusion-wise | Erik Malund | 02/21/07 07:48 |
| what is "efficient" | Jan Waclawek | 02/21/07 08:11 |
| ok is \'safe\' better? | Erik Malund | 02/21/07 08:36 |
| How to convey our ideas to the mcu? | Jan Waclawek | 02/21/07 08:49 |
| Carefull now, you could end with Prolog :) | Caslav Nedeljkovic | 02/21/07 10:33 |
| my kids | Jan Waclawek | 02/21/07 15:07 |
| Huge code != huge time | Chris Kelly | 02/21/07 16:13 |
This comes under the heading of "famous last words | Erik Malund | 02/22/07 06:20 |
| the question I always raise on this | Erik Malund | 02/20/07 05:56 |
| Here's Why... | Jon Ward | 02/20/07 18:25 |
| SDCC | Jan Waclawek | 02/16/07 02:09 |
| Thanks. Also interesting. | Christoph Franck | 02/16/07 02:23 |
| SDCC peephole optimiser conflict | Jan Waclawek | 02/16/07 02:45 |
| Raisonance | Rob Klein | 02/16/07 04:34 |
| help me ,I NEED SOME HELP ON MY PROJECT | Rahul Bisht | 02/19/07 10:23 |
| that is NOT 'help' | Erik Malund | 02/19/07 10:52 |
| Well that is not the way to get it! | Andy Neil | 02/19/07 14:16 |
| start a new thread! | Jan Waclawek | 02/19/07 17:08 |



