Where have we gone ?
Where have we gone ?
mov al, 13
int 10
And then you pushed your pixels to the video segment (a0000). So simple and elegant...But my dad still mocked me because it was too complicated! Back in his day, you didn't need to bother with stupid video modes, and could just POKE the pixels to your screen!
mem[$A000:x+(320*y)] := color
In UEFI you have VESA Video Mode to handle most of the annoying mode selection stuff and GOP to handle...memory mapped framebuffer in linear address, so that you can just write directly to the framebuffer to push your pixel...that's even simpler.
You want double or triple buffering? Just make another memory buffer with the same dimension and strides, and recursively push each level of buffer up on render, easy.
MessageBox(NULL, "Something Went Wrong", "Error", MB_ICONEXCLAMATION | MB_OK);
A full windows window including a message handling loop is only about 50 lines of code [0][0] https://learn.microsoft.com/en-us/windows/win32/learnwin32/c...
(You could probably put an honest-to-goodness window up in 10 lines, but you'd have to squeeze the code together a bit more than most reasonable people would consider permissible, and/or it'd be missing a few key aspects. But I bet 30 lines would be plenty for a full-on one though, with its own custom window proc that has a WM_PAINT handler that does something and a WM_CREATE handler that pops a context pointer in GWLP_USERDATA and a WM_DESTROY handler than frees the context. And a message loop. The code today would be basically exactly the same as it was in the Windows 95 days.)