I am searching answers to the following questions both in the fora and the
sources (I gave up the documentation, as it gives more questions than
answers...), but maybe somebody can answer me right off:

- in assembler functions, either inline or externally linked, the assumption
is, that no register may be trashed. Correct?
- on the other hand, DPTR, ACC, B may be freely thrashed (provided the
return type is void). Correct?
- therefore, for a register intensive application, I'd like to swap register
banks as a least processing-expensive solution. My assumption is, that in
the declaration, I'd add the "using" attribute (with the appropriate bank
number), together with "naked". I assume, that I still need to provide the
switching code upon entry/exit on my own; but the compiler is aware that the
register bank is in usage and will not assign it to iram/dram/stack or
otherwise. Correct?

I am uncertain for the last item, as there are cryptic comments in the
documentation regarding the 'using' attribute. Chapter 3.10 says, "The using
attribute will have no effect on the generated code for a non-interrupt
function (but may occasionally be useful anyway3.3). (pending: Note,
nowadays the using attribute has an effect on the generated code for a
non-interrupt function.)". What is this supposed to mean?

On a similar note, chapter 3.12 says on labels in inline assembler, that "In
older versions of the compiler all labels defined within inline assembler
code had to be of the form nnnnn$ where nnnn is a number less than 100
(which implies a limit of utmost 100 inline assembler labels per function)."
OK, which is "older versions of compiler" and assuming I have the up-to-date
version, what are the rules now?

Thanks,

Jan Waclawek



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to