home *** CD-ROM | disk | FTP | other *** search
- /*** Hercules : 0xB0000000, CGA-VGA : 0xB8000000,
- muß vom Programm evtl. gesetzt werden. ****/
-
- extern char far *SCRSEG;
- extern char far *SCRPTR;
-
- #define SCR_OFS(x,y) ((y-1)*160+(x-1)*2)
- /*** Ergebnis : Offset des Zeichens an Position x/y ***/
-
- #define SET_POS(x,y) { SCRPTR=SCRSEG+SCR_OFS(x,y); }
- /*** Setzt Bildschirmposition für alle Makros auf x/y ***/
-
- #define WR_SCR(c,a) { *SCRPTR=(c); *(SCRPTR+1)=(a); SCRPTR+=2; };
- /*** Schreibt an aktuelle Position (siehe SET_POS) das Zeichen c
- mit dem Attribut a ***/
-
- #define WR_ATR(a) { *(SCRPTR+1)=(a); SCRPTR+=2; };
- /*** wie WR_SCR, nur Farbe wird gesetzt. ***/
-
- #define CLEAR_LINE(count,a) { int i; for (i=1; i<=count; i++) WR_SCR(' ',(a)) }
- /*** Füllt ab der gesetzten Position count Stellen mit Leerzeichen
- in Farbe a ***/
-
- #define WR_STR(str,a) { char *ptr=(str); while (*ptr!=0) { WR_SCR(*ptr,(a)); ptr++; } }
- /*** Schreibt String str in Farbe a an gesetzte Position ***/
-
- #define WR_ASTR(zahl,a) { int i; for (i=1; i<=zahl; i++) WR_ATR((a)); }
- /*** wie WR_STR, ohne Zeichenausgabe ***/
-
- #define GET_CHRS(ptr,count) { int i; char *p=(ptr); for (i=1; i<=count*2; i++) { *p++=*SCRPTR++; } }
-
- #define MAX(x,max) { if ((x)>(max)) x=(max); }
-
- #define MIN(x,min) { if ((x)<(min)) x=(min); }