Is it possible to use uPSD3354 option "DPTR Auto Toggle" and "DPTR Auto Increment" in my source code ? Problem: the standard interrupt header do not contain code for saving and initializing this options in DPTC a DPTM registers. Original "memcpy" uses only "manual" DPTR toggle and don't use auto increment of DPTR. Thank you.
i will answer the question bcoz i do it b4 and i know the right answer. and the other people will sometime give a bad answer. i got good grade for my one in the last test.
yes. it is posible. use assembly for the isr. with the c51 stuff c code for interrupts is for whimps. and it is very badly in efficient.
Ok, I use inline assebly in "c code". But this required "Generate Assembler SRC file" and assembly it. Make algorithm dont't work effective (it translate code every time is executing) and debugger can't view structured data in this moment :-( I dont't think that efficiency of "c code" is much more worse that ASM. Compiler produce quite optimized code and some extra instruction is not important on this quite fast MCU, I think. But this depends on aplications.
why use inline assemlbler??? a real porgrammer uses assembler and links it so no need to src!!!!
this anser got me 98% in my task :)))))
Parat Matfakamta's solution is correct - whether or not you agree with his/her opinions about "real programmers" and "wimps"
Alternatively, you could write an ISR "wrapper" in assembler, and have that call a 'C' function to do the main "body" of the interrupt handling...
mrs neils answer is not to bad but it is only 89% right.
Mrs Neils would probably prefer to be called Mr Neil :p
That's okay. We're all about welcoming diversity here. If Andy wants to be Mrs. Neils in his off hours, that's fine with me.
Keep in mind that the compiler doesn't generate code to take advantage of dual DPTRs (auto-increment or not). The libraries supplied with the compiler do use dual DTPRs in functions such as memcpy(). I'd expect that a library written just for this part would take advantage of the auto-increment feature. A more generic library might have to settle for the "inc dps" method.
(Perhaps it's also worth mentioning that dual DPTRs don't lend much advantage in most situations, which is probably one reason why the compiler doesn't use them. For most of the generated C code, it's about as easy to reload the DPTR as to switch to an alternate -- and if you have more than three variables, you'll have to reload some DPTR most of the time anyway. The dual DPTRs come in handy when the code has to deal with exactly two buffers at once. memcpy() is a great example. For most other code it doesn't matter. But where you can get some performance benefit, you'll need to resort to assembler to write your own routines to use the dual DPTRs.)
Would you care to clarify the other 11% ?
the method of calcerlating marks is very described in the rukles. it is includes perceeved understanding and interest in her subject. and preveous answers. if the mark is dispeuted she can appeal. but mark can go down or up! you wnat to go?
Thank you for advices. Today I found "C" intrinsic functions :
_push_(DPTC); _push_(DPTM); DPTM=0; DPTC=0;
and
_pop_(DPTM); _pop_(DPTC);
This functions in ISR serve my problem ...
View all questions in Keil forum