Re: 89C51ED2



On Sep 10, 6:36 pm, krw <k...@xxxxxxxxxxxxxxxx> wrote:
In article <48C7E40F.1F3FA...@xxxxxxxxxxx>,
rabbitsfriendsandrelati...@xxxxxxxxxxx says...





krw wrote:

rabbitsfriendsandrelati...@xxxxxxxxxxx says...
krw wrote:

You don't do subroutines or interrupts?

declare procedure XYZ interrupt(1) using 1;         (register bank 1) MAIN defaults to
register bank zero.

code

end;

For example. The interrupt number defines the int source.

Return address?  USING only declares the register bank, it doesn't
set it.

Uh ? Bloody well does unless you have a different understanding of 'does' to me.

Not when I was using Intel's software.  USING was only a directive
to get the compiler to point R0-7 to the right place.  It didn't
actually load the pointers selecting the bank.

You remember wrong. USING tells the compiler what to assume is in the
PSW.4, PSW.3 bits. In PLM it most likely also results in a move into
the PSW.

In the ASM51, you could run with no declared bank by not putting a
USING into the code. This is handy when you want to make code that is
bank independent.

My 32 bit math library is bank independent so it can be used in
interrupts etc.




--
Keith

.



Relevant Pages

  • Re: Bankswitching!
    ... Das macht alles der Compiler. ... und dann kann man zwecks Optimierung normalerweise seinen Code ... > globale Variablen und je eine Bank pro Modul für lokale. ... | Banking optimization removes MOVLB instruction in instances where it ...
    (de.comp.lang.misc)
  • Re: 89C51ED2
    ... to get the compiler to point R0-7 to the right place. ... actually load the pointers selecting the bank. ... it doesn't actually point R0-7 to the appropriate hardware. ... My 32 bit math library is bank independent so it can be used in ...
    (sci.electronics.design)
  • Re: Which PIC18 C Compiler?
    ... assemblies I have used regularly. ... a C compiler especially with PIC's is the compiler only has to get it ... memory management and that helps. ... most sense for really small programs which did not need any bank switching. ...
    (comp.arch.embedded)
  • Re: IAR and memory banking for 128K flash and 8051
    ... switchable and then another bank to be switchable. ... a call was made from a routine in one bank to a routine in another ... were done through this bank switching routine. ... described by IAR compiler documents, but when I program the flash, the ...
    (comp.arch.embedded)
  • Re: IAR and memory banking for 128K flash and 8051
    ... switchable and then another bank to be switchable. ... a call was made from a routine in one bank to a routine in another ... were done through this bank switching routine. ... described by IAR compiler documents, but when I program the flash, the ...
    (comp.arch.embedded)

Quantcast