The example shown at https://mattiasgustavsson.itch.io/dos-like doesn’t compile anymore, a few minor changes are needed.
Something like this:
#include <stdlib.h>
#include "dos.h"
int main(int argc, char* argv[])
{
setvideomode(videomode_320x200);
while(!shuttingdown())
{
waitvbl();
for(int i = 0; i < 5; ++i)
{
setcolor(rand() % 256);
line(rand() % 320, rand() % 200, rand() % 320, rand() % 200);
setcolor(rand() % 256);
fillcircle(rand() % 320, rand() % 200, rand() % 30);
setcolor(rand() % 256);
circle(rand() % 320, rand() % 200, rand() % 30);
}
if(keystate(KEY_ESCAPE)) break;
}
return 0;
}