#include "vt1200_xlib.h" /* * XMapWindow maps with the true MapWindow entry (0x3FD64F60, request opcode * 8), not 0x3FD645B0: that address is XRaiseWindow (ConfigureWindow opcode * 12, CWStackMode=Above). */ #define MARK(n) (*(volatile unsigned int *)(0x018A8000u + (n) * 0x20u)) int xhello(void) { Display *d = XOpenDisplay("0::0"); MARK(0) = (unsigned int)d; if (!d) return -1; unsigned int root = vt1200_root(d); MARK(1) = root; Window w = XCreateSimpleWindow(d, root, 100, 100, 400, 200, 2, 0, 1); MARK(2) = (unsigned int)w; XMapWindow(d, w); int s = XSync(d, 0); MARK(3) = (unsigned int)s; return (int)w; }