*Micro/O/U Dtest title[dtest]; *The following locations are defined here so that dtest can be loaded without mesa SetTask[0]; OnPage[7]; kfcr: breakpoint,return; OnPage[xfPage1]; LoadC: breakpoint, return; *The following intercepts attempts on the part of the timer task to notify the Ethernet output task insert[EtherDefs]; Etherbreak: breakpoint, AT[EOTimerDoneLoc]; return; SetTask[0]; RV[uiCC0,40]; RV[uiCC1,41]; RV[uiCC2,42]; RV[uiCC3,43]; RV[uiBASE,44]; RV[uiBASE1,45]; RV[uiTEMP,46]; RV[uiRetLink,47]; *RV[FieldCount,50]; RV[uiCC4,52]; RV[uiCC5,53]; RV[uiCC6,54]; RV[cWord,56]; RV[cCnt,57]; RV[cLink,60]; *Register assignment depends on DCB being quad-aligned (at 1000b) RV[cNWrds,61]; RV[cDBA,62]; RV[cSLC,63]; OnPage[nepage]; DisplayTest: uiBASE _ 0C; uiBASE1 _ 0C; SetUpDCBs: uiCC0 _ 1000C; *Form two DCB'S at 1000b and 1004b uiCC1 _ 20C; * first is 16 words wide, starting at 1100, tabbed 4 words uiCC1 _ (uiCC1) or (2000c); uiCC2 _ 1000c; uiCC2 _ (uiCC2)+(100C); uiCC3 _ 50C; *5*16 = 80 scan lines total height T _ (uiCC0) + (4c); *store DCB at 1004b uiTEMP _ T; PSTORE4[uiBASE,uiCC0]; *The second DCB contains default values that can be changed with Midas T _ uiCC0; uiCC0 _ (ZERO); *second DCB (at 1000b) is end of chain uiCC1_44C; *second DCB is 44b words wide, no tab uiCC2 _ 4000c; *second DCB points to 4000 uiCC3 _ 400c; *and is 400b (*2) scan lines long nop; PSTORE4[uiBASE,uiCC0]; T _ (R400) + (20C); *turn on the display PSTORE1[uiBASE,uiTEMP], call[uiRETN]; uiTEMP _ 1C; T _ (R400)+(21c); *set interrupt mask to 1 so that we can count fields PSTORE1[uiBASE,uiTEMP]; *set mouse and keyboard words to -1 uiTEMP _ 177000C; T_ (uiTEMP) or (30C); uiCC0 _ (ZERO)-1; uiCC1 _ (ZERO)-1; uiCC2 _ (ZERO)-1; uiCC3 _ (ZERO)-1; PSTORE4[uiBASE,uiCC0]; T _ (uiTemp) or (34c); PStore4[uiBase,uiCC0]; *Set the cursor words (431b - 450b) to -1 T _ (R400) + (30c); Pstore4[uiBASE,uiCC0], call[uiRETN]; T _ (R400) + (34c); Pstore4[uiBASE,uiCC0], call[uiRETN]; T _ (R400) + (40c); Pstore4[uiBASE,uiCC0], call[uiRETN]; T _ (R400) + (44c); Pstore4[uiBASE,uiCC0], call[uiRETN]; T _ (R400) + (50c); Pstore4[uiBASE,uiCC0]; cLink _ 0c; uiPRESPIN: CALL[uiRETN]; uiSPIN: T_ (R400) + (24C); *Fetch mouse coordinates PFETCH2[uiBASE,uiCC0],CALL[uiRETN]; T _ 177000C; *mask coordinates so that they stay on the screen uiCC0 _ (uiCC0) and not (T); uiCC1 _ (uiCC1) and not (T); T_ (R400) + (26C); *Store into cursor coordinates PSTORE2[uiBASE,uiCC0], call[uiRETN]; *Update memory (one scan line) with a diagonal line pattern call[DiagPat]; *Store 177030 (mouse/keyset) and 177034-37 into the first DCB, one word per bit. uiCC0 _ 1000c; uiCC0 _ (uiCC0) + (100c); uiCC1 _ 0c; uiCC2 _ 177000c; uiCC2 _ (uiCC2) + (30c), call[KbdFill]; *do 177030 uiCC2 _ (uiCC2) + (4c), call[KbdFill]; *do 177034 uiCC2 _ (uiCC2) + 1, call[KbdFill]; *do 177035 uiCC2 _ (uiCC2) + 1, call[KbdFill]; *do 177036 uiCC2 _ (uiCC2) + 1, call[KbdFill]; *do 177037 lu _ NWW, goto[.+2,RODD]; goto[uiPRESPIN]; NWW _ 0C, goto[uiPRESPIN]; uiRETN: RETURN; KbdFill: usectask; T _ apc&apctask; uiCC3 _ 0c; *high half of base uiTemp _ T, Task; PFetch1[uiCC2,uiCC3,0]; uiCC4 _ 17c; *count the scan line loop here KbdFillLoop: uiCC5 _ 17c; *count the bit loop here KbFL1: uiCC3 _ lcy[uiCC3,1], dblgoto[xBit1,xBit0,R<0]; xBit1: uiCC6 _ (zero)-1, goto[KbSendBit]; xBit0: uiCC6 _ 0c, goto[KbSendBit]; KbSendBit: PStore1[uiCC0,uiCC6,0], TASK; uiCC0 _ (uiCC0) + 1; uiCC5 _ (uiCC5)-1; goto[KbFL1,ALU>=0]; uiCC4 _ (uiCC4)-1; goto[KbdFillLoop,ALU>=0]; apc&apctask _ uiTemp; return; DiagPat: usectask; T _ apc&apctask; uiCC0 _ T; cLink _ (cLink) -1; goto[NewDCB,ALU<0]; DiagSetup: T _ (cNWrds); cWord _ rcy[cWord,1]; cCnt _ T, call[DiagLoop]; DiagLoop: cCnt _ (cCnt) - 1; goto[.+2,ALU>=0]; apc&apctask _ uiCC0, goto[DiagRet]; PStore1[cDBA,cWord,0]; cDBA _ (cDBA) +1; DiagRet: return; NewDCB: T _ 1000c, TASK; PFetch4[uiBASE,cLink]; T _ lsh[cSLC,1]; cLink _ T; * now holds scan line count cSLC _ 0c; *now is high half of base register cNWrds _ rhmask[cNWrds]; cWord _ 1c, goto[DiagSetup]; END;