:IF[WithTOR]; ********************************************* INSERT[UIBDefs]; TITLE[UIB]; % Edit by Fiala 18 March 1982: add WithTOR conditional for integration. Edit by Jim Frandeen September 15, 1980 4:34 PM Change DoInt to NotifyInterrupt with tasking return Edit by rej March 27, 1980 3:16 PM OUTPUT fix, cursY fix Edit by rej March 27, 1980 10:10 AM remove LOADPAGE from cursor load Edit by rej March 21, 1980 3:18 PM code for multiple channel buffer transfers Edit by rej March 19, 1980 1:23 PM pstore4 mod Edit by fsb January 25, 1980 10:06 AM D0lang version 6 changes Edit by rej December 27, 1979 10:26 AM htab_300 to sel 16x16 cursor Edit by rej December 27, 1979 10:11 AM Loadpage bug fixed for vs and scb interrupts Edit by rej October 19, 1979 2:28 PM change rtclow to 355 Edit by rej October 1, 1979 11:14 AM no more output to select InputChannelBuffer Edit by rej September 28, 1979 3:48 PM fix notify Edit by SRD September 19, 1979 2:16 PM Make naked notify a NOP because it destroys uibChannelTransferFlags. Edit by rej September 12, 1979 10:58 AM init goes to EndField rather than vs Edit by rej September 11, 1979 3:39 PM init state save Edit by rej August 24, 1979 8:32 AM both alto and d0 modes Edit by rej August 24, 1979 11:12 AM pull blanking out of alto cursor Edit by rej August 24, 1979 5:03 PM got rid of D0 mode % SetTask[uibTask]; uibInit: uibCSBbase_uibrhCSBbase, At[uibInitLoc]; uibCSBbase_(uibCSBbase) OR (uiblhCSBbase); uibCSBbase1_uibrhCSBbase1; uibCSBbase1_(uibCSBbase1) OR (uiblhCSBbase1); uibControlReg _ (uibAllowWU); OUTPUT[uibControlReg,uibControlRegAddr]; *ALLOW WAKEUPS *set keyboard words to -1 (key up) uibBase1_zero; uibBase _ AuiblhMouseButtonBase; uibBase _ (uibBase) or (AuibrhMouseButtonBase); * 177030 uibTempReg1 _ (ZERO)-1; uibTempReg2_ (ZERO)-1; uibTempReg3 _ (ZERO)-1; uibTempReg4 _ (ZERO)-1; uibLink_zero; PSTORE4[uibBase,uibTempReg1,0]; * mouse,keyset,etc. PSTORE4[uibBase,uibTempReg1,4]; * keyboard[0:3]. t_uibSCBsavedQuadOffset; PSTORE4[uibCSBbase, uibTempReg1];*just to be safe t_uibChannelTransferFlagsOffset; *set to no transfer in progress PSTORE1[uibCSBbase, uibLink]; *uibLink just happens to have a zero LoadPage[uibPage]; GoToP[.+1]; OnPage[uibPage]; CALL[uibInitReturn]; ************************************************ *First wakeup comes here. ************************************************ uibFirstInst: GOTO[AuibENDFIELD], uibBase_ AuibMemPage1; *set base back to ALTO IO page uibInitReturn: RETURN; ********************************************** *END DISPLAY ALTO/UIB ********************************************** SETTASK[uibTASK]; ********************************************** *end of display - send black background and fetch ALTO DCB head ********************************************** ONPAGE[uibPage]; AuibENDFIELD: uibHTAB_300C; *send black background OUTPUT[uibHTAB,uibHTABaddr]; uibBASE1 _ zero; uibBase_ AuibMemPage1; uibCSBbase_uibrhCSBbase; uibCSBbase_(uibCSBbase) OR (uiblhCSBbase); uibCSBbase1_uibrhCSBbase1; uibCSBbase1_(uibCSBbase1) OR (uiblhCSBbase1); t_AuibrhDCBheadAddr; TASK, IOSTROBE, PFETCH2[uibBASE,uibLINK]; *fetch alto DCBhead and INTmask AuibUpdateRTC: uibTempReg1 _ 355C; *Point to RTCLOW t_ nSTKP; STKP _ uibTempReg1, uibTempReg1 _ T,NoRegILockOK; uibTempReg1 _ (uibTempReg1) XOR (377C); *STKP read inverted STACK _(STACK) AND NOT (100000C),GOTO[AuibNORTCOV,R>=0]; *must update RTC t_30c; PFETCH1[uibBASE,uibTempReg2]; *can't return untill STKP restored uibTempReg2 _ (uibTempReg2) + 1; PSTORE1[uibBASE,uibTempReg2]; AuibNORTCOV: STKP _ uibTempReg1; CALL[uibSyncWithVS]; uibSyncWithVS: INPUT[uibStatusReg1, uibStatusReg1Addr]; LU_LDF[uibStatusReg1, 15,1] ; *vertical ? GOTO[AuibInitCursorLoading,ALU#0], uibScanLineCount_uibNonDisplayCount; IOSTROBE; RETURN; ********************************************** *CURSOR LOADING ALTO ********************************************** ONPAGE[uibPage]; AuibInitCursorLoading: t_LDF[uibStatusReg1,14,1]; *check field SKIP[ALU#0], uibCursX_AuibLoadHiOrderNibble; *select upper or lower half of RAM uibCursX_(uibCursX) OR (100000c); uibCursBitmapPtr_t; *t contains one or zero depending on field t_uibCursBitmapPtr_(uibCursBitmapPtr)+(AuibrhCursBase); uibCursLineCount_(7c); *eight lines/field AuibCursNextLineSetup: GOTO[AuibCursOff, R<0], uibCursLineCount_(uibCursLineCount)-1; OUTPUT[uibCursX, uibCursorPointerAddr]; *set RAM pointer for next line CALL[uibSleep], PFETCH1[uibBase, uibCursWord];*fetch 4 alto nibbles/line AuibCursLoad: t_uibCursBitmapPtr_(uibCursBitmapPtr)+(2c);*set ptr for next word; AuibCursOutputNibbles: CALL[AuibCursAltoNibbleLoop], uibCursNibbleCount_(3c); *4 alto nibbles/line GOTO[AuibCursNextLineSetup], uibCursX_(uibCursX)+(4000c); *add one to line number ********************************************** *transfer subroutine send 4 nibbles ********************************************** AuibCursAltoNibbleLoop: *loop thru 4 nibbles GOTO[AuibCursAltoNibbleLoopRTN, R<0], uibCursNibbleCount_(uibCursNibbleCount)-1; OUTPUT[uibCursWord, AuibCursMemAddr]; GOTO[AuibCursAltoNibbleLoop], uibCursWord_LSH[uibCursWord,4]; AuibCursAltoNibbleLoopRTN: uibCursWord_uibCursWord, RETURN; *output gotcha AuibCursOff: CALL[uibSleep], uibCursX_(uibTurnOffCursor); GOTO[uibFifo], OUTPUT[uibCursX, uibCursorPointerAddr]; *turn off cursor ********************************************** *FIFO ********************************************** ONPAGE[uibPage]; uibFifo: ********************************************** *restore state: * 1) retrieve saved quad from CSB * 2) retrieve ChannelTransferFlags word from CSB ********************************************** AuibFIFOstateRestore: t_uibChannelTransferFlagsOffset; PFETCH1[uibCSBbase, uibChannelTransferFlags]; t_uibSCBsavedQuadOffset; GOTO[uibProcessFifo], PFETCH4[uibCSBbase, uibQuadWord0]; ********************************************** *process fifo entries ********************************************** uibProcessFifo: uibFifoScanLineLoop: *** do untill time for display (uibScanlineCount<0) CALL[uibNOPreturn], IOSTROBE; GOTO[uibFIFOstateSave, R<0], uibScanLineCount_(uibScanLineCount)-1; GOTO[uibEntryLoop], uibFifoEntryCount_(uibFifoEntriesPerScanLine); uibEntryLoopEnd: GOTO[uibFifoScanLineLoop,R<0], uibFifoEntryCount_(uibFifoEntryCount)-1; NOP;*placement CALL[uibNOPreturn]; *task at end of each entry uibEntryLoop: *** do while entry in Fifo(IOATTEN) or channel transfer and entryCount >=0 GOTO[uibChannelTransfer, R<0], LU_uibChannelTransferFlags; *channel transfer SKIP[IOATTEN]; GOTO[uibFifoScanLineLoop]; *FIFO empty INPUT[uibUIBdata,uibUIBdataAddr]; *FIFO entry SKIP[R<0], DISPATCH[uibUIBdata,3,4], LU_uibUIBdata; DISP[uibFifoCommands], t_RHMASK[uibUIBdata]; DISP[uibFifoDataTypes], t_RHMASK[uibUIBdata]; ********************************************** *fifo state save ********************************************** uibFIFOstateSave: t_uibSCBsavedQuadOffset; nop; *PSTORE4 rule CALL[uibNOPreturn], PSTORE4[uibCSBbase, uibQuadWord0]; t_uibChannelTransferFlagsOffset; PSTORE1[uibCSBbase, uibChannelTransferFlags]; uibALTOvsInterrupt: nop; *LOADPAGE GOTCHA LOADPAGE[NotifyInterruptPage]; IOSTROBE, CALLp[NotifyInterrupt], t_uibALTOvsInterruptMask; GOTO[uibALTOdisplay]; ********************************************** *FIFO COMMANDS AND DATA ********************************************** uibFifoCommands: uibFetchKeyQuad: AT[uibFifoCommandsDispLoc,0], AuibFetchKeyQuad: uibBase_AuiblhKeyBoardBase; uibBase_(uibBase) OR (AuibrhKeyBoardBase); GOTO[uibEntryLoopEnd], PFETCH4[uibBase,uibQuadWord0,0]; uibStoreKeyQuad: AT[uibFifoCommandsDispLoc,1], AuibStoreKeyQuad: uibBase_AuiblhKeyBoardBase; uibBase_(uibBase) OR (AuibrhKeyBoardBase); GOTO[uibEntryLoopEnd], PSTORE4[uibBase,uibQuadWord0,0]; uibUpdateMouse: AT[uibFifoCommandsDispLoc,2], t_uibMouseDelXY; *save before clobbering with PFETCH CALL[uibNOPreturn], uibTempReg4_t; AuibUpdateMouse: uibBase_AuibMemPage1; uibBase_(uibBase) + (AuibrhMouseXYBase); CALL[uibCalcMouseXY], PFETCH4[uibBase,uibMouseXcoord,0]; GOTO[uibEntryLoopEnd], PSTORE4[uibBase,uibMouseXcoord,0]; uibCalcMouseXY: t_RHMASK[uibTempReg4]; SKIP[NOH2BIT8], uibMouseXcoord_(uibMouseXcoord)+t; uibMouseXcoord_(uibMouseXcoord) + (177400c); *extend sign bit t_LDF[uibTempReg4,0,10]; SKIP[NOH2BIT8],uibMouseYcoord_(uibMouseYcoord)+t; uibMouseYcoord_(uibMouseYcoord) + (177400c); *extend sign bit USECTASK; RETURN; uibUpdateMouseButtons: AT[uibFifoCommandsDispLoc,3], AuibUpdateMouseButtons: uibBase_AuiblhMouseButtonBase; uibBase_(uibBase) OR (AuibrhMouseButtonBase); PFETCH4[uibBase, uibMouseButtonWord,0]; t_uibMouseButtonWord_(LHMASK[uibMouseButtonWord]) OR t;*zero = depressed uibQuadWord3_t; *update 0th and 3rd word of quad word NOP; *here to allow write of uibTempReg4 GOTO[uibEntryLoopEnd], PSTORE4[uibBase, uibMouseButtonWord,0]; uibFetchSCBcsbQuad0: AT[uibFifoCommandsDispLoc,4], t_uibSCBcsbQuad0offset; GOTO[uibEntryLoopEnd], PFETCH4[uibCSBbase,uibQuadWord0]; uibStoreSCBcsbQuad0: AT[uibFifoCommandsDispLoc,5], t_uibSCBcsbQuad0offset; GOTO[uibEntryLoopEnd], PSTORE4[uibCSBbase,uibQuadWord0]; uibFetchSCBcsbQuad1: AT[uibFifoCommandsDispLoc,6], t_uibSCBcsbQuad1offset; GOTO[uibEntryLoopEnd], PFETCH4[uibCSBbase,uibQuadWord0]; uibStoreSCBcsbQuad1: AT[uibFifoCommandsDispLoc,7], t_uibSCBcsbQuad1offset; GOTO[uibEntryLoopEnd], PSTORE4[uibCSBbase,uibQuadWord0]; ****** Set up control for transfer uibInputChanTransfer: AT[uibFifoCommandsDispLoc,10], uibChannelTransferFlags_(uibChannelTransferFlags) OR (uibInputChannelFlag); uibOutputChanTransfer: AT[uibFifoCommandsDispLoc,11], uibChannelTransferFlags_(uibChannelTransferFlags) OR (uibExecuteChannelTransfer); t_uibChannelIOCBbaseOffset; PFETCH2[uibCSBbase,uibChannelIOCBbase];*fetch pointer to IOCB table t_LDF[uibUIBdata,12,6];*select IOCB LU_uibChannelIOCBbase; PFETCH4[uibChannelIOCBbase,uibChannelBuffBase];*fetch IOCB uibUIBdata_(LDF[uibUIBdata,10,2]);*n th additional transfer of a multi-buffer transfer t_LSH[uibUIBdata,10]; *multiply by buffer size (256d) GOTO[uibEntryLoopEnd], uibChannelBuffPtr_(uibChannelBuffPtr)+t; * (start+n*256) uibStoreTouch: AT[uibFifoCommandsDispLoc,12], SKIP[R EVEN], LU_uibAltoModeSwitch; uibDisplayStatus_(uibDisplayStatus) OR (uibDisplayStatusTouchMask); GOTO[uibEntryLoopEnd], PSTORE2[uibCSBbase,uibTouchX,uibTouchOffset]; uibNotifyMesaSCBdriver: AT[uibFifoCommandsDispLoc,13], t_uibFifoEntryCount; *save it , since NotifyInterrupt uses registers 0&1 uibTempReg4_t; t_uibSCBinterruptMaskOffset; PFETCH1[uibCSBbase,uibSCBinterruptMask]; LOADPAGE[NotifyInterruptPage]; CALL[NotifyInterrupt], t_uibSCBinterruptMask; t_uibTempReg4; *restore fifoentrycount and channeltransferflags uibFifoEntryCount_t; GOTO[uibEntryLoopEnd], uibChannelTransferFlags_zero; uibFifoDataTypes: uibReplaceQuadByte0: AT[uibFifoDataTypesDispLoc,0], GOTO[uibEntryLoopEnd], uibQuadWord0_(LHMASK[uibQuadWord0]) OR t; uibReplaceQuadByte1: AT[uibFifoDataTypesDispLoc,1], t_LSH[uibUIBdata,10]; GOTO[uibEntryLoopEnd], uibQuadWord0_(RHMASK[uibQuadWord0]) OR t; uibReplaceQuadByte2: AT[uibFifoDataTypesDispLoc,2], GOTO[uibEntryLoopEnd], uibQuadWord1_(LHMASK[uibQuadWord1]) OR t; uibReplaceQuadByte3: AT[uibFifoDataTypesDispLoc,3], t_LSH[uibUIBdata,10]; GOTO[uibEntryLoopEnd], uibQuadWord1_(RHMASK[uibQuadWord1]) OR t; uibReplaceQuadByte4: AT[uibFifoDataTypesDispLoc,4], GOTO[uibEntryLoopEnd], uibQuadWord2_(LHMASK[uibQuadWord2]) OR t; uibReplaceQuadByte5: AT[uibFifoDataTypesDispLoc,5], t_LSH[uibUIBdata,10]; GOTO[uibEntryLoopEnd], uibQuadWord2_(RHMASK[uibQuadWord2]) OR t; uibReplaceQuadByte6: AT[uibFifoDataTypesDispLoc,6], GOTO[uibEntryLoopEnd], uibQuadWord3_(LHMASK[uibQuadWord3]) OR t; uibReplaceQuadByte7: AT[uibFifoDataTypesDispLoc,7], t_LSH[uibUIBdata,10]; GOTO[uibEntryLoopEnd], uibQuadWord3_(RHMASK[uibQuadWord3]) OR t; uibMouseDeltaX: AT[uibFifoDataTypesDispLoc,10], GOTO[uibEntryLoopEnd], uibMouseDelXY_(LHMASK[uibMouseDelXY]) OR t; uibMouseDeltaY: AT[uibFifoDataTypesDispLoc,11], t_LSH[uibUIBdata,10]; GOTO[uibEntryLoopEnd], uibMouseDelXY_(RHMASK[uibMouseDelXY]) OR t; ********************************************** *CHANNEL TRANSFER ********************************************** uibChannelTransfer: GOTO[uibChannelTransferDone,R<0], uibChannelBlockCnt_(uibChannelBlockCnt)-1; t_uibChannelBuffPtr; SKIP[R EVEN], LU_uibChannelTransferFlags; SKIP, IOSTORE16[uibChannelBuffBase,uibInChannelBuffAddr]; IOFETCH16[uibChannelBuffBase,uibOutChannelBuffAddr]; GOTO[uibEntryLoopEnd], uibChannelBuffPtr_(uibChannelBuffPtr)+(20c); uibChannelTransferDone: GOTO[uibFifoScanLineLoop], uibChannelTransferFlags_zero; ********************************************** *ALTO DISPLAY ********************************************** ********************************************** *set line count , cursor X and Y, and set up first DCB ********************************************** uibALTOdisplay: AuibLastNonDisplayLine: uibBase_AuibMemPage1; t_AuibrhCursXYbase; Pfetch2[uibBase, uibCursX]; *fetch cursor xy coordinates CALL[uibSetCursXandY], uibVideoUnloadPtr_uibBufferSize;*sets video unload ptr to no unload uibScanLineCount_uiblhLinesPerField; GOTO[AuibDCBdone],uibScanLineCount _ (uibScanLineCount) OR (uibrhLinesPerField); ********************************************** *check for new DCB ********************************************** AuibDCBdone: t_(uibLink); uibBASE1 _ 0C, GOTO[AuibGetNextDCB,ALU#0]; *The DCB chain is exhausted. uibVideoUnloadPtr_uibBufferSize;*set unload pointer to no unload call[AuibCheckCursor], OUTPUT[uibVideoUnloadPtr,uibBPREG];*output unload pointer goto[AuibNoMoreDCBs]; ********************************************** *We have displayed the entire chain and the field is not done. *Wait for end of field. ********************************************** AuibPreNoMoreDCBs: NOP; call[AuibCheckCursor]; AuibNoMoreDCBs: uibScanLineCount _ (uibScanLineCount)-1, GOTO[AuibPreNoMoreDCBs,R>=0]; goto[AuibENDFIELD]; ********************************************** *FETCH NEXT DCB ALTO ********************************************** AuibGetNextDCB: uibBASE _ T; *T contains LINK. Set base register to point to next DCB nop; PFETCH2[uibBASE,uibDBA,2]; *Fetch DBA,SLC uibVideoUnloadPtr_377c; TASK, PFETCH2[uibBASE,uibLINK,0]; *Fetch LINK,NWRDS uibVideoLoadPtr _ uibBufferSize; *Init for later ********************************************** *Check for long pointer addressing ********************************************** LU_uibSLC,goto[AuibLong,R<0]; *Short Pointer T _ uibDBA; uibBASE _ T,goto[AuibEvenOdd]; *Long Pointer AuibLong: PFETCH2[uibBASE,uibBASE,4]; *fetch directly into the base register uibSLC _ (uibSLC) AND NOT (100000C); *clear the sign bit ********************************************** *adjust DBA for odd,even field *Bias uibDCB.SLC by -2. Note that if uibDCB.SLC = 0 OR 1, at least one *scan line will be displayed. ********************************************** AuibEvenOdd: T_ RHMASK[uibNWRDS]; LU _ LDF[uibStatusReg1,14,1]; *Check EvenField uibSLC _ (uibSLC)-(2C),GOTO[AuibDBAok,ALU#0]; AuibDBAadjust: uibBASE _ (uibBASE)+(T); ********************************************** *set VideoLoadPtr for next scan, uibBufferSize-NWRDS-residue *hex align base register (DBA and not 17) *DBA contains residue (DBA(mod 20)) ********************************************** AuibDBAok: uibVideoUnloadPtr_(uibVideoUnloadPtr)-t; uibVideoLoadPtr_(uibVideoLoadPtr)-(t); t_LDF[uibBASE,14,4]; *Set up VideoLoadPtr for the next scan uibDBA _ t; t_uibVideoLoadPtr_(uibVideoLoadPtr)-(t); uibBASE _ (uibBASE) and not (17C); uibVideoPtrs_(LSH[uibVideoUnloadPtr,10]) OR t; *OR in load pointer uibVideoPtrs_LCY[uibVideoPtrs,10]; *swap low and high bytes OUTPUT[uibVideoPtrs,uibBPREG]; *output video pointers ********************************************** *fix up the high half of the base register ********************************************** T _ lsh[uibBASE1,10]; call[AuibCheckCursor], uibBASE1 _ (RHMASK[uibBASE1])+(T)+1; ********************************************** *VIDEO ALTO ********************************************** *uibBase points to closest hex word below the bitmap for the DCB *uibDBA contains the offset from uibBase pointing to the first word of the scan line *uibDWA is the offset from uibBase used in IOFETCHT16 transfers *uibVideoLoadPtr is initially contains the pointer for writing video data into the haredware buffer * after it is sent to the UIB, it is used as a counter which carries when all the data for a scanline has * been transferred *uibVideoUnloadPtr contains the pointer for reading data out of the hardware buffer ********************************************** ********************************************** *1st line of a DCB only - output HTAB ********************************************** AuibNewDCB: uibHTAB_377c; T _ LDF[uibNWRDS,2,6]; *calculate HTAB LU_LDF[uibNWRDS,1,1]; *black background bit uibHTAB _ (uibHTAB) - (T),GOTO[.+2,ALU#0]; uibHTAB _ (uibHTAB) AND NOT (200C); OUTPUT[uibHTAB,uibHTABaddr],goto[AuibVideoData]; *send it ********************************************** *last thing you do after processing a scan line which is not the last of a DCB ********************************************** AuibNormalVideoExit: call[AuibCheckCursor], OUTPUT[uibVideoPtrs,uibBPREG]; *output video pointers ********************************************** *set pointer for writing into UIB buffer and start first transfer ********************************************** AuibVideoData: T _ (uibDBA) AND NOT (17C); uibDWA _ T; AuibDWT: IOFETCH16[uibBASE,uibDATABUFaddr]; ********************************************** *Calculate the read buffer pointer, the count, and next line's DBA *in the shadow of the first IOFETCH (If there is to be more than one). ********************************************** uibVideoLoadPtr _ (uibVideoLoadPtr)-(uibBuffLessOneBlk); *From here on, uibVideoLoadPtr *is used for the count (-(NWRDS + (ADDRESS and 17B))) T_RHMASK[uibNWRDS]; T_ (RHMASK[uibNWRDS])+(T); * T _ 2*NWRDS uibDBA_(uibDBA)+(T); *uiDBA is now set up for the next scan line uibDWA_T_(uibDWA)+(20C),CALL[AuibDWT1]; ********************************************** *Loop for second through Nth IOFETCH. ********************************************** AuibDWT1: uibVideoLoadPtr_(uibVideoLoadPtr)+(20C),GOTO[AuibBUFD2,R>=0]; IOFETCH16[uibBASE,uibDATABUFaddr],GOTO[AuibBUFD2X,ALU>=0]; uibDWA_T_(uibDWA)+(20C),RETURN; ********************************************** *finished with scan line; end of field? end of DCB? ********************************************** AuibBUFD2: uibScanLineCount _ (uibScanLineCount)-1,DBLGOTO[AuibENDFIELD,AuibCONT,R<0]; *check for field done AuibBUFD2X: uibScanLineCount _ (uibScanLineCount)-1,DBLGOTO[AuibENDFIELD,AuibCONT,R<0]; AuibCONT: uibSLC_(uibSLC)-1,DBLGOTO[AuibDCBDONE,AuibMDCB2,R<0]; ********************************************** *more lines in current DCB *Calculate the next line's uibVideoLoadPtr *in the shadow of the last IOFETCH16 ********************************************** AuibMDCB2: T_LDF[uibDBA,14,4]; t _ (RHMASK[uibVideoPtrs])-(t);*unload and load video ptrs differ by LDF[uibDBA,14,4] uibVideoPtrs_(LSH[uibVideoPtrs,10]) OR t; *OR ptrs into same word uibVideoPtrs_LCY[uibVideoPtrs,10]; *swap high and low bytes GOTO[AuibNormalVideoExit], uibVideoLoadPtr _t; *still need uibVideoLoadPtr for transfer counter ********************************************** *ONE LINE NOP RETURN ********************************************** ONPAGE[uibPage]; uibNOPreturn: RETURN; ********************************************** *CALL IT QUITS FOR THIS SCAN LINE ********************************************** uibSleep: IOSTROBE, uibScanLineCount_(uibScanLineCount)-1; RETURN; ********************************************** *set cursX and cursY ********************************************** uibSetCursXandY: uibCursY_(uibCursY)+(4c); t_(uibCursX)-(3c); *kludge uibCursX_(zero) - t; *negate x value t _ LDF[uibStatusReg1,14,1]; *check for even/odd field t_(LDF[uibCursY,17,1] ) XOR t; GOTO[uibSetCursXandYRTN,ALU#0], uibCursX_LDF[uibCursX,5,13]; uibCursX_(uibCursX) OR (uibCursXeven); uibCursY_(uibCursY)-1; uibSetCursXandYRTN: RETURN; ********************************************** *CHECK CURSOR ********************************************** *CursX is written once to start the cursor and once to turn it off ONPAGE[uibPage]; AuibCheckCursor: GOTO[uibCursRet, r>=0], uibCursY_(uibCursY)-(2c); *start cursor ? LU_(uibCursY)+(4c); GOTO[.+2,ALU<0]; GOTO[uibSendCursX]; *first line of cursor; send CursX LU_(uibCursY)+(uibCursLinesPerFrame); GOTO[.+2, ALU<0], uibCursX_LDF[uibCursX,16,2]; *maintain XC8 and XC9 GOTO[uibCursRet]; uibCursX_(uibCursX) OR (uibTurnOffCursor); *finished w cursor; turn it off uibCursY_uibLargePositiveNumber; uibSendCursX: OUTPUT[uibCursX, uibCursorPointerAddr]; NOP; uibCursRet: IOSTROBE; RETURN; END[UIB];(1940) :ELSE; **************************************************** TITLE[No.UIB.unless.WithTOR.eq.1]; :ENDIF; *************************************************** (1552)