Category : Files from Magazines
Archive   : PJ83.ZIP
Filename : ELLIPSE3.C
*
* Draws nested ellipses of varying eccentricities in the VGA's
* hi-res mode, mode 12h.
* For VGA only.
* Compile and link with listingX.c (where X is 1 or 4) with:
* tcc listingX listing3 (Turbo C)
* cl listingX.c listing3.c (MSC)
*/
#include
main() {
int XRadius, YRadius, Temp, Color;
union REGS Regs;
/* Select VGA's hi-res 640x480 graphics mode, mode 12h */
Regs.x.ax = 0x0012;
int86(0x10, &Regs, &Regs);
/* Draw nested ellipses */
for ( XRadius = 100, YRadius = 2, Color = 7; YRadius < 240;
XRadius++, YRadius += 2 ) {
DrawEllipse(640/2, 480/2, XRadius, YRadius, Color);
Color = (Color + 1) & 0x0F; /* cycle through 16 colors */
}
/* Wait for a key, restore text mode, and done */
scanf("%c", &Temp);
Regs.x.ax = 0x0003;
int86(0x10, &Regs, &Regs);
}
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/