IDENT WRM,WRM PERIPH BASE MIXED SST RDS *COMMENT WRM - WORM(S) DISPLAY. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992. TITLE WRM - WORM(S) DISPLAY. SPACE 4 *** WRM - WORM(S) DISPLAY. * AUTHOR UNKNOWN. * DISASSEMBLED FROM OCTAL AND REVISED - JAN 69. E.W. HOBBS. * REVISED. E. W. HOBBS. 70/04/21. SPACE 4 ** COMMON DECKS. *CALL COMDMAC *CALL COMPMAC *CALL COMSCPS SPACE 4 **** DIRECT LOCATION ASSIGNMENTS. NC EQU 15 NUMBER OF CP-S (FOR *COMDSYS*) XC EQU 16 X - COORDINATE YC EQU 17 Y - COORDINATE AB EQU 20 - 24 CM WORD BUFFER (5 LOC) I1 EQU 25 INDEX I2 EQU 26 INDEX EQ EQU 27 EST ORDINAL DC EQU 30 DELAY COUNTER PM EQU 32 PROGRAM JUMP ADDRESS PI EQU 33 PROGRAM INDEX CT EQU 34 - 37 PASS COUNTERS ** ASSEMBLY CONSTANTS. NAME MICRO 1,, WORMS CH EQU CHDS DISPLAY CHANNEL DSCT EQU 0 DISPLAY CYCLE (SET = 0 FOR FULL SPEED) **** WRM TITLE WRM - MAIN ROUTINE ORG PPFW ** WRM - MAIN ROUTINE. WRM RJM PRS PRESET WRM1 RJM KBI CHECK KEYBOARD RJM 0,PM DISPLAY RJM DEL DELAY RJM PSS PAUSE FOR SYSTEM UJN WRM1 LOOP DEL TITLE UTILITY SUBROUTINES ** DEL - DELAY. DEL SUBR ENTRY/EXIT LDD DC DELAY SBN 1 PJN *-1 UJN DELX RETURN RNG SPACE 4 ** RNG - RANDOM NUMBER GENERATOR. RNG SUBR ENTRY/EXIT IAN 14 READ CLOCK CHANNEL LMM RNGB,I1 COMPUTE RANDOM NUMBER RAM RNGA,I1 SHN 6 RAM RNGB,I1 SHN 6 LMM RNGA,I1 SHN 4 RAM RNGA,I1 UJN RNGX RETURN RNGA DATA 6625 DATA 1347 DATA 3141 DATA 1415 DATA 4157 DATA 1514 DATA 7233 RNGB DATA 1015 DATA 6553 DATA 2565 DATA 2761 DATA 3777 DATA 1313 DATA 1133 ALW TITLE GENERATE AND DISPLAY WORM(S) ** ALW - ADVANCE LONG WORM. ALW SUBR ENTRY/EXIT SOM CTRL DECREMENT COUNTER NJN ALW1 IF NEW RANDOM NUMBER NOT REQUIRED RJM RNG GENERATE RANDOM NUMBER LPN 3 SHN 1 ADN 1 STM CTRL ALW1 LDM RNGA COMPUTE NEW X INCREMENT STD T6 SHN -10 LPN 14 STD T7 LPN 10 CONVERT TO SYMMETRIC INCREMENT ZJN ALW2 LDD T7 LMC -10 UJN ALW3 ALW2 LDD T7 ALW3 ADM TXCL+40 GENERATE NEW X-COORDINATE STD T7 PJN ALW4 LMC -0 UJN ALW6 ALW4 ADC -770 MJN ALW5 STD T2 LDC 770 SBD T2 UJN ALW6 ALW5 LDD T7 ALW6 STD T3 LDD T6 COMPUTE NEW Y INCREMENT LPN 14 STD T7 LPN 10 CONVERT TO SYMMETRIC INCREMENT ZJN ALW7 LDD T7 LMC -10 UJN ALW8 ALW7 LDD T7 ALW8 ADM TYCL+40 GENERATE NEW Y-COORDINATE STD T7 PJN ALW9 LMC -0 UJN ALW11 ALW9 ADC -770 MJN ALW10 STD T2 LDC 770 SBD T2 UJN ALW11 ALW10 LDD T7 ALW11 STD T4 LDD T6 SHN -6 LPN 3 ADN 1 STD CT LDN 4 STD T2 ALW12 LDM TXCL+34,T2 LMD T3 NJN ALW13 LDM TYCL+34,T2 LMD T4 NJN ALW13 LJM ALWX RETURN ALW13 SOD T2 NJN ALW12 LDN 1 SHIFT TABLE DOWN STD T1 ALW14 LDM TXCL+1,T1 STM TXCL,T1 LDM TYCL+1,T1 STM TYCL,T1 AOD T1 LMN 40 NJN ALW14 LDD T3 STM TXCL+40 LDD T4 STM TYCL+40 LJM ALWX RETURN ASW SPACE 4 ** ASW - ADVANCE SHORT WORM. ASW SUBR ENTRY/EXIT SOM CTRA,I2 DECREMENT COUNTER NJN ASW1 IF NEW RANDOM NUMBER NOT REQUIRED RJM RNG GENERATE RANDOM NUMBER LPN 3 ADN 1 STM CTRA,I2 ASW1 LDM RNGA,I1 COMPUTE NEW X INCREMENT STD T6 SHN -10 LPN 14 STD T7 LPN 10 CONVERT TO SYMMETRIC INCREMENT ZJN ASW2 LDD T7 LMC -10 UJN ASW3 ASW2 LDD T7 ASW3 ADM TXCA+20,I2 GENERATE NEW X-COORDINATE STD T7 PJN ASW4 LMC -0 UJN ASW6 ASW4 ADC -770 MJN ASW5 STD T2 LDC 770 SBD T2 UJN ASW6 ASW5 LDD T7 ASW6 STD T3 COMPUTE NEW Y INCREMENT LDD T6 LPN 14 STD T7 LPN 10 CONVERT TO SYMMETRIC INCREMENT ZJN ASW7 LDD T7 LMC -10 UJN ASW8 ASW7 LDD T7 ASW8 ADM TYCA+20,I2 GENERATE NEW Y-COORDINATE STD T7 PJN ASW9 LMC -0 UJN ASW11 ASW9 ADC -770 MJN ASW10 STD T2 LDC 770 SBD T2 UJN ASW11 ASW10 LDD T7 ASW11 STD T4 LDD T6 SHN -6 LPN 3 ADN 1 STM CT,I1 LDN 4 ADD I2 STD T2 ASW12 LDM TXCA+14,T2 LMD T3 NJN ASW13 LDM TYCA+14,T2 LMD T4 NJN ASW13 LJM ASWX RETURN ASW13 SOD T2 SBD I2 NJN ASW12 LDN 1 SHIFT TABLES DOWN ADD I2 STD T1 ASW14 LDM TXCA+1,T1 STM TXCA,T1 LDM TYCA+1,T1 STM TYCA,T1 AOD T1 SBD I2 LMN 20 NJN ASW14 LDD T3 STM TXCA+20,I2 LDD T4 STM TYCA+20,I2 LJM ASWX RETURN D1W SPACE 4 ** D1W - DISPLAY 1 WORM. * * CALLS ALW, DLW. * * USES CT. D1W SUBR ENTRY/EXIT LDD DC DELAY SBN 1 PJN *-1 RJM DLW DISPLAY LONG WORM SOD CT NJN D1WX RETURN IF NOT 4TH PASS RJM ALW ADVANCE LONG WORM UJN D1WX RETURN D2W SPACE 4 ** D2W - DISPLAY 2 WORMS. * * CALLS ASW, DSW. * * USES I1, I2, CT - CT+1. D2W SUBR ENTRY/EXIT RJM DSW DISPLAY SHORT WORM SOM CT,I1 NJN D2W1 IF NOT 4TH PASS RJM ASW ADVANCE SHORT WORM D2W1 LDD I1 TOGGLE INDICES LMN 1 STD I1 LDD I2 LMN TXYAL STD I2 UJN D2WX RETURN D3W SPACE 4 ** D3W - DISPLAY 3 WORMS. * * CALLS ASW, DSW. * * USES I1, I2, CT - CT+2. D3W SUBR ENTRY/EXIT RJM DSW DISPLAY SHORT WORM SOM CT,I1 NJN D3W1 IF NOT 4TH PASS RJM ASW ADVANCE SHORT WORM D3W1 AOD I1 ADVANCE INDICES SBN 3 MJN D3W2 IF < 3 STD I1 RESET TO 0 STD I2 UJN D3WX RETURN D3W2 LDN TXYAL RAD I2 UJN D3WX RETURN D4W SPACE 4 ** D4W - DISPLAY 4 WORMS. * * CALLS ASW, DSW. * * USES I1, I2, CT - CT+3. D4W SUBR ENTRY/EXIT RJM DSW DISPLAY SHORT WORM SOM CT,I1 NJN D4W1 IF NOT 4TH PASS RJM ASW ADVANCE SHORT WORM D4W1 AOD I1 ADVANCE INDICES SBN 4 MJN D4W2 IF < 4 STD I1 RESET TO 0 STD I2 UJN D4WX RETURN D4W2 LDN TXYAL RAD I2 UJN D4WX D5W SPACE 4 ** D5W - DISPLAY 5 WORMS. * * CALLS ASW, DSW. * * USES I1, I2, CT - CT+4. D5W SUBR ENTRY/EXIT RJM DSW DISPLAY SHORT WORM SOM CT,I1 NJN D5W1 IF NOT 4TH PASS RJM ASW ADVANCE SHORT WORM D5W1 AOD I1 ADVANCE INDICES SBN 5 MJN D5W2 IF < 5 STD I1 RESET TO 0 STD I2 UJN D5WX RETURN D5W2 LDN TXYAL RAD I2 UJN D5WX RETURN D6W SPACE 4 ** D6W - DISPLAY 6 SHORT WORMS. * * CALLS ASW, DSW. * * USES I1, I2, CT - CT+5. D6W SUBR ENTRY/EXIT RJM DSW DISPLAY SHORT WORM SOM CT,I1 NJN D6W1 IF NOT 4TH PASS RJM ASW ADVANCE SHORT WORM D6W1 AOD I1 ADVANCE INDICES SBN 6 MJN D6W2 IF < 6 STD I1 RESET TO 0 STD I2 UJN D6WX RETURN D6W2 LDN TXYAL RAD I2 UJN D6WX RETURN DLW SPACE 4 ** DLW - DISPLAY LONG WORM. * * CALLS DSZ. * * USES T3, T4. DLW SUBR ENTRY/EXIT LDN 40 STD T4 DLW1 ADN 1 SHN -1 STD T3 LDM TXCL,T4 ADC 6000 STM DSZB LDM TYCL,T4 ADC 7000 STM DSZC RJM DSZ DISPLAY SEGMENT SOD T4 DECREMENT ELEMENT INDEX NJN DLW1 LOOP FOR NEXT ELEMENT LDM TXCL+40 ADC 6000-1 STM DSZB LDM TYCL+40 ADC 7000 STM DSZC SOM DSZA CHANGE TO 64 CHAR./LINE LDN 77 SET REWRITE COUNT STD T3 RJM DSZ DISPLAY HEAD AOM DSZA RESTORE 32 CHAR./LINE LJM DLWX RETURN DSW SPACE 4 ** DSW - DISPLAY SHORT WORM. * * CALLS DSZ. * * USES T3, T4. DSW SUBR ENTRY/EXIT LDN 20 DSW1 ADD I2 STD T4 SBD I2 STD T3 LDM TXCA,T4 ADC 6000 STM DSZB LDM TYCA,T4 ADC 7000 STM DSZC RJM DSZ DISPLAY SEGMENT SOD T4 DECREMENT ELEMENT INDEX SBD I2 NJN DSW1 LOOP FOR NEXT ELEMENT LDM TXCA+20,I2 ADC 6000-1 STM DSZB LDM TYCA+20,I2 ADC 7000 STM DSZC SOM DSZA CHANGE TO 64 CHAR./LINE LDN 77 SET REWRITE COUNT STD T3 RJM DSZ DISPLAY HEAD AOM DSZA RESTORE 32 CHAR./LINE LJM DSWX RETURN DSZ TITLE DISPLAY SUBROUTINES ** DSZ - DISPLAY ZERO. * * ENTRY (T3) = REWRITE COUNT. * * USES T3. DSZ SUBR ENTRY/EXIT DSZ1 FNC 7001,CH SELECT WRITE LEFT SCREEN DSZA EQU *-1 ACN CH DSZ2 LDN 3 DISPLAY *0* OAM DSZB,CH SOD T3 DECREMENT REWRITE COUNT PJN DSZ2 LOOP TO INTENSIFY DCN CH UJN DSZX RETURN DSZB DATA 6347 DSZC DATA 7741 DATA L*0* KBI SPACE 4 ** KBI - KEYBOARD INPUT AND INTERPRETATION. KBI SUBR ENTRY/EXIT LDD CP CHECK ROLLOUT FLAG ADN STSW CRD CM LDD CM+2 LPN 1 NJN DRP IF ROLLOUT FLAG SET FNC 7020,CH SELECT KEYBOARD INPUT ACN CH IAN CH DCN CH ZJN KBIX RETURN IF NO INPUT SBN 1RD NJN KBI1 IF NOT +D+ DRP RJM DDS DROP DISPLAY DPP MONITOR DPPM DROP PP LJM PPR EXIT TO PP RESIDENT KBI1 SBN 1RH-1RD NJN KBI3 IF NOT +H+ RJM DDS DROP DISPLAY RJM RDS REQUEST DISPLAY RJM MDC MODIFY CHANNELS KBI2 LDN 4 RESET COUNTER STM CTRA,I2 STM CTRL LJM KBIX RETURN KBI3 SBN 1R+-1RH NJN KBI4 IF NOT *+* LDN 0 SET 0 DELAY UJN KBI5 KBI4 SBN 1R--1R+ NJN KBI6 IF NOT *-* LDM TDCT,PI SET DELAY KBI5 STD DC UJN KBI2 KBI6 SBN 1R*-1R- NJN KBI7 IF NOT +*+ RJM HDC HOLD DISPLAY CHANNEL UJN KBI2 KBI7 ADN 1R*-1R1 NJN KBI8 IF NOT *1* LDN 1 SET PROGRAM INDEX STD PI LDC D1W SET TO DISPLAY 1 LONG WORM UJN KBI10 KBI8 SBN 1R2-1R1 NJN KBI9 IF NOT *2* LDN 2 SET PROGRAM INDEX STD PI LDC D2W SET TO DISPLAY 2 SHORT WORMS UJN KBI10 KBI9 SBN 1R3-1R2 NJN KBI12 IF NOT *3* LDN 3 SET PROGRAM INDEX STD PI LDC D3W SET TO DISPLAY 3 SHORT WORMS KBI10 STD PM SET PROGRAM ADDRESS LDN 0 RESET INDICES STD I1 STD I2 LDM TDCT,PI SET DELAY STD DC KBI11 LJM KBI2 KBI12 SBN 1R4-1R3 NJN KBI13 IF NOT *4* LDN 4 SET PROGRAM INDEX STD PI LDC D4W SET TO DISPLAY 4 SHORT WORMS UJN KBI10 KBI13 SBN 1R5-1R4 NJN KBI14 IF NOT *5* LDN 5 SET PROGRAM INDEX STD PI LDC D5W SET TO DISPLAY 5 SHORT WORMS UJN KBI10 KBI14 SBN 1R6-1R5 NJN KBI11 IF NOT *6* LDN 6 SET PROGRAM INDEX STD PI LDC D6W SET TO DISPLAY 6 SHORT WORMS UJN KBI10 COMDSYS SPACE 4 ** COMMON DECKS. *CALL COMDSYS *CALL COMDDSP SPACE 4,10 DIS HERE *COMDSYS* *DISPLA* EXPANSION MDC SPACE 4 ** MDC - MODIFY DISPLAY CHANNELS. * * USES T1, T2. MDC SUBR ENTRY/EXIT LDM /COMDDSP/DDSB STD T2 LMM DSZ1 CHECK CHANNEL LPN 77 ZJN MDCX RETURN IF SET LDC DSZ1-1 SET FIRST ADDRESS STD T1 MDC1 AOD T1 ADVANCE ADDRESS LMC MDC2 ZJN MDCX RETURN IF COMPLETE LDI T1 CHECK WORD LPC 7077 LMC 7000+CH MDC2 NJN MDC1 IF NOT 7XCH LDI T1 MODIFY CHANNEL SCN 77 ADD T2 STI T1 UJN MDC1 LOOP PRS TITLE PRESET PROGRAM ** PRS - PRESET PROGRAM. * * EXIT (NC) = NUMBER OF CP-S. PRS SUBR ENTRY/EXIT CATD CHECK ACCESS TO DISPLAY CONSOLE PRS1 PAUSE LDD FL ZJN PRS3 IF FL = 0 LDD CM+1 ZJN PRS2 IF ERROR FLAG NOT SET LJM DPP DROP PP PRS2 STD CM+2 SET CM REQUEST MONITOR RSTM REQUEST 0 FL UJN PRS1 PRS3 RJM RDS REQUEST DISPLAY RJM MDC MODIFY CHANNEL INSTRUCTIONS LDN 0 CLEAR INDICES STD I1 STD I2 LDN 4 PRESET COUNTERS STD CT STD CT+1 STD CT+2 STD CT+3 STD CT+4 STD CT+5 LDC 3777 SET DELAY COUNTER STD DC LDC D2W PRESET FOR 2 WORMS STD PM LDN 2 SET PROGRAM INDEX STD PI LDN NCPL SAVE NUMBER OF CP-S CRD CM AOD CM+1 STD NC LJM PRSX RETURN SPACE 4 ** COMMON DECKS. *CALL COMPCUA TDCT TITLE TABLES ** TDCT - TABLE OF DELAY COUNTS. TDCT DATA 0 DATA 3777 DATA 3777 DATA 1777 DATA 777 DATA 0 DATA 0 TDCTL EQU *-TDCT CTRA SPACE 4 ** TABLES OF X/Y COORDINATES. * * NOTE THE INITIAL ENTRIES SHOULD ALL BE ODD TO PREVENT * THE WORM FROM WORKING ITSELF INTO A CORNER. CTRA DATA 4 TXCA DATA 0 DATA 353 DATA 353 DATA 353 DATA 357 DATA 363 DATA 367 DATA 373 DATA 367 DATA 363 DATA 357 DATA 353 DATA 353 DATA 353 DATA 353 DATA 353 DATA 347 TYCA DATA 0 DATA 725 DATA 721 DATA 715 DATA 721 DATA 725 DATA 731 DATA 735 DATA 741 DATA 745 DATA 751 DATA 755 DATA 751 DATA 745 DATA 741 DATA 735 DATA 741 TXYAL EQU *-CTRA CTRB DATA 4 DATA 0 DATA 273 DATA 277 DATA 303 DATA 277 DATA 277 DATA 277 DATA 273 DATA 273 DATA 273 DATA 273 DATA 273 DATA 267 DATA 267 DATA 267 DATA 267 DATA 267 DATA 0 DATA 125 DATA 125 DATA 125 DATA 131 DATA 135 DATA 141 DATA 145 DATA 141 DATA 135 DATA 131 DATA 125 DATA 131 DATA 135 DATA 141 DATA 145 DATA 151 CTRC DATA 4 DATA 0 DATA 633 DATA 633 DATA 627 DATA 623 DATA 617 DATA 617 DATA 617 DATA 617 DATA 623 DATA 623 DATA 627 DATA 633 DATA 637 DATA 643 DATA 647 DATA 653 DATA 0 DATA 515 DATA 511 DATA 511 DATA 511 DATA 515 DATA 521 DATA 525 DATA 531 DATA 531 DATA 535 DATA 541 DATA 541 DATA 545 DATA 545 DATA 545 DATA 545 CTRD DATA 4 DATA 0 DATA 725 DATA 721 DATA 715 DATA 721 DATA 725 DATA 731 DATA 735 DATA 741 DATA 745 DATA 751 DATA 755 DATA 751 DATA 745 DATA 741 DATA 735 DATA 741 DATA 0 DATA 353 DATA 353 DATA 353 DATA 357 DATA 363 DATA 367 DATA 373 DATA 367 DATA 363 DATA 357 DATA 353 DATA 353 DATA 353 DATA 353 DATA 353 DATA 347 CTRE DATA 4 DATA 0 DATA 125 DATA 125 DATA 125 DATA 131 DATA 135 DATA 141 DATA 145 DATA 141 DATA 135 DATA 131 DATA 125 DATA 131 DATA 135 DATA 141 DATA 145 DATA 151 DATA 0 DATA 273 DATA 277 DATA 303 DATA 277 DATA 277 DATA 277 DATA 273 DATA 273 DATA 273 DATA 273 DATA 273 DATA 267 DATA 267 DATA 267 DATA 267 DATA 267 CTRF DATA 4 DATA 0 DATA 515 DATA 511 DATA 511 DATA 511 DATA 515 DATA 521 DATA 525 DATA 531 DATA 531 DATA 535 DATA 541 DATA 541 DATA 545 DATA 545 DATA 545 DATA 545 DATA 0 DATA 633 DATA 633 DATA 627 DATA 623 DATA 617 DATA 617 DATA 617 DATA 617 DATA 623 DATA 623 DATA 627 DATA 633 DATA 637 DATA 643 DATA 647 DATA 653 CTRL DATA 4 TXCL DATA 0 DATA 273 DATA 277 DATA 303 DATA 277 DATA 277 DATA 277 DATA 273 DATA 273 DATA 273 DATA 273 DATA 273 DATA 267 DATA 267 DATA 267 DATA 267 DATA 267 DATA 273 DATA 273 DATA 273 DATA 273 DATA 277 DATA 277 DATA 277 DATA 273 DATA 273 DATA 273 DATA 277 DATA 303 DATA 307 DATA 313 DATA 317 DATA 323 TYCL DATA 0 DATA 125 DATA 125 DATA 125 DATA 131 DATA 135 DATA 141 DATA 145 DATA 141 DATA 135 DATA 131 DATA 125 DATA 131 DATA 135 DATA 141 DATA 145 DATA 151 DATA 151 DATA 145 DATA 141 DATA 135 DATA 135 DATA 131 DATA 125 DATA 125 DATA 131 DATA 135 DATA 135 DATA 141 DATA 145 DATA 151 DATA 155 DATA 161 SPACE 4 END