dos_compilers/Zortech C++ v206/DEBUG/EXAM6.C
2024-07-02 07:30:38 -07:00

25 lines
520 B
C
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
Simple example program showing the use of assembler modules
mixed with C modules. The function gotoxy is written in assembler.
*/
#include <stdio.h>
void gotoxy(int y,int x); /* assembler function in exam6a.asm */
int loop,x,y;
main()
{
printf("EXAMPLE 6\n");
for (loop=0;loop<10;loop++) {
for (y=0;y<25;y++) gotoxy(y,0);
for (x=0;x<80;x++) gotoxy(24,x);
for (y=24;y>=0;y--) gotoxy(y,79);
for (x=79;x>=0;x--) gotoxy(0,x);
}
printf("EXAMPLE 6 finished\n");
exit(0);
}