Hi, John.

On Wed, Mar 6, 2013 at 11:17 PM, John Meacham <[email protected]> wrote:
> Interesting. Perhaps  something like
>
> foreign import "volatile &periphBase" :: Ptr Word32
>
> which will declare
>
> extern volatile uint32_t periphBase in the file, then you would just
> have a linker symbol periphBase at 0x4000000. (or just import a value
> with zero and do pointer arithmetic like you do)

Ah. It's nice for Cortex-M3!

But I would like to rewrite NetBSD kernel with jhc and Haskell code.

  http://netbsdman.masterq.net/org_netbsd/src/share/man/man9/bus_space.9.html

NetBSD doesn't touch raw memory directly. It has own bus driver.
I would like to rewrite the bus driver with jhc.
How do I write the code with extern volatile style?

Thank's,
--
Kiwamu Okabe

_______________________________________________
jhc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/jhc

Reply via email to