Dani,
This totally depends on what you would want the compiler
to do. Should this appear around every MOVX instruction
or also around several when dealing with multibyte
variables? Or even around iCodes (elementary
instructions for the compiler)? Or bigger yet?
In case the first is good enough this can easily be
solved with a peephole rule:
replace {
movx %1,%2
} by {
jb _DMA0XBY,.
setb _DMA0HLT
movx %1,%2
clr _DMA0HLT
}
If necessary you can also insert code to select the
proper SFR page and return it to previous setting
afterwards.
Greets,
Maarten
> Dear list,
>
> the silabs C8051F060 incorporated a DMA controller. While the DMA
> controller is running, a special procedure must be followed to access
> the xram (wait DMA0XBY ==0, set DMA0HLT, access xram, clr DMA0HLT bit).
> I wonder how much work it would be to teach this feature to SDCC?
>
> best regards
>
> Dani
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user