|
DataMuseum.dkPresents historical artifacts from the history of: Commodore CBM-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Commodore CBM-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 923 (0x39b) Types: TextFile Notes: UNIX file Names: »scrollu.c«
└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code └─⟦f4b8d8c84⟧ UNIX Filesystem └─ ⟦this⟧ »hrtty/src/scrollu.c«
#include "../h/rico.h" #include "../h/machine.h" #include "../h/display.h" #include "../h/subr.h" scrollu( li) uint li; { register uint y, ylim, n; uint o, *p, *q, co; for (n=li; n<MAXLINE; ++n) slcompute( n); for (n=(li+1); n<MAXLINE; ++n) { texttab[n-1] = texttab[n]; } y = (li+1) * YSCROLL; ylim = MAXLINE * YSCROLL; for (; y<ylim; ++y) { n = scantab[y].sc_nword; if (n) { if (y < YSPLIT) { p = (uint *)SEG0 + y*WPERSL; q = p - YSCROLL*WPERSL; } else if (y-YSCROLL >= YSPLIT) { p = (uint *)SEG1 + (y-YSPLIT)*WPERSL; q = p - YSCROLL*WPERSL; } else { p = (uint *)SEG1 + (y-YSPLIT)*WPERSL; q = (uint *)SEG0 + (y-YSCROLL)*WPERSL; } o = scantab[y].sc_off; p += o; q += o; aldir( q, p, n); } scantab[y-YSCROLL] = scantab[y]; } slcompute(li); /* eolerase( MAXLINE-1, 0); */ linerase(MAXLINE-1); texttab[MAXLINE-1] &= ~SCROLLABLE; }