|
DataMuseum.dkPresents historical artifacts from the history of: CP/M |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about CP/M Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 4352 (0x1100) Types: TextFile Names: »MIXRUT.C«
└─⟦4dd5d59b6⟧ Bits:30003303 Mix C version 2.1 og debugger til RC703 └─ ⟦this⟧ »MIXRUT.C« └─⟦b6190e06c⟧ Bits:30003304 Mix C version 2.1 til RC703 └─⟦b6190e06c⟧ Bits:30005327 Mix C version 2.1 til RC703 └─ ⟦this⟧ »MIXRUT.C«
/**** GOTOXY ****/ gotoxy(x,y) int x,y; æ escape(61); bdos(2,x+31); bdos(2,y+31); å /**** CURSOFF ****/ cursoff() æ escape(20); å /**** CURSON ****/ curson() æ escape(19); å /**** BLINKON ****/ blinkon() æ escape('1'); å /**** ULINEON ****/ ulineon() æ escape('2'); å /**** INVERSON ****/ inverson() æ escape('3'); å /**** HIGHON ****/ highon() æ escape('4'); å /**** ATTROFF ****/ attroff() æ escape('0'); å /**** ATTINIT ****/ attinit() æ char *ap; ap = 61440; outp(254,255); setmem(ap,1920,0); outp(255,255); å /**** ATTINIT1 ****/ attinit1(ax,ay,lx,ly,ak) int ax,ay,lx, ly; char ak; æ int ai; char *ap; ap = 61440; outp(254,255); for (ai=0; ai<ly; ai++) setmem(ap+(ay+ai-1)*80+ax-1,lx,ak); outp(255,255); å /**** ESCAPE ****/ escape(ee) char ee; æ bdos(2,27); bdos(2,ee); å /**** CLRFRCURS ****/ clrfrcurs() æ escape(25); /* ^Y */ å /**** CLEARSCR ****/ clearscr() æ bdos(2,26); å /**** CLRTOEOL ****/ clrtoeol() æ escape(24); å /**** BIP ****/ bip() æ bdos(2,7); å /**** SKLIN ****/ sklin(k1,k2,k3,k4) int k1,k2,k3,k4; æ int si; bdos(2,k1); sklin1(k2,5); si=1; while (si++ <= 5) æ bdos(2,k3); sklin1(k2,12); å bdos(2,k3); sklin1(k2,5); bdos(2,k4); å /**** NEWL ****/ newl() æ bdos(2,13); bdos(2,10); å /**** PNEWL ****/ pnewl() æ bdos(5,10); bdos(5,13); å /**** LEADIN ****/ leadin(lp) int lp; æ while (lp-- > 0) bdos(5,32); å /**** RAMME ****/ ramme(rx,ry,lx,ly) int rx, ry, lx, ly; æ int ri; cursoff(); gotoxy(rx,ry+ly-1); bdos(2,15); for (ri=ry+ly-2; ri > ry; ri--) æ gotoxy(rx,ri); bdos(2,4); å gotoxy(rx,ry); bdos(2,16); sklin1(5,lx-2); bdos(2,17); for (ri=ry+1; ri <= ry+ly-2; ri++) æ gotoxy(rx+lx-1,ri); bdos(2,4); å gotoxy(rx+lx-1,ry+ly-1); bdos(2,18); for (ri=rx+lx-2; ri > rx; ri--) æ gotoxy(ri,ry+ly-1); bdos(2,5); å curson(); å /**** RAMME1 ****/ ramme1(rx,ry,lx,ly) int rx,ry,lx,ly; æ int ri; gotoxy(rx,ry+ly-1); bdos(2,15); for (ri=ry+ly-2; ri > ry; ri--) æ gotoxy(rx,ri); bdos(2,4); å gotoxy(rx,ry); bdos(2,16); sklin1(5,lx-2); bdos(2,17); for (ri=ry+1; ri <= ry+ly-2; ri++) æ gotoxy(rx+lx-1,ri); bdos(2,4); å gotoxy(rx+lx-1,ry+ly-1); bdos(2,18); for (ri=rx+lx-2; ri > rx; ri--) æ gotoxy(ri,ry+ly-1); bdos(2,5); å å /**** FILL ****/ fill(fx,fy,lx,ly,kk) int fx,fy,lx,ly; char kk; æ int fj; char *fp; fp = 61440; cursoff(); for (fj=0; fj < ly; fj++) setmem(fp+(fy+fj-1)*80+fx-1,lx,kk); curson(); å /**** SKLINA ****/ sklina(k1,k2,k3,k4) int k1,k2,k3,k4; æ int si; cursoff(); bdos(2,k1); sklin1(k2,5); si=1; while (si++ <= 31) æ bdos(2,k3); bdos(2,k2); å bdos(2,k3); sklin1(k2,5); bdos(2,k4); curson(); å /**** WINDOWON ****/ windowon(wx,wy,wlx,wly) int wx, wy, wlx, wly; æ highon(); fill(wx+1,wy+1,wlx-2,wly-2,32); attinit1(wx+1,wy+1,wlx-2,wly-2,0); ramme(wx,wy,wlx,wly); å /**** WINDOWOF ****/ windowof(wx,wy,wlx,wly) int wx, wy, wlx, wly; æ attroff(); fill(wx,wy,wlx,wly,32); å /**** MAX ****/ max(a,b) int a,b; æ if (a > b) return(a); return(b); å /**** MIN ****/ min(a,b) int a,b; æ if (a < b) return(a); return(b); å /**** ISIN ****/ /* returnerer positionen for karakteren c */ isin(c,s) /* i strengen s. */ char c, *s; /* returnerer -1 hvis c IKKE findes i s */ æ int i; i = 0; while (*(s+i) != c && i < strlen(s)) i++; if (i < strlen(s)) return(i); else return(-1); å /**** SKLIN1 ****/ sklin1(kk1,kant) int kk1,kant; æ int sj; sj=1; while (sj++ <= kant) bdos(2,kk1); å /**** BIOSOUT ****/ biosout(c) char c; æ int bc, de, hl; char a; bc = c; bios(3,&bc,&de,&hl,&a); å /**** BIOSIN ****/ char biosin() æ int bc, de, hl; char a; bios(2,&bc,&de,&hl,&a); return(a); å /**** BIOSPRT ****/ biosprt(c) char c; æ int bc, de, hl; char a; bc = c; bios(4,&bc,&de,&hl,&a); å /**** PRTON ****/ prton() æ int bc, de, hl; char a, hstrÆ10Å; bios(14,&bc,&de,&hl,&a); if (a == 0) help1(224L,2,hstr); bios(14,&bc,&de,&hl,&a); if (a == 0) return(0); return(1); å«eof»