/* TGI Praktikum Assembler - Gruppe 160 */ /* showlg.c - deutet den log(x) im Grafikmodus 320*200 an */ /* Hinweis: horizontale blaue Linie : Nullinie */ extern double lg(double x); /* eigene Logarithmusfunktion */ extern grafan(); extern grafaus(); extern pixel(unsigned int x, unsigned int y, unsigned char f); main() { unsigned int xpos=0; double y = 0; char c = 0; grafan(); for (xpos=1; xpos < 319; xpos++) { pixel (xpos, 100, 1); } for (xpos=1; xpos < 319; xpos++) { y = 100 - lg(((double) xpos)/ 100) * 30; pixel (xpos, (unsigned int) y, 15); } while (c != '\n') { c = getchar(); } grafaus(); return(0); }