3 ms·
The question is how do you call open() from assembly code? On which register do you pass which arguments? Since open() is defined in C, you basically have to sp
by varajelle 5y ago
The question is how do you call open() from assembly code? On which register do you pass which arguments? Since open() is defined in C, you basically have to speak the C ABI, and therefore C.
And open was just an (easy) example. Now do that for xcb_create_window and all the other functions of all the system library you want to interact with.
- asguy 5y ago> Since open() is defined in C, you basically have to speak the C ABI, and therefore C. .. but what does open() call? Do you think that's air you're breathing? (The GP is implying you can just call directly into the kernel via a syscall,.. and all you need to worry about is your OS's syscall interface. You don't necessarily need the C ABI; unless of course your OS's kernel uses it for syscalls, at which point: sorry-not-sorry.)
- gpderetta 5y agoWell, I know that's not really the point, but for xcb_create you can just speak the X11 protocol over the wire. No need to call any xlib function.