Absolute/Physical addressing in Lisp?
Quote:
> >[snipped]
> >> I would have thought this impossible from /any/ language. You
> >> certainly can't directly access physical memory from C (or
> >> even Java!) without getting a special licence from the OS.
> >OK, but once this policy/administrative issue is settled, is there a way
> >in Lisp.
> >My understanding is that the OP thinks of accessing physical addresses
> >to use a special control board in his system, for example.
> In Unix-like operating systems, it's typically implemented using a device
> driver, which you access by opening a device special file. Lisp can open
> files and read/write bytes.
Other possibilities include:
- The OS allows you to cause the device space to be mapped into your
process's address space. Many CL implementations will then allow
you to access such memory using either sub-primitive operators
and/or alien interfacing functions.
- The OS allows you to access certain (previously arranged) ranges of
device space using the architectures device-IO operations. Many CL
implementations will allow you to emit machine-code instructions of
your choice, possibly using the built-in assembler.
In any case the details will vary between CL implementations and/or
platforms.
Regs, Pierre.
--
The most likely way for the world to be destroyed, most experts agree,
is by accident. That's where we come in; we're computer professionals.
We cause accidents. -- Nathaniel Borenstein