texts writer wrote:
> For example, there is a backend for 6502. To use that backend with a
> different 6502 platform, library must be ported.
> How interfacing with system native features implemented? In other
> words, how to implement system call?
> What kind of interface or syntax EM provides to do that? I didn't find
> answer in sources, at least I was searching
EM provides an opcode called mon for doing this sort of thing, but these
days it's not useful. Instead we simply define machine code functions
that implement syscalls, that the libc calls directly.
For an example, look at the pc86 platform. The syscall library for this
is in plat/pc86/libsys. It implements only a very tiny number of
syscalls, but it's enough to make the libc work.
--
David Given
dg@...
|