COMPUTE! ISSUE 40 / SEPTEMBER 1983 / PAGE 210
| AUTHOR | SUBJECT | TITLE | YEAR | INDEX | AUTHOR |
| ← Record 1 → | ← Record 2 - | ||||
| Routine
To Set Bits In An Index Word. (This routine is based on YIN response with cursor moving down list on screen. You must arrange a stop or wraparound when N gets to maximum and P=7. Sanie at N=0:P=0.) 1. DIM the array IW(x) to nr of bytes in index word. Zero IW if not already done initially. 2. Print subjects in list on screen. N=0;P=0 Zero byte nr and bit nr. Print "cursor" opposite zeroth subject. 3. GET loop. 4. If SPACE, move cursor down: P = P + 1. IF P=8, then N=N+1;P=0. 5. If SHIFT-SPACE, move cursor up. IF P=-1, then N=N-1;P=7. 6. If Y, then move cursor down. If subject is marked, then GOTO 3. Else, add 2 P to IW(N); mark subject. 7. If N, move cursor down. If subject not marked, GOTO 3. Else, Subtract 2 P from IW(N); clear mark. 8. Other inputs invalid: GOTO 3. |