this is the kernel, so "standard" SpareMint Libs used to compile MiNT
code:
if (screen.planes > 8)
{
MFDB scr, dst;
struct rgb_1000 srgb, rgb;
short pxy[8];
union { unsigned short w[64]; unsigned long l[32];} b;
(*v->api->wr_mode)(v, MD_REPLACE);
(*v->api->l_type)(v, 1);
(*v->api->l_ends)(v, 0, 0);
(*v->api->l_width)(v, 1);
vq_color(v->handle, 0, 1, (short *)&srgb);
// display("saved %04d, %04d, %04d", srgb.red, srgb.green, srgb.blue);
rgb.red = 1000;
rgb.green = 1000;
rgb.blue = 0;
vs_color(v->handle, 0, (short *)&rgb);
(*v->api->line)(v, 0, 0, 0, 0, 0);
scr.fd_addr = NULL;
dst.fd_addr = &b;
dst.fd_w = 1;
dst.fd_h = 1;
dst.fd_wdwidth = 1;
dst.fd_stand = 1;
dst.fd_nplanes = screen.planes;
dst.fd_r1 = dst.fd_r2 = dst.fd_r3 = 0;
pxy[0] = 0;
pxy[1] = 0;
pxy[2] = 0;
pxy[3] = 0;
pxy[4] = 0;
pxy[5] = 0;
pxy[6] = 0;
pxy[7] = 0;
vro_cpyfm(v->handle, S_ONLY, pxy, &scr, &dst);
vs_color(v->handle, 0, (short *)&srgb);
switch (screen.planes)
{