I read about programming an operating system in Rust (for x86_64) on
It was very educational. Sadly, there are still a lot of topics, that the blog hasn't covered (yet). One of them is, how to draw pixels directly on the screen.
I searched a bit and found a tutorial on VGA graphics. It mentions the following:
To set the video mode, call interrupt 10h (BIOS video functions) with 0 (zero) in the AH register and the desired mode number in the AL register. For mode 13h, the code would be as follows:
union REGS regs;
regs.h.ah = 0x00;
regs.h.al = 0x13;
int86(0x10,®s,®s);
To return to text mode after the program finishes, simply set the mode number to 3.
union REGS regs;
regs.h.ah = 0x00;
regs.h.al = 0x03;
int86(0x10,®s,®s);
I'm a bit lost. How does that translate to Rust?