> From: Andres Djordjalian > To: PICLIST@MITVMA.MIT.EDU > Subject: 17C5X (was thanks... 0402) > Date: Thursday, 22 May 1997 11:45 > Peter F. Klammer wrote: > > > MICROCHIP, ARE YOU LISTENING!!? > > ``The salient features of Extended Indirect Mode are: > > 1. Full upward compatibility with existing PIC17C4X binary code. > > 2. Single-cycle access to contiguous linearly-addressable RAM via > > indirect addressing. > > 3. Single-cycle any-bank-to-any-bank RAM copy (MOV INDR0,INDR1). > > 4. A bank-selectable 224-byte RAM context (1Ch through FFh in any bank).'' > > But the implementation of this seems (to me, just an observer) far from > trivial at the circuit-level. You would need a new bus for the FSRs' > higher bits, the FSRs would need added circuitry apart from doubling their > size, and you would have to add a new MUX before the register address > latch. It *is* an upper-end processor, and yet doesn't approach the number of transistors Pentiums have. (thank ghu!) A little more complexity in the FSR circuitry would be A Good Thing. > > If I was microchip I think I'd rather use my resources to do diverse > faster and cheaper micros with more memory and peripherals, instead of > doing all this work just to save some programmers' work and perhaps make a > certain kind of code run a little faster. After all, isn't that the way > they're products are positioned? The simplicity of the scheme (from a > hardware point of view) might be one of various things that allow the high > speed and low price we expect from a PIC. > This is the kind of thinking that made segmented addressing so popular with ppl programming the 80x86 - NOT!!! The FSR is the logical way to use pointers in C, and having to bank-switch pointers plays hell with efficiency. Anyone remember the HUGE pointer type in PC type C? How inefficient it was? consider this dumb code fragment. #define BYTE unsigned char #ifdef BLOAT #define MAXARRAY 400 #else #define MAXARRAY 40 #endif main() { BYTE source_array[MAXARRAY]; BYTE dest_array[MAXARRAY]; BYTE *source_ptr, *dest_ptr; BYTE idx; source_ptr = source_array; dest_ptr = dest_array; for(idx = 0; idx < MAXARRAY; idx++) *source_ptr++ = *dest_ptr++; } Doesn't do much, but think about the extra code the compiler emits to generate bankswitching when BLOAT is defined... - and how many times you would use pointers in C - and the slowdown... MikeS