The Cygnal f12x has 128k of flash and using code banking defeats the purpose of using Cygnal. The overhead of banking slows the program down as much as using the Cygnal speed it up. Thus: Is there a way in Keil to make all movc a,@a+dptr generated by the compiler/written in assembler access the upper 64k WITHOUT using bankswitching. The Cygnal chip has simple means of data bank select. in advance thanks, Erik
"The problem with having a different space for MOVC and instruction fetches is that the compiler stores constants in code space." So, does XCONST only affect user constants defined with 'const' in the 'C' source code, and not these compiler-generated "internal" constants? If so, sounds like an opportunity for enhancement there...?
So, does XCONST only affect user constants defined with 'const' in the 'C' source code, and not these compiler-generated "internal" constants? That's correct. The problem with compiler-generated tables is that they are not REALLY part of YOUR data/code. They are an extension of a library routine and, as such, they are all routine-specific. For example, one method of switch-case implementation is similar to the following:
; Case # stored in registers LCALL switch_jump_table_handler DW 0005h ;# cases DW case_0_func DW case_1_func DW case_2_func DW case_3_func DW case_4_func ; switch_jump_table_handler returns here
So, does XCONST only affect user constants defined with 'const' in the 'C' source code, and not these compiler-generated "internal" constants? If so, sounds like an opportunity for enhancement there...? Amen. Allowing ALL non-code to be directed to a given place (upper 64k) would make the Cygnal/Triscend feature extremely useful. I appreciate Keils reluctance to include features that only work on selected derivatives, but since Keil with banking as a standard seem to push >64k systems, it would be nice if this non-banking memory expansion could be used. Erik