Re: 8051 and a C switch statement
- From: Hans-Bernhard Bröker <HBBroeker@xxxxxxxxxxx>
- Date: Sat, 29 Dec 2007 00:36:32 +0100
robertwessel2@xxxxxxxxx wrote:
The C standard (C89/90) requires that the implementation support at
least 257 labels in a switch statement. This is unlikely to be an
issue for an 8052.
To at least some extent it is. A jump table on an 8052 can only comfortably host about 120 entries, because of the limited reach of the indirect jmp and the length of the jmp instruction it leads to.
So a switch with more than those 120 entries will have to be slower than others.
.
- References:
- 8051 and a C switch statement
- From: Martin Griffith
- Re: 8051 and a C switch statement
- From: robertwessel2@xxxxxxxxx
- 8051 and a C switch statement
- Prev by Date: Re: 8051 and a C switch statement
- Next by Date: C for Polynomial Fit
- Previous by thread: Re: 8051 and a C switch statement
- Next by thread: Re: 8051 and a C switch statement
- Index(es):
Relevant Pages
|