JGAMES. USER,user,passwd. SETASL,*. SETJSL,*. SETTL,*. ATTACH,OPL=OPL803/UN=opluser. COPYBR,INPUT,MODIN. COPYBF,INPUT,CGAMES. REPLACE,CGAMES,MODIN. REWIND,CGAMES,MODIN. MODIFY,P=0,N=TMPPL,C=0,F,Z./*CREATE CGAMES MODIFY,P=TMPPL,I=MODIN. REWIND,COMPILE. COMPASS,I,S,S=NOSTEXT,S=PSSTEXT. REPLACE,LGO=GAMELGO. ~ *OPLFILE OPL *EDIT EYE *EDIT KAL *EDIT LIFE *EDIT LUN *EDIT LUNAR *EDIT MIC *EDIT PAC *EDIT SNK *EDIT TTT *EDIT ABCX *EDIT DUD ~ COMPCAA COMMON CTEXT COMPCAA - COMPUTE ABSOLUTE ADDRESS. SPACE 4 BASE M IF -DEF,QUAL$,1 QUAL COMPCAA SPACE 4 *** CAA - COMPUTE ABSOLUTE ADDRESS. * M. D. RUSTAD. 80/02/06. SPACE 4 *** CAA COMPUTES THE ABSOLUTE ADDRESS FOR A RELATIVE ADDRESS * AND CHECKS TO SEE THAT IT LIES WITHIN THE USERS FIELD * LENGTH. CAA ASSUMES THAT RA AND FL ARE BOTH CORRECT. * CAA ALSO ASSUMES THAT *0* IS NEVER A VALID ABSOLUTE ADDRESS. * CAA TREATS LOCATIONS 0 AND 1 AS OUT OF RANGE. * * ENTRY (A) = 18-BIT RELATIVE ADDRESS. * * EXIT (A) = 18-BIT ABSOLUTE ADDRESS. * (A) = 0 IF ADDRESS NOT IN FIELD LENGTH. CAA2 SHN 14 ADD FL ADD FIELD LENGTH/100 ADD RA ADD REFERENCE ADDRESS/100 SHN 6 REPOSITION VALUE CAA SUBR ENTRY/EXIT MJN CAA1 JUMP IF NEGATIVE SBN 2 MJN CAA1 IF .LT. 2 ADN 2 SHN 14 POSITION TO HUNDREDS SBD FL SHN 6 MJN CAA2 IF WITHIN RANGE CAA1 LDN 0 ERROR RETURN UJN CAAX SPACE 4 QUAL$ IF -DEF,QUAL$ QUAL * CAA EQU /COMPCAA/CAA QUAL$ ENDIF BASE * ENDX ~ COMSDUD COMMON CTEXT COMSDUD - *DUD* DISPLAY DRIVER EQUIVALENCES. SPACE 4,10 BASE MIXED COMSDUD SPACE 4,10 *** COMSDUD - *DUD* DISPLAY DRIVER EQUIVALENCES. * J. M. CYCHOSZ. 83/12/12. COMSDUD SPACE 4,10 *** COMSDUD DEFINES THE DISPLAY ENVIRONMENT TABLE THROUGH * WHICH A CENTRAL PROCESSOR PROGRAM AND PP PROGRAM *DUD* * COMMUNICATE. FOR A DETAILED DESCRIPTION OF THE DISPLAY * ENVIRONMENT TABLE AND FUNCTION REQUESTS SEE DOCUMENTATION * WRITTEN IN *DUD*. DET SPACE 4,16 ** *DUD* DISPLAY ENVIRONMENT TABLE. LOC 0 DET BSS 0 W=STAT BSS 1 FUNCTION/STATUS WORD (NON-INTERUPT MODE) W=ISTAT BSS 1 FUNCTION/STATUS WORD (INTERUPT MODE) W=RFL BSS 1 FIELD LENGTH REQUEST WORD W=ARCL BSS 1 AUTO-RECALL CONTROL WORD W=MSC BSS 1 REAL TIME CLOCK WORD W=KSW BSS 1 KEYBOARD STATUS WORD W=KMAD BSS 1 KEYBOARD MESSAGE ADDRESS W=DPF BSS 1 DISPLAY BUFFER POINTER TABLE FWA W=DPL BSS 1 DISPLAY BUFFER POINTER TABLE LWA+1 W=XJP BSS 20 EXCHANGE JUMP PACKANGE BUFFER W=ARP BSS 1 AUTO-RECALL POINTER BUFFER W=IKEY BSS 1 KEYBOARD INTERRUPT ADDRESS W=ICLK BSS 1 CLOCK INTERRUPT ADDRESS DETL EQU *-DET LENGTH OF DISPLAY ENVIRONMENT TABLE LOC *O FUN SPACE 4,10 ** *DUD* FUNCTION REQUEST CODES. F=NOP EQU 0 NO OPERATION F=INT EQU 2 INTERRUPT CENTRAL PROCESSOR F=ION EQU 4 ENABLE INTERRUPT F=IOF EQU 6 DISABLE INTERRUPT F=RCP EQU 10 RESTORE CENTRAL PROCESSOR F=RPR EQU 12 REQUEST PRIORITY F=REM EQU 14 REQUEST EXIT MODE F=HOLD EQU 16 HOLD DISPLAY F=DROP EQU 20 DROP PP F=KILL EQU 22 KILL PROGRAM COMSDUD SPACE 4 BASE * ENDX ~ COMSLUN COMMON CTEXT COMSLUN - LUNAR LANDER EQUIVALENCES. COMSLUN SPACE 4,10 BASE MIXED COMSLUN SPACE 4,10 *** COMSLUN - LUNAR LANDER EQUIVALENCES. COMSLUN SPACE 4,10 *** COMSLUN DEFINES THE DISPLAY ENVIRONMENT TABLE THROUGH * WHICH THE CP AND PP PORTIONS OF *LUNAR* COMMUNICATE. * * THE FORMAT OF THE DET IS AS FOLLOWS * *T STAW 36/,12/ FL,12/ DR *T RTCW 24/,36/ RC *T KEYW 48/,12/ KY *T KBSW 12/ ST,30/,18/ KB *T KBMW 42/,18/ MB *T DPFW 42/,18/ FW *T DPLW 42/,18/ LW * * FL FIELD LENGTH (IN HUNDREDS) TO BE CHANGED BY PP * (STAW CLEARED WHEN REQUEST HONORED). * DR NON-ZERO IF CP PROGRAM WANTS PP PROGRAM TO DROP * (STAW CLEARED WHEN REQUEST HONORED). * RC REAL TIME CLOCK (MILLISECOND PORTION) UPDATED BY * PP DRIVER. * KY LAST INPUT KEY (WRITTEN BY PP). * ST NUMBER OF CHARACTERS IN KEYBOARD BUFFER. * KB ADDRESS OF KEYBOARD BUFFER. * MB ADDRESS OF KEYBOARD MESSAGE BUFFER. * FW FIRST ADDRESS OF DISPLAY DESCRIPTORS. * LW LAST ADDRESS OF DISPLAY DESCRIPTORS. * * THE FORMAT OF THE DISPLAY DESCRIPTORS IS AS FOLLOWS * *T 1/S,2/,3/F,3/,3/I,18/ FW,30/ LW * * S SET IF DISPLAY TO BE SUPPRESSED. * F DISPLAY FUNCTION 0 - 7. * 0 - 64 CHARACTERS/LINE, LEFT SCREEN. * 1 - 64 CHARACTERS/LINE, RIGHT SCREEN. * 2 - 32 CHARACTERS/LINE, LEFT SCREEN. * 3 - 32 CHARACTERS/LINE, RIGHT SCREEN. * 4 - 16 CHARACTERS/LINE, LEFT SCREEN. * 5 - 16 CHARACTERS/LINE, RIGHT SCREEN. * 6 - 512 DOTS/LINE, LEFT SCREEN. * 7 - 512 DOTS/LINE, RIGHT SCREEN. * I INTENSITY 0 - 7. * FW FIRST WORD OF DISPLAY BUFFER. * LW LAST WORD OF DISPLAY BUFFER. LOC 0 DET BSS 0 DISPLAY ENVIRONMENT TABLE STAW BSS 1 STATUS WORD RTCW BSS 1 MILLISECOND CLOCK KEYW BSS 1 INPUT KEY KBSW BSS 1 KEYBOARD STATUS WORD KBMW BSS 1 KEYBOARD MESSAGE FWA DPFW BSS 1 FWA OF DISPLAY BUFFER DPLW BSS 1 LWA+1 OF DISPLAY BUFFER DETL EQU *-DET LENGTH OF DET LOC *O KBMAX EQU 100 MAXIMUM KEYBOARD BUFFER SIZE NAME MICRO 1,, LUNAR PACKAGE NAME COMSLUN SPACE 4,10 BASE * ENDX ~ EYE IDENT EYE,EYE PERIPH BASE MIXED SST RDS *COMMENT EYE - WINK AT OPERATORS. COMMENT COPYRIGHT CONTROL DATA CORPORATION. 1975. TITLE EYE - WINK AT OPERATORS. EYE SPACE 4,10 *** EYE - WINK AT OPERATORS. * L. C. HAAS. 75/02/15. * J. J. EIKUM. 75/02/15. * ADAPTED FROM AN EARLIER VERSION BY A. HOUK. EYE SPACE 4,10 *** EYE TAKES CONTROL OF THE DISPLAY CONSOLE AND * DISPLAYS TWO EYES. IT THEN LOOKS AROUND AND WINKS AT THE * OPERATOR(S). EYE SPACE 4,10 *** CALL. * *T 18/3LEYE,6/0,24/0,12/D * * D DELAY TIME. * D=0 DISPLAY EYES ONCE AND DROP. * D"0 DISPLAY EYES, BLANK SCOPES FOR D SECONDS, AND * REPEAT UNTIL DROPPED. EYE SPACE 4,10 *** KEYBOARD INPUT. * * *D* DROP DISPLAY AND PP. * * *H* DROP DISPLAY AND WAIT FOR OPERATOR ASSIGNMENT. * * (*) TOGGLE TO DSD. * * ALL OTHER KEYBOARD INPUT IS IGNORED. EYE SPACE 4,6 *** DAYFILE MESSAGES. * * * ILLEGAL USER ACCESS.* = EYE NOT CALLED BY SYOT JOB. EYE SPACE 4,6 *** OPERATOR MESSAGES. * * NONE. (EXCEPT A WINK) EYE SPACE 4,6 ** LOCAL MACROS. ARC MACRO A,B,NAME,INC,LIM USE NAME_0 NAME BSS 0 AB SET A-B X SET 0 ARC1$ DUP 253 Z SET A*A-X*X Y SET 80D ARC2$ DUP 5 YP SET Y+Z/Y Y SET YP/2 ARC2$ ENDD Y SET Y-AB USE NAME_0 VFD 3/6,9/SCRN+X,3/7,9/SCRN+Y USE NAME_1 VFD 3/6,9/SCRN+X,3/7,9/SCRN-Y USE NAME_2 VFD 3/6,9/SCRN-X,3/7,9/SCRN+Y USE NAME_3 VFD 3/6,9/SCRN-X,3/7,9/SCRN-Y X SET X+INC IFGT X,LIM,1 STOPDUP ARC1$ ENDD USE NAME_0 NAME_L EQU **4-NAME*4 USE ENDM EYE SPACE 4,6 ** COMMON DECKS. *CALL COMPMAC *CALL COMPCHI *CALL COMSCPS EYE SPACE 4,10 **** DIRECT LOCATION ASSIGNMENTS. BC EQU 20 BEGINNING CLOCK VALUE RE EQU 21 RIGHT EYE WORD COUNT RP EQU 22 RIGHT PUPIL WORD COUNT LE EQU 23 LEFT EYE WORD COUNT LP EQU 24 LEFT PUPIL WORD COUNT SC EQU 25 - 31 SCRATCH CELLS **** EYE SPACE 4,10 ** ASSEMBLY CONSTANTS. NAME MICRO 1,,$EYE$ CH EQU CHDS DISPLAY CHANNEL LIMT EQU 240 LIMIT DLY1 EQU 400 INITIALIZE EYE DLY2 EQU 40 SQUINT EYE BEFORE PUPIL MOVMENT DLY3 EQU 2 BETWEEN PUPIL MOVES DLY4 EQU 200 EYE BEFORE WINK/EYE WHEN CLOSED DLY5 EQU 20 PARTIALLY CLOSED EYE SCRN EQU 252D SCREEN CENTER/SCREEN LIMIT * INSTRUCTIONS USED AS CONSTANTS. ADCI EQU 2100 ADC EYE SPACE 4,10 * GENERATE DISPLAY DATA. NOREF AB,SCRN,Y,YP,Z,X ARC 50,50,PUPL,5,50 ARC 470,200,EYD1,5,SCRN ARC 634,124,EYD2,5,SCRN ARC 1000,104,EYD3,5,SCRN ARC 1454,50,EYD4,5,SCRN X SET 0 USE EYD5 EYD5 BSS 0 EYE$ DUP 102D VFD 3/6,9/X VFD 3/7,9/377 X SET X+5 EYE$ ENDD EYD5L EQU *-EYD5 USE EYE TITLE MAIN PROGRAM. EYE SPACE 4,16 ** MAIN PROGRAM. ORG PPFW EYE RJM PRS EYE1 RJM DIS DISPLAY LDD IR+4 SAVE BLANKOUT COUNT NJN EYE1.1 IF NOT DROP PPU LJM DRP DROP PPU EYE1.1 LDC RTCL READ SECOND CLOCK CRD CM LDD CM+1 SAVE SECONDS STD BC EYE2 LDN 0 SBN 1 NJN *-1 DELAY FOR AWHILE RJM PSS PAUSE FOR SYSTEM RJM KBI PROCESS KEYBOARD INPUT RJM /COMDDSP/ROF CHECK ROLLOUT FLAG LDC RTCL CRD CM LDD CM+1 CHECK IF BLANK OUT TIME ELAPSED SBD BC PJN EYE3 IF NO OVERFLOW ADC 10000 EYE3 SBD IR+4 MJN EYE2 DELAY LONGER UJN EYE1 DISPLAY TIME PRO SPACE 4,16 ** PRO - PROCESS ROLLOUT REQUEST. PRO LDN ZERL RECALL REQUEST CRD CM LDD MA CWD IR ADN 1 CWD CM MONITOR RECM * UJN DRP DRP SPACE 4,10 ** DRP - DROP PPU. DRP RJM DDS DROP DISPLAY DPP MONITOR DPPM LJM PPR TITLE SUBROUTINES. SPACE 4,6 ** COMMON DECKS. *CALL COMDDSP DBS SPACE 4,16 ** DBS - DISPLAY BOTH SCREENS. * * ENTRY (DBSA) = FWA OF RIGHT SCREEN BUFFER. * (DBSB) = FWA OF LEFT SCREEN BUFFER. * (RE,RP,LE,LP) = RESPECTIVE WORD COUNTS. * (A) = DISPLAY COUNT. * * EXIT SCREENS DISPLAYED. * * USES SC. * * CALLS KBI, PSS. DBS SUBR ENTRY/EXIT STD SC DBS1 FNC 7110,CH ACN CH LDD RE RIGHT EYE WORD COUNT OAM *,CH DBSA EQU *-1 LDD RP RIGHT PUPIL WORD COUNT ZJN DBS2 IF NO DISPLAY OAM PUPL,CH DBS2 DCN CH+40 FNC 7010,CH ACN CH LDD LE LEFT EYE WORD COUNT OAM *,CH DBSB EQU *-1 LDD LP LEFT PUPIL WORD COUNT ZJN DBS3 IF NO DISPLAY OAM PUPL,CH DBS3 DCN CH+40 RJM PSS PAUSE FOR SYSTEM RJM KBI CHECK FOR KEYBOARD INPUT SOD SC PJN DBS1 UJN DBSX RETURN DIS SPACE 4,16 ** DIS - DISPLAY SEQUENCE. * * EXIT SEQUENCE DISPLAYED. * * USES SC+1. * * CALLS DBS, MOV, WNK. DIS SUBR * WIDE OPEN. LDC EYD1 SET BUFFER ADDRESS STM DBSA STM DBSB LDC DLY1 LOAD DISPLAY COUNT RJM DBS * SQUINT. LDC EYD2 SET BUFFER ADDRESS STM DBSA STM DBSB LDC DLY2 LOAD DISPLAY COUNT RJM DBS * MOVE LEFT. LDC LIMT SET LIMIT STD SC+1 DIS1 LCN 1 RJM MOV SOD SC+1 PJN DIS1 LOOP * MOVE RIGHT. LDC LIMT*2 SET LIMIT STD SC+1 DIS2 LDN 1 RJM MOV SOD SC+1 PJN DIS2 LOOP * MOVE TO CENTER. LDC LIMT SET LIMIT STD SC+1 DIS3 LCN 1 RJM MOV SOD SC+1 PJN DIS3 LOOP * OPEN WIDE. LDC EYD1 SET BUFFER ADDRESS STM DBSB STM DBSA * DO WINK SEQUENCE. LDN 1 WINK RIGHT EYE RJM WNK LJM DISX RETURN KBI SPACE 4,16 ** KBI - PROCESS KEYBOARD INPUT. * * EXIT INPUT PROCESSED. * * CALLS DDS, DRP, HDC, RDS, MDC. KBI2 LMN 1RH&1R* NJN KBIX IF NOT (*) RJM HDC HOLD DISPLAY CHANNEL KBI SUBR FNC 7020,CH SELECT KEYBOARD INPUT ACN CH IAN CH+40 DCN CH+40 ZJN KBIX IF NO INPUT LMN 1RD NJN KBI1 IF NOT *D* LJM DRP DROP PPU KBI1 LMN 1RD&1RH NJN KBI2 IF NOT *H* RJM DDS DROP DISPLAY RJM RDS REQUEST DISPLAY RJM MDC MODIFY DISPLAY CHANNEL INSTRUCTIONS UJN KBIX RETURN MDC SPACE 4,10 ** MDC - MODIFY DISPLAY CHANNEL INSTRUCIONS. * * ENTRY (CM+1) = CHANNEL. * * EXIT CHANNEL INSTRUCTIONS MODIFIED. * * USES T1, T2. MDC SUBR LDC CHAN ADDRESS OF CHANNEL TABLE STD T1 MDC1 LDI T1 ZJN MDCX IF END OF TABLE STD T2 LDI T2 GET INSTRUCTION SCN 37 ADD CM+1 ADD CHANNEL NUMBER STI T2 AOD T1 ADVANCE ADDRESS UJN MDC1 LOOP MOV SPACE 4,16 ** MOV - MOVE IMAGE ALONG X AXIS. * * ENTRY (A) = INCREMENT. * * EXIT COORDINATES MOVED. * * USES CM, CM+1. * * CALLS DBS. MOV SUBR ENTRY/EXIT STM MOVA+1 SHN -14 ADC ADCI STM MOVA LDC PUPL SET FWA OF BUFFER STD CM LDC PUPL+PUPLL SET LWA OF BUFFER STD CM+1 MOV1 LDI CM LPC 777 MOVA ADC 0 ADC 6000 MAKE X COORDINATE STI CM LDN 2 INCREMENT BUFFER ADDRESS RAD CM SBD CM+1 MJN MOV1 LOOP FOR ALL OF BUFFER LDC DLY3 LOAD DISPLAY COUNT RJM DBS DISPLAY BOTH SCREENS UJN MOVX RETURN WNK SPACE 4,16 ** WNK - WINK EYES. * * ENTRY (A) = 0 NEITHER EYE. * = 1 RIGHT EYE. * = 2 LEFT EYE. * = 3 BOTH EYES. * * USES LE, LP, RE, RP, SC+2, SC+3. * * CALLS DBS. WNK4 LDN 4 RAD SC+3 SBN WNKAL MJN WNK1 WNK SUBR LPN 3 STD SC+2 LDN 0 STD SC+3 WNK1 LDD SC+2 LPN 1 ZJN WNK2 IF NOT RIGHT EYE LDM WNKA,SC+3 SET BUFFER ADDRESS STM DBSA LDM WNKA+1,SC+3 SET EYE COUNT STD RE LDM WNKA+2,SC+3 SET PUPIL COUNT STD RP WNK2 LDD SC+2 LPN 2 ZJN WNK3 IF NOT LEFT EYE LDM WNKA,SC+3 SET BUFFER ADDRESS STM DBSB LDM WNKA+1,SC+3 SET EYE COUNT STD LE LDM WNKA+2,SC+3 SET PUPIL COUNT STD LP WNK3 LDM WNKA+3,SC+3 SET DISPLAY COUNT RJM DBS DISPLAY BOTH SCREENS LJM WNK4 WNKA CON EYD1,EYD1L,PUPLL,DLY4 OPEN CON EYD2,EYD2L,PUPLL,DLY5 3/4 OPEN CON EYD3,EYD3L,PUPLL,DLY5 1/2 OPEN CON EYD4,EYD4L,PUPLL,DLY5 1/4 OPEN CON EYD5,EYD5L,0,DLY4 CLOSED CON EYD4,EYD4L,PUPLL,DLY5 1/4 OPEN CON EYD3,EYD3L,PUPLL,DLY5 1/2 OPEN CON EYD2,EYD2L,PUPLL,DLY5 3/4 OPEN CON EYD1,EYD1L,PUPLL,DLY4 OPEN WNKAL EQU *-WNKA PRS TITLE PRS - PRESET. PRS SPACE 4,16 ** PRS - PRESET. * * EXIT PROGRAM SET UP. PRS3 LDC =C* ILLEGAL USER ACCESS.* RJM DFM MONITOR ABTM LJM PPR PRS SUBR RJM CUA NJN PRS3 IF ILLEGAL ACCESS LDC PRO SET PROCESS ROLLOUT ADDRESS STM /COMDDSP/ROFA LDC EYD1L SET LENGTHS STD LE STD RE LDC PUPLL STD LP STD RP PRS1 LDD FL ZJN PRS2 LDN 0 SET FL = 0 STD CM+1 STD CM+2 SET CM REQUEST MONITOR RSTM PAUSE UJN PRS1 LOOP TILL FL = 0 PRS2 RJM RDS REQUEST DISPLAY RJM MDC MODIFY CHANNEL INSTRUCTIONS LJM PRSX RETURN COMMON SPACE 4,10 ** COMMON DECKS. *CALL COMPCUA SPACE 4 CHAN CHTB CHANNEL TABLE EYE SPACE 4 END ~ KAL IDENT KAL,KAL PERIPH BASE MIXED SST RDS TITLE KAL - KALEIDOSCOPE DISPLAY. *COMMENT KAL - KALEIDOSCOPE DISPLAY. COMMENT COPYRIGHT JOHN P. STRAIT. 1976. KAL SPACE 4,10 *** KAL - KALEIDOSCOPE DISPLAY. * * J. P. STRAIT. 76/05/08. KAL SPACE 4,10 *** KAL - KALEIDOSCOPE DISPLAY. * * KAL IS ADAPTED FROM A PDP-8 PROGRAM IN DIGITAL EQUIPMENT * CORPORATION'S *SMALL COMPUTER HANDBOOK* PP. 6-19. * * KAL CREATES A KALEIDOSCOPE ON THE CYBER CONSOLE DISPLAY. * EVERY SO OFTEN THE DISPLAY IS MUTATED. IT ALSO CHANGES * WHENEVER A CONSOLE KEY IS STRUCK. BY STRIKING THE SPACE BAR, * THE DISPLAY CAN BE FROZEN. * * SEVERAL SPECIAL CHARACTERS ARE RECOGNIZED * * D WILL DROP KALEIDOSCOPE. * H WILL DROP THE DISPLAY. * * WILL GIVE THE DISPLAY TO DSD. * ( ) WILL FREEZE THE DISPLAY AND STEP MUTATIONS. KAL TITLE SYMBOL DEFINITIONS. **** CH EQU CHDS DISPLAY CHANNEL XC EQU 16 X COORDINATE YC EQU 17 Y COORDINATE KY EQU 20 LAST KEY STRUCK BI EQU 21 BIAS FOR CREATING INTERESTING DISPLAYS TM EQU 22 LAST MILLISECOND TIME MZ EQU 23 12 BIT MINUS ZERO (7777) FZ EQU 24 FROZEN DISPLAY FLAG RC EQU 25 REPEAT COUNT SPBR EQU 62 CHAR CODE FOR THE CONSOLE SPACE BAR SHNI EQU 1000 SHIFT INSTRUCTION TDEL EQU 2000D MILLISECOND TIME DELAY ITEN EQU 3 REPEAT COUNT NAME MICRO 1,,*KAL SCOPE* **** *CALL COMPMAC *CALL COMSCPS KAL TITLE MAIN LOOP. KAL SPACE 4,10 ** KAL - MAIN LOOP. ORG PPFW KAL RJM PRS PRESET KALEIDOSCOPE KAL1 RJM PSS PAUSE FOR SYSTEM RJM CNC COMPUTE NEW COORDINATES RJM SXY SEND X,Y COORDS TO SCREENS RJM CTD CHECK TIME DELAY RJM CKS CHECK FOR KEY STRUCK UJN KAL1 GO BACK FOR MORE KAL TITLE ROUTINES. CNC SPACE 4,10 ** CNC - COMPUTE NEW COORDINATES. * * ENTRY NONE. * * EXIT NEW X,Y COORDINATES COMPUTED. * * CALLS SCL. * * I DON'T UNDERSTAND THIS ROUTINE, BUT IT WORKS. CNC SUBR ENTRY/EXIT LDD YC RJM SCL SCALE Y COORDINATE LMD MZ ADD XC ADD X COORDINATE STD XC NEW X COORDINATE RJM SCL SCALE X COORDINATE ADD YC ADD Y COORDINATE STD YC NEW Y COORDINATE UJN CNCX SXY SPACE 4,10 ** SXY - SEND X,Y COORDINATES TO BOTH SCREENS. * * ENTRY NONE. * * EXIT NONE. * * USES T1-T4. * * CALLS CSN, SCP. SXY SUBR ENTRY/EXIT LDN 0 STD T3 CLEAR THE ACCUMULATOR STD T4 LDD XC RJM CSN X * X LDD YC RJM CSN (X * X) + (Y * Y) LDD T3 SHN 12D ADD T4 SHN -16D ( (X * X) + (Y * Y) ) DIV 200000 NJN SXYX IF POINT IS OFF SCREEN FNC 7000,CH LEFT SCREEN CHAR MODE RJM SCP SEND COORDINATE PAIR LDD XC LMD MZ RIGHT SCREEN GETS A MIRROR IMAGE STD XC FNC 7100,CH RIGHT SCREEN CHAR MODE RJM SCP SEND COORD PAIR LDD XC LMD MZ RE-NEGATE X COORD STD XC UJN SXYX CTD SPACE 4,10 ** CTD - CHECK TIME DELAY. * * IF ELAPSED TIME IS GREATER THAN TDEL, MUTATE DISPLAY. * * ENTRY (TM) = TIME OF LAST MUTATION. * * USES T1. * * CALLS MDS, CET. CTD SUBR ENTRY/EXIT LDD FZ NJN CTDX IF DISPLAY IS FROZEN LDN TM RJM CET COMPUTE ELAPSED TIME ADC -TDEL MJN CTDX IF TIME DELAY HASN,T ELAPSED RJM MDS MUTATE DISPLAY UJN CTDX CKS SPACE 4,10 ** CKS - CHECK FOR KEY STRUCK. * * IF NEW KEY STRUCK CHECK FOR: * * D DROP. * H HOLD. * * PASS THE DISPLAY TO DSD. * ( ) FREEZE THE DISPLAY AND STEP MUTATIONS. * ELSE MUTATE THE DISPLAY. * * ENTRY (KY) = CHARACTER IF A KEY WAS STRUCK LAST TIME, * OTHERWISE ZERO. * * EXIT (KY) = NEW CHARACTER IF A KEY WAS STRUCK (ELSE ZERO). * (FZ) <> 0 IF DISPLAY WAS FROZEN. * * USES T1. * * CALLS DDS, HDC, MDS, RDS, CET. CKS4 LDD FZ ZJN CKS5 IF DISPLAY WASN-T FROZEN BEFORE RJM MDS ELSE MUTATE THE DISPLAY CKS5 LDN 1 STD FZ SET DISPLAY FROZEN CKS SUBR ENTRY/EXIT FNC 7020,CH INPUT A CHARACTER ACN CH LDD KY ZJN CKS1 IF NO KEY STRUCK LAST TIME AROUND IAN CH GET THE KEY DCN CH+40 STD KY UPDATE UJN CKSX CKS1 IAN CH GET A CHAR DCN CH+40 STD KY UPDATE ZJN CKSX IF NO KEY STRUCK SBN 1RD ZJN DPR IF A D SBN 1RH-1RD ZJN CKS2 IF A H SBN 1R*-1RH ZJN CKS3 IF A * SBN SPBR-1R* ZJN CKS4 IF A ( ) LDN 0 STD FZ THAW THE DISPLAY RJM MDS MUTATE THE DISPLAY UJN CKSX CKS2 RJM DDS DROP DISPLAY RJM RDS REQUEST DISPLAY LJM CKSX CKS3 RJM HDC HOLD DISPLAY CHANNEL LJM CKSX * QUIT BECAUSE *D* WAS STRUCK. DPR RJM DDS DROP DISPLAY DPP MONITOR DPPM DROP PP LJM PPR EXIT TO PP RESIDENT KAL TITLE SUBROUTINES. MDS SPACE 4,10 ** MDS - MUTATE THE DISPLAY. * * ENTRY NONE. * * EXIT BIAS CHANGED. * * USES T1. MDS SUBR ENTRY/EXIT LDD BI STD T1 SAVE OLD BIAS IAN 14 READ MILLISECOND CLOCK FOR MUTATION LPN 3 ONLY KEEP LOWER TWO BITS NJN MDS1 ADN 1 ENSURE NON ZERO BIAS MDS1 STD BI NEW BIAS SBD T1 NJN MDS3 IF NEW BIAS IS DIFFERENT LDD BI ADN 1 ENSURE DIFFERENT BIAS LPN 3 NJN MDS2 ADN 3 ENSURE NON ZERO BIAS MDS2 STD BI NEW BIAS MDS3 LDC RTCL CRD CM READ REAL TIME CLOCK LDD CM+4 STD TM NEW TIME UJN MDSX SCL SPACE 4,10 ** SCL - SCALE COORDINATE BY THE BIAS. * * ENTRY (A) = COORDINATE * (BI) = SHIFT COUNT - 1. * * EXIT (A) = COORDINATE VALUE SHIFTED RIGHT. * * USES T1. SCL SUBR ENTRY/EXIT STD T1 LDD BI GET THE BIAS LMN 77 WANT TO SHIFT RIGHT ADC SHNI STM SCLA LDD T1 GET COORD SHN 6 PJN SCL1 ADN 77 FOR SIGN EXTENSION SCL1 SHN 12D SCLA SHN ** LPC 7777 UJN SCLX SCP SPACE 4,10 ** SCP - SEND COORDINATE PAIR. * * ENTRY NONE. * * EXIT NONE. * * USES T1-T6 SCP SUBR ENTRY/EXIT LDD XC LPC 777 LMC 6000 STD T1 SAVE X COORDINATE STD T4 LDD YC LPC 777 LMC 7000 STD T2 SAVE Y COORDINATE STD T5 LDC 2R* STD T3 SAVE STAR STD T6 LDN ITEN STD RC SET REPEAT COUNT ACN CH SCP1 LDN 6 OAM T1,CH SEND STARS FJM *,CH WAIT CHANNEL EMPTY (2X PPS) SOD RC NJN SCP1 IF DISPLAY TO BE REPEATED DCN CH+40 UJN SCPX CSN SPACE 4,10 ** CSN - CENTER AND SQUARE A 9 BIT NUMBER. * * ENTRY (A) = 9 BIT NUMBER TO CENTER AND SQUARE. * * EXIT (T3),(T4) INCREASED BY THE 18 BIT RESULT. * * USES T1,T2. * * CALLS MUL. CSN SUBR ENTRY/EXIT LPC 777 ENSURE 9 BITS ADC -377 CENTER THE NUMBER PJN CSN1 OBTAIN ABSOLUTE VALUE. LMC 777777 CSN1 STD T1 PARAMS TO MUL STD T2 RJM MUL CALCULATE THE RESULT UJN CSNX MUL SPACE 4,10 ** MUL - MULTIPLY TWO NUMBERS. * * ENTRY (T1) = OPERAND ONE. * (T2) = OPERAND TWO. * * EXIT (T3), (T4) INCREASED BY THE 24 BIT RESULT. * * DESTROYS T1. MUL SUBR ENTRY/EXIT LDC SHNI INITIALIZE THE SHIFTER STM MULA MUL1 LDD T1 ZJN MULX IF NO BITS LEFT IN OPERAND ONE SHN 17D GET NEXT BIT STD T1 PJN MUL2 IF BIT NOT SET LDD T2 MULA SHN ** POSITION OPERAND TWO RAD T4 ADD IT TO THE ACCUMULATOR SHN -12D RAD T3 MUL2 AOM MULA INCREMENT SHIFT COUNT UJN MUL1 CET SPACE 4,10 ** CET - COMPUTE ELAPSED TIME. * * ENTRY ((A)) = LAST KNOWN TIME (MILLISECONDS). * * EXIT (A) = ELAPSED TIME (MILLISECONDS). * * USES T1. CET SUBR ENTRY/EXIT STD T1 LDC RTCL CRD CM READ REAL TIME CLOCK LDD CM+4 GET LOW ORDER MILLISECONDS SBI T1 LAST KNOWN TIME PJN CETX IF DIFFERENCE IS POSITIVE ADC 10000 ELSE INCREASE UJN CETX PRS TITLE PRESET KALEIDOSCOPE. PRS SPACE 4,10 ** PRS - PRESET KALEIDOSCOPE. * * 1) RELEASE STORAGE. * 2) REQUEST THE DISPLAY. * 3) SET THE CURRENT TIME. * 4) INITIALIZE DIRECT CELLS. PRS SUBR ENTRY/EXIT RJM CUA CHECK USER ACCESS ZJN PRS1 IF LEGAL USER ACCESS LDC =C* ILLEGAL USER ACCESS.* RJM DFM ISSUE MESSAGE MONITOR ABTM ABORT THE CONTROL POINT LJM PPR EXIT TO PP RESIDENT PRS1 LDN ZERL CRD CM MONITOR RSTM RELEASE STORAGE PAUSE RESET RA/FL RJM RDS REQUEST DISPLAY LDC RTCL CRD CM GET TIME WORD LDD CM+4 LOW ORDER MILLISECONDS STD TM SET TIME LDN 1 STD BI SET BIAS LDC 5161 STD XC SET X COORDINATE LDC 3645 STD YC SET Y COORDINATE LDC 7777 STD MZ SET 12 BIT MINUS ZERO LDN 0 STD FZ SET THAWED DISPLAY STD KY CLEAR LAST KEY STRUCK LJM PRSX SPACE 4,6 * PRESET COMMON DECKS. *CALL COMDDSP *CALL COMPCUA SPACE 4 END ~ LIFE IDENT LIFE,111B,LIFE ABS ORG 111B ENTRY LIFE ENTRY RFL= TITLE LIFE - THE GAME OF LIFE. *COMMENT LIFE - THE GAME OF LIFE. TITLE IDENT SECTION. *** LIFE - THE GAME OF LIFE. * * AUTHOR IS DOUG BROWN EXCEPT FOR THE FOLLOWING: * THE ALGORITHM FOR THE LIFEING WAS DEVELOPED BY * DAN SLEATOR. * THE PPU DISPLAY PROGRAM AND THE INTERFACING * IN THE CENTRAL PROGRAM WAS WRITTEN BY * STEVE FREYDER. * THE PROGRAM WAS REWRITTEN IN 1981 BY JOE CYCHOSZ. * MARSHALL MIDDEN (1981) CHANGE THE GENERATION METHOD TO BE * EVEN FASTER. * * * REQUEST COPIES OF THIS PROGRAM FROM: * * JOE CYCHOSZ JUNIOR SYSTEMS PROGRAMERS * PURDURE UNIVERSITY 5TH FLOOR CERL * COMPUTER AIDED DESIGN LAB OR UNIVERSITY OF ILLINOIS * POTTER ENGINEERING CENTER URBANA, ILL. 61801 * WEST LAFAYETTE, IN. 47907 * (317) 494-5944 (217) 333-2375 * TITLE MACROS AND DEFINITIONS. INPUT SPACE 4,16 ** INPUT - INPUT KEY. * PURGMAC INPUT INPUT MACRO RJ WKI ENDM KEY SPACE 4,10 ** KEY - KEY MACRO. * * KEY KY,LOC * * ENTRY *KY* = KEY TO TEST FOR. * *LOC* = LOCATION TO BRANCH TO IF MATCH. PURGMAC KEY KEY MACRO K,LOC LOCAL CC CC SET 0 ECHO ,AA=(LB,RB,CR,BKSP,SP),BB=(53B,55B,60B,61B,62B) IFC EQ,$AA$K$,1 CC SET BB ENDD .1 IFEQ CC,0 SX2 X1-1R_K .1 ELSE SX2 X1-CC .1 ENDIF ZR X2,LOC ENDM STARRY SPACE 4,10 ** STARRY - GENERATE FULL WORD OF STARS. * * EXIT (X7) = WORD. PURGMAC STARRY STARRY MACRO LX6 10 BX4 -X0*X6 SA5 B5+X4 BX7 X5 ENDM SPACE 4,10 ** DATA AREAS. X BSS 1 (0-59) LSH TO LJ BIT Y BSS 1 (0-59) TOP-BOTTOM GN BSS 1 GENERATION NUMBER AUTO BSS 1 MODE BSS 1 0=OFF 1=ON LASTKEY BSS 1 LIFEO DATA 10HLIFEOMATIC MATIC DATA 10HLIFEOMATIC GENNY DATA 10HGENERATION DATA 10H 0 DATA 10H DISPLAY DISP BSS 60*6 DISPLAY BUFFER DATA 10H CELLS BSS 1 USED BY THE GENERATOR ARRAY BSS 60 BSS 1 USED BY THE GENERATOR DATA 10H SAVE SAVE BSS 60 FOR RESTORE TITLE MAIN PROGRAM AND GENERATION ROUTINES. LIFE SPACE 4,10 ** MAIN PROGRAM. LIFE SB1 1 SET GOOCH REGISTER MEMORY CM,,R,RFL= SHORTEN FIELD LENGTH SYSTEM ABC,R,STATUS CALL DISPLAY DRIVER MAINGO MX6 0 ZERO OUT ARRAY SB2 59-1 SA6 ARRAY+59 LIFE1 SA6 A6-B1 SB2 B2-B1 GE B2,LIFE1 IF MORE SX6 B1 SA6 MODE WRITING MODE ON LIFE2 SX6 29 SA6 X CENTER STAR SX6 30 SA6 Y INIT * TO CENTRE MX6 1 SA6 AUTO INIT AUTO TO WAIT FOR KEY MX6 0 SA6 GN ZERO GENERATION NUMBER SA6 LASTKEY CLEAR KEY BUFFER SA4 MODE RJ SET LIFE3 RJ GDB GENERATE DISPLAY BUFFER SB2 ARRAY SB3 SAVE RJ MOV INPUT NZ X1,LIFE4 IF KEY SA1 LASTKEY LIFE4 KEY S,SETS SURPRISE MODE BX6 X1 SA6 LASTKEY KEY Q,NW NORTHWEST KEY W,N NORTH KEY E,NE NORTHEAST KEY A,W WEST KEY D,E EAST KEY Z,SW SOUTHWEST KEY X,S SOUTH KEY C,SE SOUTHEAST KEY +,ON MODE ON KEY -,OFF MODE OFF KEY BKSP,REMOVE REMOVE RJ PNK CHECK FOR NUMBER KEYS KEY CR,CRGO START EQ LIFE3 REMOVE SPACE 4,10 REMOVE BX4 X4-X4 REMOVE CELL RJ SET EQ LIFE3 ON SPACE 4,10 ON SX6 B1 MODE ON SA6 MODE BX4 X6 RJ SET ADD CELL EQ LIFE3 OFF SPACE 4,10 OFF SX6 B0 MODE OFF SA6 MODE BX4 X6 RJ SET REMOVE CELL EQ LIFE3 SETS SPACE 4,10 SETS SA1 AUTO SURPRISE MODE SX6 2 WAIT NG X1,SETS1 MX6 1 WAIT UNCONDITIONAL SETS1 SA6 AUTO EQ LIFE3 CRGO SPACE 4,10 CRGO SX1 1R8 START RJ PNK RESTORE SPACE 4,10 RESTORE SB2 SAVE RESTORE SB3 ARRAY RJ MOV COPY SAVE ARRAY * EQ ENTER ENTER SPACE 4,10 ENTER SA1 Y SA2 X1+ARRAY GET SA1 X SB7 X1+B1 MX0 -1 LX6 B7,X2 POSITION BX6 -X0*X6 MAKE 0 OR 1 SA6 MODE SET MODE EQ LIFE2 SPACE 4,16 ** DIRECTION KEYS. NW SA1 Y NORTHWEST RJ MUL SA1 X RJ MUL EQ MOVE N SA1 Y NORTH RJ MUL EQ MOVE NE SA1 Y NORTHEAST RJ MUL SA1 X RJ MDR EQ MOVE E SA1 X EAST RJ MDR EQ MOVE SE SA1 Y SOUTHEAST RJ MDR SA1 X RJ MDR EQ MOVE S SA1 Y SOUTH RJ MDR EQ MOVE SW SA1 Y SOUTHWEST RJ MDR SA1 X RJ MUL EQ MOVE W SA1 X WEST RJ MUL EQ MOVE MOVE SA4 MODE RJ SET MOVE CURSOR EQ LIFE3 GENERATE TITLE GENERATE GENERATIONS OF LIFE. ** GENERATE - GENERATE GENERATIONS OF LIFE. * * ENTRY ARRAY = MATRIX OF BITS FOR EACH CELL ALIVE. * * HERE'S THE REGISTER USAGE: * * B1 CONSTANT 1 * B2 60 (BITS PER WORD) * B3 59 (BPW-1 FOR SHIFTS) * B4 ARRAY-1 * B5 STARS (MAKE THINGS FASTER) * B6 LOOP COUNTER * B7 DISP WRITE ADD * * X0 1NOTHING * X1 LAST LINE * X2 THIS LINE * X3 NEXT LINE * X4 TEMP * X5 TEMP * X6 TEMP * X7 TEMP * * A3 READ OLD ARRAY * A6 WRITE NEW ARRAY GENERATE SB2 60 BITS PER WORD SB4 ARRAY-1 FWA-1 OF BIT MAP ARRAY SB5 STARS FWA OF STARS CONVERSION TABLE SB7 DISP FWA OF DISPLAY BUFFER SB3 B2-B1 BITS PER WORD - 1 SA2 B4+B1 FETCH FIRST ELEMENT SA1 B4+B2 LAST ELEMENT IN ARRAY BX6 X1 SB6 B3+ LOOP COUNTER SA6 B4+ PUT LAST ELEMENT BEFORE FIRST * CREATE NEW LIFE GENERATION. GEN1 SA1 B4+B6 FETCH X-1 ARRAY ELEMENT BX3 X2 FETCH X+1 ARRAY ELEMENT SA2 B6+ARRAY FETCH X ARRAY ELEMENT * NOW GENERATE THE NEXT GENERATION. BX4 X1+X3 BX5 X4+X2 NZ X5,GEN2 IF SOMETHING THERE NG X5,GEN2 IF SOMETHING THERE * FORMAT BLANK LINE FOR DISPLAY. SA4 STARS+0 BX7 X4 BX6 X4 SA7 B7 SA6 A7+B1 SA7 A6+B1 SA6 A7+B1 SA7 A6+B1 SA6 A7+B1 SB7 A6+B1 B7 POINTS TO NEXT LINE OF DISPLAY EQ GEN3 BLANK LINE OF ARRAY * * X1 = ...S,A,B,C,T... * X2 = ...U,D,E,F,V... * X3 = ...W,G,H,I,X... * * DESIRE IS TO ADD UP THE 8 BITS SURROUNDING A BIT. * (I.E. FOR BIT E WE ADD A+B+C+D+F+G+H+I.) * * * IN THE GAME OF LIFE, IF THERE ARE THREE CELLS SURROUNDING * A GIVEN LOCATION, THAT LOCATION BECOMES A ONE (REGARDLESS * IF THAT LOCATION IS 0 OR 1). IF A LOCATION HAS TWO CELLS * SURROUNDING IT, AND IT IS 1, IT REMAINS 1, ELSE IT BECOMES * 0. ALL OTHERS COMBINATIONS LEAD TO 0. * * * BITS IN NUMBER 0-8. ORIGINAL CELL VALUE. NEW VALUE. * C3 C2 C1 C0 CS * 0 0 0 0 0 0 * 0 0 0 0 1 0 * 0 0 0 1 0 0 * 0 0 0 1 1 0 * 0 0 1 0 0 0 * 0 0 1 0 1 1 * 0 0 1 1 0 1 * 0 0 1 1 1 1 * 0 1 0 0 0 0 * 0 1 0 0 1 0 * 0 1 0 1 0 0 * 0 1 0 1 1 0 * ... 0 * * THEREFORE NEW GENERATION = * (CS.OR.C0) .AND. C1 .AND. COMP(C2) .AND. COMP(C3) * AND IF C2 REMAINS SET INSTEAD OF CARRYING INTO C3 * THEN (CS.OR.C0) .AND. C1 .AND. COMP(C2) * GEN2 BX4 X1-X3 ...AG,BH,CD... UNITS BX4 X1-X3 ...AG,BH,CD... UNITS BX5 X1*X3 ...AG,BH,CD... TWOS * X - 0, 6, 7 UNUSED BX6 X4-X2 ...AGD,BHE,CIF... UNITS BX0 X4*X2 CARRY TO TWOS IX7 X0+X5 ...AGD,BHE,CIF... TWOS * X - 0, 1, 3 NOT NEEDED ANYMORE LX1 X6,B1 ...BHE,CIF,TXV... UNITS BX3 X1-X4 ...BHEAG,CIFBH,TXVCI UNITS BX0 X1*X4 CARRY TO TWOS BX1 X0+X5 WE KNOW THAT 1+2 IS ONLY 3 TWOS * X - 0, 4, 5 NOT NEEDED ANYMORE LX4 X7,B1 ...BHE,CIF,TXV... TWOS BX5 X1-X4 ...BHEAG,CIFBH,TXVCI... TWOS BX0 X1*X4 ...BHEAG,CIFBH,TXVCI... FOURS * X - 1, 4 NOT NEEDED ANYMORE LX1 X6,B3 (BPW-1) ...SWU,AGD,BHE... UNITS * X6 NOT NEEDED ANYMORE BX4 X1-X3 ...SWUBHEAG,AGDCIFBH,BHETXVCI... UNITS BX6 X1*X3 CARRY TO TWOS BX1 X5-X6 ADD CARRY TO TWOS TWOS BX3 X5*X6 CARRY TO FOURS BX5 X3+X0 FOURS AND ABOVE FOURS * X - 0, 3, 6 NOT NEEDED ANYMORE LX6 X7,B3 (BPW-1) ...SWU,AGD,BHE... TWOS * X7 NOT NEEDED ANYMORE BX0 X1-X6 ...SWUBHEAG,AGDCIFBH,BHETXVCI... TWOS BX3 X1*X6 CARRY TO FOURS BX7 X5+X3 ...SWUBHEAG,AGDCIFBH,BHETXVCI... FOURS+ * X - 7, 0, 4 ARE BITS 4, 2, 1 OF AGDCIFBH, WITH 4 SET FOR 4 * AND ABOVE, X2 = ORIGINAL VALUE. BX1 X2+X4 ORIGINAL .OR. UNITS BX5 -X7*X0 COMP(FOURS) .AND. TWOS BX6 X1*X5 COMP(FOURS).AND.TWOS.AND.ORIGINAL.OR.UNITS SA6 A2 STORE NEW X VALUE * FORMAT LINE FOR DISPLAY. MX0 -10 STARRY SA7 B7 * SA7 B7+B1 FOR 7 WORD INTERLEAVING DUP 5,2 STARRY SA7 A7+B1 SB7 A7+B1 B7 POINTS TO NEXT LINE OF DISPLAY GEN3 SB6 B6-B1 PL B6,GEN1 IF NOT END OF ARRAY SA1 GN SX0 B1 IX1 X0+X1 INCREMENT GENERATION COUNT BX6 X1 SA6 A1 RJ CDD SA6 GENNY+1 UPDATE DISPLAY * PROCESS KEYBOARD INPUT. GEN4 INPUT INPUT KEY RJ PNK CHECK FOR NUMBER KEYS KEY CR,MAINGO RESTART KEY R,RESTORE RESTORE KEY L,ENTER RESTORE LAST SA1 AUTO NG X1,GEN4 WAIT FOR NEXT KEY EQ GENERATE ITERATE STARS SPACE 4,10 ** STARS. STARS BSS 0 LIST -L TURN OFF FOR STARS DATA 10H DATA 10H * DATA 10H * DATA 10H ** DATA 10H * DATA 10H * * DATA 10H ** DATA 10H *** DATA 10H * DATA 10H * * DATA 10H * * DATA 10H * ** DATA 10H ** DATA 10H ** * DATA 10H *** DATA 10H **** DATA 10H * DATA 10H * * DATA 10H * * DATA 10H * ** DATA 10H * * DATA 10H * * * DATA 10H * ** DATA 10H * *** DATA 10H ** DATA 10H ** * DATA 10H ** * DATA 10H ** ** DATA 10H *** DATA 10H *** * DATA 10H **** DATA 10H ***** DATA 10H * DATA 10H * * DATA 10H * * DATA 10H * ** DATA 10H * * DATA 10H * * * DATA 10H * ** DATA 10H * *** DATA 10H * * DATA 10H * * * DATA 10H * * * DATA 10H * * ** DATA 10H * ** DATA 10H * ** * DATA 10H * *** DATA 10H * **** DATA 10H ** DATA 10H ** * DATA 10H ** * DATA 10H ** ** DATA 10H ** * DATA 10H ** * * DATA 10H ** ** DATA 10H ** *** DATA 10H *** DATA 10H *** * DATA 10H *** * DATA 10H *** ** DATA 10H **** DATA 10H **** * DATA 10H ***** DATA 10H ****** DATA 10H * DATA 10H * * DATA 10H * * DATA 10H * ** DATA 10H * * DATA 10H * * * DATA 10H * ** DATA 10H * *** DATA 10H * * DATA 10H * * * DATA 10H * * * DATA 10H * * ** DATA 10H * ** DATA 10H * ** * DATA 10H * *** DATA 10H * **** DATA 10H * * DATA 10H * * * DATA 10H * * * DATA 10H * * ** DATA 10H * * * DATA 10H * * * * DATA 10H * * ** DATA 10H * * *** DATA 10H * ** DATA 10H * ** * DATA 10H * ** * DATA 10H * ** ** DATA 10H * *** DATA 10H * *** * DATA 10H * **** DATA 10H * ***** DATA 10H ** DATA 10H ** * DATA 10H ** * DATA 10H ** ** DATA 10H ** * DATA 10H ** * * DATA 10H ** ** DATA 10H ** *** DATA 10H ** * DATA 10H ** * * DATA 10H ** * * DATA 10H ** * ** DATA 10H ** ** DATA 10H ** ** * DATA 10H ** *** DATA 10H ** **** DATA 10H *** DATA 10H *** * DATA 10H *** * DATA 10H *** ** DATA 10H *** * DATA 10H *** * * DATA 10H *** ** DATA 10H *** *** DATA 10H **** DATA 10H **** * DATA 10H **** * DATA 10H **** ** DATA 10H ***** DATA 10H ***** * DATA 10H ****** DATA 10H ******* DATA 10H * DATA 10H * * DATA 10H * * DATA 10H * ** DATA 10H * * DATA 10H * * * DATA 10H * ** DATA 10H * *** DATA 10H * * DATA 10H * * * DATA 10H * * * DATA 10H * * ** DATA 10H * ** DATA 10H * ** * DATA 10H * *** DATA 10H * **** DATA 10H * * DATA 10H * * * DATA 10H * * * DATA 10H * * ** DATA 10H * * * DATA 10H * * * * DATA 10H * * ** DATA 10H * * *** DATA 10H * ** DATA 10H * ** * DATA 10H * ** * DATA 10H * ** ** DATA 10H * *** DATA 10H * *** * DATA 10H * **** DATA 10H * ***** DATA 10H * * DATA 10H * * * DATA 10H * * * DATA 10H * * ** DATA 10H * * * DATA 10H * * * * DATA 10H * * ** DATA 10H * * *** DATA 10H * * * DATA 10H * * * * DATA 10H * * * * DATA 10H * * * ** DATA 10H * * ** DATA 10H * * ** * DATA 10H * * *** DATA 10H * * **** DATA 10H * ** DATA 10H * ** * DATA 10H * ** * DATA 10H * ** ** DATA 10H * ** * DATA 10H * ** * * DATA 10H * ** ** DATA 10H * ** *** DATA 10H * *** DATA 10H * *** * DATA 10H * *** * DATA 10H * *** ** DATA 10H * **** DATA 10H * **** * DATA 10H * ***** DATA 10H * ****** DATA 10H ** DATA 10H ** * DATA 10H ** * DATA 10H ** ** DATA 10H ** * DATA 10H ** * * DATA 10H ** ** DATA 10H ** *** DATA 10H ** * DATA 10H ** * * DATA 10H ** * * DATA 10H ** * ** DATA 10H ** ** DATA 10H ** ** * DATA 10H ** *** DATA 10H ** **** DATA 10H ** * DATA 10H ** * * DATA 10H ** * * DATA 10H ** * ** DATA 10H ** * * DATA 10H ** * * * DATA 10H ** * ** DATA 10H ** * *** DATA 10H ** ** DATA 10H ** ** * DATA 10H ** ** * DATA 10H ** ** ** DATA 10H ** *** DATA 10H ** *** * DATA 10H ** **** DATA 10H ** ***** DATA 10H *** DATA 10H *** * DATA 10H *** * DATA 10H *** ** DATA 10H *** * DATA 10H *** * * DATA 10H *** ** DATA 10H *** *** DATA 10H *** * DATA 10H *** * * DATA 10H *** * * DATA 10H *** * ** DATA 10H *** ** DATA 10H *** ** * DATA 10H *** *** DATA 10H *** **** DATA 10H **** DATA 10H **** * DATA 10H **** * DATA 10H **** ** DATA 10H **** * DATA 10H **** * * DATA 10H **** ** DATA 10H **** *** DATA 10H ***** DATA 10H ***** * DATA 10H ***** * DATA 10H ***** ** DATA 10H ****** DATA 10H ****** * DATA 10H ******* DATA 10H ******** DATA 10H * DATA 10H * * DATA 10H * * DATA 10H * ** DATA 10H * * DATA 10H * * * DATA 10H * ** DATA 10H * *** DATA 10H * * DATA 10H * * * DATA 10H * * * DATA 10H * * ** DATA 10H * ** DATA 10H * ** * DATA 10H * *** DATA 10H * **** DATA 10H * * DATA 10H * * * DATA 10H * * * DATA 10H * * ** DATA 10H * * * DATA 10H * * * * DATA 10H * * ** DATA 10H * * *** DATA 10H * ** DATA 10H * ** * DATA 10H * ** * DATA 10H * ** ** DATA 10H * *** DATA 10H * *** * DATA 10H * **** DATA 10H * ***** DATA 10H * * DATA 10H * * * DATA 10H * * * DATA 10H * * ** DATA 10H * * * DATA 10H * * * * DATA 10H * * ** DATA 10H * * *** DATA 10H * * * DATA 10H * * * * DATA 10H * * * * DATA 10H * * * ** DATA 10H * * ** DATA 10H * * ** * DATA 10H * * *** DATA 10H * * **** DATA 10H * ** DATA 10H * ** * DATA 10H * ** * DATA 10H * ** ** DATA 10H * ** * DATA 10H * ** * * DATA 10H * ** ** DATA 10H * ** *** DATA 10H * *** DATA 10H * *** * DATA 10H * *** * DATA 10H * *** ** DATA 10H * **** DATA 10H * **** * DATA 10H * ***** DATA 10H * ****** DATA 10H * * DATA 10H * * * DATA 10H * * * DATA 10H * * ** DATA 10H * * * DATA 10H * * * * DATA 10H * * ** DATA 10H * * *** DATA 10H * * * DATA 10H * * * * DATA 10H * * * * DATA 10H * * * ** DATA 10H * * ** DATA 10H * * ** * DATA 10H * * *** DATA 10H * * **** DATA 10H * * * DATA 10H * * * * DATA 10H * * * * DATA 10H * * * ** DATA 10H * * * * DATA 10H * * * * * DATA 10H * * * ** DATA 10H * * * *** DATA 10H * * ** DATA 10H * * ** * DATA 10H * * ** * DATA 10H * * ** ** DATA 10H * * *** DATA 10H * * *** * DATA 10H * * **** DATA 10H * * ***** DATA 10H * ** DATA 10H * ** * DATA 10H * ** * DATA 10H * ** ** DATA 10H * ** * DATA 10H * ** * * DATA 10H * ** ** DATA 10H * ** *** DATA 10H * ** * DATA 10H * ** * * DATA 10H * ** * * DATA 10H * ** * ** DATA 10H * ** ** DATA 10H * ** ** * DATA 10H * ** *** DATA 10H * ** **** DATA 10H * *** DATA 10H * *** * DATA 10H * *** * DATA 10H * *** ** DATA 10H * *** * DATA 10H * *** * * DATA 10H * *** ** DATA 10H * *** *** DATA 10H * **** DATA 10H * **** * DATA 10H * **** * DATA 10H * **** ** DATA 10H * ***** DATA 10H * ***** * DATA 10H * ****** DATA 10H * ******* DATA 10H ** DATA 10H ** * DATA 10H ** * DATA 10H ** ** DATA 10H ** * DATA 10H ** * * DATA 10H ** ** DATA 10H ** *** DATA 10H ** * DATA 10H ** * * DATA 10H ** * * DATA 10H ** * ** DATA 10H ** ** DATA 10H ** ** * DATA 10H ** *** DATA 10H ** **** DATA 10H ** * DATA 10H ** * * DATA 10H ** * * DATA 10H ** * ** DATA 10H ** * * DATA 10H ** * * * DATA 10H ** * ** DATA 10H ** * *** DATA 10H ** ** DATA 10H ** ** * DATA 10H ** ** * DATA 10H ** ** ** DATA 10H ** *** DATA 10H ** *** * DATA 10H ** **** DATA 10H ** ***** DATA 10H ** * DATA 10H ** * * DATA 10H ** * * DATA 10H ** * ** DATA 10H ** * * DATA 10H ** * * * DATA 10H ** * ** DATA 10H ** * *** DATA 10H ** * * DATA 10H ** * * * DATA 10H ** * * * DATA 10H ** * * ** DATA 10H ** * ** DATA 10H ** * ** * DATA 10H ** * *** DATA 10H ** * **** DATA 10H ** ** DATA 10H ** ** * DATA 10H ** ** * DATA 10H ** ** ** DATA 10H ** ** * DATA 10H ** ** * * DATA 10H ** ** ** DATA 10H ** ** *** DATA 10H ** *** DATA 10H ** *** * DATA 10H ** *** * DATA 10H ** *** ** DATA 10H ** **** DATA 10H ** **** * DATA 10H ** ***** DATA 10H ** ****** DATA 10H *** DATA 10H *** * DATA 10H *** * DATA 10H *** ** DATA 10H *** * DATA 10H *** * * DATA 10H *** ** DATA 10H *** *** DATA 10H *** * DATA 10H *** * * DATA 10H *** * * DATA 10H *** * ** DATA 10H *** ** DATA 10H *** ** * DATA 10H *** *** DATA 10H *** **** DATA 10H *** * DATA 10H *** * * DATA 10H *** * * DATA 10H *** * ** DATA 10H *** * * DATA 10H *** * * * DATA 10H *** * ** DATA 10H *** * *** DATA 10H *** ** DATA 10H *** ** * DATA 10H *** ** * DATA 10H *** ** ** DATA 10H *** *** DATA 10H *** *** * DATA 10H *** **** DATA 10H *** ***** DATA 10H **** DATA 10H **** * DATA 10H **** * DATA 10H **** ** DATA 10H **** * DATA 10H **** * * DATA 10H **** ** DATA 10H **** *** DATA 10H **** * DATA 10H **** * * DATA 10H **** * * DATA 10H **** * ** DATA 10H **** ** DATA 10H **** ** * DATA 10H **** *** DATA 10H **** **** DATA 10H ***** DATA 10H ***** * DATA 10H ***** * DATA 10H ***** ** DATA 10H ***** * DATA 10H ***** * * DATA 10H ***** ** DATA 10H ***** *** DATA 10H ****** DATA 10H ****** * DATA 10H ****** * DATA 10H ****** ** DATA 10H ******* DATA 10H ******* * DATA 10H ******** DATA 10H ********* DATA 10H* DATA 10H* * DATA 10H* * DATA 10H* ** DATA 10H* * DATA 10H* * * DATA 10H* ** DATA 10H* *** DATA 10H* * DATA 10H* * * DATA 10H* * * DATA 10H* * ** DATA 10H* ** DATA 10H* ** * DATA 10H* *** DATA 10H* **** DATA 10H* * DATA 10H* * * DATA 10H* * * DATA 10H* * ** DATA 10H* * * DATA 10H* * * * DATA 10H* * ** DATA 10H* * *** DATA 10H* ** DATA 10H* ** * DATA 10H* ** * DATA 10H* ** ** DATA 10H* *** DATA 10H* *** * DATA 10H* **** DATA 10H* ***** DATA 10H* * DATA 10H* * * DATA 10H* * * DATA 10H* * ** DATA 10H* * * DATA 10H* * * * DATA 10H* * ** DATA 10H* * *** DATA 10H* * * DATA 10H* * * * DATA 10H* * * * DATA 10H* * * ** DATA 10H* * ** DATA 10H* * ** * DATA 10H* * *** DATA 10H* * **** DATA 10H* ** DATA 10H* ** * DATA 10H* ** * DATA 10H* ** ** DATA 10H* ** * DATA 10H* ** * * DATA 10H* ** ** DATA 10H* ** *** DATA 10H* *** DATA 10H* *** * DATA 10H* *** * DATA 10H* *** ** DATA 10H* **** DATA 10H* **** * DATA 10H* ***** DATA 10H* ****** DATA 10H* * DATA 10H* * * DATA 10H* * * DATA 10H* * ** DATA 10H* * * DATA 10H* * * * DATA 10H* * ** DATA 10H* * *** DATA 10H* * * DATA 10H* * * * DATA 10H* * * * DATA 10H* * * ** DATA 10H* * ** DATA 10H* * ** * DATA 10H* * *** DATA 10H* * **** DATA 10H* * * DATA 10H* * * * DATA 10H* * * * DATA 10H* * * ** DATA 10H* * * * DATA 10H* * * * * DATA 10H* * * ** DATA 10H* * * *** DATA 10H* * ** DATA 10H* * ** * DATA 10H* * ** * DATA 10H* * ** ** DATA 10H* * *** DATA 10H* * *** * DATA 10H* * **** DATA 10H* * ***** DATA 10H* ** DATA 10H* ** * DATA 10H* ** * DATA 10H* ** ** DATA 10H* ** * DATA 10H* ** * * DATA 10H* ** ** DATA 10H* ** *** DATA 10H* ** * DATA 10H* ** * * DATA 10H* ** * * DATA 10H* ** * ** DATA 10H* ** ** DATA 10H* ** ** * DATA 10H* ** *** DATA 10H* ** **** DATA 10H* *** DATA 10H* *** * DATA 10H* *** * DATA 10H* *** ** DATA 10H* *** * DATA 10H* *** * * DATA 10H* *** ** DATA 10H* *** *** DATA 10H* **** DATA 10H* **** * DATA 10H* **** * DATA 10H* **** ** DATA 10H* ***** DATA 10H* ***** * DATA 10H* ****** DATA 10H* ******* DATA 10H* * DATA 10H* * * DATA 10H* * * DATA 10H* * ** DATA 10H* * * DATA 10H* * * * DATA 10H* * ** DATA 10H* * *** DATA 10H* * * DATA 10H* * * * DATA 10H* * * * DATA 10H* * * ** DATA 10H* * ** DATA 10H* * ** * DATA 10H* * *** DATA 10H* * **** DATA 10H* * * DATA 10H* * * * DATA 10H* * * * DATA 10H* * * ** DATA 10H* * * * DATA 10H* * * * * DATA 10H* * * ** DATA 10H* * * *** DATA 10H* * ** DATA 10H* * ** * DATA 10H* * ** * DATA 10H* * ** ** DATA 10H* * *** DATA 10H* * *** * DATA 10H* * **** DATA 10H* * ***** DATA 10H* * * DATA 10H* * * * DATA 10H* * * * DATA 10H* * * ** DATA 10H* * * * DATA 10H* * * * * DATA 10H* * * ** DATA 10H* * * *** DATA 10H* * * * DATA 10H* * * * * DATA 10H* * * * * DATA 10H* * * * ** DATA 10H* * * ** DATA 10H* * * ** * DATA 10H* * * *** DATA 10H* * * **** DATA 10H* * ** DATA 10H* * ** * DATA 10H* * ** * DATA 10H* * ** ** DATA 10H* * ** * DATA 10H* * ** * * DATA 10H* * ** ** DATA 10H* * ** *** DATA 10H* * *** DATA 10H* * *** * DATA 10H* * *** * DATA 10H* * *** ** DATA 10H* * **** DATA 10H* * **** * DATA 10H* * ***** DATA 10H* * ****** DATA 10H* ** DATA 10H* ** * DATA 10H* ** * DATA 10H* ** ** DATA 10H* ** * DATA 10H* ** * * DATA 10H* ** ** DATA 10H* ** *** DATA 10H* ** * DATA 10H* ** * * DATA 10H* ** * * DATA 10H* ** * ** DATA 10H* ** ** DATA 10H* ** ** * DATA 10H* ** *** DATA 10H* ** **** DATA 10H* ** * DATA 10H* ** * * DATA 10H* ** * * DATA 10H* ** * ** DATA 10H* ** * * DATA 10H* ** * * * DATA 10H* ** * ** DATA 10H* ** * *** DATA 10H* ** ** DATA 10H* ** ** * DATA 10H* ** ** * DATA 10H* ** ** ** DATA 10H* ** *** DATA 10H* ** *** * DATA 10H* ** **** DATA 10H* ** ***** DATA 10H* *** DATA 10H* *** * DATA 10H* *** * DATA 10H* *** ** DATA 10H* *** * DATA 10H* *** * * DATA 10H* *** ** DATA 10H* *** *** DATA 10H* *** * DATA 10H* *** * * DATA 10H* *** * * DATA 10H* *** * ** DATA 10H* *** ** DATA 10H* *** ** * DATA 10H* *** *** DATA 10H* *** **** DATA 10H* **** DATA 10H* **** * DATA 10H* **** * DATA 10H* **** ** DATA 10H* **** * DATA 10H* **** * * DATA 10H* **** ** DATA 10H* **** *** DATA 10H* ***** DATA 10H* ***** * DATA 10H* ***** * DATA 10H* ***** ** DATA 10H* ****** DATA 10H* ****** * DATA 10H* ******* DATA 10H* ******** DATA 10H** DATA 10H** * DATA 10H** * DATA 10H** ** DATA 10H** * DATA 10H** * * DATA 10H** ** DATA 10H** *** DATA 10H** * DATA 10H** * * DATA 10H** * * DATA 10H** * ** DATA 10H** ** DATA 10H** ** * DATA 10H** *** DATA 10H** **** DATA 10H** * DATA 10H** * * DATA 10H** * * DATA 10H** * ** DATA 10H** * * DATA 10H** * * * DATA 10H** * ** DATA 10H** * *** DATA 10H** ** DATA 10H** ** * DATA 10H** ** * DATA 10H** ** ** DATA 10H** *** DATA 10H** *** * DATA 10H** **** DATA 10H** ***** DATA 10H** * DATA 10H** * * DATA 10H** * * DATA 10H** * ** DATA 10H** * * DATA 10H** * * * DATA 10H** * ** DATA 10H** * *** DATA 10H** * * DATA 10H** * * * DATA 10H** * * * DATA 10H** * * ** DATA 10H** * ** DATA 10H** * ** * DATA 10H** * *** DATA 10H** * **** DATA 10H** ** DATA 10H** ** * DATA 10H** ** * DATA 10H** ** ** DATA 10H** ** * DATA 10H** ** * * DATA 10H** ** ** DATA 10H** ** *** DATA 10H** *** DATA 10H** *** * DATA 10H** *** * DATA 10H** *** ** DATA 10H** **** DATA 10H** **** * DATA 10H** ***** DATA 10H** ****** DATA 10H** * DATA 10H** * * DATA 10H** * * DATA 10H** * ** DATA 10H** * * DATA 10H** * * * DATA 10H** * ** DATA 10H** * *** DATA 10H** * * DATA 10H** * * * DATA 10H** * * * DATA 10H** * * ** DATA 10H** * ** DATA 10H** * ** * DATA 10H** * *** DATA 10H** * **** DATA 10H** * * DATA 10H** * * * DATA 10H** * * * DATA 10H** * * ** DATA 10H** * * * DATA 10H** * * * * DATA 10H** * * ** DATA 10H** * * *** DATA 10H** * ** DATA 10H** * ** * DATA 10H** * ** * DATA 10H** * ** ** DATA 10H** * *** DATA 10H** * *** * DATA 10H** * **** DATA 10H** * ***** DATA 10H** ** DATA 10H** ** * DATA 10H** ** * DATA 10H** ** ** DATA 10H** ** * DATA 10H** ** * * DATA 10H** ** ** DATA 10H** ** *** DATA 10H** ** * DATA 10H** ** * * DATA 10H** ** * * DATA 10H** ** * ** DATA 10H** ** ** DATA 10H** ** ** * DATA 10H** ** *** DATA 10H** ** **** DATA 10H** *** DATA 10H** *** * DATA 10H** *** * DATA 10H** *** ** DATA 10H** *** * DATA 10H** *** * * DATA 10H** *** ** DATA 10H** *** *** DATA 10H** **** DATA 10H** **** * DATA 10H** **** * DATA 10H** **** ** DATA 10H** ***** DATA 10H** ***** * DATA 10H** ****** DATA 10H** ******* DATA 10H*** DATA 10H*** * DATA 10H*** * DATA 10H*** ** DATA 10H*** * DATA 10H*** * * DATA 10H*** ** DATA 10H*** *** DATA 10H*** * DATA 10H*** * * DATA 10H*** * * DATA 10H*** * ** DATA 10H*** ** DATA 10H*** ** * DATA 10H*** *** DATA 10H*** **** DATA 10H*** * DATA 10H*** * * DATA 10H*** * * DATA 10H*** * ** DATA 10H*** * * DATA 10H*** * * * DATA 10H*** * ** DATA 10H*** * *** DATA 10H*** ** DATA 10H*** ** * DATA 10H*** ** * DATA 10H*** ** ** DATA 10H*** *** DATA 10H*** *** * DATA 10H*** **** DATA 10H*** ***** DATA 10H*** * DATA 10H*** * * DATA 10H*** * * DATA 10H*** * ** DATA 10H*** * * DATA 10H*** * * * DATA 10H*** * ** DATA 10H*** * *** DATA 10H*** * * DATA 10H*** * * * DATA 10H*** * * * DATA 10H*** * * ** DATA 10H*** * ** DATA 10H*** * ** * DATA 10H*** * *** DATA 10H*** * **** DATA 10H*** ** DATA 10H*** ** * DATA 10H*** ** * DATA 10H*** ** ** DATA 10H*** ** * DATA 10H*** ** * * DATA 10H*** ** ** DATA 10H*** ** *** DATA 10H*** *** DATA 10H*** *** * DATA 10H*** *** * DATA 10H*** *** ** DATA 10H*** **** DATA 10H*** **** * DATA 10H*** ***** DATA 10H*** ****** DATA 10H**** DATA 10H**** * DATA 10H**** * DATA 10H**** ** DATA 10H**** * DATA 10H**** * * DATA 10H**** ** DATA 10H**** *** DATA 10H**** * DATA 10H**** * * DATA 10H**** * * DATA 10H**** * ** DATA 10H**** ** DATA 10H**** ** * DATA 10H**** *** DATA 10H**** **** DATA 10H**** * DATA 10H**** * * DATA 10H**** * * DATA 10H**** * ** DATA 10H**** * * DATA 10H**** * * * DATA 10H**** * ** DATA 10H**** * *** DATA 10H**** ** DATA 10H**** ** * DATA 10H**** ** * DATA 10H**** ** ** DATA 10H**** *** DATA 10H**** *** * DATA 10H**** **** DATA 10H**** ***** DATA 10H***** DATA 10H***** * DATA 10H***** * DATA 10H***** ** DATA 10H***** * DATA 10H***** * * DATA 10H***** ** DATA 10H***** *** DATA 10H***** * DATA 10H***** * * DATA 10H***** * * DATA 10H***** * ** DATA 10H***** ** DATA 10H***** ** * DATA 10H***** *** DATA 10H***** **** DATA 10H****** DATA 10H****** * DATA 10H****** * DATA 10H****** ** DATA 10H****** * DATA 10H****** * * DATA 10H****** ** DATA 10H****** *** DATA 10H******* DATA 10H******* * DATA 10H******* * DATA 10H******* ** DATA 10H******** DATA 10H******** * DATA 10H********* DATA 10H********** LIST * TURN ON AFTER STARS TITLE SUBROUTINES. GDB SPACE 4,16 ** GDB - GENERATE DISPLAY BUFFER. * GDB PS ENTRY/EXIT SA0 DISP FWA OF DISPLAY BUFFER SA3 X SA4 Y SB2 B0 SB7 X3 X COORDINATE OF 0/X CELL SB6 X4 Y COORDINATE OF 0/X CELL MX0 -6 SB5 59 SX2 1R* SA4 MODE SA4 GDBA+X4 0/X GDB1 SA1 ARRAY+B2 SB3 B0 * SA0 A0+B1 FOR 7 WORD INTERLEAVE DISPLAYS GDB2 SX7 0 SB4 10 GDB3 LX7 6 PL X1,GDB4 BX7 X7+X2 GDB4 NE B6,B2,GDB5 NE B7,B3,GDB5 BX7 X0*X7 BX7 X7+X4 INSERT 0/X GDB5 LX1 1 SB3 B3+B1 SB4 B4-B1 NZ B4,GDB3 IF WORD NOT FINISHED SA7 A0 STORE IN DISPLAY BUFFER SA0 A0+B1 LE B3,B5,GDB2 SB2 B2+B1 LE B2,B5,GDB1 EQ GDB RETURN GDBA VFD 60/1R0,60/1RX MDR SPACE 4,16 ** MDR - MOVE DOWN OR RIGHT. * * ENTRY (A1) = ADDRESS OF COORDINATE TO MOVE. * (X1) = CURRENT VALUE OF COORDINATE. * * EXIT COORDINATE UPDATED. MDR PS ENTRY/EXIT SX6 X1-59 ZR X6,MDR1 IF WRAP AROUND SX6 X1+1 INCREMENT MDR1 SA6 A1 EQ MDR RETURN MOV SPACE 4,10 ** MOV - MOVE CELL ARRARYS. * * ENTRY (B2) = FWA OF SOURCE ARRARY. * (B3) = FWA OF DESTINATION ARRARY. MOV1 SB4 B4-B1 SA1 B2+B4 BX6 X1 COPY SA6 B3+B4 GT B4,MOV1 MILL MOV PS ENTRY/EXIT SB4 60 NUMBER OF WORDS TO MOVE EQ MOV1 MUL SPACE 4,16 ** MUL - MOVE UP OR LEFT. * * ENTRY (A1) = ADDRESS OF COORDINATE TO MOVE. * (X1) = CURRENT VALUE OF COORDINATE. * * EXIT COORDINATE UPDATED. MUL PS ENTRY/EXIT NZ X1,MUL1 IF NO WRAP AROUND SX1 60 MUL1 SX6 X1-1 DECREMENT SA6 A1+ EQ MUL RETURN PNK SPACE 4,16 ** PNK - PROCESS NUMBER KEYS. * * ENTRY (X1) = KEY PRESSED. * * EXIT (X1) = KEY PRESSED. * TO *GENERATE* IF NUMBER KEY. * * USES X - 2, 6. * A - 2, 6. PNK PS ENTRY/EXIT KEY 9,PNK2 FAST PL X2,PNK IF NOT NUMBER KEY SX6 X1-1R0 ZR X6,PNK1 ONESHOT NG X6,PNK IF NOT NUMBER KEY SX0 10 IX6 X0-X6 DELAY = (10 - KEY) SA6 AUTO EQ GENERATE PNK1 SX6 -1 ONE SHOT EQ PNK3 PNK2 SX6 0 FAST PNK3 SA6 AUTO SA2 LIFEO RE-ALIGN LIFEOMATIC BX6 X2 SA6 MATIC EQ GENERATE SET SPACE 4,16 ** SET - SET/UNSET CELL. * * ENTRY (X4) = MODE. (0=OFF,1=ON) * (X) = X COORDINATE OF CELL. * (Y) = Y COORDINATE OF CELL. SET PS ENTRY/EXIT SA1 Y SA2 X1+ARRAY GET SA1 X SB7 X1 LX2 B7,X2 POSITION SB6 60 MX0 1 NZ X4,SET1 IF SET BX2 -X0*X2 UNSET MX0 0 CLEAR SET BIT SET1 BX6 X0+X2 SB7 B6-B7 LX6 B7,X6 REPOSTION SA6 A2 PUT BACK EQ SET RETURN WKI SPACE 4,16 ** WKI - WAIT FOR KEYBOARD INPUT. * * ENTRY (AUTO) = IF .LT. 0 THEN UNCONDITIONAL WAIT FOR KEY. * IF = 0 THEN JUST CHECK FOR KEY. * ELSE AUTO = NUMBER OF DISPLAY CYCLES * TO PAUSE. * * EXIT (X1) = KEY OR ZERO. WKI3 SX6 B0 LX1 6 SA6 KEY CLEAR OLD KEY SA3 STATUS+1 (X3) = STATUS/REQUEST WORD KEY H,HOLD HOLD DISPLAY KEY K,KILL DROP DISPLAY KEY *,DSD TOGGLE TO *DSD* WKI PS ENTRY/EXIT SA1 KEY GET KEY NZ X1,WKI3 IF KEY PRESSED SA1 AUTO ZR X1,WKI1 IF NO WAIT NG X1,WKI2 IF UNCONDITIONAL WAIT SB2 X1 SA1 MATIC ROTATE *LIFEOMATIC* LX1 6 BX6 X1 SA6 A1 WKI0 SB2 B2-B1 RECALL SA1 KEY NZ X1,WKI3 IF KEY PRESSED GT B2,WKI0 LOOP WKI1 SA1 STATUS+1 CHECK DISPLAY STATUS AX1 48 ZR X1,WKI IF DISPLAY ASSIGNED, TIMEOUT RECALL EQ WKI1 LOOP WKI2 RECALL WAIT FOR KEY SA1 KEY NZ X1,WKI3 IF KEY PRESSED EQ WKI2 LOOP DSD SPACE 4,10 ** DSD - TOGGLE TO *DSD* DSD SX6 1 LX6 48 BX6 X3+X6 SA6 STATUS+1 SET DSD REQUEST EQ WKI1 HOLD SPACE 2,6 ** HOLD - HOLD DISPLAY. HOLD SX6 2 LX6 48 BX6 X3+X6 SA6 STATUS+1 SET HOLD REQUEST EQ WKI1 KILL SPACE 2,6 ** KILL - DROP PROGRAM. KILL SX6 4 LX6 48 BX6 X3+X6 SA6 STATUS+1 SET DROP REQUEST ENDRUN END PROGRAM SPACE 4,10 ** COMMON DECKS. *CALL COMCSYS *CALL COMCCDD TITLE GENERATE COMMUNICATION AREA. SPACE 4 ** MACRO DEFINITIONS. CWD SPACE 4,16 ** CWD - GENERATE DISPLAY CONTROL WORD. * * CWD X,Y,FL,BR,SI,SC,WC,ADDR,ABS * * ENTRY *X* = X COORDINATE. (0-511) * *Y* = Y COORDINATE. (0-511) * *FL* = FLASH RATE. * *BR* = BRIGHTNESS. * *SI* = SIZE. (0=SMALL,1=MEDIUM,2=LARGE) * *SC* = SCREEN. (0=LEFT,1=RIGHT) * *WC* = CM WORD COUNT. * *ADDR* = ADDRESS OF TEXT. * *ABS* = ABSOLUTE TEXT FLAG. PURGMAC CWD CWD MACRO X,Y,FL,BR,SI,SC,WC,ADDR,ABS LOCAL QQ .1 IFC EQ,$ABS$ QQ SET 0 .1 ELSE QQ SET 400000B .1 ENDIF + VFD 3/0,9/X,3/0,9/Y,3/FL,3/BR,3/0,2/SI,1/SC,6/WC,18/QQ+ADDR ENDM INST SPACE 4,10 ** INST - INSTRUCTION GENERATION MACRO. * * INST TEXT * * ENTRY *TEXT* = TEXT TO BE DISPLAY. PURGMAC INST INST MACRO TEXT NOREF .L IFC NE,$TEXT$,5 .M MICRO 1,,$_TEXT_$ .L MICCNT .M .L SET .L+9 .L SET .L/10 CWD 50,ROW,0,0,0,1,.L,(=H$".M"$) ROW SET ROW-20B ENDM STATUS SPACE 4,10 ** DISPLAY PP STATUS BUFFER. STATUS VFD 60/CWT VFD 12/4000B,18/KEY+1,30/KEY KEY SPACE 4,10 ** KEY BUFFER. KEY DATA 0 KEY WRITTEN HERE DATA 0 KEYBOARD CHARACTER COUNT CWT SPACE 4,16 ** CONTROL WORD TABLE. CWT VFD 60/CWTL-1 NUMBER OF ENTRIES ** GENERATE CONTROL WORDS. NOREF ROW,.LOC ROW SET 770B STARTING ROW FOR CELLS .LOC SET DISP DUP 60 CWD 0,ROW,0,0,0,0,6,.LOC ROW SET ROW-10B .LOC SET .LOC+6 ENDD SPACE 4,16 ** GENERATE INSTRUCTIONS. ROW SET 650B STARTING ROW FOR INSTRUCTIONS INST (ANYTIME) INST ( H - HOLD) INST ( K - KILL) INST ( * - TOGGLE TO DSD) INST (SETUP) INST ( Q,W,E,A,D,Z,X,C - DESIGN) INST ( S - SURPRISE) INST ( BKSP - REMOVE SINGLE CELL) INST ( - - CONTINUE REMOVING CELLS) INST ( + - CONTINUE ADDING CELLS) INST ( CR - GO) INST (EXECUTION) INST ( CR - STOP) INST ( R - RESTORE INITIAL PATTERN) INST ( L - RESTORE LAST PATTERN) INST (NUMBERS - PRESS ANYTIME) INST ( THEY AFFECT EXECUTION SPEED) INST ( 0 - ONE AT A TIME) INST ( 1,2,...,8 - SLOW TO FAST) INST ( 9 - VERY FAST) SPACE 4,10 ** CWD FOR *GENERATION NNNNNN*. CWD 30,40,0,7,1,1,2,GENNY SPACE 2,6 ** CWD FOR LIFEOMATIC. CWD 100,470,0,4,2,1,1,MATIC SPACE 2 CWTL EQU *-CWT LENGTH OF CONTROL WORD TABLE RFL= END LIFE ~ LUN IDENT LUN,LUN PERIPH BASE MIXED SST RDS *COMMENT LUN - LUNAR PP DISPLAY DRIVER. COMMENT COPYRIGHT (C) UNIVERSITY OF MINNESOTA - 1977. LUN TITLE LUN - LUNAR LANDER DISPLAY DRIVER. LUN SPACE 4 *** LUN - LUNAR LANDER DISPLAY DRIVER. * S. D. FREYDER. DATE UNKNOWN. * J. M. CYCHOSZ. DATE UNKNOWN. * J. J. DRUMMOND. 77/06/20. KRONOS/NOS REWRITE. * * COPYRIGHT (C) UNIVERSITY OF MINNESOTA - 1977. * * GENERAL PERMISSION TO COPY, BUT NOT FOR PROFIT, ALL OR PART * OF THIS MATERIAL IS GRANTED, PROVIDED THAT REFERENCE IS MADE * TO LUN AND TO THE FACT THAT COPYING PRIVILEGES WERE GRANTED * BY PERMISSION OF THE UNIVERSITY OF MINNESOTA. LUN SPACE 4 *** LUN PROCESSES KEYBOARD INPUT AND DISPLAYS OUTPUT FOR * A CP LUNAR LANDER SIMULATOR. LUN SPACE 4,10 *** OPERATOR MESSAGES. * * *REQUEST DISPLAY. (LUNAR)* = THE SIMULATOR REQUESTS THE * DISPLAY CHANNEL. LUN SPACE 4,10 *** DAYFILE MESSAGES. * * * ILLEGAL USER ACCESS.* = USER WAS NOT VALIDATED TO * CALL THE DISPLAY DRIVER. * * * LUN ARGUMENT ERROR.* = THE SIMULATOR REQUESTED * INFORMATION TO BE DISPLAYED THAT WAS OUTSIDE * IT,S FIELD LENGTH. LUN SPACE 4,10 *** PROGRAMS CALLED. * * NONE. LUN SPACE 4,10 **** DIRECT CELL ASSIGNMENTS. KY EQU 16 LAST KEY ENTERED CL EQU 17 INTERNAL DELAY CLOCK CN EQU 20 - 24 ONE CM WORD PI EQU 25 - 26 PROGRAM INFORMATION (DET) ADDRESS IN EQU 27 INTENSITY FACTOR FW EQU 30 - 31 CURRENT BUFFER ADDRESS LW EQU 32 - 33 LWA + 1 OF BUFFER FT EQU 34 - 35 FIRST ADDRESS OF DATA MF EQU 36 KEYBOARD BUFFER MESSAGE FLAG LK EQU 37 LAST REAL KEY LUN SPACE 4,10 ** PROGRAM CONSTANTS. CH EQU CHDS DISPLAY CHANNEL DELAY EQU 20 CYCLE TIME IN MILLISECONDS ITEN EQU 4 INTENSITY OF KEYBOARD MESSAGE BUFFER *CALL COMPMAC *CALL COMSCPS LIST X *CALL COMSLUN LIST * **** LUN SPACE 4,10 ** CONSTANTS USED AS INSTRUCTIONS. *CALL COMSPIM ORG PPFW LUN TITLE MAIN PROGRAM ** MAIN PROGRAM. LUN RJM PRS PRESET PROGRAM LUN1 RJM DLY DELAY RJM DBF DISPLAY BUFFERS RJM DKB DISPLAY KEYBOARD BUFFERS RJM CST CHECK STATUS WORD RJM PKI PROCESS KEYBOARD INPUT PAUSE LDD CM+1 CHECK FOR ERRORS ZJN LUN1 LJM DRP DROP OUT LUN TITLE SUBROUTINES. CST SPACE 4,10 ** CST - CHECK STATUS WORD. * * ENTRY (STAW) = SIMULATOR REQUESTS TO DISPLAY DRIVER. * * EXIT NONE. * * CALLS DRP, RPI, WPI. CST1 LDD CM+3 CHECK IF RFL REQUEST ZJN CSTX IF NO RFL REQUEST STD CM+1 LDN 0 STD CM+2 CM REQUEST MONITOR RSTM CHANGE FIELD LENGTH LDD CM+1 NJN CSTX IF NOT HONORED, DO NOT CLEAR REQUEST LDN ZERL CRD CM LDN STAW RJM WPI CLEAR STATUS WORD CST SUBR ENTRY/EXIT LDN STAW RJM RPI READ STATUS WORD LDD CM+4 CHECK IF DROP REQUEST ZJN CST1 IF NO DROP REQUEST LDN ZERL CRD CM LDN STAW RJM WPI ACKNOWLEDGE DROP REQUEST LJM DRP DROP PP DBF SPACE 4,10 ** DBF - DISPLAY BUFFERS. * * ENTRY NONE. * * EXIT CONTENTS OF ALL BUFFERS DISPLAYED. * * USES T5, T6, T7, IN, FW - FW+1, LW - LW+1, FT - FT+1, * CN - CN+4. * * CALLS RPI, TFL. DBF SUBR ENTRY/EXIT LDN DPFW RJM RPI READ PROGRAM INFORMATION LDD CM+3 SHN 14 LMD CM+4 RJM TFL TEST FIELD LENGTH SBN 1 STD FW+1 STORE FWA - 1 SHN -14 STD FW LDN DPLW RJM RPI READ PROGRAM INFORMATION LDD CM+3 SHN 14 LMD CM+4 RJM TFL TEST FIELD LENGTH STD LW+1 STORE LWA SHN -14 STD LW * ADVANCE TO NEXT ADDRESS. DBF1 AOD FW+1 SHN -14 RAD FW SBD LW SHN 14 ADD FW+1 SBD LW+1 MJN DBF2 LJM DBFX IF END OF TABLE * PROCESS NEXT BUFFER POINTER. DBF2 LDD FW SHN 14 LMD FW+1 CRD CN READ NEXT BUFFER POINTER LDD CN SHN 6 MJN DBF1 IF DISPLAY TO BE SUPPRESSED SHN -6 LPN 7 INTENSITY ZJN DBF1 IF ZERO INTENSITY STD IN SAVE INTENSITY LDD CN SHN -6 LPN 7 INDEX TO FUNCTION CODE STD T7 LDM DBFB,T7 LOAD FUNCTION FAN CH FUNCTION DISPLAY CONSOLE LDD CN+2 LOAD BUFFER FWA SCN 77 SHN 6 ADD CN+1 SHN 6 RJM TFL TEST FIELD LENGTH STD FT+1 STM DBFA+1 SHN -14 STD FT ADC LDCI FORM *LDC* INSTRUCTION STM DBFA LDD CN+3 SHN 14 LMD CN+4 RJM TFL TEST FIELD LENGTH STD T7 SHN -14 SBD FT SHN 14 ADD T7 SBD FT+1 PJN DBF4 IF NOT LAST ENTRY DBF3 LJM DBF1 NEXT TABLE ENTRY DBF4 ZJN DBF3 IF ZERO LENGTH STD T6 SAVE LENGTH STD T5 ACN CH DBF5 LDC -BUFS BUFFER SIZE (WORDS) RAD T5 MJN DBF6 IF PP BUFFER NOT FULL LDC BUFS STD T7 SET TRANSFER LENGTH LDD FT SHN 14 LMD FT+1 CRM DBUF,T7 FILL PP BUFFER STD FT+1 INCREMENT BYTE COUNT SHN -14 STD FT LDC BUFR LENGTH OF BUFFER (BYTES) ROUNDED DOWN OAM DBUF,CH DISPLAY BUFFER UJN DBF5 REST OF DATA DBF6 ADC BUFS ZJN DBF8 IF DONE STD T5 SET NEW BYTE COUNT STD T7 LDD FT SHN 14 LMD FT+1 CRM DBUF,T7 READ REMAINING DATA DBF7 LDD T5 SHN 2 ADD T5 TIMES 5 OAM DBUF,CH DISPLAY BUFFER DBF8 SOD IN DECREMENT INTENSITY COUNT ZJN DBF9 IF DONE WITH THIS BUFFER LDD T6 STD T5 ADC -BUFS MJN DBF7 IF .LE. PP BUFFER LENGTH DBFA LDC * REMAINING LENGTH STD FT+1 SHN -14 STD FT LJM DBF5 DISPLAY REST OF DATA DBF9 DCN CH+40 LJM DBF1 NEXT BUFFER DBFB BSS 0 TABLE OF FUNCTION CODES LOC 0 DATA 7000 64 CHARACTERS/LINE, LEFT SCREEN DATA 7100 64 CHARACTERS/LINE, RIGHT SCREEN DATA 7001 32 CHARACTERS/LINE, LEFT SCREEN DATA 7101 32 CHARACTERS/LINE, RIGHT SCREEN DATA 7002 16 CHARACTERS/LINE, LEFT SCREEN DATA 7102 16 CHARACTERS/LINE, RIGHT SCREEN DATA 7010 512 DOTS/LINE, LEFT SCREEN DATA 7110 512 DOTS/LINE, RIGHT SCREEN LOC *O DKB SPACE 4,10 ** DKB - DISPLAY KEYBOARD BUFFER. * * ENTRY NONE. * * EXIT KEYBOARD MESSAGE AND BUFFER DISPLAYED. * * USES T5, T6, T7, CM - CM+4, MF. * * CALLS RPI, TFL. DKB SUBR ENTRY/EXIT LDN KBMW KEYBOARD MESSAGE BUFFER RJM RPI READ PROGRAM INFORMATION FNC 7001,CH 32 CHARACTERS/LINE, LEFT SCREEN LDD CM+3 SHN 14 LMD CM+4 RJM TFL TEST FIELD LENGTH CRM KMBF,TR READ MESSAGE LDM KMBF ZJN DKB2 IF NO MESSAGE LDN ITEN SET INTENSITY STD T7 ACN CH DKB1 LDN 2 OAM DKBA,CH OUTPUT COORDINATES LDN 3*5 OAM KMBF,CH OUTPUT MESSAGE SOD T7 DECREMENT INTENSITY COUNT NJN DKB1 IF TO BE DISPLAYED MORE TIMES DCN CH+40 DKB2 LDN KBSW KEYBOARD STATUS WORD RJM RPI READ PROGRAM INFORMATION LDD CM STD MF SET MESSAGE FLAG NJN DKB3 IF SOMETHING THERE LJM DKBX RETURN DKB3 STD T7 SAVE CHARACTER COUNT ADC -KBMAX MINUS MAXIMUM CHARACTER COUNT MJN DKB4 IF LESS THAN MAXIMUM LDC KBMAX STD T7 DKB4 LDD T7 SBN 33D MJN DKB5 IF LESS THAN 33 CHARACTERS FNC 7000,CH 64 CHARACTERS/LINE, LEFT SCREEN * DIVIDE CHARACTER COUNT BY 4 TO APPROXIMATE CM WORD * COUNT OF KEYBOARD BUFFER. DKB5 LDD T7 SHN -2 ADN 1 STD T6 LDD CM+3 SHN 14 LMD CM+4 RJM TFL TEST FIELD LENGTH CRM KBUF,T6 READ KEYBOARD BUFFER LDN 0 STD T5 ACN CH LDN 2 OAM DKBB,CH OUTPUT COORDINATES * LOOP TO DISPLAY KEYBOARD BUFFER. DKB6 LDM KBUF,T5 SHN 6 LMM KBUF+1,T5 OAN CH+40 LDN 2 RAD T5 SBD T7 MJN DKB6 IF MORE TO DISPLAY DCN CH+40 LJM DKBX RETURN DKBA DATA 7020 DKBB DATA 6000 DATA 7000 DLY SPACE 4,10 ** DLY - DELAY CONSTANT TIME. GUARANTEES THAT EACH * LOOP TAKES ABOUT THE SAME TIME. * * ENTRY NONE. * * EXIT DELAY TIME ELAPSED. * REAL-TIME CLOCK UPDATED IN CP PROGRAM. * * USES CM - CM+4. * * CALLS PSS, WPI. DLY3 LDD CM+4 STD CL UPDATE INTERNAL CLOCK DLY SUBR ENTRY/EXIT DLY1 RJM ROF PAUSE AND CHECK ROLLOUT FLAG LDC RTCL CRD CM READ REAL-TIME CLOCK LDN 0 STD CM CLEAR SECONDS FIELD STD CM+1 LDN RTCW REAL-TIME CLOCK WORD RJM WPI WRITE PROGRAM INFORMATION LDD CM+4 SBD CL MINUS START TIME PJN DLY2 IF NO OVERFLOW ADC 10000 DLY2 SBN DELAY SUBTRACT DELAY PJN DLY3 IF DELAY ELAPSED * DELAY 1 MILLISECOND. LDC 500D SBN 1 NJN *-1 LOOP UJN DLY1 RE-READ CLOCK DRP SPACE 4,10 ** DRP - DROP PPU. * * ENTRY NONE. * * EXIT DISPLAY CHANNEL DROPPED. * PP DROPPED AND EXITS TO RESIDENT. * * CALLS DDS, PPR. DRP RJM DDS DROP DISPLAY DPP MONITOR DPPM DROP PP LJM PPR EXIT TO PP RESIDENT PIA SPACE 4,10 ** PIA - PROGRAM INFORMATION ADDRESS. * * ENTRY (A) = INDEX OF ENTRY IN DISPLAY ENVIRONMENT TABLE. * * EXIT (A) = ABSOLUTE CM ADDRESS OF TABLE ENTRY. * * CALLS TFL. PIA SUBR ENTRY/EXIT ADD PI+1 SHN 6 ADD PI SHN 14 RJM TFL TEST FIELD LENGTH UJN PIAX RETURN PKI SPACE 4,10 ** PKI - PROCESS KEYBOARD INPUT. * * SPECIAL KEYS: * * H HOLD DISPLAY. * K KILL PROGRAM AND DROP DISPLAY. * * PASS DISPLAY TO DSD (IF LUN AND DSD SHARING SAME * CHANNEL). * * IF NOT FIRST CHARACTER IN LINE, ONLY THE #H# WILL BE * RECOGNIZED. * * ENTRY (KY) = PREVIOUS CHARACTER. * (LK) = LAST REAL KEY. * * EXIT (KY) = NEW CHARACTER. * (LK) = NEW KEY IF KEY NON-ZERO AND DIFFERENT. * * USES T5, T6, T7, CM - CM+4. * * CALLS DRP, DDS, HDC, RDS, WPI. PKI SUBR ENTRY/EXIT LDD KY STD T7 SAVE KEY FNC 7020,CH FUNCTION FOR INPUT ACN CH IAN CH INPUT CHARACTER DCN CH+40 STD KY STORE KEY ZJN PKIX IF NO CHARACTER ENTERED LMD T7 ZJN PKIX IF NO NEW CHARACTER LDD MF CHECK MESSAGE FLAG NJN PKI3 NOT FIRST CHARACTER IN LINE PKI0 LDD KY STD LK SET LAST KEY LMN 1RK NJN PKI1 IF NOT -K- MONITOR DCPM DROP CPU LJM DRP DROP PROGRAM PKI1 LMN 1RK&1R* NJN PKI2 IF NOT -*- RJM HDC HOLD DISPLAY CHANNEL UJN PKIX RETURN PKI2 LMN 1R*&1RH NJN PKI4 IF NOT -H- RJM DDS DROP DISPLAY RJM RDS REQUEST DISPLAY UJN PKI5 RETURN * PASS INPUT TO CP PROGRAM. PKI3 LDD LK LMN 53B ZJN PKI0 IF LAST KEY IS LEFT BLANK PKI4 LDN ZERL CRD CM LDD KY STD LK STD CM+4 LDN KEYW INPUT KEY RJM WPI WRITE PROGRAM INFORMATION PKI5 LJM PKIX RETURN ROL SPACE 4,10 ** ROL - PROCESS ROLLOUT REQUEST. * * ENTRY ROLLOUT REQUESTED. * * EXIT PP RECALL ISSUED. * * USES CM - CM+4. * * CALLS PPR. ROL RJM DDS DROP DISPLAY LDD MA WRITE REQUEST TO MESSAGE BUFFER CWD IR LDN ZERL REQUEST DEFAULT RECALL PARAMETERS CRD CM MONITOR RECM LJM PPR EXIT PP-RES RPI SPACE 4,10 ** RPI - READ PROGRAM INFORMATION. * * ENTRY (A) = INDEX IN DISPLAY ENVIRONMENT TABLE. * * EXIT (CM - CM+4) = VALUE IN DET. * * USES CM - CM+4. * * CALLS PIA. RPI SUBR ENTRY/EXIT RJM PIA GET PROGRAM INFORMATION ADDRESS CRD CM READ INFORMATION UJN RPIX RETURN TFL SPACE 4,10 ** TFL - TEST FIELD LENGTH. * * ENTRY (A) = RELATIVE CM ADDRESS. * * EXIT (A) = ABSOLUTE CM ADDRESS. * * CALLS DDS, DFM. TFL2 SHN 14 ADD FL ADD FIELD LENGTH ADD RA ADD REFERENCE ADDRESS SHN 6 REPOSITION VALUE TFL SUBR ENTRY/EXIT MJN TFL1 IF NEGATIVE SHN 14 POSITION TO HUNDREDS SBD FL SHN 6 MJN TFL2 IF ADDRESS IN RANGE TFL1 RJM DDS DROP DISPLAY LDC TFLA * LUN ARGUMENT ERROR.* RJM DFM ISSUE DAYFILE MESSAGE MONITOR ABTM ABORT CONTROL POINT LJM PPR EXIT TO PP RESIDENT TFLA DATA C* LUN ARGUMENT ERROR.* WPI SPACE 4,10 ** WPI - WRITE PROGRAM INFORMATION. * * ENTRY (A) = INDEX IN DISPLAY ENVIRONMENT TABLE. * (CM - CM+4) = CM CONTENTS TO BE WRITTEN TO DET. * * EXIT DET UPDATED. * * CALLS PIA. WPI SUBR ENTRY/EXIT RJM PIA GET PROGRAM INFORMATION ADDRESS CWD CM WRITE VALUE UJN WPIX RETURN LUN TITLE BUFFERS AND PRESET CODE. ** BUFFERS. BUFF EQU * DBUF EQU BUFF DISPLAY BUFFER KMBF EQU BUFF KEYBOARD MESSAGE BUFFER KBUF EQU BUFF KEYBOARD BUFFER BUFL EQU 7776-BUFF LENGTH OF BUFFER (BYTES) BUFS EQU BUFL/5 LENGTH OF BUFFER (WORDS) BUFR EQU BUFS*5 LENGTH OF BUFFER (BYTES) ROUNDED DOWN PRS SPACE 4,10 ** PRS - PRESET PROGRAM. * * ENTRY NONE. * * EXIT SIMULATOR RESTARTED AND DISPLAY OBTAINED. * * CALLS CUA, MCI, RDS, TFL, WPI. PRS SUBR ENTRY/EXIT RJM CUA CHECK USER ACCESS ZJN PRS2 IF LEGAL USER ACCESS LDC PRSA * ILLEGAL USER ACCESS. * PRS1 RJM DFM ISSUE DAYFILE MESSAGE MONITOR ABTM ABORT THE CONTROL POINT LJM PPR EXIT TO PP RESIDENT PRS2 LDC RTCL CRD CM READ REAL-TIME CLOCK LDD CM+4 STD CL PRESET INTERNAL CLOCK LDD IR+4 SET PROGRAM INFORMATION ADDRESS (DET) STD PI+1 LDD IR+3 LPN 37 STD PI SHN 14 LMD PI+1 NJN PRS3 IF NON-ZERO PARAMETER LDC PRSB * LUN ARGUMENT ERROR.* UJN PRS1 ABORT PROGRAM PRS3 LDN ZERL CRD CM CLEAR CM - CM+4 LDN 1 RJM TFL TEST FIELD LENGTH CWD CM CLEAR RA+1 LDN 0 STD KY INITIALIZE KEY STM MSD CLEAR DRIVER NAME STD T7 * LOOP TO MOVE DISPLAY PROGRAM ROUTINES TO PPR. PRS4 LDM PRSC,T7 STM MSFW,T7 AOD T7 INCREMENT COUNTER LMC PRSCL NJN PRS4 IF MORE TO MOVE RJM RDS REQUEST DISPLAY LDC PSNI STM /COMDDSP/RDSA FORCE OPERATOR ASSIGNMENT OF DISPLAY LDC ROL STM /COMDDSP/ROFA SET ADDRESS OF ROLLOUT PROCESSOR PAUSE LDD CM SHN -11 LMN 6 NJN PRS5 IF NOT IN *I* STATUS MONITOR RCPM REQUEST CPU PRS5 LJM PRSX RETURN PRSA DATA C* ILLEGAL USER ACCESS. * PRSB DATA C* LUN ARGUMENT ERROR.* PRSC BSS 0 LOC MSFW *CALL COMDDSP ROF EQU /COMDDSP/ROF ERRNG PPFW-* PP RESIDENT OVERFLOW LOC *O PRSCL EQU *-PRSC ** PRESET COMMON DECKS. *CALL COMPCUA ERRNG 7776-* PRESET OVERFLOW END ~ LUNAR IDENT LUNAR,TDET ABS ENTRY LUNAR ENTRY RFL= SYSCOM B1 BASE DECIMAL SST CP,FL,OA,SMS,TH,T1,T2,T3 *COMMENT LUNAR - LUNAR LANDING SIMULATOR. LUNAR TITLE LUNAR - LUNAR LANDING SIMULATOR. LUNAR SPACE 4,10 ***** LUNAR - LUNAR LANDING SIMULATOR. * * L. R. ATKIN. 70/03/01. * C. G. FILSTEAD. 70/03/01. * D. J. SLATE. 70/03/01. VERSION 1.0 * C. G. FILSTEAD. 70/08/16. VERSION 2.0 * S. D. FREYDER. (LUN INTERFACE) * J. J. DRUMMOND. 77/06/20. CONVERSION TO KRONOS/NOS. LUNAR SPACE 4,10 *** LUNAR SIMULATES A SHIP IN THE VICINITY OF THE MOON. * IT IS ABLE TO ORBIT, LAND, TAKE OFF, ETC. THE SIMULATED SHIP * DOES NOT RESEMBLE THE *APOLLO* LUNAR MODULE, SINCE THRUST AND * FUEL LIMITATIONS WOULD MAKE LANDING TOO DIFFICULT AND TIME * CONSUMING. LUNAR SPACE 4,10 *** CONTROL STATEMENT CALL. * * LUNAR(P1,P2,...PN) * * PI ANY OF THE FOLLOWING IN ANY ORDER. * * S CALL SMP TO SAMPLE *P* REGISTER. LUNAR SPACE 4,10 *** OPERATOR MESSAGES. * * NONE. LUNAR SPACE 4,10 *** DAYFILE MESSAGES. * * NONE. LUNAR SPACE 4,10 *** PROGRAMS CALLED. * * LUN - PP DISPLAY DRIVER. * SMP - PP *P* REGISTER SAMPLER (IF *S* OPTION SELECTED). LUNAR TITLE ASSEMBLY MACROS. ** ASSEMBLY MACROS. *CALL COMCMAC *CALL COMCCMD CHAR SPACE 4,10 ** CHAR - SET CHARACTER STRING IN DISPLAY BUFFER. * * CHAR (STRING) * * ENTRY *STRING* = CHARACTER STRING. PURGMAC CHAR CHAR MACRO S LOCAL A,B,C A MICRO 1,,$_S_$ B SET 1 DUP -1 C MICRO B,2,$"A"$ B SET B+2 IFC EQ,$"C"$ STOPDUP ELSE VFD 12/2R"C" ENDIF ENDD ENDM DSBP SPACE 4,10 ** DSBP - GENERATE DISPLAY BUFFER POINTER. * * DSBP TB,CS,IN,FW,LW,ST * * ENTRY *TB* = *R*, RIGHT TUBE, *L*, LEFT TUBE. * *CS* = CHARACTER SIZE, *S*, *M*, *L*, *D*. * *IN* = INTENSITY, 0-7. * *FW* = ADDRESS OF BUFFER. * *LW* = ADDRESS+1 OF END OF BUFFER. * *ST* = *ON* OR *OFF*. PURGMAC DSBP DSBP MACRO TB,CS,IN,FW,LW,ST NOREF ONOF,SC,SIZ Z IFC EQ,*ST*ON* ONOF SET 0 Z ELSE ONOF SET 1 Z ENDIF SIZ SET 10 QQ ECHO ,A=(S,M,L,D,),B=(0,1,2,3,10) Z IFC EQ,*A*CS* SIZ SET B SIZE = B Z ENDIF QQ ENDD SCN SET 10 QQ ECHO ,A=(L,R,),B=(0,1,10) ZZ IFC EQ,*A*TB* SCN SET B ZZ ENDIF QQ ENDD IFEQ SCN,10,1 ERR BAD TUBE SPECIFIER IFEQ SIZ,10,1 ERR BAD SIZE VFD 1/ONOF,4/SIZ,1/SCN,6/IN,18/FW,30/LW ENDM FILL SPACE 4,10 ** FILL - ZERO FILL WORD. * * FILL C * * ENTRY *C* .NE. 0, *C* = FILL DATA. PURGMAC FILL FILL MACRO C LOCAL A IFNE $,59,5 A SET $+1 IFC NE,*C**,2 VFD A/C SKIP 1 VFD A/'?XCOORD ENDM TEST SPACE 4,10 ** TEST - TEST CHARACTER FOR EQUALITY WITH (A0). * * TAG TEST CHAR * * ENTRY *CHAR* = CHARACTER TO BE TESTED. * *TAG* = JUMP ADDRESS IF TEST SATISFIED. PURGMAC TEST MACRO TEST,T,C SB2 A0-1R_C ZR B2,T ENDM KEY SPACE 4,10 ** KEY - CONSTRUCT JUMP TABLE ENTRY FOR KEY PROCESSING. * * KEY JUMP1,JUMP2 PURGMAC KEY KEY MACRO J1,J2 ZR X2,J1 EQ J2 ENDM XC SPACE 4,10 ** XC - GENERATE X COORDINATE. * * XC X * * ENTRY *X* = X COORDINATE (0-777B) PURGMAC XC XC MACRO X '?XCOORD SET 6000B+X_B VFD 12/'?XCOORD ENDM YC SPACE 4,10 ** YC - GENERATE Y COORDINATE. * * YC Y * * ENTRY *Y* = Y COORDINATE (0-777B) PURGMAC YC YC MACRO Y VFD 3/7,9/Y_B ENDM LUNAR TITLE ASSEMBLY AND PROGRAM CONSTANTS. **** ASSEMBLY CONSTANTS. DELAY EQU 100 CYCLE TIME IPORT EQU 5 ANGLE INCREMENT FOR OUTLINE GENERATION TSCSL EQU 900 LENGTH OF SINE/COSINE TABLE TACSL EQU 922 LENGTH OF ARC COSINE TABLE TSTPL EQU 200B LENGTH OF STAR POINTER TABLES TSTPS EQU 7 LOG2(TSTPL) RPORT EQU 210 RADIUS OF PORT XDSOI EQU 0 INITIAL X COORDINATE XDSOF EQU 511 FINAL X COORDINATE YDSOI EQU 0 INITIAL Y COORDINATE YDSOF EQU 448 FINAL Y COORDINATE XCENT EQU 256 X COORDINATE OF ORIGIN XPORT EQU 256 X COORDINATE OF CENTER OF PORT YCENT EQU 224 Y COORDINATE OF ORIGIN YPORT EQU 211 Y COORDINATE OF CENTER OF PORT * ARTIFICAL HORIZON. XAFHD EQU 128 X COORDINATE OF CENTER YAFHD EQU 350 Y COORDINATE OF CENTER RAFHD EQU 100 RADIUS OF DISPLAY IAFHD EQU 10 ANGLE INCREMENT FOR CIRCLE GENERATION AAFHD EQU 70 .707*RAFHD BAFHD EQU 49 .707*AAFHD * VELOCITY AND ORIENTATION PROJECTIONS. XVOPD EQU 384 X COORDINATE OF CENTER YVOPD EQU 350 Y COORDINATE OF CENTER RVOPD EQU 100 RADIUS OF DISPLAY IVOPD EQU 10 ANGLE INCREMENT FOR CIRCLE GENERATION * BETA AND GAMMA PROJECTIONS. XBGPD EQU 256 X COORDINATE OF CENTER YBGPD EQU 120 X COORDINATE OF CENTER RBGPD EQU 80 RADIUS OF DISPLAY IBGPD EQU 10 ANGLE INCREMENT **** LIST X *CALL COMSLUN LIST * LUNAR SPACE 4,10 ** ASSEMBLY MICROS. RMN MICRO 1,, 1.738094996E6 RADIUS OF MOON LUNAR SPACE 4,10 ** PROGRAM CONSTANTS. ORG 110B TDET BSSZ DETL DISPLAY ENVIRONMENT TABLE * VECTOR DEFINITIONS. AG DATA 0,0,0 ACCELERATION RELATIVE TO THE MOON AV DATA 0,0,0 ACCELERATION VECTOR BE DATA 0,0,0 BASE EAST VECTOR BN DATA 0,0,0 BASE NORTH VECTOR BV DATA 0,0,0 BASE VECTOR EV DATA 0,0,0 EAST VECTOR FV DATA 0,0,0 FORCE VECTOR GV DATA 0,0,0 GRAVITY VECTOR NV DATA 0,0,0 NORTH VECTOR OA DATA 1.0,0,0 ORIENTATION *ALPHA* VECTOR OB DATA 0,1.0,0 ORIENTATION *BETA* VECTOR OC DATA 0,0,0 ORIENTATION *GAMMA* VECTOR OG DATA 0,0,0 ORIENTATION RELATIVE TO THE MOON OM DATA 0,0,0 ROTATION VECTOR (OMEGA) RU DATA 0,0,0 UNIT RADIUS VECTOR RV DATA 1.75E6,0.0,0.0 RADIUS VECTOR VE DATA 1.0,0.0,2.0 VECTOR TO THE EARTH VG DATA 0,0,0 VELOCITY RELATIVE TO THE MOON VS DATA 1.0,0.0,0.0 VECTOR TO THE SUN VV DATA -25.0,1000.0,-1400.0 VELOCITY VECTOR * TEMPORARY VECTORS. T1 BSS 3 T2 BSS 3 T3 BSS 3 * MISCELLANEOUS CONSTANTS. AD DATA 70.0 FLOAT(AAFHD) AM DATA 0 ANGLE SUBTENDED BY THE MOON,S RADIUS AP DATA 0 ANGLE SUBTENDED BY THE PORT,S RADIUS BA DATA 0 BETA ACCELERATION CA DATA 0 GAMMA ACCELERATION DF DATA 0 DISPLAY CHANGE FLAG DI DATA 0 DISPLAY INDEX DT DATA 0.1 FL CON RFL= FIELD LENGTH FM DATA 0 FORCE MAGNITUDE GM DATA 4.9027358453E12 GRAVITY CONSTANT GM2 DATA 9.8054716906E12 2 * GM HT DATA 0 ALTITUDE IF DATA 0 INITIALIZATION MODE FLAG IP DATA 0 IMPACT LATITUDE IT DATA 0 IMPACT LONGITUDE MD DATA 0 TRAJECTORY MODE MR DATA 0 MAGNITUDE OF RADIUS VECTOR MS DATA 1.6229 MV DATA 0 MAGNITUDE OF VELOCITY VECTOR OP DATA 0 ORBITAL PERIOD PD DATA -0 PORT VIEWING DIRECTION (FORWARD) PH DATA 0 CURRENT LATITUDE PI DATA 3.1415926535897 PI2 DATA 1.570796326795 PI/2 PP DATA 0 PERILUN LATITUDE PT DATA 0 PERILUN LONGITUDE PV DATA 0.9 COS(PORT VIEWING HALF-ANGLE) - 25 DEG 51 M RADIAN DATA 57.2957975147 RD DATA 100.0 FLOAT(RAFHD) REARTH DATA 0.0174533 RADIUS OF EARTH RF DATA 30000.0 REMAINING FUEL RM DATA 0 ROLL MAGNITUDE RMOON DATA "RMN" RADIUS OF MOON RP DATA 210.0 RADIUS OF PORT (RPORT) RSUN DATA 0.0087266 RADIUS OF SUN SF DATA 0 SURFACE CONTACT FLAG SP DATA 0 SMP FLAG (1 = ON) TA DATA 0 TRAJECTORY APOLUN TE DATA 0 TRAJECTORY ECCENTRICITY TH DATA 0 CURRENT LONGITUDE TM DATA 0 CURRENT TIME TP DATA 0 TRAJECTORY PERILUN TV DATA 0 TANGENTIAL VELOCITY * SCRATCH CELLS. S0 BSS 1 S1 BSS 1 S2 BSS 1 S3 BSS 1 S4 BSS 1 S5 BSS 1 S6 BSS 1 S7 BSS 1 * CHARACTER STRINGS. EW DATA 20H EAST WEST DS DATA 20H KM METERS NS DATA 20H NORTH SOUTH LUNAR SPACE 4,10 ** DISPLAY BUFFER POINTERS. TDBP BSS 0 * INITIALIZATION BUFFERS. IBUF DSBP L,M,3,IDIS,IDIS+IDISL,ON IBFS DSBP L,S,1,IDSS,IDSS+IDSSL,ON IBFI DSBP L,L,7,IDSI,IDSI+IDSIL,OFF * FIXED DISPLAY BUFFERS. TFDB BSS 0 RSBF DSBP R,M,3,RSDB,RSDB+RSDBL,ON LSBF DSBP L,D,1,LSDB,LSDB,OFF * RIGHT SCREEN VARIABLE BUFFERS. MODH DSBP R,M,3,RVBH,RVBH+RVBHL,OFF MODO DSBP R,M,3,RVBO,RVBO+RVBOL,OFF MODI DSBP R,M,3,RVBI,RVBI+RVBIL,OFF * LEFT SCREEN VARIABLE BUFFERS. TLVB BSS 0 LSIB DSBP L,M,3,LSI1,LSI1+LSI1L,OFF LSIC DSBP L,S,1,LSI2,LSI2+LSI2L,OFF LSAB DSBP L,M,3,LSAD,LSAD+LSADL,OFF LSBB DSBP L,M,3,LSBD,LSBD+LSBDL,OFF LSCB DSBP L,S,3,LSCD,LSCD+LSCDL,OFF TLVBL EQU *-TLVB TDBPL EQU *-TDBP FWEC EQU * FIRST WORD EXECUTABLE CODE (FOR *SMP*) LUNAR SPACE 4,10 ** COMMON DECKS. *CALL COMCCDD *CALL COMCCPM *CALL COMCOVL *CALL COMCSYS SEG LUNAR TITLE MAIN PROGRAM. USE MAIN ** MAIN PROGRAM. LUNAR SB1 1 JP PRS PRESET PROGRAM * MAIN LOOP. LUN1 SA1 TM ADVANCE CLOCK SA2 DT RX6 X1+X2 SA6 A1 RJ AVS ADVANCE SIMULATION * PROCESS DISPLAYS. RJ DRS DISPLAY RIGHT SCREEN RJ DLS DISPLAY LEFT SCREEN * TIME DISPLAY LOOP. LUN2 RJ PKI PROCESS KEYBOARD INPUT SA1 TDET+RTCW READ REAL-TIME CLOCK SA2 LUNA SX3 2*DELAY IX6 X1-X2 GET EXPIRED TIME IX7 X6-X3 NG X7,LUN3 IF PP RESPONDING NORMALLY SX6 DELAY LUN3 SX6 X6-DELAY MINUS DELAY TIME PL X6,LUN4 IF OVER TIME RECALL JP LUN2 LUN4 BX6 X1 RESET START TIME SA6 A2 JP LUN1 LUNA CON 0 LAST TIME READING AVS SPACE 4,10 ** AVS - ADVANCE SIMULATION. * * ADVANCES ORIENTATION AND POSITION AND ADJUSTS FUEL. * * CALLS ADD, ATN, CSP, DOT, NOR, MAG, SCM, SQR. AVS SUBR ENTRY/EXIT * ADJUST FUEL. SA1 RF REMAINING FUEL SA2 FM THRUST BX6 X6-X6 MX7 0 ZR X1,AVS0 IF NO FUEL LEFT RX3 X1-X2 BX7 X2 NO NX6 X3 PL X3,AVS0 IF FUEL NOT EXHAUSTED BX6 X6-X6 MX7 0 AVS0 SA3 IF INITIALIZATION FLAG SA6 A1 UPDATE FUEL SA7 A2 UPDATE THRUST ZR X3,AVS2 IF INITIALIZATION MODE * ADVANCE POSITION. SA1 HT CHECK ALTITUDE SA2 MR ZR X1,AVS4 IF ON SURFACE FX2 X2*X2 R**2 SA3 GM COMPUTE GRAVITY ACCELERATION VECTOR FX3 X3/X2 SB2 GV SA1 RU BX2 -X3 RJ SCM SCALAR MULTIPLY SA1 OA COMPUTE ACCELERATION DUE TO THRUST SA2 FM FV=FM*OA SB2 FV RJ SCM SCALAR MULTIPLY SA1 GV ACCELERATION = GV+FV SA2 FV SB2 AV RJ ADD ADD VECTORS SA1 OB A(BETA) = BA*OB SB2 T1 SA2 BA RJ SCM SCALAR MULTIPLY SA1 OC A(GAMMA) = CA*OC SB2 T2 SA2 CA RJ SCM SCALAR MULTIPLY SA1 T1 AV=AV+T1+T2 SB2 T3 SA2 T2 RJ ADD SA1 AV SA2 T3 SB2 A1 RJ ADD SA1 AV VELOCITY = DT*AV SA2 DT SB2 T1 RJ SCM SCALAR MULTIPLY SA1 VV VV=VV+T1 SA2 B2 SB2 A1 RJ ADD ADD VECTORS SA1 VV POSITION = RV+DT*VV SA2 DT SB2 T1 RJ SCM SCALAR MULTIPLY SA1 RV RV=RV+T1 SA2 B2 SB2 A1 RJ ADD ADD VECTORS * ADVANCE ORIENTATION DUE TO PITCH AND YAW. SA1 OB ADVANCE BETA SA2 OM SB2 T1 T1 = OB X OM RJ CSP CROSS PRODUCT SA1 OB OB=OB+(OB X OM) SA2 T1 SB2 A1 RJ ADD ADD VECTORS SA1 B2 RJ NOR NORMALIZE BETA SA1 OA ADVANCE ALPHA SA2 OM SB2 T1 T1 = OA X OM RJ CSP CROSS PRODUCT SA1 OA OA=OA+(OA X OM) SA2 T1 SB2 A1 RJ ADD ADD VECTORS SA1 B2 NORMALIZE ALPHA RJ NOR NORMALIZE VECTOR * ADVANCE ORIENTATION DUE TO ROLL. SA1 RM CHECK ROLL ZR X1,AVS1 IF NOT ROLLING SA1 OA COMPUTE OA X OB SA2 OB SB2 T1 RJ CSP CROSS PRODUCT SA1 T1 SA2 RM T2=RM*(OA X OB) SB2 T2 RJ SCM SCALAR MULTIPLY SA1 OB OB=OB+T2 SA2 B2 SB2 A1 RJ ADD ADD VECTORS SA1 B2 NORMALIZE BETA RJ NOR * ENSURE OA AND OB PERPENDICULAR. AVS1 SA1 OA COMPUTE OA . OB SA2 OB RJ DOT SA1 OA T1 = -(OA . OB)*OA SB2 T1 BX2 -X6 RJ SCM SCALAR MULTIPLY SA1 OB OB=OB+-(OA . OB)*OA SA2 T1 SB2 A1 RJ ADD ADD VECTORS * COMPUTE ORIENTATION *GAMMA* VECTOR. SA1 OA OC = OA X OB SB2 OC SA2 OB RJ CSP * FORM UNIT RADIUS VECTOR. AVS2 SA1 RV COMPUTE R VECTOR SB2 RU RJ NOR NORMALIZE VECTOR SA1 VV SET VELOCITY MAGNITUDE RJ MAG SA6 MV * FORM NORTH VECTOR. * N = (RU X (0,1,0)) X RU. SA1 RU RU1 SA2 A1+B1 RU2 SA3 A2+B1 RU3 RX5 X1*X2 RU1*RU2 FX4 X1*X1 RU1**2 FX0 X5*X5 N1**2 BX6 -X5 FX7 X3*X3 RU3**2 RX1 X2*X3 RU2*RU3 RX7 X7+X4 RU1**2+RU3**2 FX2 X1*X1 N3**2 SA6 NV N1= -RU1*RU2 FX0 X0+X2 N1**2+N3**2 FX3 X7*X7 N2**2 SA7 A6+1 N2 = RU1**2+RU3**2 BX6 -X1 FX1 X0+X3 N1**2+N2**2+N3**2 SB2 A6 SA6 A7+B1 N3 = -RU2*RU3 RJ SQR COMPUTE SQUARE ROOT SA1 B2 NORMALIZE NV SX2 17204B =1.S-45 LX2 45 FX2 X2/X6 RJ SCM SCALAR MULTIPLY * COMPUTE EAST VECTOR. * E = RU X N SA1 RU SA2 NV EV = RU X NV SB2 EV RJ CSP CROSS PRODUCT * COMPUTE RELATIVE VELOCITY AND ACCELERATION. SA4 =10.0 1/DT SA1 VV COMPUTE V(N-S) SA2 NV SA5 VG BX0 X4 RJ DOT V(N-S) = VV . NV SA6 A5 SA1 VV FX7 X6-X5 A(N-S) = DV(N-S)/DT SA5 A5+B1 NX7 X7 SA2 EV FX7 X0*X7 SA7 AG RJ DOT V(E-W) = VV . EV SA6 A5 SA1 VV FX7 X6-X5 A(E-W) = DV(E-W)/DT SA5 A5+B1 NX7 X7 SA2 RU FX7 X0*X7 SA7 A7+B1 RJ DOT V(ALT) = VV . RU SA6 A5 FX7 X6-X5 A(ALT) = DV(ALT)/DT NX7 X7 RX7 X0*X7 SA7 A7+1 * COMPUTE RELATIVE ORIENTATION. SA1 OA O(N-S) = OA . NV SA2 NV RJ DOT DOT PRODUCT SA6 OG SA1 OA O(E-W) = OA . EV SA2 EV RJ DOT DOT PRODUCT SA6 OG+1 SA1 OA O(ALT) = OA . RU SA2 RU RJ DOT DOT PRODUCT SA6 OG+2 * SET ALTITUDE. SA1 RV RJ MAG COMPUTE MAGNITUDE OF RADIUS VECTOR SA2 RMOON HT = MR - RMOON SA6 MR RX7 X6-X2 NX6 X7 SA6 HT PL X6,AVS3 IF NOT ON SURFACE MX6 0 ELSE, ALTITUDE = 0 SA6 A6 * SET LONGITUDE AND LATITUDE. AVS3 SA1 RU+2 LONGITUDE = ARC TAN (Z/X) SA2 RU RJ ATN ARC TANGENT SA6 TH SA2 RU+2 LATITUDE = ARC TAN (Y/SQRT(X**2+Z**2)) SA3 RU FX6 X2*X2 Z**2 FX7 X3*X3 X**2 FX1 X6+X7 X**2+Z**2 RJ SQR COMPUTE SQUARE ROOT SA1 RU+1 Y BX2 X6 RJ ATN COMPUTE ARC TANGENT SA6 PH * COMPUTE TANGENTIAL VELOCITY MAGNITUDE. SA1 RV TV = RV X VV SA2 VV SB2 T3 RJ CSP CROSS PRODUCT SA1 T3 COMPUTE MAGNITUDE RJ MAG SA6 TV * COMPUTE TRAJECTORY PARAMETERS. SA1 MV SA2 MR SA3 GM2 FX1 X1*X1 MV**2 FX7 X6*X6 TV**2 SX4 17224B =4.S-45 FX0 X3/X2 2GM/MR FX5 X3*X3 (2GM)**2 LX4 45 FX1 X1-X0 MV**2-2GM/MR SA7 T1 NX1 X1 FX7 X7*X4 4*VT**2 FX6 X1+X1 2*(MV**2-2GM/MR) FX7 X7*X1 4*VT**2*(MV**2-2GM/MR) SA6 A7+B1 FX1 X5+X7 (2GM)**2+4*VT**2*(MV**2-2GM/MR) NX1 X1 RJ SQR COMPUTE SQUARE ROOT SA1 GM2 SA2 T1+1 FX3 X6-X1 SQRT-2GM FX4 X6+X1 SQRT+2GM NX3 X3 BX4 -X4 FX6 X3/X2 PERIGEE FX7 X4/X2 APOGEE SA6 TP SA7 TA SA1 GM COMPUTE ECCENTRICITY SA2 A2-B1 =VT**2 FX3 X1*X6 TP*GM SX4 17204B =1.S-45 FX5 X2/X3 VT**2/(TP*GM) LX4 45 FX7 X5-X4 TE = (VT**2/(TP*GM))-1 NX7 X7 SA3 MR SA7 TE * COMPUTE LONGITUDE AND LATITUDE OF PERIGEE. FX0 X5*X6 TP*(TE+1) FX2 X3*X7 MR*TE FX0 X0-X3 TP*(TE+1)-MR NX0 X0 FX6 X0/X2 (TP*(TE+1)-MR)/(TE*MR) SA6 S0 CURRENT X IN TRAJECTORY REFERENCE FRAME FX0 X6*X6 X**2 FX1 X4-X0 1-X**2 NX1 X1 RJ SQR Y = SQRT(1-X**2) SA1 VG+2 IF V(ALT) > 0, Y = -Y AX1 60 BX6 -X6-X1 SA6 A6+B1 S1 = CURRENT Y SA1 T3 SB2 A1 RJ NOR COMPUTE NORMALIZED (RU X VV) SA1 RU T2 = RU X N(RV X VV) SA2 T3 SB2 T2 RJ CSP CROSS PRODUCT SA1 S0 =X SA3 RU SA2 A1+B1 =Y SA4 T2 FX6 X3*X1 RU(1)*X FX7 X4*X2 T2(1)*Y SA3 A3+B1 FX6 X6-X7 RU(1)*X-T2(1)*Y NX6 X6 SA6 T1 SA4 A4+B1 FX6 X3*X1 RU(2)*X FX7 X4*X2 T2(2)*Y SA3 A3+B1 FX6 X6-X7 RU(2)*X-T2(2)*Y SA4 A4+B1 NX6 X6 FX7 X4*X2 T2(3)*Y FX5 X3*X1 RU(3)*X SA6 A6+B1 FX7 X5-X7 RU(3)*X-T2(3)*Y NX7 X7 SA2 A6-B1 READ T1(1) SA7 A6+B1 BX1 X7 RJ ATN LONGITUDE = ARC TANGENT(Z/X) SA6 PT SA3 T1 =X SA4 T1+2 =Z FX6 X3*X3 X**2 FX7 X4*X4 Y**2 FX1 X6+X7 X**2+Y**2 RJ SQR COMPUTE SQUARE ROOT SA1 T1+1 =Y BX2 X6 RJ ATN COMPUTE ARC TANGENT (Y,SQRT(X**2+Z**2)) SA6 PP SA2 TP SA3 RMOON SA1 TA FX0 X2-X3 NG X1,HYP IF HYPERBOLIC PL X0,ORB IF TP > RMOON EQ IMP ELSE, IMPACT MODE * PROCESS SURFACE CONTACT. AVS4 SA1 SF CHECK SURFACE FLAG NG X1,AVS5 IF SECOND CYCLE ON SURFACE BX6 X6-X6 CLEAR ROTATION MX7 0 SA6 OM SA7 A6+B1 SA6 A7+B1 SA7 VV CLEAR VELOCITY VECTOR SA6 A7+B1 SA7 A6+B1 SA6 RM CLEAR ROLL SA7 FM TURN OFF ENGINES SA6 BA SA7 CA SA1 RU SET OA = RU SA2 A1+B1 BX6 X1 LX7 X2 SA1 A2+B1 SA6 OA SA7 A6+B1 BX6 X1 SA6 A7+1 SA1 OA SET OB PERPENDICULAR TO OA SA2 OB SB2 T3 RJ CSP CROSS PRODUCT SA1 T3 SB2 OB RJ NOR NORMALIZE VECTOR JP AVSX RETURN AVS5 SA1 MV CHECK LANDING CONDITIONS SA3 =20.0 SA2 =7.0 FX7 X1-X3 FX6 X1-X2 PL X7,AVS7 IF VELOCITY > 20 M/SEC PL X6,AVS6 IF VELOCITY > 7 M/SEC SA1 OG+2 CHECK ORIENTATION SA3 =0.8 SA2 =0.9 IX7 X1-X3 IX6 X1-X2 NG X7,AVS7 IF OA . RU < .8 NG X6,AVS6 IF OA . RU < .9 SA1 VG CHECK LATERAL VELOCITY SA2 A1+B1 FX1 X1*X1 V(N-S)**2 FX2 X2*X2 V(E-W)**2 SA4 =49.0 =7**2 FX0 X1+X2 V(N-S)**2+V(E-W)**2 SA3 =16.0 =4**2 IX7 X0-X4 IX6 X0-X3 PL X7,AVS7 IF LATERAL VELOCITY > 7 M/SEC PL X6,AVS6 IF LATERAL VELOCITY > 4 M/SEC * PROCESS SUCCESSFUL LANDING. SX7 =28L TOUCH DOWN SA7 TDET+KBMW SET MESSAGE ADDRESS SA1 FM CHECK THRUST SA2 MS BX6 X6-X6 MX7 0 ZR X1,AVSX RETURN IF NO THRUST FX3 X1-X2 NG X3,AVSX RETURN IF INSUFFICIENT ACCELERATION SX1 B1 LEAVE SURFACE SA7 TDET+KBMW CLEAR KEYBOARD MESSAGE PX2 X1 NX6 X2 SA7 SF SA6 HT JP AVSX RETURN * PROCESS BAD LANDING. AVS6 SX7 =28L CRASH LANDING EQ AVS8 AVS7 SX7 =28L SPLAT AVS8 SA7 TDET+KBMW BX6 X6-X6 MX7 0 SA6 RF CLEAR REMAINING FUEL ON IMPACT JP AVSX RETURN HYP SPACE 4,10 ** HYP - PROCESS HYPERBOLIC MODE. HYP SA1 VG+2 READ V(ALT) MX6 0 BX2 X0*X1 SIGN(TP-RMOON)*SIGN(V(ALT)) NG X2,IMP IF TP < RMOON AND V(ALT) < 0 SA6 MD ELSE, SET MODE JP AVSX RETURN IMP SPACE 4,10 ** IMP - PROCESS IMPACT MODE. * * CALLS ATN, SQR. IMP SX6 2 SET MODE SA6 MD * COMPUTE IMPACT LONGITUDE AND LATITUDE. SA1 TP READ PERIGEE SX2 17204B =1S-45 SA3 TE READ ECCENTRICITY SA4 RMOON LX2 45 FX6 X4*X3 TE*RMOON FX7 X3+X2 TE+1 FX5 X1*X7 TP*(TE+1) FX3 X5-X4 TP*(TE+1)-RMOON NX3 X3 RX7 X3/X6 (TP*(TE+1)-RMOON)/(TE*RMOON) FX0 X7*X7 X**2 SA7 S2 FX4 X2-X0 1-X**2 NX1 X4 RJ SQR SQUARE ROOT SA6 S3 SA1 S0 TRANSFORM COORDINATES SA2 A1+B1 SA3 A2+B1 FX4 X1*X3 XN*XI FX5 X2*X6 YN*YI FX0 X3*X2 XI*YN FX1 X1*X6 XN*YI FX6 X4+X5 XN*XI+YN*YI FX7 X0-X1 XI*YN-XN*YI NX1 X6 NX2 X7 SA3 RU SA4 T2 FX5 X1*X3 RU1*X1 FX6 X2*X4 T2(1)*Y1 RX7 X5-X6 RU1*X1-T2(1)*Y1 SA3 A3+B1 SA4 A4+B1 NX7 X7 SA7 T1 FX5 X1*X3 RU2*X FX6 X2*X4 T2(2)*Y RX7 X5-X6 RU2*X-T2(2)*Y SA3 A3+B1 SA4 A4+B1 NX7 X7 FX5 X1*X3 RU3*X SA7 A7+B1 FX6 X2*X4 T2(3)*Y RX7 X5-X6 RU3*X-T2(3)*Y NX6 X7 SA6 A7+B1 SA2 A7-B1 BX1 X6 LONGITUDE = ARC TANGENT (Z/X) RJ ATN SA6 IT SET LONGITUDE SA2 T1 LATITUDE = ARC TANGENT (Y/SQRT(X**2+Z**2)) SA3 T1+2 FX7 X2*X2 X**2 FX6 X3*X3 Z**2 FX1 X6+X7 X**2+Z**2 RJ SQR SQUARE ROOT SA1 T1+1 =Y BX2 X6 RJ ATN ARC TANGENT SA6 IP SA1 VG+2 PL X1,ORB1 IF ASCENDING JP AVSX RETURN ORB SPACE 4,10 ** ORB - PROCESS ORBITAL MODE. * * CALLS SQR. ORB SX6 B1+ SET MODE SA6 MD ORB1 SA1 TP COMPUTE PERIOD SA2 TA FX1 X1*X2 TA*TP RJ SQR COMPUTE SQUARE ROOT SA2 TA SA3 TP SA1 PI FX7 X2+X3 TA+TP FX7 X7*X1 PI*(TA+TP) SA4 TV FX7 X7*X6 PI*(TA+TP)*SQRT(TA*TP) RX6 X7/X4 PI*(TA+TP)*SQRT(TA*TP)/MAG(RV X VV) SA6 OP JP AVSX RETURN SEG LUNAR TITLE KEYBOARD INPUT PROCESSOR. USE KEYIN ** PKI - PROCESS KEYBOARD INPUT. * * DURING EXECUTION, THE SHIP IS CONTROLLED BY A SET OF ONE- * CHARACTER TYPE-INS. THESE MAY BE ENTERED AT ANY TIME. PKI SUBR ENTRY/EXIT SA1 TDET+KEYW LOAD KEY BX7 X7-X7 SA7 A1 CLEAR KEY ZR X1,PKIX IF NO KEY PRESSED SX2 B1 SB3 X1 SAVE KEY FOR STH IX1 X1-X2 BX2 X2*X1 EVEN/ODD BIT TO (X2) AX1 1 SB2 X1 RELATIVE JUMP ADDRESS JP B2+KEYTABL JUMP TO EXECUTE ROUTINE KEYTABL BSS 0 KEY YAW1,ROL4 A,B YAW -10,ROLL +10 KEY PKIX,PKIX C,D XXX,XXX KEY PKIX,YAW3 E,F XXX,YAW +1 KEY YAW4,PKIX G,H YAW + 10,XXX KEY DHI,PKIX I,J INSTRUCTIONS,XXX KEY PKIX,PKIX K,L KILL DISPLAY,XXX KEY PKIX,PKIX M,N XXX,XXX KEY PKIX,TQP O,P XXX,TOGGLE QUEUE PRIORITY KEY PTC1,PTC3 Q,R PITCH -10,PITCH +1 KEY YAW2,PTC4 S,T YAW -10,PITCH +10 KEY PKIX,ROL3 U,V XXX,ROLL +1 KEY PTC2,ROL2 W,X ROLL -1,PITCH -1 KEY PKIX,ROL1 Y,Z XXX,ROLL -10 * SEE STH FOR DETAILS ON OPERATION OF ALL NUMBERS EXCEPT 0. KEY THZ,STH 0,1 KEY STH,STH 2,3 KEY STH,STH 4,5 KEY STH,STH 6,7 KEY STH,STH 8,9 KEY THI,THD +,- INC. THRUST,DEC. THRUST KEY PKI,PKI *,/ XXX,XXX KEY STB1,STB2 (,) +GAMMA,-GAMMA KEY TPD,RST $,= TOGGLE PORT,RESTART SIMULATION KEY CDS,STC1 RT BLK,, CH. DISP.,+BETA KEY STC2,PKIX ., -BETA,XXX KEY PKIX,PKIX XXX,XXX KEY PKIX,PKIX XXX,XXX KEY PKIX,PKIX XXX,XXX KEY PKIX,PKIX XXX,XXX KEY PKIX,PKIX XXX,XXX KEY PKIX,PKIX XXX,XXX KEY PKIX,PKIX XXX,XXX KEY PKIX,0 XXX,100B CDS SPACE 4,10 ** CDS - CHANGE LEFT SCREEN DISPLAY. * * ENTRY = *RIGHT BLANK*. CDS SA1 DI ADVANCE DISPLAY INDEX BX7 X7-X7 SX6 X1+B1 SA7 DF SET DISPLAY CHANGE FLAG SA6 A1+ SX2 X6-TLDPL CHECK INDEX NG X2,PKIX EXIT IF IN RANGE SX7 B1 SA7 A1 ELSE, RESET INDEX JP PKIX EXIT DHI SPACE 4,10 ** DHI - DISPLAY HELP INFORMATION. * * ENTRY *I* = DISPLAY HELP INFORMATION. DHI BX6 X6-X6 MX7 0 SA6 DI SET DISPLAY INDEX SA7 DF SET DISPLAY CHANGE FLAG JP PKIX EXIT PTC SPACE 4,10 ** PTC - PITCH CONTROL. * * ENTRY *Q* = PITCH -10. * *W* = PITCH -1. * *R* = PITCH +1. * *T* = PITCH +10. * * CALLS ADD, CSP, SCM. PTC1 SX1 -10 EQ PTC PTC2 SX1 -1 EQ PTC PTC3 SX1 1 EQ PTC PTC4 SX1 10 PTC PX7 X1 FLOAT PITCH SA2 =0.001 NX1 X7 NO FX6 X1*X2 0.01*PITCH SA1 OA COMPUTE OA X OB SA6 T3 SAVE SA2 OB SB2 T1 RJ CSP CROSS PRODUCT OF OA, OB TO T1 SA1 T1 COMPUTE T3*(OA X OB) SA2 T3 SB2 T1 RJ SCM SCALAR MULTIPLY SA1 OM OMEGA = OMEGA + T1 SA2 T1 SB2 A1 RJ ADD ADD VECTORS JP PKIX EXIT ROL SPACE 4,10 ** ROL - ROLL CONTROL. * * ENTRY *Z* = ROLL -10. * *X* = ROLL -1. * *V* = ROLL +1. * *B* = ROLL +10. ROL1 SX1 -10 EQ ROL ROL2 SX1 -1 EQ ROL ROL3 SX1 1 EQ ROL ROL4 SX1 10 ROL PX7 X1 FLOAT (X1) SA3 =0.001 NX1 X7 SA2 RM FX4 X1*X3 RX5 X4+X2 RM=RM+ROLL/100 NX6 X5 SA6 A2 JP PKIX EXIT RST SPACE 4,10 ** RST - RESTART SIMULATION. * * DROPS PP AND CALLS IN LUNAR AGAIN. * * CALLS OVL=, RFL. RST SX6 1 SA6 TDET+STAW SIGNAL PP TO DROP + SA1 A6 NZ X1,* WAIT TIL IT ACKNOWLEDGES MX6 -1 SET DISPLAY DRIVER NOT ASSIGNED SA6 DF SX6 RFL= REQUIRED MEMORY RJ RFL REQUEST MEMORY OVERLAY RSTA,,S CALL NEW COPY OF LUNAR JP * *** OOPS *** RSTA CON 0L"NAME" NAME OF PACKAGE (LUNAR) STB SPACE 4,10 ** STB - SIDE THRUST IMPULSE BETA CONTROL. * * ENTRY *,* = +1 M/SEC**2 FOR DELTAT SECONDS * *.* = -1 M/SEC**2 FOR DELTAT SECONDS STB1 SX6 B1 ACCELERATION = +1 EQ STB STB2 SX6 -1 ACCELERATION = -1 STB PX2 X6 SA1 BA NX3 X2 RX4 X3+X1 UX5,B2 X4 SB2 B2+46 GT B2,PKIX IF THRUST LIMIT NX6 X4 SA6 A1 JP PKIX EXIT STC SPACE 4,10 ** STC - SIDE THRUST IMPULSE GAMMA CONTROL. * * ENTRY *(* = +1 M/SEC**2 FOR DELTAT SECONDS. * *)* = -1 M/SEC**2 FOR DELTAT SECONDS. STC1 SX6 B1 ACCELERATION = +1 EQ STC STC2 SX6 -1 ACCELERATION = -1 STC PX2 X6 SA1 CA NX3 X2 RX4 X3+X1 UX5,B2 X4 SB2 B2+46 GT B2,PKIX IF THRUST LIMIT NX6 X4 SA6 A1 JP PKIX EXIT STH SPACE 4,10 ** STH - SIDE THRUST. * * ENTRY = *1* - *9*. * * SET THRUST SO THAT ACCELERATION = 0.1*2**KEY METERS/SEC**2. STH SX2 B1 SB3 B3-1R0 PX3 B3,X2 SA1 =0.1 NX4 X3 RX6 X1*X4 SA6 FM JP PKIX EXIT THD SPACE 4,10 ** THD - DECREMENT THRUST BY 0.01 METERS/SEC**2. * * ENTRY = *-*. THD SA1 FM READ THRUST MAGNITUDE SA2 =0.01 BX7 X7-X7 RX3 X1-X2 ADVANCE THRUST NX6 X3 SA6 A1 PL X6,PKIX EXIT IF > 0 SA7 A1+ CLEAR THRUST JP PKIX EXIT THI SPACE 4,10 ** THI - INCREMENT THRUST BY 0.01 METERS/SEC**2. * * ENTRY = *+*. THI SA1 FM ADVANCE ACCELERATION SA2 =0.01 RX6 X1+X2 SA6 A1 JP PKIX EXIT THZ SPACE 4,10 ** THZ - SET THRUST TO ZERO. * * ENTRY = *0*. THZ SX6 0 CLEAR FM SA6 FM JP PKIX EXIT TPD SPACE 4,8 ** TPD - TOGGLE PORT VIEWING DIRECTION. * * ENTRY = *LEFT BLANK*. TPD SA1 PD PD = -PD BX6 -X1 SA6 A1 JP PKIX EXIT TQP SPACE 4,10 ** TQP - TOGGLE QUEUE PRIORITY. TOGGLES THE QUEUE PRIORITY OF * *LUNAR* BETWEEN INITIAL AND MXPS PRIORITY. * * ENTRY NONE. * * EXIT QUEUE PRIORITY TOGGLED. * * CALLS CPM=. TQP JP PKIX RETURN YAW SPACE 4,10 ** YAW - YAW CONTROL. * * ENTRY *A* = YAW -10. * *S* = YAW -1. * *F* = YAW +1. * *G* = YAW +10. * * CALLS ADD, SCM. YAW1 SX1 -10 EQ YAW YAW2 SX1 -1 EQ YAW YAW3 SX1 1 EQ YAW YAW4 SX1 10 YAW PX7 X1 FLOAT (X1) SA2 =0.001 NX1 X7 NO FX2 X1*X2 X1/100 SA1 OB SB2 T1 RJ SCM T1 = (X1) / 100 * BETA SA1 OM OMEGA = OMEGA + T1 SA2 T1 SB2 A1 RJ ADD ADD VECTORS JP PKIX EXIT SEG LUNAR TITLE RIGHT SCREEN DISPLAY. USE RIGHT ** DRS - DISPLAY RIGHT SCREEN. * * THE RIGHT SCREEN DISPLAY IS PRESENT THROUGHOUT THE * SIMULATION. IT PROVIDES NUMERIC INFORMATION ABOUT THE SHIP'S * POSITION, TRAJECTORY, AND ORIENTATION. * * CALLS CDD, CFP, CUA, DOT. DRS SUBR ENTRY/EXIT * DISPLAY REMAINING FUEL SA1 RF READ REMAINING FUEL SB2 B1+ 1 FRACTIONAL DIGIT RJ CFP CONVERT FLOATING POINT SA6 RFUEL * DISPLAY ALTITUDE. SA1 HT READ ALTITUDE SA2 =1000.0 NZ X1,DRS1 IF NOT ON SURFACE SA4 SF CHECK SURFACE CONTACT FLAG NG X4,DRSX RETURN IF NOT FIRST CYCLE MX6 60 ELSE, SET FLAG SA6 A4 DRS1 FX3 X1-X2 CHECK MAGNITUDE NG X3,DRS2 IF < 1000 METERS FX1 X1/X2 ELSE, CONVERT TO KILOMETERS DRS2 AX3 60 SX4 B1 SB2 B1+B1 FRACTION = 2 DIGITS BX5 X3*X4 BX4 -X4-X3 SA5 X5+DS SB2 B2+X4 RJ CFP CONVERT FLOATING POINT SA6 ALTT BX7 X5 SA7 A6+B1 * DISPLAY LONGITUDE AND LATITUDE. SA1 TH READ LONGITUDE SB2 EW RJ CVA CONVERT ANGLE SA6 LONG BX7 X5 SA7 A6+B1 SA1 PH READ LATITUDE SB2 NS RJ CVA CONVERT ANGLE SA6 LATT BX7 X5 SA7 A6+B1 * DISPLAY VELOCITY. SA1 MV READ VELOCITY SB2 2 RJ CFP CONVERT FLOATING POINT NUMBER SA6 VELC * DISPLAY VELOCITY RELATIVE TO THE GROUND. SA1 VG READ V(N-S) SB2 2 RJ CFP CONVERT FLOATING POINT SA6 VELV SB2 B1+B1 SA1 A1+B1 READ V(E-W) RJ CFP SA6 A6+B1 SB2 2 SA1 A1+B1 READ V(ALT) RJ CFP * DISPLAY ACCELERATION RELATIVE TO THE GROUND. SA1 AG READ A(N-S) SB2 4 SA6 A6+B1 SB7 B2 SAVE NUMBER OF DIGITS RJ CFP CONVERT SA6 ACCV SB2 B7 SA1 A1+B1 READ A(E-W) RJ CFP CONVERT SA6 A6+B1 SB2 4 SA1 A1+B1 READ A(ALT) RJ CFP CONVERT * DISPLAY ORIENTATION RELATIVE TO THE GROUND. SA1 OG READ O(N-S) SB2 6 SA6 A6+B1 SB7 B2 SAVE NUMBER OF DIGITS RJ CFP CONVERT SA6 POSV SB2 B7 SA1 A1+B1 READ O(E-W) RJ CFP CONVERT SA6 A6+B1 SB2 6 SA1 A1+B1 READ O(ALT) RJ CFP CONVERT SA6 A6+1 * DISPLAY BETA ORIENTATION. SA1 OB NORTH/SOUTH SA2 NV RJ DOT BX1 X6 SB2 B7 RJ CFP CONVERT SA6 BETV SA1 OB EAST/WEST SA2 EV RJ DOT BX1 X6 SB2 B7 RJ CFP CONVERT SA6 BETV+1 SA1 OB ALTITUDE SA2 RU RJ DOT BX1 X6 SB2 B7 RJ CFP CONVERT SA6 BETV+2 * DISPLAY GAMMA ORIENTATION. SA1 OC NORTH/SOUTH SA2 NV RJ DOT BX1 X6 SB2 B7 RJ CFP CONVERT SA6 GAMV SA1 OC EAST/WEST SA2 EV RJ DOT BX1 X6 SB2 B7 RJ CFP CONVERT SA6 GAMV+1 SA1 OC ALTITUDE SA2 RU RJ DOT BX1 X6 SB2 B7 RJ CFP CONVERT SA6 GAMV+2 * DISPLAY ELAPSED TIME. SA2 TM READ CLOCK UX6,B3 X2 LX1 B3,X6 RJ CDD CONVERT DECIMAL DIGITS SA6 TIME * DISPLAY TRAJECTORY INFORMATION. SA1 MD READ TRAJECTORY MODE SA2 X1+DRSA READ PROCESSOR ADDRESS SB7 X2+ JP B7 PROCESS APPROPRIATE MODE DRSA BSS 0 LOC 0 CON PHM PROCESS HYPERBOLIC MODE CON POM PROCESS ORBITAL MODE CON PIM PROCESS IMPACT MODE LOC *O PHM SPACE 4,10 ** PHM - PROCESS HYPERBOLIC MODE. * * CALLS CDD, CFP, CVA, CVC. PHM SA1 MODH TURN ON *H* DISPLAY MX0 1 SA2 A1+B1 TURN OFF *O* DISPLAY BX6 -X0*X1 SA3 A2+B1 BX7 X0+X2 SA6 A1 SA7 A2 BX6 X0+X3 SA6 A3 * DISPLAY PERIGEE. SB2 B1+B1 DIGITS = 2 SA1 TP READ PERIGEE SA2 RMOON FX1 X1-X2 (X1) = TP-RMOON SA4 =1000.0 BX3 X1 NX1 AX3 60 BX3 X1-X3 FX3 X3-X4 NG X3,PHM1 IF < 1000 M FX1 X1/X4 ELSE CONVERT TO KM PHM1 AX3 60 SX0 B1 SET UNITS BX5 X3*X0 BX0 -X0-X3 SB2 B2+X0 RJ CFP CONVERT FLOATING POINT NUMBER SA5 X5+DS SA6 HPER BX7 X5 SA7 A6+B1 * DISPLAY LONGITUDE AND LATITUDE OF PERIGEE. SA1 PT READ PERIGEE *THETA* SB2 EW RJ CVA CONVERT ANGLE SA6 HLON BX7 X5 SA7 A6+B1 SA1 PP READ PERIGEE *PHI* SB2 NS RJ CVA CONVERT ANGLE SA6 HLAT BX7 X5 SA7 A6+B1 * DISPLAY VELOCITY AT PERIGEE. SA1 TP READ PERIGEE RJ CVC COMPUTE VELOCITY CHANGE SA6 HVEL SET DPC CONVERSION * DISPLAY TIME TO PERIGEE. SA1 VG+2 READ ALTITUDE VELOCITY NG X1,PHM2 IF DESCENDING SA2 =10H PAST SX5 B0 BX6 X2 JP PHM3 PHM2 SA1 MR COMPUTE TIME INTERVAL RJ CTI SA2 =60.0 FX5 X6/X2 MINUTES UX7,B2 X5 LX5 B2,X7 PX3 X5 NX4 X3 FX3 X4*X2 NO FX1 X6-X3 SECONDS UX7,B2 X1 LX1 B2,X7 RJ CDD BX1 X5 LX5 X6 RJ CDD SA2 PHMA LX5 24 SET UNITS BX5 X5-X2 PHM3 SA6 HTIM SET DPC CONVERSION BX7 X5 SET UNITS SA7 A6+B1 * DISPLAY ECCENTRICITY. SA1 TE READ ECCENTRICITY SA2 =100.0 SB2 B1+B1 DIGITS = 2 IX6 X1-X2 SX0 B1+B1 AX6 60 BX0 X6*X0 SB2 B2+X0 IF TE < 100, DIGITS = 4 RJ CFP CONVERT FLOATING POINT SA6 HECC JP DRSX RETURN PHMA CON 10H M S &10H POM SPACE 4,10 ** POM - PROCESS ORBITAL MODE. * * CALLS CFP, CVA. POM SA1 MODH TURN OFF *H* DISPLAY MX0 1 SA2 A1+B1 TURN ON *O* DISPLAY BX6 X0+X1 SA3 A2+B1 TURN OFF *I* DISPLAY BX7 -X0*X2 SA6 A1 SA7 A2 BX6 X0+X3 SA6 A3+ * DISPLAY PERIGEE AND APOGEE. SA1 TP READ PERIGEE SA5 RMOON SB2 B1+B1 DIGITS = 2 FX1 X1-X5 SA2 =1000.0 CHECK MAGNITUDE NX1 FX3 X1-X2 NG X3,POM1 IF < 1000 M FX0 X1/X2 ELSE,CONVERT TO KM NX1 X0 POM1 AX3 60 SX0 B1 SET UNITS BX4 X3*X0 BX0 -X0-X3 SA3 X4+DS SB2 B2+X0 BX6 X3 SA6 OPUN SET UNITS RJ CFP COMPUTE FLOATING POINT NUMBER SA6 A6-B1 SA1 TA READ APOGEE SB2 B1+B1 FX1 X1-X5 COMPUTE APOGEE-RMOON SA2 =1000.0 NX1 FX3 X1-X2 CHECK MAGNITUDE NG X3,POM2 IF < 1000 M FX1 X1/X2 ELSE, CONVERT TO KM POM2 AX3 60 SX0 B1 SET UNITS BX4 X3*X0 BX0 -X0-X3 SA3 X4+DS SB2 B2+X0 BX6 X3 SA6 OAPU SET UNITS RJ CFP CONVERT FLOATING POINT NUMBER SA6 A6-B1 * DISPLAY PERIOD. SA1 OP READ PERIOD SB2 B1+B1 DIGITS = 2 SA2 =0.016666666666666667 NO FX1 X1*X2 CONVERT TO MINUTES RJ CFP SA6 OTIM * DISPLAY LONGITUDE AND LATITUDE OF PERIGEE AND APOGEE. SA1 PT READ PERIGEE *THETA* SB2 POMA RJ CVA CONVERT ANGLE LX6 12 INSERT *E* OR *W* BX6 X6-X5 SA6 OPLN SA1 PT READ THETA BX6 X1 THETA(APOGEE) = -SIGN(PT,PI-ABS(PT)) AX1 60 SA2 PI BX5 X1-X6 FX7 X2-X5 NX7 X7 SB2 POMA BX1 -X1-X7 RJ CVA CONVERT ANGLE LX6 12 BX6 X6-X5 INSERT *E* OR *W* SA1 PP READ LATITUDE OF PERIGEE SA6 OALN SB2 POMB RJ CVA CONVERT ANGLE LX6 12 INSERT *N* OR *S* BX6 X6-X5 SX7 1RN&1RS SA6 OPLA NO BX6 X6-X7 SA6 OALA SET LATITUDE OF APOGEE JP DRSX RETURN POMA CON 1RE&1R CON 1RW&1R POMB CON 1RN&1R CON 1RS&1R PIM SPACE 4,10 ** PIM - PROCESS IMPACT MODE. * * CALLS ACS, CDD, CFP, CTI, CVA, CVC. PIM SA1 MODH TURN OFF *H* DISPLAY MX0 1 SA2 A1+B1 TURN OFF *O* DISPLAY BX6 X0+X1 SA3 A2+B1 TURN ON *I* DISPLAY BX7 X0+X2 SA6 A1 SA7 A2+ BX6 -X0*X3 SA6 A3 * DISPLAY IMPACT LONGITUDE AND LATITUDE. SA1 IT READ LONGITUDE SB2 EW RJ CVA CONVERT ANGLE SA6 ILON BX7 X5 SA7 A6+B1 SA1 IP READ LATITUDE SB2 NS RJ CVA CONVERT ANGLE SA6 ILAT BX7 X5 SA7 A6+B1 * DISPLAY IMPACT VELOCITY. SA1 RMOON RJ CVC COMPUTE VELOCITY CHANGE SA6 IVEL * DISPLAY IMPACT ANGLE. SA3 RMOON FX7 X3*X5 RMONN*V(RMOON) SA2 TV READ TANGENTIAL VELOCITY FX1 X2/X7 MAG(RV X VV)/RMOON*V(RMOON) RJ ACS ARC COSINE SA3 RADIAN CONVERT TO DEGREES SB2 B1+B1 2 DIGITS FX1 X7*X3 RJ CFP CONVERT FLOATING POINT NUMBER SA6 IANG * DISPLAY TIME TO IMPACT. SA1 MR COMPUTE IMPACT TIME RJ CTI SA6 S7 SA1 RMOON RJ CTI SA1 VG+2 CHECK DIRECTION SA2 S7 NG X1,PIM1 IF DOWNWARD FX6 X6+X2 SA2 OP PIM1 FX4 X2-X6 SA2 =60.0 CONVERT NX4 X4 FX5 X4/X2 MINUTES UX6,B2 X5 LX5 B2,X6 PX3 X5 NX3 X3 FX3 X3*X2 FX1 X4-X3 SECONDS UX6,B2 X1 LX1 B2,X6 RJ CDD BX1 X5 LX5 X6 RJ CDD SA2 PIMA SET UNITS LX5 24 BX4 X5-X2 LX7 X4 SA6 ITIM SA7 A6+B1 JP DRSX RETURN PIMA CON 10H M S &10H RSDB SPACE 4,10 ** RIGHT SCREEN FIXED DISPLAY BUFFER. RSDB BSS 0 * SHIPS POSITION AND SPEED. XC 60 YC 725 FILL DATA 10H FUEL RFUEL DATA 0 FUEL REMAINING YC 725 FILL BSSZ 2 DATA 10H UNITS XC 0 YC 660 FILL DATA 10HLONGITUDE LONG DATA 0 LONGITUDE LODR DATA 0 *EAST* OR *WEST* XC 0 YC 630 FILL DATA 10HLATITUDE LATT DATA 0 LATITUDE LADR DATA 0 *NORTH* OR *SOUTH* XC 0 YC 600 FILL DATA 10HALTITUDE ALTT DATA 0 ALTITUDE ALUN DATA 0 *M* OR *KM* XC 0 YC 550 FILL DATA 10HVELOCITY VELC DATA 0 VELOCITY CHAR ( M/SEC) * PARAMETERS RELATIVE TO THE GROUND. XC 160 YC 500 CHAR (N-S) XC 420 CHAR (E-W) XC 640 CHAR (ALT) XC 0 YC 450 CHAR (V) XC 0 YC 420 CHAR (A) XC 0 YC 370 CHAR (O) XC 0 YC 340 CHAR (B) XC 0 YC 310 CHAR (G) XC 40 YC 450 FILL VELV DATA 0 V(N-S) DATA 0 V(E-W) DATA 0 V(ALT) XC 40 YC 420 FILL ACCV DATA 0 A(N-S) DATA 0 A(E-W) DATA 0 A(ALT) XC 40 YC 370 FILL POSV DATA 0 COS(P(N-S)) DATA 0 COS(P(E-W)) DATA 0 COS(P(ALT)) XC 40 YC 340 FILL BETV DATA 0 BETA ORIENTATION DATA 0 DATA 0 XC 40 YC 310 FILL GAMV DATA 0 GAMMA ORIENTATION DATA 0 DATA 0 * TIME. XC 0 YC 260 CHAR (TIME) XC 0 FILL TIME DATA 0 CHAR ( SEC.) FILL 0 RSDBL EQU *-RSDB RVBH SPACE 4,10 ** RIGHT SCREEN - HYPERBOLIC MODE. RVBH BSS 0 XC 260 YC 220 CHAR (HYPERBOLIC) XC 0 YC 170 FILL DATA 10HPERILUN HPER DATA 0 HPUN DATA 0 XC 0 YC 140 FILL DATA 10HLONGITUDE HLON DATA 0 HLND DATA 0 XC 0 YC 110 FILL DATA 10HLATITUDE HLAT DATA 0 HLTD DATA 0 XC 0 YC 60 FILL DATA 10HVELOCITY HVEL DATA 0 CHAR ( M/SEC) XC 0 YC 30 FILL DATA 10HTIME HTIM DATA 0 HTMD DATA 0 XC 0 YC 0 FILL CHAR (ECCENTRICITY) XC 240 FILL HECC DATA 0 RVBHL EQU *-RVBH RVBO SPACE 4,10 ** RIGHT SCREEN - ORBITAL MODE. RVBO BSS 0 XC 320 YC 220 CHAR (ORBITAL) XC 0 YC 170 FILL DATA 10HPERILUN OPER DATA 0 OPUN DATA 0 XC 0 YC 140 FILL DATA 10HAPOLUN OAPG DATA 0 OAPU DATA 0 XC 0 YC 110 FILL DATA 10HPERIOD OTIM DATA 0 OTMU DATA 10H MIN XC 240 YC 60 CHAR (LONGITUDE) XC 540 YC 60 CHAR (LATITUDE) XC 0 YC 30 FILL DATA 10HPERILUN OPLN DATA 0 OPLA DATA 0 XC 0 YC 0 FILL DATA 10HAPOLUN OALN DATA 0 OALA DATA 0 RVBOL EQU *-RVBO RVBI SPACE 4,10 ** RIGHT SCREEN - IMPACT MODE. RVBI BSS 0 XC 320 YC 220 CHAR (IMPACT) XC 320 YC 220 CHAR (IMPACT) XC 0 YC 170 FILL DATA 10HLONGITUDE ILON DATA 0 ILND DATA 0 XC 0 YC 140 FILL DATA 10HLATITUDE ILAT DATA 0 ILTD DATA 0 XC 0 YC 110 FILL DATA 10HVELOCITY IVEL DATA 0 CHAR ( M/SEC) XC 0 YC 60 FILL DATA 10HTIME ITIM DATA 0 ITMU DATA 0 XC 0 YC 30 CHAR (IMPACT ANGLE) XC 240 FILL IANG DATA 0 CHAR ( DEG) FILL 0 RVBIL EQU *-RVBI SEG LUNAR TITLE LEFT SCREEN DISPLAY. USE LEFT ** DLS - DISPLAY LEFT SCREEN. * * THE LEFT SCREEN DISPLAYS ARE CYCLED WHENEVER THE *RIGHT * BLANK* KEY IS DEPRESSED. DLS SUBR ENTRY/EXIT SA2 DF READ DISPLAY CHANGE FLAG SA4 DI READ DISPLAY INDEX NZ X2,DLS3 IF NO DISPLAY CHANGE * PROCESS DISPLAY CHANGE. SA1 LSBF TURN OFF FIXED BUFFER SA2 TLVB TURN OFF VARIABLE BUFFERS SB2 TLVBL MX0 1 BX6 X0+X1 SA6 A1+ DLS1 BX7 X0+X2 TURN OFF BUFFER SA7 A2 SB2 B2-B1 SA2 A2+B1 NZ B2,DLS1 LOOP FOR ALL BUFFERS SA5 X4+TLDI READ INITIALIZOR ADDRESS SB7 X5 JP B7 EXECUTE INITIALIZOR * INITIALIZOR EXIT. DLS2 SX7 B1 CLEAR DISPLAY CHANGE FLAG MX0 1 TURN ON FIXED BUFFER SA1 LSBF BX6 -X0*X1 SA6 A1 SA4 DI READ DISPLAY INDEX SA7 DF * PROCESS DISPLAY. DLS3 SA5 X4+TLDP READ PROCESSOR ADDRESS SB7 X5+ JP B7 EXECUTE PROCESSOR ** DISPLAY EXITS. DISX EQU DLSX DISPLAY EXIT INIX EQU DLS2 INITIALIZOR EXIT TLDP SPACE 4,10 ** TABLE OF LEFT SCREEN DISPLAY PROCESSORS. TLDP BSS 0 LOC 0 CON DLSX KEYBOARD DISPLAY - RETURN CON DSA A - PORT CON DSB B - ORIENTATION CON DSC C - NAVIGATION LOC *O TLDPL EQU *-TLDP TLDI SPACE 4,10 ** TABLE OF LEFT SCREEN DISPLAY INITIALIZORS. TLDI BSS 0 LOC 0 CON IDK INITIALIZE KEYBOARD DISPLAY CON IDA INITIALIZE A DISPLAY CON IDB INITIALIZE B DISPLAY CON IDC INITIALIZE C DISPLAY LOC *O TLDIL EQU *-TLDI LUNAR TITLE KEYBOARD DISPLAY. IDK SPACE 4,10 ** IDK - INITIALIZE KEYBOARD DISPLAY. * * CALLS RFL. IDK SA1 LSIB TURN ON DISPLAYS SA2 A1+B1 MX0 1 BX6 -X0*X1 BX7 -X0*X2 SA6 A1 SA7 A2 SA1 LSBF SET LEFT SCREEN BUFFER TO ZERO LENGTH SX6 LSDB MX0 -30 BX7 X0*X1 BX7 X7+X6 SA7 A1 RJ RFL REDUCE FIELD LENGTH JP INIX EXIT LSI1 SPACE 4,10 ** LEFT SCREEN KEYBOARD INFORMATION BUFFER - MEDIUM CHARACTERS. LSI1 BSS 0 XC 0 YC 650 CHAR (THRUST CONTROLS) XC 0 YC 410 CHAR (ORIENTATION CONTROLS) XC 0 YC 110 CHAR (OTHER CONTROLS) FILL LSI1L EQU *-LSI1 LSI2 SPACE 4,10 ** LEFT SCREEN KEYBOARD INFORMATION DISPLAY - SMALL CHARACTERS. LSI2 BSS 0 XC 40 YC 622 CHAR (THRUST IS IN TERMS OF THE ACCELERATION (M/SEC**2)) XC 40 YC 610 CHAR (CAUSED. THIS ACCELERATION IS APPLIED ALONG THE UNIT) XC 40 YC 576 CHAR (VECTOR *O*, APPEARING ON THE RIGHT SCREEN.) XC 40 YC 552 CHAR ( KEY A(M/SEC**2) KEY A(M/SEC**2)) XC 40 YC 540 CHAR ( 0 0.0 6 6.4) XC 40 YC 526 CHAR ( 1 0.2 7 12.8) XC 40 YC 514 CHAR ( 2 0.4 8 25.6) XC 40 YC 502 CHAR ( 3 0.8 9 51.2) XC 40 YC 470 CHAR ( 4 1.6 + A+0.1) XC 40 YC 456 CHAR ( 5 3.2 - A-0.1) XC 40 YC 360 CHAR (ORIENTATION IS CONTROLLED VIA PITCH, YAW, AND ROLL.) XC 40 YC 346 CHAR (MOTION ABOUT AN AXIS IS INITIATED BY DEPRESSING THE) XC 40 YC 334 CHAR (KEY CORRESPONDING TO THE AXIS, MAGNITUDE, AND) XC 40 YC 322 CHAR (DIRECTION OF MOTION DESIRED. IF THE KEY IS DEPRESSED) XC 40 YC 310 CHAR (*N* TIMES, THE MOTION IS *N* TIMES AS FAST. TO ) XC 40 YC 276 CHAR (COUNTERACT THE MOTION, THE KEY OF OPPOSITE DIRECTION ) XC 40 YC 264 CHAR (AND EQUAL MAGNITUDE IS DEPRESSED *N* TIMES.) XC 40 YC 240 CHAR ( AXIS -10 -1 +1 +10) XC 40 YC 226 CHAR ( PITCH Q W R T) XC 40 YC 214 CHAR ( YAW A S F G) XC 40 YC 202 CHAR ( ROLL Z X V B) XC 0 XC 40 YC 170 CHAR (N. B. SIMULTANEOUS MOTION ABOUT 2 OR MORE AXES IS) XC 40 YC 156 CHAR (DIFFICULT TO CONTROL.) XC 40 YC 62 CHAR (H - HOLD DISPLAY. K - KILL PROGRAM.) XC 40 YC 50 CHAR (* - TRADE DISPLAY. I - THIS DISPLAY.) XC 40 YC 36 CHAR (P - TOGGLE QUEUE PRIORITY. = - RESTART SIMULATION.) XC 40 YC 24 CHAR (RIGHT BLANK - ADVANCE LEFT SCREEN DISPLAY.) XC 40 YC 12 CHAR (LEFT BLANK - TOGGLE PORT VIEWING DIRECTION.) FILL LSI2L EQU *-LSI2 SEG LUNAR TITLE -A- DISPLAY (PORT). USE PORT ** DSA - A DISPLAY (PORT). * * THE VIEW OUT OF A CIRCULAR PORT IS SIMULATED. THE VIEWING * DIRECTION MAY BE TOGGLED BETWEEN FORWARD AND REAR USING THE * *LEFT BLANK* KEY. * * CALLS ACS, ATN, DSE, DSN, DSM, DSS, CFP, CSP, RFL, SQR. DSA SA1 OA+2 SET VIEWING DIRECTION SA2 OA SA5 PD SA3 A2+B1 BX6 X2-X5 SA6 T1 BX7 X3-X5 BX6 X1-X5 SA7 A6+B1 BX1 X1-X5 BX2 X2-X5 SA6 A7+B1 RJ ATN THETA = ARC TANGENT(OA(Z)/OA(X)) SB2 4 SA1 RADIAN FX1 X1*X6 CONVERT TO DEGREES RJ CFP CONVERT FLOATING POINT NUMBER SA6 PTHC SA1 T1 DISPLAY PHI SA2 T1+2 FX4 X1*X1 X**2 FX2 X2*X2 Z**2 FX1 X4+X2 X**2+Z**2 RJ SQR COMPUTE SQUARE ROOT SA1 T1+1 BX2 X6 RJ ATN PHI = ARC TANGENT (Y/SQRT(X**2+Z**2) SA2 PI2 SB2 4 SA1 RADIAN RX7 X6/X2 PHI/(PI/2) FX1 X1*X6 CONVERT TO DEGREES SA7 S0 RJ CFP CONVERT FLOATING POINT NUMBER SA6 PPHC SA1 PD DISPLAY DIRECTION SX2 1RF&1RR SX6 1RR BX2 X1*X2 NO BX6 X6-X2 LX6 54 SA6 PDIR * COMPUTE PORT DISPLAY DATA. SA1 T1 COMPUTE T1 X OB SB2 T2 SA2 OB RJ CSP SA1 RU =RU(X) SA2 A1+B1 =RU(Y) SA3 A2+B1 =RU(Z) RX7 X2/X1 RU(Y)/RU(X) RX6 X3/X1 RU(Z)/RU(X) SA7 TDSS SA6 A7+1 SA2 MR COMPUTE MOON APPARENT ANGULAR RADIUS SA3 RMOON FX2 X2*X2 MR**2 FX3 X3*X3 FX4 X2-X3 MR**2-RMOON**2 NX2 X4 AX4 60 ABSOLUTE VALUE BX1 X2-X4 RJ SQR SA2 MR SA1 RU FX3 X6/X2 COS()=SQRT()/MR BX1 -X1 SA2 RMOON COMPUTE ANGLE SUBTENDED BY THE MOON FX7 X3/X1 -COS()/RU(X) SA3 MR AM = ARCSIN(RMOON/R) SA7 A6+B1 FX1 X2/X3 RJ ACS SA6 AM * COMPUTE PRIMARY DIRECTION COSINE. SA1 T1 COMPUTE MAX(T1(X),T1(Y),T1(Z))) SB3 60 SA2 A1+B1 AX4 X1,B3 SIGN(T1(X)) AX5 X2,B3 SIGN(T1(Y) SA3 A2+B1 MX0 1 BX1 X1-X4 ABS(T1(X))=X AX6 X3,B3 SIGN(T1(Z)) BX2 X2-X5 ABS(T1(Y))=Y BX4 X0*X4 SIGN BIT(T1(X) BX3 X3-X6 ABS(T1(Z))=Z LX4 -6 BX5 X0*X5 SIGN BIT(T1(Y)) BX6 X0*X6 SIGN BIT(T1(Z)) LX5 -24 LX6 -42 BX7 X4+X5 BX7 X7+X6 IX4 X1-X2 X-Y AX4 60 SIGN(X-Y) BX5 -X4 SIGN(Y-X) NO BX1 X5*X1 X*SIGN(Y-X) SX6 24 SHIFT(Y) BX2 X4*X2 Y*SIGN(X-Y) IX2 X1+X2 MAX(X,Y)=X*SIGN(Y-X)+Y*SIGN(X-Y) BX6 X4*X6 SX1 6 SHIFT(X) BX1 X5*X1 BX1 X1+X6 SHIFT(MAX(X,Y)) IX4 X2-X3 MAX(X,Y)-Z AX4 60 SIGN(MAX-Z) BX5 -X4 SIGN(Z-MAX) SX6 42 BX1 X5*X1 BX6 X4*X6 BX6 X6+X1 SHIFT(MAX(X,Y,Z)) SB2 X6+ LX7 X7,B2 PLUG (PL) OR (NG) JUMP AT DSSA SA6 DSAC BX7 X0*X7 SIGN BIT(MAX(X,Y,Z))) BX7 X7-X0 SA1 DSSA SA2 =77677777777777777777B LX7 -8 FORM PL OR NG BX3 X2*X1 BX6 X3+X7 SA6 A1 * PROCESS DISPLAYS. SA4 DSAA SET DISPLAY BUFFER ADDRESS BX6 X4 SA6 A4+B1 SA1 X4-1 SET COORDINATE BUFFER BX7 X1 SA7 A1 SA2 S0 SET DATA POINTERS SB4 TSTP UX2,B3 X2 PHI/(PI/2)*2**LOG(TSTPL) SX5 TSTM-TSTP MX6 0 SB3 B3+TSTPS LX4 X2,B3 AX2 60 SIGN(PHI) BX5 X2*X5 BX4 X4-X2 ABS(PHI) SB4 B4+X5 TSTP OR TSTM SA3 B4+X4 READ POINTERS SA2 X3 SET END OF DATA SA6 X3 AX3 30 SX6 A2 SAVE ADDRESS SA6 DSAD BX6 X2 SAVE WORD SA1 X3 SET FWA-1 SA6 A6+B1 MX7 0 RJ DSS DISPLAY STARS SA1 DSAD RESTORE END OF TABLE SA2 A1+B1 BX6 X2 SA6 X1 RJ DSN DISPLAY SUN RJ DSE DISPLAY EARTH RJ DSM DISPLAY MOON * COMPLETE PROCESSING. DSA1 NG X7,DSA2 LEFT ADJUST BUFFER LX7 12 NZ X7,DSA1 DSA2 SA7 A7+B1 SX6 A7+B1 SET BUFFER LWA+1 SA1 LSBF MX0 -30 BX7 X0*X1 SA2 FL BX7 X6+X7 IX3 X6-X2 LWA-FL SA7 LSBF NG X3,DISX RETURN IF LWA+1 < FL RJ RFL ELSE, REQUEST ADDITIONAL FIELD LENGTH JP DISX RETURN DSAA DATA 0 DSAB DATA 0 DSAC DATA 0 DSAD DATA 0 ADDRESS OF SAVED WORD DSAE DATA 0 SAVED WORD TDSS SPACE 4,10 ** PRE-COMPUTED DATA FOR ROUTINE *DSS*. TDSS BSS 0 DATA 0 RU(Y)/RU(X) DATA 0 RU(Z)/RU(X) DATA 0 -COS(APPARENT MOON ANGULAR RADIUS)/RU(X) DSS SPACE 4,10 ** DSS - DISPLAY STARS. * * ENTRY (A1) = ADDRESS-1 OF DATA TABLE. * (A7) = DISPLAY BUFFER ADDRESS. * (X7) = COORDINATE BUFFER. * (B2) = 6+18*PRIMARY DIRECTION COSINE NUMBER. * (T1) = VIEW DIRECTION. * (T2) = T1 X OB. * (DSSA) = PLUGGED (PL) OR (NG) INSTRUCTION. * (TDSS) = PRE-COMPUTED DATA TABLE. * * EXIT (X7) = COORDINATE BUFFER. * (A7) = DISPLAY BUFFER ADDRESS. * * USES ALL REGISTERS EXCEPT A0, B2. DSS SUBR ENTRY/EXIT SB3 -17 SB5 60 SB6 TACS DSS1 SA1 A1+B1 READ NEXT DATUM ZR X1,DSSX RETURN IF END OF TABLE LX6 X1,B2 ELSE, CHECK PRIMARY DIRECTION COSINE DSSA NG X6,DSS1 LOOP IF BEHIND VIEWING AREA * UNPACK DIRECTION COSINES AND MAGNITUDE. SX3 X1 (X3) = COS(Z) AX1 18 SX2 X1 (X2) = COS(Y) MX0 -6 LX1 24 BX6 -X0*X1 UNPACK MAGNITUDE PX2 X2,B3 AX1 42 (X1) = COS(X) PX3 X3,B3 SB4 X6 * COMPUTE ANGLE BETWEEN STAR AND CENTER OF PORT. SA4 T1 =T1(X) PX1 X1,B3 NX2 X2 SA5 A4+B1 =T1(Y) NX1 FX6 X2*X5 S(Y)*T1(Y) NX3 FX5 X1*X4 S(X)*T1(X) SA4 A5+B1 =T1(Z) FX0 X5+X6 S(X)*T1(X)+S(Y)*T1(Y) FX4 X3*X4 S(Z)*T1(Z) SA5 PV COS(PORT VIEWING HALF-ANGLE) - 25 DEG 51 M FX0 X0+X4 FX6 X0-X5 NG X6,DSS1 IF OFF SCREEN * COMPUTE ANGLE BETWEEN STAR AND CENTER OF MOON. SA5 TDSS =RU(Y)/RU(X) SA4 A5+B1 =RU(Z)/RU(X) FX6 X2*X5 S(Y)*RU(Y)/RU(X) FX0 X3*X4 S(Z)*RU(Z)/RU(X) SA5 A4+B1 =COS(MOON APPARENT ANGULAR RADIUS)/-RU(X) FX0 X0+X1 FX4 X0+X6 FX6 X4+X5 BX6 X5-X6 NG X6,DSS1 IF BEHIND MOON * COMPUTE DISPLAY COORDINATES. SA4 T2 = T1 X OB SA5 A4+B1 =T2(Y) FX0 X4*X1 T2(X)*S(X) FX6 X5*X2 T2(Y)*S(Y) SA4 A5+B1 =T2(Z) FX0 X0+X6 T2(X)*S(X)+T2(Y)*S(Y) FX5 X4*X3 T2(Z)*S(Z) NX6 X0 FX0 X6+X5 S . T2 SA4 OB =OB(X) UX0,B7 X0 FX6 X4*X1 OB(X)*S(X) SA5 A4+B1 =OB(Y) SB7 B7+10 FX5 X5*X2 OB(Y)*S(Y) SA4 A5+B1 =OB(Z) LX0 X0,B7 COS(X)*1024 FX1 X5+X6 OB(X)*S(X)+OB(Y)*S(Y)) FX2 X4*X3 OB(Z)*S(Z) NX1 X1 FX1 X1+X2 S . OB UX1,B7 X1 AX2 X0,B5 SB7 B7+10 LX1 X1,B7 COS(Y)*1024 BX5 X0-X2 ABS(COS(X)) AX3 X1,B5 SA4 X5+B6 READ X COORDINATE BX6 X1-X3 ABS(COS(Y)) BX4 X4-X2 SA5 X6+B6 READ Y COORDINATE SX4 X4+6000B+XPORT BX5 X5-X3 LX7 12 SX5 X5+7000B+YPORT * DISPLAY STAR. BX7 X7+X4 SET X COORDINATE PL X7,DSS2 IF BUFFER NOT FULL SA7 A7+B1 ELSE, WRITE BUFFER MX7 0 DSS2 NG B4,DSS1 IF INTENSIFICATION COMPLETED LX7 12 ELSE, INSERT ANOTHER Y COORDINATE BX7 X7+X5 SB4 B4-B1 ADVANCE MAGNITUDE PL X7,DSS2 IF BUFFER NOT FULL SA7 A7+B1 MX7 0 EQ DSS2 DSE SPACE 4,10 ** DSE - DISPLAY THE EARTH. * * ENTRY (A7) = BUFFER ADDRESS. * (X7) = COORDINATE BUFFER. * * EXIT (A7) = BUFFER ADDRESS. * (X7) = COORDINATE BUFFER. * * CALLS ACS, DOT, DSS. DSE2 SA1 S0 RESTORE A7, X7 SA2 A1+B1 SA3 X1 BX7 X3 SA7 A3+ BX7 X2 DSE SUBR ENTRY/EXIT SX6 A7 SAVE A7, X7 SA6 S0 SA7 A6+B1 * DETERMINE RELATIVE POSITIONS OF EARTH AND MOON. SA1 RU COMPUTE RU . VE SA2 VE RJ DOT PL X6,DSE1 IF EARTH NOT BEHIND MOON BX1 X6 ELSE, A = ARCCOS(RU . VE) RJ ACS SA5 REARTH SA1 AM FX2 X7+X5 A+REARTH IX7 X2-X1 NG X7,DSE2 IF A + REARTH < AM, EARTH IS BEHIND MOON * DETERMINE POSITION OF EARTH ON SCREEN. DSE1 SA1 T1 COMPUTE T1 . VE SA2 VE RJ DOT BX1 X6 A = ARCCOS(T1 . VE) RJ ACS SA5 REARTH SA4 AP FX1 X7-X5 A-REARTH FX2 X1-X4 PL X2,DSE2 IF A-REARTH> AP, EARTH IS OFF THE SCREEN * DISPLAY EARTH. SA2 S0 RESTORE A7, X7 SA3 A2+B1 SA4 X2 SA1 TETH-1 SET DATA ADDRESS BX7 X4 SA7 A4 BX7 X3 RJ DSS DISPLAY STARS JP DSEX RETURN DSN SPACE 4,10 ** DSN - DISPLAY THE SUN. * * ENTRY (A7) = DISPLAY BUFFER ADDRESS. * (X7) = COORDINATE BUFFER. * * EXIT (A7) = DISPLAY BUFFER ADDRESS. * (X7) = COORDINATE BUFFER. * * CALLS ACS, DOT, DSS. DSN2 SA1 S0 RESTORE A7, X7 SA2 A1+B1 SA3 X1 BX7 X3 SA7 A3+ BX7 X2 DSN SUBR ENTRY/EXIT SX6 A7 SAVE A7, X7 SA6 S0 SA7 A6+B1 * DETERMINE RELATIVE POSITION OF SUN AND MOON. SA1 RU COMPUTE RU . VS SA2 VS RJ DOT PL X6,DSN1 IF NOT BEHIND MOON BX1 X6 A = ARCCOS(RU . VS) RJ ACS SA5 RSUN SA1 AM FX2 X7+X5 A+RSUN IX7 X2-X1 NG X7,DSN2 IF A+RSUN < AM, SUN IS BEHIND MOON * DETERMINE POSITION OF SUN ON SCREEN. DSN1 SA1 T1 COMPUTE T1 . VS SA2 VS RJ DOT BX1 X6 A = ARCCOS(T1 . VS) RJ ACS SA5 RSUN SA4 AP FX1 X7-X5 A-RSUN FX2 X1-X4 PL X2,DSN2 IF A-RSUN > AP, SUN IS OFF THE SCREEN * DISPLAY THE SUN. SA2 S0 RESTORE A7, X7 SA3 A2+B1 SA4 X2 SA1 TSUN-1 SET DATA ADDRESS BX7 X4 SA7 A4 BX7 X3 RJ DSS DISPLAY STARS JP DSNX RETURN DSM SPACE 4,10 ** DSM - DISPLAY MOON. DSM SUBR ENTRY/EXIT JP DSMX RETURN LSAD SPACE 4,10 ** A DISPLAY BUFFER. LSAD BSS 0 XC 0 YC 660 CHAR (O) XC 0 CHAR (-) FILL 0 PTHC DATA 0 XC 510 YC 660 CHAR (O) XC 510 CHAR (I) FILL 0 PPHC DATA 0 XC 370 YC 660 FILL PDIR DATA 0 LSADL EQU *-LSAD IDA SPACE 4,10 ** IDA - INITIALIZE A DISPLAY. * * CALLS CIR, RFL. IDA SA1 LSAB TURN ON DISPLAY MX0 1 BX6 -X0*X1 SA6 LSAB * DRAW PORT OUTLINE. SA1 LSDB-1 INITIALIZE BUFFER ADDRESS BX7 X1 SA7 A1 SX7 0 SB2 XPORT SET CIRCLE PARAMETERS SB3 YPORT SB4 IPORT SX1 RPORT RJ CIR DRAW CIRCLE SX6 A7+1000B SET FIELD LENGTH RJ RFL REQUEST FIELD LENGTH SA1 LSDB-1 REGENERATE CIRCLE BX7 X1 SA7 A1 SX7 0 SB2 XPORT SET CIRCLE PARAMETERS SB3 YPORT SB4 IPORT SX1 RPORT RJ CIR DRAW CIRCLE IDA1 NG X7,IDA2 LEFT ADJUST BUFFER LX7 12 NZ X7,IDA1 IDA2 SA7 A7+B1 SX6 A7+B1 SET INITIAL ADDRESS SA6 DSAA SA1 LSBF SET ADDRESS IN BUFFER POINTER MX0 -30 BX7 X0*X1 BX7 X7+X6 SA7 A1 JP INIX EXIT SEG LUNAR TITLE -B- DISPLAY (ORIENTATION). USE ORIENT ** DSB - B DISPLAY (ORIENTATION). * * INSTRUMENT-LIKE DISPLAYS ARE PROVIDED TO REFLECT THE * ORIENTATION OF THE SHIP'S ENGINES AND ROTATION CONTROLS WITH * RESPECT TO THE SURFACE DIRECTLY BELOW THE SHIP. * * CALLS DAH, DBG, DPO, DPV, DVP, RFL. DSB SA1 DSBA SET BUFFER ADDRESS BX6 X1 SA6 A1+B1 RJ DAH DRAW ARTIFICAL HORIZON RJ DVP DRAW VELOCITY POINTER RJ DPV DRAW PROJECTION OF VELOCITY RJ DPO DRAW PROJECTION OF ORIENTATION RJ DBG DISPLAY BETA AND GAMMA SA1 DSBB SET BUFFER LWA+1 SA2 LSBF SA3 FL MX0 -30 SX6 X1+B1 SET LWA+1 BX7 X0*X2 IX5 X6-X3 BX7 X7+X6 SA7 A2 NG X7,DISX RETURN IF LWA+1 < FL RJ RFL ELSE, REQUEST ADDITIONAL FIELD LENGTH EQ DISX RETURN DSBA DATA 0 DSBB DATA 0 DAH SPACE 4,10 ** DAH - DRAW ARTIFICAL HORIZON. * * CALLS CSP, DOT, LIN, SQR. DAH SUBR ENTRY/EXIT * COMPUTE HORIZONTAL ANGLE. SA1 RU COMPUTE (RU X OA) SA2 OA SB2 T1 RJ CSP SA1 OB A = OB . T1 SA2 T1 RJ DOT SA6 S0 SA1 OB B = OB . RU SA2 RU RJ DOT SA1 A6 =A FX1 X1*X1 A**2 FX2 X6*X6 B**2 SA6 A6+B1 FX1 X1+X2 A**2+B**2 RJ SQR COMPUTE SQUARE ROOT SA4 S0 =A SA2 A4+B1 =B FX0 X4/X6 SINE = A/SQRT FX1 X2/X6 COSINE = B/SQRT BX7 -X0 COS(X+PI/2) = -SIN(X) LX6 X1 SIN(X+PI/2) = COS(X) SA7 A2 SA6 A4 * COMPUTE Y COORDINATE. SA5 OG+2 =O(ALT) BX5 -X5 SA4 AD Y(MAX) FX7 X5*X4 -O(ALT)*Y(MAX) UX7,B2 X7 LX7 X7,B2 SX7 X7+YAFHD SET Y COORDINATE SA7 A7+B1 (S2) SB2 XAFHD SET X COORDINATE SB4 60 SET LENGTH SA2 =-30.0 SET INITIAL R SA5 DSBB READ BUFFER ADDRESS SB3 X7 SET Y COORDINATE SA5 X5 SET COORDINATE BUFFER BX7 X5 SA7 A5 MX7 0 RJ LIN DRAW LINE * DRAW LINE PERPENDICULAR TO ARTIFICAL HORIZON. SA3 S0 =SIN(X+PI/2) SA1 A3+B1 =COS(X+IP/2) SA4 A1+B1 =Y COORDINATE SB2 XAFHD SET X COORDINATE BX0 X3 SB3 X4 SX2 -20 SB4 20 RJ LIN DRAW LINE DAH1 NG X7,DAH2 LEFT ADJUST BUFFER LX7 12 NZ X7,DAH1 DAH2 SA7 A7+B1 SX6 A7 SA6 DSBB * SET COMPASS POINTS. SA1 OG =O(N-S) SA2 A1+B1 =O(E-W) FX6 X1*X1 O(N-S)**2 FX7 X2*X2 O(E-W)**2 FX1 X6+X7 RJ SQR COMPUTE SQRT(O(N-S)**2+O(E-W)**2) SA4 OG =O(N-S) SA5 A4+B1 =O(E-W) FX0 X4/X6 COS(N/S) FX1 X5/X6 COS(E/W) AX4 60 AX5 60 SX3 B1 BX3 X5*X3 1*SIGN(COS(E/W)) SA3 X3+DAHA *E* OR *W* + COORDINATES BX1 -X1-X4 IF -COS(N-S) < 0, COS(N/S) = -(-COS(N/S)) LX7 X3 SX3 B1 BX3 X4*X3 1*SIGN(COS(N/S)) BX0 X0-X5 IF -COS(E/W) < 0, COS(N/S) = -COS(N/S) SA3 X3+DAHB *N* OR *S* + COORDINATES SA4 RD FX0 X0*X4 FX1 X1*X4 UX0,B2 X0 UX1,B3 X1 LX0 X0,B2 LX1 X1,B3 SX0 X0+XAFHD+6000B SX1 X1+XAFHD+6000B LX0 48 LX1 48 BX7 X7+X0 BX6 X3+X1 SA5 DSBB SET INTO BUFFER SA6 X5+B1 SA7 A6+B1 SA6 A7+B1 SA7 A6+B1 SX6 A7 ADVANCE ADDRESS SA6 A5 JP DAHX RETURN DAHA VFD 12/0,12/7005B+YAFHD,12/1LE,24/0 VFD 12/0,12/7005B+YAFHD,12/1LW,24/0 DAHB VFD 12/0,12/7005B+YAFHD,12/1LN,24/0 VFD 12/0,12/7005B+YAFHD,12/1LS,24/0 DVP SPACE 4,10 ** DVP - DRAW VELOCITY POINTER. * * CALLS ATN, NOR, SQR. DVP SUBR ENTRY/EXIT * COMPUTE X COORDINATE. SA1 OG NORMALIZE (O(N-S),O(E-W)) SA2 A1+B1 BX6 X1 SA6 T1 BX7 X2 MX6 0 SA7 A6+B1 SA6 A7+B1 SB2 T1 SA1 B2 RJ NOR SA1 VG =V(N-S) SA2 A1+B1 =V(E-W) FX6 X1*X1 FX7 X2*X2 FX1 X6+X7 RJ SQR COMPUTE SQRT(V(N-S)**2+V(E-W)**2 SA1 VG SA2 T1 COMPUTE (V(N-S),V(E-W)) . N(O(N-S),O(E-W)) SA3 A1+B1 SA4 A2+B1 RX1 X1*X2 RX3 X3*X4 FX7 X1+X3 PL X7,DVP1 IF ANGLE > 180 DEGREES FX6 X7/X6 SX1 17204B =1S-45 LX1 45 FX6 X6*X6 FX2 X1-X6 NX1 X2 RJ SQR SA5 RD RX6 X6*X5 SA6 S0 SA1 VG SA2 A1+B1 BX1 -X1 -V(N-S) BX2 -X2 -V(E-W) RJ ATN SA6 S1 SA1 OG SA2 A1+B1 RJ ATN SA1 S0 SET DIRECTION SA2 A1+B1 IX7 X6-X2 AX7 60 BX0 X1-X7 UX0,B2 X0 SET X COORDINATE LX0 X0,B2 SX0 X0+6000B+XAFHD * COMPUTE Y COORDINATE. SA1 VG+2 =V(ALT) SA2 MV SA3 AD FX6 X1/X2 COS = V(ALT)/MV FX6 X6*X3 UX1,B2 X6 SET Y COORDINATE LX1 X1,B2 SX1 X1+7000B+YAFHD SX6 2RO SX7 2R+ LX6 24 LX0 48 BX6 X6+X0 FORMAT = XXXX YYYY 1755 XXXX 4500 LX1 36 LX0 24 BX6 X6+X1 BX6 X6+X0 BX6 X6+X7 SA6 VELP JP DVPX RETURN DVP1 SX6 0 CLEAR VELOCITY POINTER SA6 VELP JP DVPX RETURN DPV SPACE 4,10 ** DPV - DRAW PROJECTION OF VELOCITY. * * CALLS ATN, LIN, SCS. DPV SUBR ENTRY/EXIT SA1 VG V(N-S) SA2 VG+1 V(E-W) RJ ATN COMPUTE ARC TANGENT(V(N-S)/V(E-W)) BX1 X6 RJ SCS SINE/COSINE SA5 DSBB SET BUFFER ADDRESS BX0 X6 LX1 X7 SA4 X5 BX7 X4 SA7 A4 MX7 0 SA2 =-10.0 INITIAL R SB2 XVOPD X COORDINATE SB3 YVOPD X COORDINATE SB4 RVOPD+10 LENGTH RJ LIN DRAW LINE DPV1 NG X7,DPV2 LEFT ADJUST BUFFER LX7 12 NZ X7,DPV1 DPV2 SA7 A7+B1 SX6 A7 SET BUFFER ADDRESS SA6 DSBB JP DPVX RETURN DPO SPACE 4,10 ** DPO - DRAW PROJECTION OF ORIENTATION. * * CALLS ATN, LIN, SCS. DPO SUBR ENTRY/EXIT SA1 OG O(N-S) SA2 OG+1 O(E-W) RJ ATN COMPUTE ARC TANGENT(O(N-S)/O(E-W)) BX1 X6 RJ SCS SINE/COSINE SA5 DSBB SET BUFFER ADDRESS BX0 X6 LX1 X7 SA4 X5 BX7 X4 SA7 A4 MX7 0 SX2 0 SB2 XVOPD X COORDINATE SB3 YVOPD Y COORDINATE SB4 RVOPD+10 LENGTH RJ LIN DRAW LINE DPO1 NG X7,DPO2 LEFT ADJUST BUFFER LX7 12 NZ X7,DPO1 DPO2 SA7 A7+B1 SX6 A7 SET BUFFER ADDRESS SA6 DSBB JP DPOX RETURN DBG SPACE 4,10 ** DBG - DRAW BETA AND GAMMA PROJECTIONS. * * CALLS DRP. DBG SUBR ENTRY/EXIT SX6 2R+B DRAW BETA PROJECTION SX7 OB RJ DRP SX6 2R+G DRAW GAMMA PROJECTION SX7 OC RJ DRP JP DBGX RETURN DRP SPACE 4,10 ** DRP - DRAW PROJECTION. * * ENTRY (X6) = CHARACTERS TO PUT AT END OF LINE. * (X7) = ADDRESS OF VECTOR TO PROJECT. * * CALLS ATN, DOT, LIN, SCS. DRP SUBR ENTRY/EXIT SA6 S0 (S0) = CHARACTERS SA7 A6+B1 (S1) = ADDRESS OF VECTOR * COMPUTE PROJECTION ANGLE. SA1 X7 COMPUTE NV . (S1) SA2 NV RJ DOT SA6 S2 SA2 EV SA4 A6-B1 COMPUTE EV . (S1) SA1 X4 RJ DOT SA1 S2 ANGLE = ARCTAN((NV.(S1))/(EV.(S1))) BX2 X6 RJ ATN BX1 X6 COMPUTE SINE AND COSINE OF ANGLE RJ SCS * DRAW PROJECTION. SA5 DSBB SET BUFFER ADDRESS BX0 X6 (X0) = SINE LX1 X7 (X1) = COSINE SA4 X5 BX7 X4 SA7 A4 MX7 0 SX2 0 INITIAL R SB2 XBGPD X COORDINATE OF CENTER SB3 YBGPD Y COORDINATE OF CENTER SB4 RBGPD-30 LENGTH RJ LIN DRAW LINE * INSERT CHARACTERS. PL X7,DRP1 IF BUFFER NOT FULL SA7 A7+B1 ELSE, ADVANCE BUFFER MX7 0 DRP1 SA1 S0 INSERT CHARACTERS LX7 12 BX7 X7+X1 NG X7,DRP3 IF BUFFER FULL MX0 12 ELSE, LEFT ADJUST BUFFER DRP2 LX7 12 BX6 X0*X7 ZR X6,DRP2 DRP3 SA7 A7+B1 SET BUFFER ADDRESS SX6 A7 SA6 DSBB JP DRPX RETURN LSBD SPACE 4,10 ** ORIENTATION DISPLAY BUFFER. LSBD BSS 0 * ARTIFICAL HORIZON. VFD 12/6000B+XAFHD-2*20B+10B VFD 12/7000B+YAFHD+RAFHD+10B CHAR (DOWN) VFD 12/6000B+XAFHD-20B+10B VFD 12/7000B+YAFHD-RAFHD-20B-10B CHAR (UP) * VELOCITY AND ORIENTATION PROJECTION. VFD 12/6000B+XVOPD VFD 12/7000B+YVOPD+RVOPD+10B CHAR (N) VFD 12/6000B+XVOPD VFD 12/7000B+YVOPD-RVOPD-20B-10B CHAR (S) VFD 12/6000B+XVOPD-RVOPD-20B VFD 12/7000B+YVOPD-10B CHAR (W) VFD 12/6000B+XVOPD+RVOPD+10B VFD 12/7000B+YVOPD-10B CHAR (E) * BETA AND GAMMA PROJECTION. VFD 12/6000B+XBGPD VFD 12/7000B+YBGPD+RBGPD+10B CHAR (N) VFD 12/6000B+XBGPD VFD 12/7000B+YBGPD-RBGPD-20B CHAR (S) VFD 12/6000B+XBGPD+RBGPD+10B VFD 12/7000B+YBGPD-10B CHAR (E) VFD 12/6000B+XBGPD-RBGPD-20B VFD 12/7000B+YBGPD-10B CHAR (W) FILL 0 VELP DATA 0 LSBDL EQU *-LSBD IDB SPACE 4,10 ** IDB - INITIALIZE B DISPLAY. * * CALLS GFD, RFL. IDB SA1 LSBB TURN ON DISPLAY MX0 1 BX6 -X0*X1 SA6 A1 RJ GFD GENERATE FIXED DISPLAY SX6 A7+1000B SET FIELD LENGTH RJ RFL RJ GFD REGENERATE DISPLAY JP INIX EXIT GFD SPACE 4,10 ** GFD - GENERATE FIXED DISPLAY. * * CALLS CIR, HLN, VLN. GFD SUBR ENTRY/EXIT * INITIALIZE BUFFER ADDRESS. SA1 LSDB-1 BX7 X1 SA7 A1 MX7 0 * GENERATE ARTIFICAL HORIZON. SB2 XAFHD X COORDINATE OF CENTER SB3 YAFHD Y COORDINATE OF CENTER SB4 IAFHD ANGLE INCREMENT SX1 RAFHD RADIUS RJ CIR DRAW CIRCLE SB2 XAFHD-AAFHD INITIAL X COORDINATE SB3 XAFHD+AAFHD FINAL X COORDINATE SB4 3 SX1 YAFHD-AAFHD Y COORDINATE RJ HLN SB2 XAFHD-RAFHD INITIAL X COORDINATE SB3 XAFHD+RAFHD FINAL X COORDINATE SB4 3 INCREMENT SX1 YAFHD Y COORDINATE RJ HLN DRAW HORIZONTAL LINE SB2 XAFHD-AAFHD INITIAL X COORDINATE SB3 XAFHD+AAFHD FINAL X COORDINATE SB4 3 INCREMENT SX1 YAFHD+AAFHD Y COORDINATE RJ HLN DRAW HORIZONTAL LINE SB2 YAFHD-RAFHD INITIAL Y COORDINATE SB3 YAFHD+RAFHD FINAL Y COORDINATE SB4 3 INCREMENT SX1 XAFHD X COORDINATE RJ VLN DRAW VERTICAL LINE * GENERATE VELOCITY AND ORIENTATION PROJECTION. SB2 XVOPD X COORDINATE OF CENTER SB3 YVOPD X COORDINATE OF CENTER SB4 IVOPD ANGLE INCREMENT SX1 RVOPD RADIUS RJ CIR DRAW CIRCLE SB2 XVOPD-RVOPD INITIAL X SB3 XVOPD+RVOPD FINAL X SB4 3 SX1 YVOPD Y COORDINATE RJ HLN DRAW HORIZONTAL LINE SB2 YVOPD-RVOPD INITIAL Y SB3 YVOPD+RVOPD FINAL Y SB4 3 SX1 XVOPD X COORDINATE RJ VLN DRAW VERTICAL LINE * GENERATE BETA AND GAMMA PROJECTIONS. SB2 XBGPD X COORDINATE OF CENTER SB3 YBGPD Y COORDINATE OF CENTER SB4 IBGPD ANGLE INCREMENT SX1 RBGPD RADIUS OF DISPLAY RJ CIR DRAW CIRCLE SB2 XBGPD-RBGPD INITIAL X SB3 XBGPD+RBGPD FINAL X SB4 3 INCREMENT SX1 YBGPD Y COORDINATE RJ HLN DRAW HORIZONTAL LINE SB2 YBGPD-RBGPD INITIAL Y SB3 YBGPD+RBGPD FINAL Y SB4 3 INCREMENT SX1 XBGPD X COORDINATE RJ VLN DRAW VERTICAL LINE * SET BUFFER ADDRESS. GFD1 NG X7,GFD2 LEFT ADJUST BUFFER LX7 12 NZ X7,GFD1 GFD2 SA7 A7+B1 SX6 A7 SET BUFFER ADDRESS SA6 DSBA SA1 LSBF SET LWA+1 OF BUFFER MX0 -30 SX6 X6+B1 BX5 X0*X1 BX6 X6+X5 SA6 A1 JP GFDX RETURN SEG LUNAR TITLE -C- DISPLAY (NAVIGATION). USE NAVIGAT ** DSC - C DISPLAY (NAVIGATION). * * INFORMATION HELPFUL TO NAVIGATION IS DISPLAYED. THE TYPE OF * DISPLAY VARYS, DEPENDING UPON THE CURRENT TRAJECTORY OF THE * SHIP. * * CALLS DTT. DSC SA1 MD CHECK MODE SX2 X1-2 NZ X2,DSC1 IF NOT IMPACT MODE RJ DTT ELSE, DISPLAY THRUST TIMES JP DISX RETURN DSC1 BX6 X6-X6 CLEAR DISPLAY MX7 0 SA6 KEY9 SA7 KEY8 SA6 KEY7 SA7 KEY6 SA6 KEY5 JP DISX RETURN DSCA DATA 0 DSCB DATA 0 DTT SPACE 4,10 ** DTT - DISPLAY THRUST TIMES. * * CALLS CTT. DTT SUBR ENTRY/EXIT SA1 =51.2 SB2 2R9/&2R RJ CTT COMPUTE THRUST TIME SA6 KEY9 SA1 =25.6 SB2 2R8/&2R RJ CTT SA6 KEY8 SA1 =12.8 SB2 2R7/&2R RJ CTT SA6 KEY7 SA1 =6.4 SB2 2R6/&2R RJ CTT SA6 KEY6 SA1 =3.2 SB2 2R5/&2R RJ CTT SA6 KEY5 JP DTTX RETURN CTT SPACE 4,10 ** CTT - COMPUTE THRUST TIME. * * ENTRY (X1) = ACCELERATION. * (B2) = 2R_LABEL&2R * * EXIT (X6) = TIME IN DISPLAY CODE. * * USES X1-X7,B2. * * CALLS CFP,SQR. CTT SUBR ENTRY/EXIT SA2 MS SA3 VG+2 =V(ALT) FX4 X1*X2 AC*AM BX3 -X3 FX5 X1-X2 AC-AM FX6 X1*X3 AC*V(ALT) NX5 X5 FX3 X3*X3 V(ALT)**2 FX7 X5+X5 2*(AC-AM) FX0 X4/X7 AC*AM/2*(AC-AM) = A RX6 X6/X5 AC*V(ALT)/(AC-AM) = B SA4 HT FX1 X3/X7 V(ALT)**2/2*(AC-AM) SA6 S0 FX1 X1-X4 V(ALT)**2/2*(AC-AM)-HT = C RX7 X0+X0 2*A NX1 X1 SA7 A6+B1 FX6 X6*X6 B**2 FX5 X0*X1 A*C FX5 X5+X5 FX5 X5+X5 4*A*C NX5 X5 FX4 X6-X5 B**2-4*A*C NG X4,CTT1 IF PAST NX1 X4 RJ SQR SA1 S0 =B SA2 A1+B1 =2*A FX7 X6-X1 SQRT-B NG X7,CTT1 NX7 X7 FX1 X7/X2 (X1) = TIME SX5 B2 SB2 B1 RJ CFP CONVERT FLOATING POINT LX5 42 BX6 X6-X5 JP CTTX RETURN CTT1 BX6 X6-X6 JP CTTX RETURN IDC SPACE 4,10 ** IDC - INITIALIZE C DISPLAY. * * CALLS GFX, RFL. IDC BX6 X6-X6 CLEAR DISPLAY BUFFER MX7 0 SA6 KEY9 SA7 KEY8 SA6 KEY7 SA7 KEY6 SA6 KEY5 SA1 LSCB TURN ON DISPLAY BUFFER MX0 1 BX6 -X0*X1 SA6 A1 RJ GFX GENERATE FIXED DISPLAY SA1 LSBF SET BUFFER LWA+1 MX0 -30 SX6 A7+B1 BX7 X0*X1 BX6 X6+X7 SA6 LSBF SX6 A7+1000B SET FIELD LENGTH RJ RFL RJ GFX GENERATE FIXED DISPLAY JP INIX EXIT GFX SPACE 4,10 ** GFX - GENERATE FIXED DISPLAY. * * CALLS HLN, VLN. GFX SUBR ENTRY/EXIT SA1 LSDB-1 SET BUFFER ADDRESS BX7 X1 SA7 A1 SX7 0 * GENERATE RECTANGLE. SB2 XDSOI INITIAL X SB3 XDSOF FINAL X SB4 2 SX1 YDSOI Y COORDINATE RJ HLN DRAW HORIZONTAL LINE SB2 YDSOI INITIAL Y SB3 YDSOF FINAL Y SB4 2 SX1 XDSOF X COORDINATE RJ VLN DRAW VERTICAL LINE SB2 YDSOI INITIAL Y SB3 YDSOF FINAL Y SB4 2 SX1 XDSOI X COORDINATE RJ VLN DRAW VERTICAL LINE SB2 XDSOI INITIAL X SB3 XDSOF FINAL X SB4 2 SX1 YDSOF Y COORDINATE RJ HLN DRAW HORIZONTAL LINE GFX1 NG X7,GFX2 LEFT ADJUST BUFFER LX7 12 NZ X7,GFX1 GFX2 SA7 A7+B1 SX6 A7+B1 SET LWA+1 USED SA6 DSCA JP GFXX RETURN LSCD SPACE 4,10 ** NAVIGATION DISPLAY BUFFER. LSCD BSS 0 Y SET 7000B+YDSOF-20B ECHO 3,A=(9,8,7,6,5) VFD 12/6010B+XDSOI,12/Y,24/0,12/6010B+XDSOI KEY_A DATA 0 Y SET Y-12B LSCDL EQU *-LSCD SEG LUNAR TITLE SUBROUTINES. USE SUBS ** ACS - ARC COSINE/SINE. * * ENTRY (X1) = NUMBER. * * EXIT (X6) = ARC SINE (NUMBER). * (X7) = ARC COSINE (NUMBER). * * USES X0, A1-A6, X6, X7. * * CALLS SQR. ACS SUBR ENTRY/EXIT SX2 17204B =1S-45 BX6 X1 LX2 45 SA6 ACSA SAVE ARGUMENT AX1 60 BX7 X6-X1 (X7) = ABS(ARG) FX1 X2-X7 1-ABS(ARG) NG X1,ACS1 IF ABS(ARG) > 1 NX1 X1 RJ SQR COMPUTE SQRT (1-ABS(ARG)) SA1 ACSA READ ARGUMENT BX7 X1 SA2 A1+B1 =C7 AX1 60 (X1) = SIGN(ARG) SA3 A2+B1 =C6 BX0 X7-X1 (X0) = ABS(ARG) FX4 X0*X2 A*C7 SA5 A3+B1 =C5 FX7 X4+X3 A*C7+C6 NX7 X7 SA2 A5+B1 =C4 FX3 X0*X7 A*(A*C7+C6) FX5 X3+X5 A*(A*C7+C6)+C5 NX5 X5 SA4 A2+B1 =C3 FX7 X0*X5 A*(A*(A*C7+C6)+C5) FX2 X7+X2 B = A*(A*(A*C7+C6)+C5)+C4 NX2 X2 SA3 A4+B1 =C2 FX7 X0*X2 A*B FX5 X7+X4 A*B+C3 NX5 X5 SA2 A3+B1 =C1 FX7 X0*X5 A*(A*B+C3) FX4 X7+X3 A*(A*B+C3)+C2 NX4 X4 SA5 A2+B1 =C0 FX7 X0*X4 C = A*(A*(A*B+C3)+C2) FX3 X7+X2 C+C1 NX3 X3 FX7 X0*X3 A*(C+C1) FX4 X7+X5 PSI = C0+C1*A+C2*A**2+C3*A**3+...+C7*A**7 NX4 X4 SA3 A5+B1 =PI/2 FX7 X6*X4 ARC COSINE = PSI*SQRT(1-ABS(ARG)) FX6 X3-X7 ARC SINE = PI/2-ARC COSINE PL X1,ACSX RETURN IF ARG > 0 BX6 -X6 ELSE, ARC SINE = -ARC SINE FX7 X3-X6 ARC COSINE = PI/2+ARC SINE JP ACSX RETURN * PROCESS ARGUMENT > 1. ACS1 SA1 ACSB =PI/2 BX2 X6 MX7 0 ARC COSINE = 0 BX6 X1 ARC SINE = PI/2 PL X2,ACSX RETURN IF ARGUMENT > 0 BX6 -X6 ELSE, ARC SINE = -PI/2 FX7 X2+X2 ARC COSINE = PI JP ACSX RETURN ACSA DATA 0 DATA -0.0012624911 C7 DATA 0.0066700901 C6 DATA -0.0170881256 C5 DATA 0.0308918810 C4 DATA -0.0501743046 C3 DATA 0.0889789874 C2 DATA -0.2145988016 C1 DATA 1.5707963050 C0 ACSB DATA 1.5707963268 PI/2 ADD SPACE 4,10 ** ADD - ADD VECTORS. * * ENTRY (A1) = ADDRESS OF FIRST VECTOR. * (A2) = ADDRESS OF SECOND VECTOR. * (B2) = ADDRESS OF RESULTANT. * (X1) = ((A1)). * (X2) = ((A2)). * * USES A1-A4, A6, A7, X6, X7. ADD1 RX3 X1+X2 A3+B3 NO NX6 X3 SA6 A7+B1 C3 ADD SUBR ENTRY/EXIT RX6 X1+X2 A1+B1 SA3 A1+B1 A2 SA4 A2+B1 B2 NX6 RX7 X3+X4 A2+B2 SA1 A3+B1 A3 SA2 A4+B1 B3 NX7 SA6 B2 C1 SA7 B2+B1 C2 EQ ADD1 ATN SPACE 4,10 ** ATN - ARC TANGENT. FROM CACM ALGORTHM 241. * * ENTRY (X1) = NUMBER. * (X2) = NUMBER. * * EXIT (X6) = ARC TANGENT ((X1)/(X2)). * * USES B2, X0-X2, A3-A5, X6, X7. ATN1 SA3 ATNA =PI/2 AX1 60 BX6 X3-X1 ARC TANGENT = PI/2*SIGN(Y) ATN SUBR ENTRY/EXIT ZR X2,ATN1 IF X = 0 FX0 X1/X2 ELSE, W=Y/X BX6 X1-X2 SIGN(Y)*SIGN(X) SA4 ATNB =1.34E8 AX6 60 SA5 A4+B1 =2.13E-22 BX3 X0-X6 V = ABS(W) IX7 X3-X4 SB2 B0 IX6 X5-X3 PL X7,ATN1 IF V > 1.34E8 PL X6,ATN4 IF V > 2.13E-22 SA4 A5+B1 =TN1 IX6 X3-X4 NG X6,ATN3 IF V < TN1 SA4 A4+B1 SB2 1 K=1 IX6 X3-X4 NG X6,ATN2 IF V < TN2 SB2 2 ELSE, K=2 SA4 A4+B1 IX6 X3-X4 NG X6,ATN2 IF V < TN3 SA4 A4+1 =TN4 SB2 B2+B1 IX6 X3-X4 NG X6,ATN2 IF V < TN4 SB2 B2+1 ELSE, K=4 ATN2 SA4 B2+ATNC-1 =CT SA5 B2+ATND-1 =CSC2 FX6 X3+X4 V+CT FX7 X5/X6 CSC2/(V+CT) FX3 X4-X7 CT-CSC2/(V+CT) NX3 X3 ATN3 SA4 ATNE =C0 FX3 X3*X4 Z=(X3)*C0 FX6 X3*X3 Z**2 SA5 A4+B1 =C1 SA4 A5+B1 =C2 FX7 X6+X5 C1+Z**2 FX7 X4/X7 C2/(C1+Z**2) SA5 A4+B1 =C3 FX4 X6-X7 Z**2-C2/(C1+Z**2) NX4 X4 FX7 X4+X5 Z**2+C3-C2/(C1+Z**2) SA4 B2+ATNF =PI*K/9 FX6 X3/X7 Z/(Z**2+C3-C2/(C1+Z**2)) FX7 X4+X6 K/9*PI+Z/(Z**2+C3-C2/(C1+Z**2)) AX0 60 SIGN(W) NX7 X7 NO BX0 X7-X0 (K/9*PI+Z/(Z**2+C3-C2/(C1+Z**2)))*SIGN(W) ATN4 BX6 X0 PL X2,ATNX RETURN IF X > 0 AX1 60 SIGN(Y) SA2 PI BX2 X2-X1 PI*SIGN(Y) FX6 X0+X2 ATAN+PI*SIGN(Y) JP ATNX RETURN ATNA DATA 1.5707963268 PI/2 ATNB DATA 1.34E8 DATA 2.13E-22 DATA 0.17632698071 TN1 DATA 0.57735026919 TN2 DATA 1.1917535926 TN3 DATA 2.7474774195 TN4 ATNC DATA 2.7474774195 CT1 DATA 1.1917535926 CT2 DATA 0.57735026919 CT3 DATA 0.17632698071 CT4 ATND DATA 8.548632169 CSC2(1) DATA 2.420276626 CSC2(2) DATA 1.333333333 CSC2(3) DATA 1.031091204 CSC2(4) ATNE DATA 0.16363636364 C0 DATA 0.0511194591 C1 DATA 0.00270998425 C2 DATA 0.216649136 C3 ATNF DATA 0 0/9 PI DATA 0.3490658504 1/9 PI DATA 0.6981317008 2/9 PI DATA 1.0471975512 3/9 PI DATA 1.3962634016 4/9 PI CFP SPACE 4,10 ** CFP - CONVERT FLOATING POINT NUMBER. * * ENTRY (X1) = NUMBER TO BE CONVERTED. * (B2) = COUNT OF DIGITS IN FRACTIONAL PART. * * EXIT (X6) = DPC CONVERSION. * * USES A2-A4, B2-B6, X0-X4, X6. * * CALLS CDD. CFP SUBR ENTRY/EXIT SA2 CFPA+B2 READ ROUNDING FRACTION BX4 X1 SB3 B2+B2 COUNT*2 SA3 CFPB+B2 READ MAGNITUDE AX1 60 SX0 1R-&1R BX4 X4-X1 (X4) = ABS(X1) SB4 B3+B3 COUNT*4 RX4 X4+X2 ROUND NUMBER BX0 X1*X0 SET SIGN RX6 X3*X4 ADJUST MAGNITUDE SB6 B3+B4 COUNT*6 UX2,B5 X6 LX1 X2,B5 RJ CDD CONVERT DECIMAL DIGITS MX1 6 CLEAR TOP CHARACTER BX6 -X1*X6 GT B2,B6,CFP1 IF AT LEAST (COUNT+1) DIGITS SA4 =66666666666666666666B SB3 B6-B2 SET(B6-B2)/6+1 LEADING ZEROS SB2 B6+B4 AX2 X1,B3 LX3 X2,B2 BX4 X3*X4 BX6 X6-X4 CFP1 SB5 B6+B4 INSERT DECIMAL POINT SX2 1R. AX1 X1,B5 LX0 X0,B2 LX1 X1,B6 LX2 X2,B6 BX4 -X1*X6 INTEGER PART BX6 X1*X6 FRACTIONAL PART LX4 6 BX6 X6+X2 BX6 X6+X4 LX0 6 BX6 X6-X0 SET SIGN JP CFPX RETURN CFPA DATA 0.5 DATA 0.5E-1 DATA 0.5E-2 DATA 0.5E-3 DATA 0.5E-4 DATA 0.5E-5 DATA 0.5E-6 DATA 0.5E-7 CFPB DATA 1. DATA 1.E1 DATA 1.E2 DATA 1.E3 DATA 1.E4 DATA 1.E5 DATA 1.E6 DATA 1.E7 CIR SPACE 4,10 ** CIR - GENERATE CIRCLE. * * ENTRY (B2) = X COORDINATE OF CENTER. * (B3) = Y COORDINATE OF CENTER. * (B4) = ANGLE INCREMENT. * (X1) = RADIUS. (INTEGER) * (X7) = COORDINATE BUFFER. * (A7) = DISPLAY BUFFER ADDRESS. * * EXIT (X7) = COORDINATE BUFFER. * (A7) = BUFFER ADDRESS UPDATED. * * USES A2, A3, A7, X1, X4, X5, B2-B7. CIR SUBR ENTRY/EXIT SA2 TSCS SET SINE ADDRESS SB2 B2+6000B SET X COORDINATE SB3 B3+7000B SET Y COORDINATE SB5 TSCSL SA3 TSCS+TSCSL-1 PX1 X1 SB6 B5 NX1 X1 * PROCESS QUADRANT I. CIR1 LE B6,CIR3 IF END OF QUADRANT FX4 X1*X2 Y=R*SINE SB6 B6-B4 FX5 X1*X3 X=R*COSINE UX4,B7 X4 SA2 A2+B4 READ NEXT SINE LX4 X4,B7 UX5,B7 X5 SX4 X4+B3 SET Y COORDINATE LX7 12 SHIFT BUFFER SA3 A3-B4 SET NEXT COSINE LX5 X5,B7 SX5 X5+B2 SET X COORDINATE NO BX7 X7+X5 INSERT X COORDINATE PL X7,CIR2 IF BUFFER NOT FULL SA7 A7+B1 ELSE, WRITE BUFFER MX7 0 CIR2 LX7 12 INSERT Y COORDINATE BX7 X7+X4 PL X7,CIR1 LOOP IF BUFFER NOT FULL SA7 A7+B1 ELSE, WRITE BUFFER MX7 0 EQ CIR1 LOOP * PROCESS QUADRANT II. CIR3 SA2 A2-B4 SET SINE ADDRESS SB2 -B2 COSINE < 0 SB6 B5 SA3 A3+B4 SET COSINE ADDRESS CIR4 LE B6,CIR6 IF END OF QUADRANT FX4 X1*X2 Y=R*SINE SB6 B6-B4 FX5 X1*X3 X=-R*COSINE UX4,B7 X4 SA2 A2-B4 READ NEXT SINE LX4 X4,B7 UX5,B7 X5 SX4 X4+B3 SET Y COORDINATE LX7 12 SHIFT BUFFER SA3 A3+B4 READ NEXT COSINE LX5 X5,B7 SX5 X5+B2 SET -(X COORDINATE) NO BX7 -X5+X7 INSERT X COORDINATE PL X7,CIR5 IF BUFFER NOT FULL SA7 A7+B1 ELSE, WRITE BUFFER MX7 0 CIR5 LX7 12 INSERT Y COORDINATE BX7 X7+X4 PL X7,CIR4 LOOP IF BUFFER NOT FULL SA7 A7+B1 ELSE, WRITE BUFFER MX7 0 EQ CIR4 LOOP * PROCESS QUADRANT III. CIR6 SA2 A2+B4 SET SINE ADDRESS SB3 -B3 SINE < 0 SB6 B5 SA3 A3-B4 SET COSINE ADDRESS CIR7 LE B6,CIR9 IF END OF QUADRANT FX4 X1*X2 Y=-R*SINE SB6 B6-B4 FX5 X1*X3 X=-R*COSINE UX4,B7 X4 SA2 A2+B4 READ NEXT SINE LX4 X4,B7 UX5,B7 X5 SX4 X4+B3 SET -(Y COORDINATE) LX7 12 SHIFT BUFFER SA3 A3-B4 READ NEXT COSINE LX5 X5,B7 SX5 X5+B2 SET -(X COORDINATE) NO BX7 -X5+X7 INSERT X COORDINATE PL X7,CIR8 IF BUFFER NOT FULL SA7 A7+B1 ELSE, WRITE BUFFER MX7 0 CIR8 LX7 12 INSERT Y COORDINATE BX7 -X4+X7 PL X7,CIR7 LOOP IF BUFFER NOT FULL SA7 A7+B1 ELSE, WRITE BUFFER MX7 0 EQ CIR7 LOOP * PROCESS QUADRANT IV. CIR9 SA2 A2-B4 SET SINE ADDRESS SB2 -B2 COSINE > 0 SB6 B5 SA3 A3+B4 CIR10 LE B6,CIRX RETURN IF END OF QUADRANT FX4 X1*X2 Y=-R*SINE SB6 B6-B4 FX5 X1*X3 X=R*COSINE UX4,B7 X4 SA2 A2-B4 READ NEXT SINE LX4 X4,B7 UX5,B7 X5 SX4 X4+B3 SET -(Y COORDINATE) LX7 12 SHIFT BUFFER SA3 A3+B4 READ NEXT COSINE LX5 X5,B7 SX5 X5+B2 SET X COORDINATE NO BX7 X7+X5 INSERT X COORDINATE PL X7,CIR11 IF BUFFER NOT FULL SA7 A7+B1 ELSE, WRITE BUFFER MX7 0 CIR11 LX7 12 INSERT Y COORDINATE BX7 -X4+X7 PL X7,CIR10 LOOP IF BUFFER NOT FULL SA7 A7+B1 ELSE, WRITE BUFFER MX7 0 EQ CIR10 LOOP CSP SPACE 4,10 ** CSP - CROSS PRODUCT. * * ENTRY (A1) = ADDRESS OF FIRST VECTOR. * (A2) = ADDRESS OF SECOND VECTOR. * (B2) = ADDRESS OF RESULTANT. * (X1) = ((A1)). * (X2) = ((A2)). * * USES A1-A5, X0, X6, X7. CSP1 RX3 X2-X4 A3*B1-A1*B3 NX6 X1 NX7 X3 SA6 B2 C1 NX6 X0 SA7 B2+B1 C2 NO SA6 A7+B1 C3 CSP SUBR ENTRY/EXIT SA3 A1+B1 A2 SA4 A2+B1 B2 FX6 X3*X2 A2*B1 SA5 A3+B1 A3 FX7 X1*X4 A1*B2 FX2 X5*X2 A3*B1 RX0 X7-X6 A1*B2-A2*B1 FX6 X5*X4 A3*B2 SA5 A4+B1 B3 FX7 X3*X5 A2*B3 FX4 X1*X5 A1*B3 RX1 X7-X6 A2*B3-A3*B2 EQ CSP1 CTI SPACE 4,10 ** CTI - COMPUTE TIME INTERVAL. * * ENTRY (X1) = RADIUS VECTOR MAGNITUDE. * * EXIT (X6) = TIME INTERVAL REQUIRED TO TRAVEL FROM PERIGEE * TO (X1) ALONG TRAJECTORY. * * USES ALL REGISTERS EXCEPT A0. * * CALLS ACS, ATN, LOG, SCS, SQR. CTI SUBR ENTRY/EXIT * COMPUTE ANGLE BETWEEN PERIGEE AND (X1). SA2 TP R0 = PERIGEE SX3 17204B =1./2**45 SA4 TE E = ECCENTRICITY LX3 45 FX6 X2/X1 R0/R FX0 X3+X4 1+E FX6 X6*X0 (1+E)(R0/R) FX7 X6-X3 (1+E)(R0/R)-1 NX7 X7 FX1 X7/X4 ((1+E)(R0/R)-1)/E FX6 X4-X3 E-1 FX0 X4*X4 E**2 NX6 X6 RX7 X0-X3 E**2-1 SA6 S1 S1 = B = E-1 NX7 X7 SA7 A6-B1 S0 = A = E**2-1 RJ ACS THETA = ARCCOS(((E+1)(R0/R)-1)/E) * COMPUTE INTEGRAL ALONG TRAJECTORY. SA7 S2 S2 = THETA UX1,B2 X7 COMPUTE THETA/2 SB2 B2-B1 PX1 X1,B2 RJ SCS COMPUTE TAN(THETA/2) RX6 X6/X7 SA6 A7+B1 S3 = D = TAN(THETA/2) SA2 S0 =A BX1 X2 AX2 60 COMPUTE ABS(A) NO BX1 X1-X2 RJ SQR COMPUTE SQRT(ABS(A)) SA6 S4 S4 = C = SQRT(ABS(A)) SA1 S0 =A PL X1,CTI1 IF E > 1 * PROCESS ORBITAL TRAJECTORY. SA2 S3 =D SA3 A1+B1 =B BX1 -X1 -A FX6 X2*X3 DB FX2 X6/X1 SX1 17204B NO LX1 45 RJ ATN ATAN(-BD/A) SA1 S4 =C UX2,B2 X6 SB2 B2+B1 PX2 X2,B2 2*ATAN(-BD/A) FX6 X2/X1 2*ATAN(-BD/A)/C EQ CTI2 * PROCESS HYPERBOLIC TRAJECTORY. CTI1 SA1 S1 =B SA2 S3 =D SA3 A2+B1 =C FX0 X1*X2 BD FX7 X0-X3 BD-C FX6 X0+X3 BD+C NX7 X7 RX1 X6/X7 (BD+C)/(BD-C) RJ LOG SA1 S4 NO FX6 X6/X1 I = LOG((BD+C)/(BD-C))/C * COMPLETE INTEGRATION. CTI2 SA2 S0 =A NO RX6 X6/X2 I/A SA6 S6 SA1 S2 =THETA RJ SCS COMPUTE SIN AND COS OF THETA SA1 TE =E SX2 17204B SA3 S0 =A FX6 X1*X6 E*SIN FX7 X1*X7 E*COS LX2 45 SA4 S6 =I FX7 X7+X2 1+E*COS FX6 X6/X3 (E*SIN)/A NX7 X7 FX0 X2+X1 1+E FX5 X6/X7 (E*SIN)/(A*(1+E*COS)) FX6 X5-X4 (E*SIN)/(A*(1+E*COS))-I/A = X SA1 TP =R0 NX6 X6 SA2 TV =H = MAG(R X V) FX0 X0*X1 R0*(1+E) FX0 X0*X0 R0**2*(1+E)**2 FX7 X0/X2 (((R0**2)(1+E)**2)/H) = Y RX6 X6*X7 TIME = X*Y BX1 X6 AX6 60 BX6 X1-X6 JP CTIX RETURN CVA SPACE 4,10 ** CVA - CONVERT ANGLE TO DISPLAY CODE. * * ENTRY (X1) = ANGLE TO BE CONVERTED. (IN RADIANS) * (B2) = ADDRESS OF LABEL FOR POSITIVE ANGLES. * * EXIT (X6) = DPC CONVERSION. * (X5) = LABEL. * * USES A4, A5, X1-X4, B2. * * CALLS CFP. CVA1 SB2 3 RJ CFP CONVERT FLOATING POJNT CVA SUBR ENTRY/EXIT BX2 X1 FIND ABS (X1) SA4 RADIAN AX2 60 BX1 X1-X2 SX3 B1 SET LABEL BX3 X2*X3 RX1 X1*X4 CONVERT TO DEGREES SA5 B2+X3 EQ CVA1 CVC SPACE 4,10 ** CVC - COMPUTE VELOCITY CHANGE. * * ENTRY (X1) = RADIUS AT WHICH VELOCITY IS DESIRED. * (MR) = CURRENT RADIUS MAGNITUDE. * (MV) = CURRENT VELOCITY MAGNITUDE. * * EXIT (X5) = VELOCITY MAGNITUDE AT R=(X1). * (X6) = DPC CONVERSION OF (X5) WITH 2 FRACTIONAL DIGITS. * * USES A2-A5, X0-X7, B7. * * CALLS CFP, SQR. CVC1 FX2 X2*X2 MV**2 SB2 B1+B1 FX6 X1+X2 MV**2+2GM*(1/(X1)-1/MR) NX1 X6 RJ SQR COMPUTE SQUARE ROOT BX1 X6 LX5 X6 RJ CFP CONVERT FLOATING POINT NUMBER CVC SUBR ENTRY/EXIT SX4 17204B =1.S-45 SA2 MR MAGNITUDE OF RADIUS VECTOR LX4 45 1.0 FX6 X4/X1 1/(X1) SA3 GM2 FX7 X4/X2 1/MR SA2 MV FX5 X6-X7 1/(X1) - 1/MR NX6 X5 FX1 X6*X3 2GM * (1/(X1) - 1/MR) EQ CVC1 DOT SPACE 4,10 ** DOT - DOT PRODUCT. * * ENTRY (A1) = ADDRESS OF FIRST VECTOR. * (A2) = ADDRESS OF SECOND VECTOR. * (X1) = ((A1)). * (X2) = ((A2)). * * EXIT (X6) = DOT PRODUCT. * * USES A1-A4, X6, X7. DOT1 FX7 X3*X4 A2*B2 SA2 A4+B1 B3 FX6 X6+X7 A1*B1+A2*B2 FX3 X1*X2 A3*B3 NX4 X6 RX7 X4+X3 A1*B1+A2*B2+A3*B3 NO NX6 X7 DOT SUBR ENTRY/EXIT SA3 A1+B1 A2 FX6 X1*X2 A1*B1 SA4 A2+B1 B2 SA1 A3+B1 A3 EQ DOT1 HLN SPACE 4,10 ** HLN - DRAW HORIZONTAL LINE. * * ENTRY (B2) = INITIAL X COORDINATE. * (B3) = FINAL X COORDINATE. * (B4) = X INCREMENT. * (X1) = Y COORDINATE. * (X7) = COORDINATE BUFFER. * (A7) = ADDRESS OF DISPLAY BUFFER. * * EXIT (X7) = COORDINATE BUFFER. * (A7) = BUFFER ADDRESS ADVANCED. * * USES B2, X1, X6, X7, A7. HLN1 LX7 12 SET X COORDINATE BX7 X7+X6 NG X7,HLN3 IF BUFFER FULL LX7 12 ELSE, SET Y COORDINATE BX7 X7+X1 NG X7,HLN4 IF BUFFER FULL HLN2 SX6 X2+B2 FORM X COORDINATE SB2 B2+B4 ADVANCE X LE B2,B3,HLN1 LOOP HLN SUBR ENTRY/EXIT SX1 X1+7000B FORM Y COORDINATE SX2 6000B EQ HLN2 HLN3 SA7 A7+B1 WRITE BUFFER BX7 X1 SET Y COORDINATE EQ HLN2 HLN4 SA7 A7+B1 WRITE BUFFER MX7 0 EQ HLN2 LIN SPACE 4,10 ** LIN - DRAW OBLIQUE LINE. * * ENTRY (B2) = X COORDINATE FOR R=0. * (B3) = Y COORDINATE FOR R=0. * (B4) = NUMBER OF POINTS IN LINE. * (X0) = SINE OF HORIZONTAL ANGLE. * (X1) = COSINE OF HORIZONTAL ANGLE. * (X2) = INITIAL R. * (X7) = COORDINATE BUFFER. * (A7) = DISPLAY BUFFER ADDRESS. * * EXIT (X4) = LAST X COORDINATE. * (X5) = LAST Y COORDINATE. * (X7) = COORDINATE BUFFER. * (A7) = DISPLAY BUFFER ADDRESS. * * USES X2, X3-X5, B2-B6, X7, A7. LIN2 LX7 12 INSERT Y COORDINATE BX7 X7+X5 PL X7,LIN3 IF BUFFER NOT FULL SA7 A7+1 SX7 0 LIN3 SB4 B4-1 ADVANCE POINT COUNT NZ B4,LIN1 IF NOT FINISHED LIN SUBR ENTRY/EXIT SB2 B2+6000B SET COORDINATES SB3 B3+7000B SX3 17204B =1S-45 LX3 45 LIN1 RX4 X1*X2 X = R*COSINE RX5 X0*X2 Y = R*SINE UX4,B5 X4 RX2 X2+X3 R = R+1 UX5,B6 X5 NX2 X2 LX4 X4,B5 LX5 X5,B6 SX4 X4+B2 SET X COORDINATE SX5 X5+B3 SET Y COORDINATE LX7 12 INSERT X COORDINATE BX7 X7+X4 PL X7,LIN2 IF BUFFER NOT FULL SA7 A7+B1 BX7 X5 EQ LIN3 LOG SPACE 4,10 ** LOG - NATURAL LOGARITHM. * * ENTRY (X1) = NUMBER. * * EXIT (X6) = LOG(NUMBER). * * USES X0, A1-A5, X6, X7, B2. LOG SUBR ENTRY/EXIT SX2 17204B MX0 0 LX2 45 FX3 X1-X2 X-1 NX3 X3 PL X3,LOG1 IF X > 1 FX4 X2/X1 ELSE, COMPUTE LOG(1/X) MX0 60 FX3 X4-X2 NX3 X3 LOG1 SA1 LOGA =A5 SA2 A1+B1 =A4 FX6 X1*X3 A5*X SA4 A2+B1 =A3 FX7 X6+X2 A5*X+A4 NX7 X7 SA1 A4+B1 =A2 FX6 X7*X3 (A5*X+A4)*X FX5 X6+X4 (A5*X+A4)*X+A3 SA2 A1+B1 =A1 NX5 X5 FX6 X5*X3 ((A5*X+A4)*X+A3)*X FX7 X6+X1 ((A5*X+A4)*X+A3)*X+A2 NX7 X7 FX5 X7*X3 (((A5*X+A4)*X+A3)*X+A2)*X FX6 X5+X2 (((A5*X+A4)*X+A3)*X+A2)*X+A1 NX6 X6 FX6 X6*X3 LOG = ((((A5*X+A4)*X+A3)*X+A2)*X+A1)*X BX6 X6-X0 LOG(X) = -LOG(1/X) JP LOGX RETURN LOGA DATA .03215845 A5 DATA -.1360275 A4 DATA .28947478 A3 DATA -.49190896 A2 DATA .99949556 A1 MAG SPACE 4,10 ** MAG - VECTOR MAGNITUDE. * * ENTRY (A1) = ADDRESS OF VECTOR. * (X1) = ((A1)). * * EXIT (X6) = MAGNITUDE. * * USES A1, A2, X7. * * CALLS SQR. MAG1 RX1 X2+X7 A1**2+A2**2+A3**2 RJ SQR COMPUTE SQUARE ROOT MAG SUBR ENTRY/EXIT SA2 A1+B1 A2 FX6 X1*X1 A1**2 FX7 X2*X2 A2**2 SA1 A2+B1 A3 FX7 X6+X7 A1**2+A2**2 FX2 X1*X1 A3**2 EQ MAG1 NOR SPACE 4,10 ** NOR - NORMALIZE VECTOR. * * ENTRY (A1) = ADDRESS OF VECTOR. * (B2) = ADDRESS OF RESULTANT. * (X1) = ((A1)). * * EXIT VECTOR NORMALIZED. * * USES A1-A3, X6, X7. * * CALLS SCM, SQR. NOR1 FX1 X2+X7 A1**2+A2**2+A3**2 RJ SQR COMPUTE SQUARE ROOT SX7 17204B =1.0S-45 LX7 45 FX2 X7/X6 1./MAG(A) SA1 A1 RJ SCM SCALAR MULTIPLY NOR SUBR ENTRY/EXIT SA2 A1+B1 A2 FX6 X1*X1 A1**2 FX7 X2*X2 A2**2 SA3 A2+B1 A3 FX7 X6+X7 A1**2+A2**2 FX2 X3*X3 A3**2 EQ NOR1 RFL SPACE 4,10 ** RFL - REQUEST FIELD LENGTH. * * RFL REQUESTS OR RELEASES MEMORY AS REQUIRED. SINCE * A REQUEST TO REDUCE FL WITH A PP ASSIGNED (LUN) WILL NOT * BE HONORED, LUNAR WILL REQUEST THE PP DRIVER TO REDUCE * MEMORY. * * ENTRY (X6) = MEMORY REQUIRED. * (DF) < 0 IF DISPLAY DRIVER NOT ASSIGNED. * * EXIT FL ADJUSTED. * * USES A - 1, 2, 6, 7. * X - 1, 2, 3, 6, 7. * * CALLS RCL=, SYS=. RFL SUBR ENTRY/EXIT SX7 X6+77B ROUND REQUEST UP SA1 FL CHECK FIELD LENGTH AX7 6 LX7 6 IX6 X1-X7 SA7 A1 UPDATE FL ZR X6,RFLX IF NO CHANGE PL X6,RFL2 IF TO REDUCE RFL1 MEMORY CM,,R,X7 REQUEST MEMORY JP RFLX RETURN RFL2 SA1 DF CHECK IF DISPLAY DRIVER (LUN) ASSIGNED NG X1,RFL1 IF PP NOT ASSIGNED LX7 6 FL (IN HUNDREDS) TO BYTE 3 SA7 TDET+STAW REQUEST *LUN* TO REDUCE FL RECALL + SA1 TDET+STAW NZ X1,* IF REQUEST NOT YET HONORED JP RFLX EXIT SCM SPACE 4,10 ** SCM - SCALAR MULTIPLY. * * ENTRY (A1) = ADDRESS OF VECTOR. * (B2) = ADDRESS OF RESULTANT. * (X1) = ((A1)). * (X2) = SCALAR. * * USES A3, A6, A7, X6, X7. SCM1 SA6 B2 B1 RX6 X3*X2 S*A3 SA7 B2+B1 B2 SA6 A7+B1 B3 SCM SUBR ENTRY/EXIT SA3 A1+B1 A2 RX6 X1*X2 S*A1 RX7 X3*X2 S*A2 SA3 A3+B1 A3 EQ SCM1 SCS SPACE 4,10 ** SCS - SINE/COSINE. FROM FORTRAN EXTENDED 2.0. * * ENTRY (X1) = NUMBER. * * EXIT (X6) = SINE(NUMBER). * (X7) = COSINE(NUMBER). * * USES B2, X0, X1, A2-A5. * EXIT - 5PI/4 @ X < 7PI/4. + LX7 X6 COSINE = SINE BX6 -X4 SINE = -COSINE EQ SCSX RETURN * EXIT - 3PI/4 @ X < 5PI/4. + BX7 -X7 COSINE = -COSINE BX6 -X6 SINE = -SINE EQ SCSX RETURN * EXIT - PI/4 @ X < 3PI/4. + BX7 -X6 COSINE = -SINE LX6 X4 SINE = COSINE * EXIT - X < PI/4. SCS SUBR ENTRY/EXIT SA2 SCSA =2/PI SB2 B0 (B2) = K FX6 X1*X2 SX2 B1 LX2 58 =2000 0000 0000 0000 0000 FX4 X2+X6 PROCESS RANGE REDUCTION DX7 X2+X6 RX0 X4+X7 NX3 X0 BX7 X2-X0 IX0 X2+X7 SA2 A2+1 =PI/2(U) FX6 X3*X2 H1=N*PI/2(U) (U) SA4 A2+B1 =PI/2(L) ZR X7,SCS1 IF RANGE REDUCTION NOT NEEDED FX7 X1-X6 (ARG-H1)(U) DX5 X2*X3 H2=N*PI/2(U) (L) DX2 X1-X6 (ARG-H1)(L) NX7 X7 FX6 X4*X3 N*PI/2(L) (U) FX2 X2-X5 (ARG-H1)(L)-H2 SX5 3 FX2 X2-X6 (ARG-H1)(L)-H2-N*PI/2(L) BX6 X5*X0 K=(N+K) MOD 4 RX7 X7+X2 REDUCED ARGUMENT SB2 X6+0 (B2) = K NX1 X7 SCS1 SA3 A4+B1 =C5 FX0 X1*X1 Z=X*X FX4 X0*X3 C5*Z SA2 A3+B1 =C6 FX6 X0*X0 Z**2 SA3 A2+B1 =C4 FX5 X2*X6 C6*Z**2 FX7 X4+X3 C5*Z+C4 SA2 A3+B1 =C3 FX7 X7+X5 A = C6*Z**2+C5*Z+C4 FX4 X2*X0 C3*Z SA3 A2+B1 =C2 FX2 X7*X6 A*Z**2 FX7 X4+X3 C3*Z+C2 FX7 X2+X7 B = A*Z**2+C3*Z+C2 SA4 A3+B1 =C1 SA5 A3+2 =C0 FX3 X7*X6 B*Z**2 FX2 X0*X4 C1*Z FX7 X3+X2 B*Z**2+C1*Z RX4 X7+X5 C0+B*Z**2+C1*Z SA3 A5+B1 =S5 FX7 X3*X0 S5*Z SA2 A3+B1 =S4 FX5 X2+X7 S5*Z+S4 SA3 A2+B1 =S3 FX7 X5*X6 (S5*Z+S4)*Z**2 SA2 A3+B1 =S2 FX3 X3*X0 S3*Z FX5 X7+X2 (S5*Z+S4)*Z**2+S2 SA2 A2+B1 =S1 FX5 X5+X3 C = (S5*Z+S4)*Z**2+S2+S3*Z FX0 X2*X0 S1*Z FX6 X5*X6 C*Z**2 SA3 A2+B1 =S0 FX2 X0+X6 S1*Z+C*Z**2 SB2 -B2 SET EXIT INDEX RX5 X2+X3 S1*Z+C*Z**2+S0 BX7 X4 RX6 X1*X5 JP SCSX+B2 RETURN SCSA DATA 17175057460333447104B 2/PI DATA 17206220773250420550B PI/2(U) DATA 16406043230461461213B PI/2(L) DATA 61053301014524016617B C5 DATA 16634334143344163607B C6 DATA 17006400637375136457B C4 DATA 60712237223723423125B C3 DATA 17135252525252523467B C2 DATA 60610000000000000004B C1 DATA 17177777777777777777B C0 DATA 61111270663112476351B S5 DATA 16755616534201617573B S4 DATA 60741377140534357734B S3 DATA 17114210421041004142B S2 DATA 60622525252525255342B S1 DATA 17177777777777777770B S0 SQR SPACE 4,10 ** SQR - COMPUTE SQUARE ROOT. FROM FORTRAN EXTENDED 2.0. * * ENTRY (X1) = NUMBER. * * EXIT (X6) = SQUARE ROOT OF NUMBER. * * USES ALL REGISTERS EXCEPT A0, A1, B1, B2, B7. SQR2 SX2 B1 RX7 X1/X6 INITIAL ITERATION LX2 48 RX4 X6+X7 IX3 X4-X2 DIVIDE BY 2 FX5 X1/X3 FX2 X3+X5 PX6 X2,B6 SQR SUBR ENTRY/EXIT SA2 SQRA UX6,B3 X1 UNPACK ARGUMENT LX0 X1,B1 SA3 A2+B1 (SQRB) LX1 11 SB4 -48 BX0 -X0-X1 CHECK EXPONENT SB5 B4 PL X0,SQR1 IF EVEN EXPONENT SB4 B4-1 SB3 B3+1 SQR1 ZR X6,SQRX RETURN IF ARGUMENT = 0 PX1 X6,B4 SA4 A3+B1 (SQRC) RX2 X1+X2 Y=X+SQRA NX7 X2 SA5 A4+B1 (SQRD) RX6 X7*X7 Y**2 RX2 X7+X3 Y+SQRB SX0 B3+B5 EXPONENT - 48 SA3 A5+B1 (SQRE) RX4 X4+X6 Y**2+SQRB NX7 X4 RX4 X6+X2 Y**2+Y+SQRC AX0 1 (EXPONENT-48)/2 RX2 X4*X7 (Y**2+SQRB)*(Y**2+Y+SQRC) SB6 X0 RX0 X2+X5 (X2)+SQRD NX4 X0 RX6 X3*X4 (X6) = INITIAL APPROXIMATION EQ SQR2 SQRA DATA 60573560267502145144B SQRB DATA 17214445021665557370B SQRC DATA 60572336002142565360B SQRD DATA 60671653636314430510B SQRE DATA 60612641712452322167B VLN SPACE 4,10 ** VLN - DRAW VERTICAL LINE. * * ENTRY (B2) = INITIAL Y COORDINATE. * (B3) = FINAL Y COORDINATE. * (B4) = Y INCREMENT. * (X1) = X COORDINATE. * (X7) = COORDINATE BUFFER. * (A7) = ADDRESS OF DISPLAY BUFFER. * * EXIT (X7) = COORDINATE BUFFER. * (A7) = BUFFER ADDRESS ADVANCED. * * USES B2, X1, X2, X7, A7. VLN1 LX7 12 SET Y COORDINATE BX7 X7+X1 NG X7,VLN3 IF BUFFER FULL VLN2 SX1 B2+X2 FORM Y COORDINATE SB2 B2+B4 LE B2,B3,VLN1 LOOP VLN SUBR ENTRY/EXIT SX1 X1+6000B SET X COORDINATE SX2 7000B EQ VLN1 VLN3 SA7 A7+B1 WRITE BUFFER BX7 X7-X7 EQ VLN2 LWEC EQU * LAST WORD OF EXECUTABLE CODE (FOR *SMP*) SEG LUNAR TITLE TABLE OF STARS. USE STARS TSTB SPACE 4,10 ** TSTB - TABLE OF STARS. * FORMAT - VFD 6/M,18/X,18/Y,18/Z. * *M* = MAGNITUDE - 0-77B. * *X* = X DIRECTION COSINE. * *Y* = Y DIRECTION COSINE. * *Z* = Z DIRECTION COSINE. TSTB BSS 0 LIST -L DATA 01005006377743776063B -20.75 88.80 1 DATA 00000251377431017133B -271.25 86.60 0 DATA 00022511377217773340B -13.75 85.70 0 DATA 00032426376401007571B -343.75 83.80 0 DATA 00037267375674012140B -342.00 82.60 0 DATA 00766330375503041313B -254.00 82.20 0 DATA 00743562375303750713B -140.75 81.80 0 DATA 00743177372377054213B -237.00 78.10 0 DATA 00036324371653056653B -303.00 77.40 0 DATA 01070637371423006161B -353.75 77.10 1 DATA 00764663371423707744B -101.25 77.10 0 DATA 00716705370401045005B -217.00 76.10 0 DATA 00101144367026017750B -346.25 74.80 0 DATA 03716050366635056112B -222.75 74.60 3 DATA 00061532366052715706B -45.25 74.00 0 DATA 00030311365045105665B -289.25 73.20 0 DATA 00007501364326113575B -275.75 72.70 0 DATA 00772424363575116042B -266.00 72.20 0 DATA 01715752363575074126B -230.25 72.20 1 DATA 00105565363251731575B -28.75 71.90 0 DATA 00106462363142045423B -332.00 71.80 0 DATA 00007673362370121545B -275.50 71.30 0 DATA 00023752362257120031B -284.00 71.20 0 DATA 00057634362033673564B -55.00 71.00 0 DATA 00104755361605060224B -325.00 70.80 0 DATA 00113360361125727014B -28.50 70.40 0 DATA 00652311361010012707B -187.25 70.30 0 DATA 00674355361010712216B -141.50 70.30 0 DATA 01104334360555065744B -321.75 70.10 1 DATA 00050056360437115655B -297.25 70.00 0 DATA 00651030360320762473B -171.25 69.90 0 DATA 00043307357623122276B -293.25 69.50 0 DATA 00774657357362645441B -92.00 69.30 0 DATA 00734116356776124345B -247.00 69.00 0 DATA 00767101356531134114B -264.50 68.80 0 DATA 00675771355267672337B -133.50 68.00 0 DATA 00061406354536124034B -300.50 67.60 0 DATA 00133641354536737021B -19.75 67.60 0 DATA 01036534354406135024B -288.25 67.50 1 DATA 00672100354406673253B -135.50 67.50 0 DATA 00122013353362706020B -35.25 66.90 0 DATA 00665766352321107365B -224.00 66.30 0 DATA 00041504352165636244B -71.00 66.20 0 DATA 00642452352031722741B -154.25 66.10 0 DATA 01750311351401146200B -257.00 65.80 1 DATA 00143716351243041332B -341.50 65.70 0 DATA 00044236350746143604B -290.00 65.50 0 DATA 00014011350746151365B -276.50 65.50 0 DATA 00742041350447146546B -253.75 65.30 0 DATA 00107731350447660641B -47.75 65.30 0 DATA 00640423350310061125B -207.25 65.20 0 DATA 00075456350310650024B -55.00 65.20 0 DATA 00642052347505067244B -210.50 64.80 0 DATA 00675012347343651375B -127.75 64.70 0 DATA 00141052346222067371B -330.25 64.10 0 DATA 00657247345712661322B -135.75 63.90 0 DATA 00647165345064670072B -141.00 63.50 0 DATA 01147044344401714030B -26.75 63.20 1 DATA 00103716344062641532B -54.25 63.00 0 DATA 00077233343541635453B -57.25 62.80 0 DATA 00106715343217136055B -307.00 62.60 0 DATA 00165620342674762036B -6.75 62.40 0 DATA 03615250342522740145B -164.50 62.30 3 DATA 01132067342347116251B -319.00 62.20 1 DATA 01716116341315156520B -245.75 61.70 1 DATA 00142142341141107776B -323.75 61.60 0 DATA 00117774340606134653B -310.75 61.40 0 DATA 01667733337716632753B -125.50 61.00 1 DATA 00147435337177106404B -325.75 60.70 0 DATA 00173023337017746320B -11.75 60.60 0 DATA 00043374336275606165B -73.75 60.30 0 DATA 03174055336113743727B -12.75 60.20 3 DATA 01171437335016724265B -19.75 59.70 1 DATA 00122653334633634315B -50.25 59.60 0 DATA 00624221334447667260B -146.00 59.50 0 DATA 00753072334447577604B -99.25 59.50 0 DATA 00034223334076177463B -282.50 59.30 0 DATA 01655234334076145154B -230.75 59.30 1 DATA 00771531333336574232B -92.75 59.00 0 DATA 00200012333150041067B -345.50 58.90 0 DATA 00712574333150606756B -113.75 58.90 0 DATA 00675542332762162662B -240.00 58.80 0 DATA 00014576332573204304B -275.50 58.70 0 DATA 00173416332573716557B -21.75 58.70 0 DATA 00202055332404742440B -12.75 58.60 0 DATA 03205267332404775530B -1.00 58.60 3 DATA 00743475332215575222B -102.25 58.50 0 DATA 00125051332215630623B -50.50 58.50 0 DATA 00203054332025743423B -12.25 58.40 0 DATA 00156142331635115120B -325.00 58.30 0 DATA 00206051331063024506B -351.25 58.00 0 DATA 00174410330671066623B -336.25 57.90 0 DATA 00170400330306100576B -331.75 57.70 0 DATA 01566752330113005767B -182.50 57.60 1 DATA 00207677327332746150B -10.75 57.30 0 DATA 00132413327136151035B -310.75 57.20 0 DATA 00022632326546212116B -277.75 57.00 0 DATA 00722020326546203503B -250.75 57.00 0 DATA 00213510326351006552B -357.25 56.90 0 DATA 00773075326351213557B -268.00 56.90 0 DATA 00570263326351041644B -194.00 56.90 0 DATA 03571472326351731356B -164.00 56.90 3 DATA 00175472325363100544B -332.75 56.50 0 DATA 03566033325363036451B -192.50 56.50 3 DATA 00576726325363706417B -156.00 56.50 0 DATA 00114656324765167354B -302.75 56.30 0 DATA 03215371324167752162B -8.75 56.00 3 DATA 00010635323366560003B -86.50 55.70 0 DATA 00567754322763062137B -200.25 55.50 0 DATA 00155661322763641263B -40.75 55.50 0 DATA 03567314322562061560B -200.00 55.40 3 DATA 00222032322155003646B -358.50 55.20 0 DATA 00754734322155220664B -262.50 55.20 0 DATA 00572624322155074003B -204.25 55.20 0 DATA 00135124321752616766B -50.50 55.10 0 DATA 00663646321547175420B -238.75 55.00 0 DATA 00216276320530726401B -16.25 54.60 0 DATA 00622443320116632657B -137.25 54.40 0 DATA 00005672317711552565B -87.75 54.30 0 DATA 01552330317503770641B -177.25 54.20 1 DATA 00203466317067667031B -29.00 54.00 0 DATA 00056240316033557242B -72.25 53.60 0 DATA 00227460315202753274B -7.75 53.30 0 DATA 00061225314771221154B -288.75 53.20 0 DATA 01155503314560624207B -44.50 53.10 1 DATA 00605143313062640033B -142.00 52.50 0 DATA 01752205312646232532B -262.00 52.40 1 DATA 00600431312433132721B -215.50 52.30 0 DATA 00164627312433627602B -41.75 52.30 0 DATA 00112210312217212156B -298.25 52.20 0 DATA 00573526312217124233B -212.50 52.20 0 DATA 00543220312002015013B -184.75 52.10 0 DATA 01604733312002636065B -141.50 52.10 1 DATA 00617453311566621417B -135.50 52.00 0 DATA 00573465311133126632B -213.25 51.80 0 DATA 00660176311133567174B -120.25 51.80 0 DATA 00217630310716103033B -335.00 51.70 0 DATA 00073033310262224011B -291.75 51.50 0 DATA 03773650310262237236B -268.50 51.50 3 DATA 00051725310262546176B -74.75 51.50 0 DATA 00225506306746073545B -338.25 51.00 0 DATA 00204324306064135451B -324.75 50.70 0 DATA 00043671305643236367B -282.75 50.60 0 DATA 00225321304534674544B -24.25 50.20 0 DATA 00122563304311562114B -59.75 50.10 0 DATA 00101473304066226717B -293.50 50.00 0 DATA 00113260304066555553B -62.75 50.00 0 DATA 00242416304066746204B -9.00 50.00 0 DATA 00227643303420101163B -336.75 49.80 0 DATA 03553370303420110336B -206.00 49.80 3 DATA 00207610303420641641B -34.75 49.80 0 DATA 00715325302750541765B -107.75 49.60 0 DATA 00240457302523053017B -345.00 49.50 0 DATA 00546313302523077477B -202.50 49.50 0 DATA 03154415302523602030B -49.25 49.50 3 DATA 00707550302277543147B -109.75 49.40 0 DATA 00152315301624576732B -50.50 49.20 0 DATA 00165175301624610541B -45.50 49.20 0 DATA 00230156301151106765B -335.00 49.00 0 DATA 00243763300723045666B -347.00 48.90 0 DATA 00213304300474136716B -325.75 48.80 0 DATA 00202451300474625236B -39.25 48.80 0 DATA 00154024300245576061B -50.25 48.70 0 DATA 00145226300016207514B -306.75 48.60 0 DATA 00246047277567042426B -348.25 48.50 0 DATA 01614053277337603544B -133.00 48.40 1 DATA 00526222277107761713B -175.25 48.30 0 DATA 00120206276426551027B -62.00 48.10 0 DATA 00235277276426675145B -23.00 48.10 0 DATA 00151046275744570226B -52.25 47.90 0 DATA 00251632275260742645B -9.75 47.70 0 DATA 00154504275026571662B -51.00 47.60 0 DATA 00607241274574604072B -134.25 47.50 0 DATA 01145520274574564050B -54.00 47.50 1 DATA 00136300274341221246B -303.00 47.40 0 DATA 00125770274341551435B -60.25 47.40 0 DATA 00237151273653106032B -336.25 47.20 0 DATA 00174456273653171276B -315.75 47.20 0 DATA 00171033273417175265B -314.00 47.10 0 DATA 00250611272236717466B -16.00 46.70 0 DATA 00136535271544224476B -302.50 46.50 0 DATA 00663342271544236560B -244.25 46.50 0 DATA 00554502271544140475B -213.25 46.50 0 DATA 00136666271306224711B -302.50 46.40 0 DATA 00647442271050231127B -240.00 46.30 0 DATA 00116725271050541556B -63.50 46.30 0 DATA 00756156270354260474B -264.25 46.10 0 DATA 00707531270354250254B -251.50 46.10 0 DATA 00240130270115115204B -334.25 46.00 0 DATA 00260726267656024741B -353.25 45.90 0 DATA 00005341267656515733B -88.25 45.90 0 DATA 17047242267656522172B -77.25 45.90 15 DATA 00166362267157205721B -311.50 45.70 0 DATA 00651732265514236415B -241.50 45.20 0 DATA 00730752265514517707B -102.50 45.20 0 DATA 00217271265253156002B -322.50 45.10 0 DATA 01520267265011724152B -166.00 45.00 1 DATA 00253120265011705041B -19.00 45.00 0 DATA 07163257264547213730B -309.50 44.90 7 DATA 01116042264547243527B -295.50 44.90 1 DATA 03006250264547512615B -88.00 44.90 3 DATA 00251663264547700375B -20.50 44.90 0 DATA 00177322263335575152B -45.75 44.50 0 DATA 00174322261652207612B -312.50 44.00 0 DATA 00267530261140024073B -353.75 43.80 0 DATA 00051440261140264021B -283.00 43.80 0 DATA 00254622260673102247B -339.00 43.70 0 DATA 00517765260673706635B -162.00 43.70 0 DATA 00063624260673516240B -73.75 43.70 0 DATA 00203701260160202567B -315.25 43.50 0 DATA 00630122260160546032B -124.00 43.50 0 DATA 00532507257711652653B -152.75 43.40 0 DATA 00173344256456563170B -48.75 43.00 0 DATA 00272653255467026071B -353.25 42.70 0 DATA 00632161255467236166B -237.25 42.70 0 DATA 00254637255217113107B -336.50 42.60 0 DATA 00670513255217256321B -247.75 42.60 0 DATA 00155750254225545663B -54.50 42.30 0 DATA 00575351253753566337B -133.50 42.20 0 DATA 01525004253230654464B -154.00 42.00 1 DATA 00502765252756030027B -187.25 41.90 0 DATA 00267532252503063632B -344.25 41.80 0 DATA 03246063252503642014B -29.50 41.80 3 DATA 00510625250223074323B -198.25 41.10 0 DATA 01062573250223505702B -74.75 41.10 1 DATA 00111646250223515613B -67.50 41.10 0 DATA 00516156247472663474B -156.75 40.90 0 DATA 00262343247472665130B -22.75 40.90 0 DATA 00204620247215215115B -313.25 40.80 0 DATA 00565616247215207650B -224.50 40.80 0 DATA 01210171246462565271B -45.50 40.60 1 DATA 00277054246204732666B -11.00 40.50 0 DATA 00133627245171523266B -62.00 40.20 0 DATA 00545125244712610073B -142.25 40.10 0 DATA 00263170244712661104B -23.75 40.10 0 DATA 00050613244433500133B -78.00 40.00 0 DATA 03157743244154241273B -304.75 39.90 3 DATA 00230662243674604163B -39.00 39.80 0 DATA 01151065243414531327B -57.75 39.70 1 DATA 00220704242112570711B -43.00 39.30 0 DATA 00257760241631133465B -332.50 39.20 0 DATA 00211137241631560542B -46.25 39.20 0 DATA 00673171241347272306B -249.75 39.10 0 DATA 00014774241347471603B -86.25 39.10 0 DATA 00017454241347471743B -85.50 39.10 0 DATA 00224332241066204364B -318.25 39.00 0 DATA 00073646241066275573B -287.50 39.00 0 DATA 01475321240322054020B -192.75 38.80 1 DATA 00562731240322562731B -135.00 38.80 0 DATA 17035417240037305460B -278.50 38.70 15 DATA 01540341240037170171B -217.00 38.70 1 DATA 00474160240037730126B -168.50 38.70 0 DATA 00272563237272110472B -338.75 38.50 0 DATA 00055767237007474556B -76.75 38.40 0 DATA 00216366237007562603B -44.75 38.40 0 DATA 00136345236240261502B -298.00 38.20 0 DATA 00240267235754171741B -322.75 38.10 0 DATA 00311133235754765351B -3.00 38.10 0 DATA 00077205235203277660B -288.25 37.90 0 DATA 00230351235203573361B -41.00 37.90 0 DATA 00305014235203723325B -12.75 37.90 0 DATA 00157627234432250720B -303.50 37.70 0 DATA 00576365234432233566B -230.25 37.70 0 DATA 00504672234432115407B -202.50 37.70 0 DATA 00073161234432476230B -73.00 37.70 0 DATA 00226105234144210277B -317.75 37.60 0 DATA 00044107233657307666B -280.25 37.50 0 DATA 00727350233371307223B -258.50 37.40 0 DATA 00257165233371630620B -30.50 37.40 0 DATA 00771617233104313427B -268.25 37.30 0 DATA 00016151233104464665B -86.00 37.30 0 DATA 00265537232616134445B -333.00 37.20 0 DATA 00734456232616310640B -260.00 37.20 0 DATA 00506345232616653340B -155.50 37.20 0 DATA 00547675232616570160B -138.25 37.20 0 DATA 01006164232616464135B -88.25 37.20 1 DATA 01725337231552310175B -258.00 36.90 1 DATA 00055172231263307735B -282.75 36.80 0 DATA 00536357231263601630B -142.00 36.80 0 DATA 00635214230773263747B -241.25 36.70 0 DATA 00157246230214255046B -302.75 36.50 0 DATA 00153414230214257354B -301.50 36.50 0 DATA 00316177227143764223B -3.25 36.20 0 DATA 00207547226653234067B -311.00 36.10 0 DATA 00016344226362316465B -274.00 36.00 0 DATA 00616343226362255147B -236.75 36.00 0 DATA 00523227226362162237B -213.50 36.00 0 DATA 00513036225305631501B -150.50 35.70 0 DATA 00155527224521516614B -58.25 35.50 0 DATA 03311252223147706211B -16.00 35.10 3 DATA 00177641222360246444B -307.50 34.90 0 DATA 00504405222360136401B -206.75 34.90 0 DATA 00143377222064271131B -298.25 34.80 0 DATA 01541747222064565312B -138.75 34.80 1 DATA 00655011222064476666B -113.25 34.80 0 DATA 00231072222064557755B -43.25 34.80 0 DATA 00467652221570676754B -162.00 34.70 0 DATA 00236334221274565037B -41.25 34.60 0 DATA 00236006220777213630B -318.50 34.50 0 DATA 01264657220777623255B -31.00 34.50 1 DATA 00500252220206646477B -155.00 34.30 0 DATA 00117242217711304241B -292.00 34.20 0 DATA 00725571217414460213B -101.50 34.10 0 DATA 00216260216322541721B -48.00 33.80 0 DATA 00560631216024235515B -227.75 33.70 0 DATA 01212365215526242107B -310.50 33.60 1 DATA 00457173215526724447B -168.25 33.60 0 DATA 00263576214730614303B -32.75 33.40 0 DATA 00054370214431456553B -78.00 33.30 0 DATA 00052551214132321722B -281.50 33.20 0 DATA 00725226214132321722B -258.50 33.20 0 DATA 00324101214132742137B -8.00 33.20 0 DATA 01100437213332463171B -72.50 33.00 1 DATA 00275244212232146625B -331.50 32.70 0 DATA 00140755212232300276B -296.75 32.70 0 DATA 01063242211430321561B -283.75 32.50 1 DATA 00467354211430657774B -158.25 32.50 0 DATA 00453534210023723654B -168.25 32.10 0 DATA 03656605210023466733B -112.00 32.10 3 DATA 00040033210023451411B -81.50 32.10 0 DATA 00663052207521464766B -110.75 32.00 0 DATA 00176044207521517202B -54.50 32.00 0 DATA 00174521207217262020B -305.00 31.90 0 DATA 01663633206715313626B -249.50 31.80 1 DATA 00572517206412254157B -232.25 31.70 0 DATA 01166602206107511104B -57.00 31.60 1 DATA 00703450204167322554B -254.00 31.10 0 DATA 00641502204167305663B -244.50 31.10 0 DATA 00520305203052204253B -217.00 30.80 0 DATA 00702154201426454011B -106.25 30.40 0 DATA 00217430201121250044B -310.50 30.30 0 DATA 01332463201121737250B -8.50 30.30 1 DATA 00773130200613335147B -268.75 30.20 0 DATA 00520357200613206541B -217.50 30.20 0 DATA 00616604200306276256B -239.25 30.10 0 DATA 00203060177777262624B -306.25 30.00 0 DATA 00131302177471313103B -293.75 29.90 0 DATA 01243101177163226626B -317.25 29.80 1 DATA 01320223176654115700B -339.50 29.70 1 DATA 00325331176345700617B -16.50 29.60 0 DATA 00767201176036441270B -92.25 29.50 0 DATA 00114217175527321451B -290.00 29.40 0 DATA 00563510175527255247B -231.00 29.40 0 DATA 00772117175220337130B -268.50 29.30 0 DATA 00557361174400525215B -130.25 29.10 0 DATA 00644101174400464032B -114.25 29.10 0 DATA 00307576174400633243B -26.75 29.10 0 DATA 00321620173250117365B -339.25 28.80 0 DATA 00440545173250025400B -185.50 28.80 0 DATA 00252453173250556234B -40.50 28.80 0 DATA 00336006173250737636B -8.25 28.80 0 DATA 00003726172737340407B -271.00 28.70 0 DATA 00224624172737527645B -48.50 28.70 0 DATA 03047042172116442341B -80.00 28.50 3 DATA 03340752172116775034B -.75 28.50 3 DATA 00450272171605100714B -196.75 28.40 0 DATA 00270507171273201222B -325.00 28.30 0 DATA 07641504171273463232B -114.75 28.30 7 DATA 00446456170762074225B -195.50 28.20 0 DATA 00662542170136453461B -110.00 28.00 0 DATA 00313756167312142303B -334.25 27.80 0 DATA 01757157167312341650B -265.75 27.80 1 DATA 01123773166777322414B -291.75 27.70 1 DATA 00014671166465435376B -86.75 27.60 0 DATA 01333050166152073564B -344.75 27.50 1 DATA 00173530166152276341B -303.00 27.50 0 DATA 00156750166152306076B -299.25 27.50 0 DATA 01522540166152222557B -220.25 27.50 1 DATA 00537111165324240666B -225.00 27.30 0 DATA 00257421165324557232B -39.50 27.30 0 DATA 00610137165010301474B -238.25 27.20 0 DATA 00650623164475455347B -112.50 27.10 0 DATA 03565111164161264754B -232.50 27.00 3 DATA 00631252164161464240B -116.75 27.00 0 DATA 00520362163645221767B -219.75 26.90 0 DATA 00254347163331552055B -41.00 26.80 0 DATA 00231020163015251753B -312.00 26.70 0 DATA 00330704163015667334B -18.50 26.70 0 DATA 00573707162500272735B -234.75 26.60 0 DATA 00521226162500554063B -139.75 26.60 0 DATA 00051600162164341210B -280.50 26.50 0 DATA 00500316162164602304B -146.75 26.50 0 DATA 00600466161647276520B -236.25 26.40 0 DATA 00433250161647020774B -184.25 26.40 0 DATA 00737024161015343244B -261.75 26.20 0 DATA 00115536160477330276B -289.75 26.10 0 DATA 00010022157644431664B -88.00 25.90 0 DATA 00473115156472170501B -211.50 25.60 0 DATA 00533035155635242055B -224.50 25.40 0 DATA 00175151155316302517B -302.75 25.30 0 DATA 00443210155316672316B -162.50 25.30 0 DATA 01731611154777433425B -99.50 25.20 1 DATA 00340635153622072107B -345.50 24.90 0 DATA 01716566153622342725B -257.75 24.90 1 DATA 00312206153302162336B -330.50 24.80 0 DATA 00350517152442007067B -358.25 24.60 0 DATA 00637362152442454143B -114.50 24.60 0 DATA 00124334152122331070B -291.25 24.50 0 DATA 01500563150741572042B -145.00 24.20 1 DATA 00335221150420113073B -341.25 24.10 0 DATA 00206675150420501123B -54.75 24.10 0 DATA 00206110150077500332B -55.00 24.00 0 DATA 00337514150077673477B -17.00 24.00 0 DATA 00457732147556624653B -152.75 23.90 0 DATA 00153176147235320167B -297.25 23.80 0 DATA 01204526147235476756B -55.50 23.80 1 DATA 00207136147235500557B -54.75 23.80 0 DATA 00203732146714476172B -55.75 23.70 0 DATA 00432761146372715163B -167.50 23.60 0 DATA 00206433146372477654B -55.00 23.60 0 DATA 00510102145526555574B -141.50 23.40 0 DATA 00002032145204424705B -89.50 23.30 0 DATA 00346763144662054713B -349.00 23.20 0 DATA 00267402144662223216B -321.25 23.20 0 DATA 00610371144340312710B -239.50 23.10 0 DATA 00317722144340621347B -28.00 23.10 0 DATA 00336103144015116522B -340.50 23.00 0 DATA 03313025144015610314B -30.50 23.00 3 DATA 00345617143473712747B -13.00 22.90 0 DATA 00350322143150050765B -350.00 22.80 0 DATA 00124445143150443533B -69.00 22.80 0 DATA 01756370142302424235B -94.25 22.60 1 DATA 00143703142302451632B -65.00 22.60 0 DATA 00064145141757346534B -282.75 22.50 0 DATA 00766555141757423526B -92.25 22.50 0 DATA 00152467141110323402B -296.75 22.30 0 DATA 00664625140564437163B -108.50 22.20 0 DATA 00145133140240451361B -64.75 22.10 0 DATA 00020443137370354745B -274.00 21.90 0 DATA 00551470137043507735B -129.25 21.80 0 DATA 00047166137043425442B -80.50 21.80 0 DATA 00167574137043462530B -59.75 21.80 0 DATA 00023544136517355025B -274.75 21.70 0 DATA 01641117136517332102B -246.50 21.70 1 DATA 00100545135321432462B -74.25 21.40 0 DATA 00575163134774307356B -236.75 21.30 0 DATA 00111602134446342774B -288.00 21.20 0 DATA 01427033134121713224B -167.25 21.10 1 DATA 01035066134121422743B -83.00 21.10 1 DATA 00224764132720273224B -308.50 20.80 0 DATA 00004132132720357216B -271.00 20.80 0 DATA 00421257132720756207B -175.75 20.80 0 DATA 00431410132372676776B -164.25 20.70 0 DATA 00704024132372430116B -104.50 20.70 0 DATA 00242434132372520114B -47.25 20.70 0 DATA 00345723131516673713B -16.50 20.50 0 DATA 00052544131170354072B -280.25 20.40 0 DATA 01451100130641624674B -153.50 20.30 1 DATA 00747743130641421067B -95.75 20.30 0 DATA 00155736130641452430B -62.75 20.30 0 DATA 01325347130641622041B -27.25 20.30 1 DATA 00014445130312420046B -87.00 20.20 0 DATA 00002062127764417463B -89.50 20.10 0 DATA 00450555127435624522B -153.50 20.00 0 DATA 17465227126227202304B -212.75 19.70 15 DATA 00360766125700766420B -2.25 19.60 0 DATA 00134262125350336744B -292.50 19.50 0 DATA 00513755125350240540B -221.75 19.50 0 DATA 00266731125021235474B -319.25 19.40 0 DATA 00630027125021331742B -244.50 19.40 0 DATA 00246241124471520572B -46.50 19.30 0 DATA 00163267124141324355B -298.50 19.20 0 DATA 00143324123260443234B -65.75 19.00 0 DATA 01451125122730157653B -207.50 18.90 1 DATA 00327733122400621765B -27.00 18.80 0 DATA 00544606121165505261B -129.75 18.50 0 DATA 00043704121165417712B -81.50 18.50 0 DATA 00570124120634311304B -236.00 18.40 0 DATA 00151457120303332725B -295.75 18.30 0 DATA 00415424120303020750B -184.00 18.30 0 DATA 00055306117420357037B -280.75 18.10 0 DATA 00444452116535151653B -205.75 17.90 0 DATA 00423076116535070675B -193.50 17.90 0 DATA 00143107116204336530B -294.00 17.80 0 DATA 00147043115652442757B -65.00 17.70 0 DATA 00505433114433235655B -220.25 17.40 0 DATA 00152137114101443664B -64.25 17.30 0 DATA 00144342113547336761B -294.25 17.20 0 DATA 00453116113547607447B -150.50 17.20 0 DATA 00151220113547443213B -64.50 17.20 0 DATA 00310513112326214375B -325.00 16.90 0 DATA 00501425111773232165B -219.00 16.80 0 DATA 00464165111773210117B -213.75 16.80 0 DATA 00773560111440365124B -269.00 16.70 0 DATA 00664164111440426630B -108.00 16.70 0 DATA 03735655110552414734B -98.00 16.50 3 DATA 00443502107663154531B -206.25 16.30 0 DATA 07136016107663434774B -67.50 16.30 7 DATA 00771437106774412077B -91.50 16.10 0 DATA 00575461106440320541B -238.00 16.00 0 DATA 01417770106440711541B -167.25 16.00 1 DATA 00143067106440436603B -66.25 16.00 0 DATA 00237764105550273236B -310.50 15.80 0 DATA 00564321105214313065B -235.50 15.70 0 DATA 00132245105214432546B -68.50 15.70 0 DATA 00145161105214437230B -65.75 15.70 0 DATA 00232252104657300227B -308.75 15.60 0 DATA 00145212104657437137B -65.75 15.60 0 DATA 00073533104323420506B -76.00 15.50 0 DATA 00147250103766437671B -65.25 15.40 0 DATA 00156100103766443076B -63.50 15.40 0 DATA 00100746103432421611B -74.75 15.30 0 DATA 03411341102540756604B -176.00 15.10 3 DATA 00204730101646320514B -302.50 14.90 0 DATA 00072632101646360232B -283.75 14.90 0 DATA 00775656101311410401B -90.50 14.80 0 DATA 00346221101311645223B -21.50 14.80 0 DATA 01357135100754100055B -345.00 14.70 1 DATA 00236255100754276303B -309.75 14.70 0 DATA 00140630100417433753B -67.00 14.60 0 DATA 01367452100417767265B -2.00 14.60 1 DATA 01712266100061361761B -257.50 14.50 1 DATA 00147606100061436727B -65.25 14.50 0 DATA 00227676077166304112B -307.75 14.30 0 DATA 00630111077166341220B -245.25 14.30 0 DATA 00231512076630302713B -308.25 14.20 0 DATA 00771401076630407720B -91.50 14.20 0 DATA 00477026076273234201B -219.00 14.10 0 DATA 01101327074502357752B -285.25 13.70 1 DATA 00713107072711414423B -102.25 13.30 0 DATA 00726703072711412220B -99.50 13.30 0 DATA 00111701072711422044B -72.75 13.30 0 DATA 01724536071454412263B -100.00 13.00 1 DATA 00700357071115361241B -255.25 12.90 0 DATA 03737307067660367545B -262.50 12.60 3 DATA 00021332067660406614B -86.00 12.60 0 DATA 00234301067660475120B -51.25 12.60 0 DATA 07445663066761605651B -150.75 12.40 7 DATA 00134536066422427535B -68.25 12.30 0 DATA 00367106066062047111B -351.00 12.20 0 DATA 00524433066062511577B -133.25 12.20 0 DATA 00646250066062426315B -111.00 12.20 0 DATA 00201635066062452053B -58.75 12.20 0 DATA 00354232063723123533B -340.50 11.70 0 DATA 00341623063723154720B -334.25 11.70 0 DATA 00636032063723346601B -247.00 11.70 0 DATA 01414667063023075600B -194.25 11.50 1 DATA 00410630061222723230B -169.75 11.10 0 DATA 00227167060661310543B -307.00 11.00 0 DATA 00546757060321307336B -232.50 10.90 0 DATA 00407633057760050327B -189.25 10.80 0 DATA 00444303056515605003B -150.75 10.50 0 DATA 01153320056155343571B -295.25 10.40 1 DATA 00353112055613132207B -339.00 10.30 0 DATA 00663154055613357704B -252.25 10.30 0 DATA 00464165055613553747B -144.00 10.30 0 DATA 00731513054350406645B -98.75 10.00 0 DATA 00114670054350417710B -72.25 10.00 0 DATA 00040725054007405760B -82.50 9.90 0 DATA 00140404054007427004B -67.50 9.90 0 DATA 00427624053445635335B -157.00 9.80 0 DATA 00266220053104256376B -316.25 9.70 0 DATA 00301233053104535631B -40.00 9.70 0 DATA 00003233052542403466B -89.25 9.60 0 DATA 00003234052201374357B -270.75 9.50 0 DATA 00667167052201361615B -253.25 9.50 0 DATA 00567321052201453513B -122.75 9.50 0 DATA 01316201051637221607B -324.75 9.40 1 DATA 00042035051637405575B -82.25 9.40 0 DATA 00240514051637475073B -50.50 9.40 0 DATA 00403272051275000000B -180.00 9.30 0 DATA 00037710050733405240B -82.75 9.20 0 DATA 00646342050372423474B -110.75 9.10 0 DATA 00364671047466077246B -345.50 8.90 0 DATA 00003237046562375020B -270.75 8.70 0 DATA 00121256046562420300B -71.25 8.70 0 DATA 00243402046562476670B -49.75 8.70 0 DATA 07160742046217342415B -296.50 8.60 7 DATA 00164701046217437364B -62.50 8.60 0 DATA 00345317046217625015B -25.00 8.60 0 DATA 00447427045655574516B -148.75 8.50 0 DATA 01647251045655422661B -110.50 8.50 1 DATA 00267517045655521557B -43.50 8.50 0 DATA 00326612045313571627B -32.00 8.40 0 DATA 00361460044751114131B -342.50 8.30 0 DATA 00164010044406341205B -297.25 8.20 0 DATA 00315573043501553706B -35.75 8.00 0 DATA 00413043043137676276B -165.00 7.90 0 DATA 00560235042231321045B -235.50 7.70 0 DATA 00742122040761403710B -96.75 7.40 0 DATA 07013045040761402277B -87.50 7.40 7 DATA 00365654040416700330B -14.50 7.30 0 DATA 00140126040053353043B -292.25 7.20 0 DATA 00402035040053773442B -179.00 7.20 0 DATA 00402653037510752755B -175.25 7.10 0 DATA 00371330037145717410B -11.00 7.00 0 DATA 00533602036237475771B -130.25 6.80 0 DATA 01122604036237417514B -71.00 6.80 1 DATA 01555205035674317503B -234.75 6.70 1 DATA 00406274035331717364B -169.00 6.60 0 DATA 00376273034057006522B -358.50 6.30 0 DATA 01524057034057504313B -132.50 6.30 1 DATA 03054136034057405322B -80.00 6.30 3 DATA 00531675033513477145B -130.75 6.20 0 DATA 00165423033150341624B -297.50 6.10 0 DATA 00543202032604467277B -128.00 6.00 0 DATA 00046571032241404243B -81.25 5.90 0 DATA 00373301031675050740B -350.75 5.80 0 DATA 00337252031332172414B -331.25 5.70 0 DATA 00201223031332444406B -59.50 5.70 0 DATA 17632307030422426240B -113.50 5.50 15 DATA 00120675030056416234B -71.50 5.40 0 DATA 00375361026603033604B -353.75 5.10 0 DATA 00463541026603547336B -143.25 5.10 0 DATA 00350764026237630213B -24.00 5.00 0 DATA 00274651025327253413B -317.75 4.80 0 DATA 00563146025327324563B -236.50 4.80 0 DATA 00335426024417176476B -330.25 4.60 0 DATA 01750515024417376065B -264.75 4.60 1 DATA 00753765024417401470B -94.50 4.60 0 DATA 00772335023507377136B -268.75 4.40 0 DATA 00350621022577150671B -335.75 4.20 0 DATA 00725670022577373637B -260.50 4.20 0 DATA 00423545022577140530B -202.25 4.20 0 DATA 00070265022233371030B -282.75 4.10 0 DATA 00034717022233402227B -83.50 4.10 0 DATA 00406707021322070274B -192.75 3.90 0 DATA 00535401020412472700B -129.50 3.70 0 DATA 00540757020412470043B -128.50 3.70 0 DATA 01266773020412515571B -44.25 3.70 1 DATA 00056443017135404565B -79.50 3.40 0 DATA 00366446016571103162B -344.75 3.30 0 DATA 00021647016571376747B -274.00 3.30 0 DATA 00052143015313403666B -80.50 3.00 0 DATA 00251313015313500417B -48.50 3.00 0 DATA 01127343014747360201B -290.00 2.90 1 DATA 00773423014747377504B -269.00 2.90 0 DATA 00446455014747206423B -211.75 2.90 0 DATA 00305231014402535267B -39.50 2.80 0 DATA 00372101014036065125B -348.00 2.70 0 DATA 00755031014036377006B -265.75 2.70 0 DATA 00504161014036522326B -137.25 2.70 0 DATA 00071414014036406655B -77.00 2.70 0 DATA 00343660014036613720B -27.00 2.70 0 DATA 00603025013471440675B -119.25 2.60 0 DATA 00777777013125377603B -270.00 2.50 0 DATA 00511451013125263206B -224.50 2.50 0 DATA 00720227013125404566B -100.75 2.50 0 DATA 00474612012214245214B -220.25 2.30 0 DATA 00400602012214757212B -176.25 2.30 0 DATA 00115766012214414304B -72.25 2.30 0 DATA 00337133012214603007B -29.25 2.30 0 DATA 00631775011647352460B -246.50 2.20 0 DATA 00440615010736175005B -209.25 2.00 0 DATA 00054336007460404000B -80.00 1.70 0 DATA 00111577007113412752B -73.25 1.60 0 DATA 00774514005635377723B -269.25 1.30 0 DATA 00620637005635346411B -244.25 1.30 0 DATA 00376517005270031510B -354.25 1.20 0 DATA 00347770004012154132B -335.00 .90 0 DATA 00374360003101052177B -350.50 .70 0 DATA 00163156003101344453B -296.75 .70 0 DATA 00130466000344360132B -290.25 .10 0 DATA 00440510000344602723B -150.75 .10 0 DATA 00232040000344463431B -53.00 .10 0 DATA 01423371777433141757B -202.50 -.10 1 DATA 00400430777433020574B -183.75 -.10 0 DATA 00425534777433630713B -156.25 -.10 0 DATA 00310261777433540505B -38.50 -.10 0 DATA 00711535776521372125B -257.75 -.30 0 DATA 00401722776521740632B -173.00 -.30 0 DATA 00666162776521412672B -106.75 -.30 0 DATA 00145033776521424625B -66.75 -.30 0 DATA 03044567776154402517B -81.75 -.40 3 DATA 00351667775610150075B -336.00 -.50 0 DATA 00057577775610404401B -79.25 -.50 0 DATA 00354400775243141754B -337.50 -.60 0 DATA 00461441774676550505B -143.75 -.70 0 DATA 00466762774676541414B -141.75 -.70 0 DATA 01336171774331177011B -330.25 -.80 1 DATA 00403270773765051112B -189.25 -.90 0 DATA 01205570773053332170B -301.50 -1.10 1 DATA 00603722773053440106B -119.00 -1.10 0 DATA 03040230772142402071B -82.75 -1.30 3 DATA 00236341771575310766B -308.25 -1.40 0 DATA 00143774771230353443B -293.00 -1.50 0 DATA 00372227770317712630B -12.00 -1.70 0 DATA 00460255767752225374B -215.75 -1.80 0 DATA 00345755767406160122B -334.00 -1.90 0 DATA 00411576767406672431B -164.25 -1.90 0 DATA 03032574767041401435B -84.00 -2.00 3 DATA 00471153765563537014B -141.00 -2.30 0 DATA 01055405764652404246B -79.75 -2.50 1 DATA 00334263764306201627B -329.50 -2.60 0 DATA 00034746764306401720B -83.50 -2.60 0 DATA 00574227763741444636B -121.00 -2.70 0 DATA 01021653763030377031B -274.00 -2.90 1 DATA 00561034762117323730B -236.00 -3.10 0 DATA 00405753762117712664B -168.00 -3.10 0 DATA 00005447762117400336B -88.75 -3.10 0 DATA 00212214761553451017B -57.25 -3.20 0 DATA 01611006760642342120B -242.25 -3.40 1 DATA 00126265760642417367B -70.25 -3.40 0 DATA 00140601760276423401B -67.75 -3.50 0 DATA 00554425757731457264B -125.25 -3.60 0 DATA 00772332757365377317B -268.75 -3.70 0 DATA 00505151756455256137B -223.00 -3.90 0 DATA 00700042755544410623B -104.50 -4.10 0 DATA 01615072754270343733B -243.25 -4.40 1 DATA 00746340753014402112B -95.75 -4.70 0 DATA 00056372752450372651B -280.50 -4.80 0 DATA 00041225752104403074B -82.50 -4.90 0 DATA 00103050751540366027B -285.25 -5.00 0 DATA 00724637751540373257B -260.25 -5.00 0 DATA 00413123751540107272B -196.25 -5.00 0 DATA 00473215750630242124B -219.50 -5.20 0 DATA 01076603750630410713B -75.75 -5.20 1 DATA 00245412747721301631B -310.50 -5.40 0 DATA 00236520747721470425B -51.50 -5.40 0 DATA 00451536747355211664B -212.75 -5.50 0 DATA 00116566747011415542B -72.00 -5.60 0 DATA 00423315746445136311B -201.75 -5.70 0 DATA 00075465745536367050B -284.00 -5.90 0 DATA 01307200745173236373B -321.50 -6.00 1 DATA 01040102745173403340B -82.75 -6.00 1 DATA 00041163744627403501B -82.50 -6.10 0 DATA 00764714744264401572B -92.50 -6.20 0 DATA 00376350743720000000B 0.00 -6.30 0 DATA 00376220742446003250B -359.25 -6.60 0 DATA 00370020742446070077B -347.25 -6.60 0 DATA 00535372741175474464B -129.75 -6.90 0 DATA 00063602741175407133B -78.25 -6.90 0 DATA 00745341740632403231B -96.00 -7.00 0 DATA 00170173740267440161B -61.75 -7.10 0 DATA 00034575737361403552B -83.50 -7.30 0 DATA 00104731737361413467B -74.25 -7.30 0 DATA 00404727737016045414B -188.50 -7.40 0 DATA 00044333737016404604B -81.75 -7.40 0 DATA 00164103735203436410B -62.75 -7.80 0 DATA 00055076734640406363B -79.75 -7.90 0 DATA 00741065734276373474B -263.00 -8.00 0 DATA 00360545733733117275B -341.75 -8.10 0 DATA 00626713733733346500B -245.50 -8.10 0 DATA 03473620733371537535B -140.75 -8.20 3 DATA 00341552733026163002B -333.00 -8.30 0 DATA 00312236733026230346B -323.00 -8.30 0 DATA 00041041733026373115B -277.50 -8.30 0 DATA 17066650733026410537B -77.50 -8.30 15 DATA 00356126731215652372B -19.75 -8.70 0 DATA 00075137730311412460B -76.00 -8.90 0 DATA 00023655727747374043B -274.50 -9.00 0 DATA 01526637727747273716B -228.00 -9.00 1 DATA 00410721727747065514B -192.25 -9.00 0 DATA 00050503727405371373B -279.25 -9.10 0 DATA 00501163727405532123B -139.00 -9.10 0 DATA 00405132727044741147B -173.00 -9.20 0 DATA 00251722727044504742B -47.75 -9.20 0 DATA 00631174726502431151B -114.00 -9.30 0 DATA 00270607726502523550B -43.00 -9.30 0 DATA 00250132726140274332B -311.75 -9.40 0 DATA 00374056726140760451B -3.50 -9.40 0 DATA 00366525725235065435B -347.75 -9.60 0 DATA 00367032724673063306B -348.25 -9.70 0 DATA 00545406724673307413B -232.25 -9.70 0 DATA 03022546724673404265B -85.75 -9.70 3 DATA 01771313724332374133B -268.50 -9.80 1 DATA 00610462724332336157B -241.75 -9.80 0 DATA 00452042724332205534B -212.00 -9.80 0 DATA 00233236724332471155B -52.00 -9.80 0 DATA 00243620723770277607B -310.50 -9.90 0 DATA 00222266723066462641B -54.50 -10.10 0 DATA 01641532721622351353B -248.00 -10.40 1 DATA 00656047720721355730B -251.00 -10.60 0 DATA 07423426720721126040B -200.00 -10.60 7 DATA 00003226720721404307B -89.25 -10.60 0 DATA 00361633720360672523B -16.00 -10.70 0 DATA 00340433720017616641B -26.75 -10.80 0 DATA 00601344716555331002B -239.75 -11.10 0 DATA 00367452716555725352B -9.75 -11.10 0 DATA 00345666716215145107B -336.25 -11.20 0 DATA 00341164716215620734B -26.25 -11.20 0 DATA 00503311714754532461B -138.75 -11.50 0 DATA 00264204713514256046B -316.00 -11.80 0 DATA 00443667713154610361B -151.50 -11.90 0 DATA 00711620713154413341B -102.50 -11.90 0 DATA 00070250712614414006B -77.00 -12.00 0 DATA 00216407711016462441B -55.25 -12.40 0 DATA 00447506710117603052B -150.00 -12.60 0 DATA 00574421710117453432B -121.75 -12.60 0 DATA 00717216707560364740B -258.75 -12.70 0 DATA 00105704707560420172B -73.75 -12.70 0 DATA 00313744707560557673B -35.25 -12.70 0 DATA 00207754707221321272B -303.00 -12.80 0 DATA 00207754707221321272B -303.00 -12.80 0 DATA 00745717707221370212B -264.00 -12.80 0 DATA 00457723706662211565B -213.50 -12.90 0 DATA 00212414705764317242B -303.75 -13.10 0 DATA 00067016705764414636B -77.25 -13.10 0 DATA 00536104705425502365B -130.50 -13.20 0 DATA 00060465705066413516B -78.75 -13.30 0 DATA 00764042703275407443B -92.75 -13.70 0 DATA 01202644702736454457B -58.25 -13.80 1 DATA 00466751702400555735B -144.00 -13.90 0 DATA 00575224702042323162B -238.25 -14.00 0 DATA 00732155702042412375B -98.75 -14.00 0 DATA 00352605701504120653B -341.00 -14.10 0 DATA 00414633701147716412B -168.50 -14.20 0 DATA 00010522701147407762B -88.00 -14.20 0 DATA 00327276700611173060B -330.25 -14.30 0 DATA 00276563700611541300B -39.75 -14.30 0 DATA 00551033700253304557B -232.50 -14.40 0 DATA 00460506700253570027B -146.75 -14.40 0 DATA 00132653677716431314B -68.50 -14.50 0 DATA 00030643677360366371B -275.75 -14.60 0 DATA 00775656676131410473B -90.50 -14.90 0 DATA 00023322676131411275B -85.50 -14.90 0 DATA 00366013675237027540B -354.50 -15.10 0 DATA 01211241675237315403B -303.75 -15.10 1 DATA 00741720674345365054B -263.00 -15.30 0 DATA 00430644674011126336B -200.50 -15.40 0 DATA 00701142673454421341B -104.75 -15.50 0 DATA 01705311673120357401B -256.25 -15.60 1 DATA 01506475673120242446B -221.25 -15.60 1 DATA 00413107673120034766B -186.75 -15.60 0 DATA 00543774673120501035B -129.25 -15.60 0 DATA 01426502672563660620B -161.25 -15.70 1 DATA 00305357672563554426B -36.75 -15.70 0 DATA 01413302671337032624B -186.25 -16.00 1 DATA 00120047671003350436B -289.00 -16.10 0 DATA 00352006670114112721B -342.25 -16.30 0 DATA 00440670670114631103B -155.25 -16.30 0 DATA 01067213670114420454B -77.00 -16.30 1 DATA 00635056667560340622B -246.25 -16.40 0 DATA 00572175667560315755B -237.00 -16.40 0 DATA 00336722667225631171B -24.75 -16.50 0 DATA 01312135666672212751B -325.50 -16.60 1 DATA 37724260666672416453B -100.25 -16.60 31 DATA 00710714665451421252B -103.00 -16.90 0 DATA 01413357665116013575B -182.75 -17.00 1 DATA 00305245664563220535B -323.75 -17.10 0 DATA 00417021664563725405B -170.00 -17.10 0 DATA 00271123663676237427B -319.25 -17.30 0 DATA 00254427662457254427B -315.00 -17.60 0 DATA 00430305662125114277B -198.25 -17.70 0 DATA 00415135661573752603B -175.00 -17.80 0 DATA 00425774661573673626B -163.75 -17.80 0 DATA 00363466661242001040B -359.75 -17.90 0 DATA 03754706661242415111B -94.50 -17.90 3 DATA 01041716661242416606B -82.00 -17.90 1 DATA 00117210660710346151B -289.00 -18.00 0 DATA 00216125660357305366B -305.75 -18.10 0 DATA 00612753660357452524B -118.75 -18.10 0 DATA 00735052660357417137B -98.25 -18.10 0 DATA 00632136660025334665B -245.25 -18.20 0 DATA 00361541657143030254B -354.25 -18.40 0 DATA 03357207656612726706B -9.75 -18.50 3 DATA 00657065655377433435B -109.50 -18.80 0 DATA 00602265655047460742B -121.25 -18.90 0 DATA 00271330654517544322B -40.00 -19.00 0 DATA 00614510653636324355B -241.50 -19.20 0 DATA 00736264653636420457B -98.00 -19.20 0 DATA 00342237653306124472B -339.50 -19.30 0 DATA 00304054653306215123B -324.25 -19.30 0 DATA 00561767653306303360B -234.00 -19.30 0 DATA 01607257652427320770B -240.00 -19.50 1 DATA 00361054652427765362B -2.50 -19.50 0 DATA 00630234651220331315B -244.50 -19.80 0 DATA 00277467650671221547B -322.75 -19.90 0 DATA 00712721650342425275B -102.75 -20.00 0 DATA 00714773650013425041B -102.25 -20.10 0 DATA 00101155647465430610B -74.25 -20.20 0 DATA 00610737646607320243B -240.25 -20.40 0 DATA 00353474645733053526B -349.50 -20.60 0 DATA 00023657645733356635B -274.75 -20.60 0 DATA 00611777645733320440B -240.50 -20.60 0 DATA 01045337645057423503B -81.00 -20.80 1 DATA 00015435644531421164B -86.75 -20.90 0 DATA 00721277644203352317B -258.75 -21.00 0 DATA 00010253643656356541B -272.00 -21.10 0 DATA 00353164643331050326B -350.25 -21.20 0 DATA 00101623643331345333B -286.00 -21.20 0 DATA 00065541643331350435B -283.00 -21.20 0 DATA 00640650643331332702B -246.50 -21.20 0 DATA 00055405643003425675B -79.00 -21.30 0 DATA 00262407642456542040B -41.50 -21.40 0 DATA 00353674642131041114B -352.00 -21.50 0 DATA 00750116641605354646B -264.25 -21.60 0 DATA 00320534641605615407B -28.75 -21.60 0 DATA 00346625641260071426B -346.00 -21.70 0 DATA 00074362640407345545B -284.75 -21.90 0 DATA 00510037640407551556B -140.75 -21.90 0 DATA 00221241640063504245B -52.25 -22.00 0 DATA 01422672637537005131B -181.25 -22.10 1 DATA 00645166637537444672B -112.50 -22.10 0 DATA 00234310637537515527B -48.75 -22.10 0 DATA 00267430637213225756B -320.75 -22.20 0 DATA 01604175636667311746B -238.50 -22.30 1 DATA 00431347636667711555B -166.75 -22.30 0 DATA 00024472636020424306B -85.00 -22.50 0 DATA 01074156636020433217B -75.25 -22.50 1 DATA 01437427635475112007B -198.25 -22.60 1 DATA 00620105635475457636B -118.25 -22.60 0 DATA 00265343634627226717B -320.25 -22.80 0 DATA 01425707634627035620B -187.25 -22.80 1 DATA 00651403634627444331B -111.50 -22.80 0 DATA 00061017634304346527B -282.00 -22.90 0 DATA 00740145634304426251B -97.75 -22.90 0 DATA 00500712633437566331B -144.25 -23.10 0 DATA 00667170633437440031B -108.00 -23.10 0 DATA 00743261632573426502B -97.00 -23.30 0 DATA 00204101631727475743B -55.75 -23.50 0 DATA 01704243631063435241B -104.75 -23.70 1 DATA 00771674630542352114B -268.50 -23.80 0 DATA 00734312630221347246B -261.25 -23.90 0 DATA 00630367630221321723B -243.75 -23.90 0 DATA 01610331627700467006B -120.75 -24.00 1 DATA 00246634627700534050B -44.50 -24.00 0 DATA 00727327627357346105B -260.00 -24.10 0 DATA 00715327627357433665B -102.50 -24.10 0 DATA 00426410627036003034B -180.75 -24.20 0 DATA 00341502626515073316B -345.25 -24.30 0 DATA 00170126626515470003B -59.00 -24.30 0 DATA 00665037626175443171B -108.75 -24.40 0 DATA 01631032625335457172B -116.25 -24.60 1 DATA 01723543624155343737B -259.00 -24.90 1 DATA 00641433624155324101B -246.00 -24.90 0 DATA 01532303624155242601B -224.50 -24.90 1 DATA 00175473624155474552B -57.25 -24.90 0 DATA 00601505623636302452B -237.00 -25.00 0 DATA 00131514623317325624B -292.75 -25.10 0 DATA 01631504622461317447B -243.75 -25.30 1 DATA 00244167622142242634B -315.25 -25.40 0 DATA 00577413622142300217B -236.25 -25.40 0 DATA 00531514622142537267B -136.00 -25.40 0 DATA 01026112621624345777B -275.50 -25.50 1 DATA 00520751621624551130B -139.25 -25.50 0 DATA 00224314621305260666B -310.00 -25.60 0 DATA 00632701620767460527B -116.00 -25.70 0 DATA 01606557620451303773B -238.25 -25.80 1 DATA 07641521616762321334B -245.75 -26.20 7 DATA 01471450616762163556B -210.25 -26.20 1 DATA 03700537616762443146B -106.00 -26.20 3 DATA 03060516616130340051B -282.25 -26.40 3 DATA 00154340615613311641B -298.25 -26.50 0 DATA 00151544615277313024B -297.50 -26.60 0 DATA 00643636615277456366B -113.75 -26.60 0 DATA 00672156615277445774B -107.75 -26.60 0 DATA 00046460613302340464B -279.75 -27.10 0 DATA 00013732613302343452B -273.00 -27.10 0 DATA 00226571612453252300B -311.50 -27.30 0 DATA 00503754612453200017B -214.25 -27.30 0 DATA 00545452612453530747B -132.75 -27.30 0 DATA 00551206612453525477B -131.50 -27.30 0 DATA 00151646612140311110B -297.75 -27.40 0 DATA 00524477611625224762B -221.00 -27.50 0 DATA 00323342611312122163B -338.75 -27.60 0 DATA 00623661611000307143B -241.50 -27.70 0 DATA 00671011611000450573B -108.25 -27.70 0 DATA 01073440610465332365B -285.25 -27.80 1 DATA 00755176610465341531B -265.25 -27.80 0 DATA 00566733610465264203B -232.75 -27.80 0 DATA 00707231610465444605B -104.50 -27.80 0 DATA 00156343607641305155B -299.25 -28.00 0 DATA 01651400607641320650B -247.50 -28.00 1 DATA 00650527607327457575B -112.75 -28.10 0 DATA 00641426607015463070B -114.75 -28.20 0 DATA 00631610606172310512B -243.00 -28.40 0 DATA 00524101606172556377B -139.75 -28.40 0 DATA 00001755605661340757B -270.50 -28.50 0 DATA 00340001605040017523B -356.00 -28.70 0 DATA 00641063605040464372B -115.00 -28.70 0 DATA 00262573605040570051B -37.25 -28.70 0 DATA 03712533604527446060B -103.75 -28.80 3 DATA 00610320604217275426B -237.75 -28.90 0 DATA 03663375603377455633B -110.00 -29.10 3 DATA 00572434602250262550B -233.25 -29.40 0 DATA 00230066602250534705B -47.00 -29.40 0 DATA 00732302600614332740B -260.25 -29.80 0 DATA 00553265600614245055B -228.00 -29.80 0 DATA 00300305600614620732B -30.00 -29.80 0 DATA 01016407600306335346B -273.75 -29.90 1 DATA 00327626600306714142B -13.50 -29.90 0 DATA 01065504600000327073B -284.00 -30.00 1 DATA 01760421600000442654B -94.00 -30.00 1 DATA 00124657600000463130B -67.50 -30.00 0 DATA 07323632577471100602B -343.00 -30.10 7 DATA 00626243577471475270B -118.50 -30.10 0 DATA 00335005576656002711B -359.25 -30.30 0 DATA 01777022576351334632B -269.75 -30.40 1 DATA 00467057575536645377B -155.75 -30.60 0 DATA 00656335575232463430B -111.75 -30.70 0 DATA 00122277574725464074B -68.00 -30.80 0 DATA 00552401573610240241B -227.00 -31.10 0 DATA 00447306573001741435B -172.00 -31.30 0 DATA 00474700572476142263B -206.75 -31.40 0 DATA 00757667571365331152B -265.75 -31.70 0 DATA 00175627567452517510B -54.50 -32.20 0 DATA 00724720566650454141B -101.50 -32.40 0 DATA 00476615566347140254B -206.50 -32.50 0 DATA 00474244566347133176B -205.00 -32.50 0 DATA 00751334566347451214B -96.00 -32.50 0 DATA 00240213566046220236B -318.00 -32.60 0 DATA 00225106566046233624B -313.75 -32.60 0 DATA 00606603565545515734B -124.25 -32.70 0 DATA 00565535565245533121B -130.00 -32.80 0 DATA 00241621565245562074B -41.25 -32.80 0 DATA 00305073564745125552B -336.50 -32.90 0 DATA 00321754564145053530B -348.25 -33.10 0 DATA 00314417564145100371B -342.50 -33.10 0 DATA 00611100563346261720B -236.25 -33.30 0 DATA 00452247563346764632B -177.00 -33.30 0 DATA 00312760563047102734B -341.75 -33.40 0 DATA 00757166563047452740B -94.50 -33.40 0 DATA 00272203562550150235B -330.75 -33.50 0 DATA 00256252562550173151B -324.75 -33.50 0 DATA 00324117562251752506B -5.75 -33.60 0 DATA 00012151561455453406B -87.25 -33.80 0 DATA 00501012561157135112B -206.00 -33.90 0 DATA 00707220560661314407B -254.50 -34.00 0 DATA 00136545560661502041B -63.50 -34.00 0 DATA 03672770560363310336B -251.00 -34.10 3 DATA 00601124560363251664B -233.25 -34.10 0 DATA 01026121560363455133B -84.00 -34.10 1 DATA 00455415560066750746B -173.75 -34.20 0 DATA 00131366560066500065B -65.00 -34.20 0 DATA 03020445557274322447B -274.50 -34.40 3 DATA 00603657557274252706B -234.00 -34.40 0 DATA 00653017557000301067B -246.25 -34.50 0 DATA 00535461556207205677B -219.50 -34.70 0 DATA 00573674555417534651B -129.00 -34.90 0 DATA 00657600555124301573B -247.50 -35.00 0 DATA 00051635555124462403B -78.50 -35.00 0 DATA 00764100554630456707B -93.25 -35.10 0 DATA 00005360554043457107B -88.50 -35.30 0 DATA 00142512553256267455B -298.25 -35.50 0 DATA 00535354553256575431B -141.25 -35.50 0 DATA 00035002553256461472B -82.00 -35.50 0 DATA 00620121552763520343B -122.50 -35.60 0 DATA 00064776552763466551B -75.25 -35.60 0 DATA 00042237552472315025B -279.50 -35.70 0 DATA 01013612552200460547B -86.75 -35.80 1 DATA 00567212551707233721B -228.75 -35.90 0 DATA 03514673551707150357B -210.25 -35.90 3 DATA 01474303550634102316B -198.75 -36.20 1 DATA 00615300550343524350B -123.75 -36.30 0 DATA 00631066547563262157B -240.00 -36.50 0 DATA 00571527547563233713B -229.25 -36.50 0 DATA 00675664547563475104B -108.75 -36.50 0 DATA 00161451547563524313B -56.50 -36.50 0 DATA 00473353547273703722B -163.00 -36.60 0 DATA 01011653546514314600B -272.75 -36.80 1 DATA 01677025546225475670B -108.50 -36.90 1 DATA 01760662545736313706B -265.75 -37.00 1 DATA 03742523545736312253B -261.75 -37.00 3 DATA 00550040545736567144B -138.00 -37.00 0 DATA 00055675545161306536B -283.00 -37.20 0 DATA 01740063545161311315B -261.00 -37.20 1 DATA 00474575544673071654B -196.50 -37.30 0 DATA 00541747544406177770B -219.00 -37.40 0 DATA 00526323544406160176B -213.50 -37.40 0 DATA 00165036543633532272B -54.75 -37.60 0 DATA 00650630543345511133B -115.50 -37.70 0 DATA 01251512543061156126B -327.00 -37.80 1 DATA 01677042542574277221B -251.25 -37.90 1 DATA 00160164542574530023B -56.25 -37.90 0 DATA 00066535542023301710B -285.75 -38.10 0 DATA 00625773542023253235B -238.25 -38.10 0 DATA 00552224542023571146B -138.00 -38.10 0 DATA 00656037542023507754B -114.00 -38.10 0 DATA 00142231541537257416B -299.25 -38.20 0 DATA 00631217541254254520B -239.25 -38.30 0 DATA 00306530540770033727B -352.00 -38.40 0 DATA 00576275540770231077B -229.75 -38.40 0 DATA 00745705540222306267B -262.50 -38.60 0 DATA 00644311540222516105B -117.25 -38.60 0 DATA 00506241537173110152B -201.25 -38.90 0 DATA 01753150536711305670B -264.00 -39.00 1 DATA 00533431536711157760B -214.25 -39.00 0 DATA 00627012535665527777B -122.00 -39.30 0 DATA 00474264535404035172B -188.50 -39.40 0 DATA 00065475535123276075B -285.75 -39.50 0 DATA 00710562535123502266B -106.25 -39.50 0 DATA 00477036534643051005B -192.00 -39.60 0 DATA 03635410534363525330B -120.00 -39.70 3 DATA 00251652533344142033B -330.00 -40.00 0 DATA 00761356533344303442B -265.75 -40.00 0 DATA 00545774533344606456B -141.75 -40.00 0 DATA 00626503533344532465B -122.50 -40.00 0 DATA 01757621533065303113B -265.25 -40.10 1 DATA 01577210532327222625B -228.75 -40.30 1 DATA 00646464532327522331B -117.25 -40.30 0 DATA 00227143532327604357B -39.25 -40.30 0 DATA 00063100531315273416B -285.25 -40.60 0 DATA 00164230531315544203B -53.25 -40.60 0 DATA 00527726531040141025B -210.00 -40.70 0 DATA 01214620531040572316B -43.50 -40.70 1 DATA 00077710530562266751B -289.25 -40.80 0 DATA 00610541530562230553B -232.00 -40.80 0 DATA 00571453530305564636B -134.00 -40.90 0 DATA 00521702527554654745B -154.50 -41.10 0 DATA 00220206527300177503B -318.50 -41.20 0 DATA 00522404527300123535B -205.75 -41.20 0 DATA 00526761526021131677B -208.00 -41.60 0 DATA 00525636526021650261B -152.75 -41.60 0 DATA 00770375525546276773B -267.75 -41.70 0 DATA 01564617525546202756B -223.25 -41.70 1 DATA 01547664525546163544B -217.25 -41.70 1 DATA 00510207525546713241B -164.00 -41.70 0 DATA 00251216525274130075B -332.50 -41.80 0 DATA 00262364525021102565B -339.50 -41.90 0 DATA 01525004524547123313B -206.00 -42.00 1 DATA 00103315524547516060B -69.25 -42.00 0 DATA 00126167524275251174B -297.00 -42.10 0 DATA 00055702524024270006B -284.00 -42.20 0 DATA 00705312524024264272B -252.00 -42.20 0 DATA 00704470524024264066B -251.75 -42.20 0 DATA 00615152524024226752B -232.75 -42.20 0 DATA 00131606524024530742B -61.75 -42.20 0 DATA 00605521523552557370B -130.25 -42.30 0 DATA 00025315523301273650B -276.50 -42.40 0 DATA 00126327523031530150B -62.75 -42.50 0 DATA 00612542522560554414B -128.50 -42.60 0 DATA 01566317522310200236B -223.00 -42.70 1 DATA 00634232522310540346B -122.00 -42.70 0 DATA 00003216522040504143B -89.00 -42.80 0 DATA 03273027522040756640B -5.25 -42.80 3 DATA 03747413521570271732B -262.50 -42.90 3 DATA 03571244521321575742B -136.00 -43.00 3 DATA 01723444521051265441B -256.25 -43.10 1 DATA 01673374521051522053B -111.50 -43.10 1 DATA 01743441521051507202B -98.75 -43.10 1 DATA 00271011520603030267B -352.50 -43.20 0 DATA 00220624520334612600B -39.00 -43.30 0 DATA 00172016520066563476B -49.00 -43.40 0 DATA 01254377516637675621B -21.00 -43.80 1 DATA 00247715516125113504B -335.75 -44.00 0 DATA 00261620515661056634B -345.25 -44.10 0 DATA 00601347515661205264B -226.50 -44.10 0 DATA 00266604515415757151B -5.25 -44.20 0 DATA 00247301515151112412B -336.00 -44.30 0 DATA 00767153515151267003B -267.25 -44.30 0 DATA 00623011515151223217B -233.50 -44.30 0 DATA 00607630515151212215B -229.00 -44.30 0 DATA 00536165515151126007B -208.00 -44.30 0 DATA 00573002514442602710B -136.75 -44.50 0 DATA 00711057514442521667B -107.50 -44.50 0 DATA 00072456514177254465B -288.75 -44.60 0 DATA 00620317514177220100B -232.25 -44.60 0 DATA 00512037514177764676B -176.50 -44.60 0 DATA 00553146513472150141B -215.00 -44.80 0 DATA 00644513513230234511B -239.75 -44.90 0 DATA 00072736512766253120B -289.00 -45.00 0 DATA 00541445512524126725B -208.75 -45.10 0 DATA 00235000512263647130B -29.50 -45.20 0 DATA 00552153511060142151B -213.25 -45.60 0 DATA 00613224510620570432B -130.75 -45.70 0 DATA 00255270510361052327B -346.25 -45.80 0 DATA 00260403507662025530B -353.00 -46.00 0 DATA 00017377507662261117B -275.00 -46.00 0 DATA 00003065507662261634B -271.00 -46.00 0 DATA 00553100507423637244B -147.00 -46.10 0 DATA 00611630507423573442B -131.75 -46.10 0 DATA 00660627507423541107B -116.50 -46.10 0 DATA 00251037507423711704B -17.75 -46.10 0 DATA 00620061506727567022B -129.25 -46.30 0 DATA 00260655506727774723B -1.00 -46.30 0 DATA 00747334506471256646B -262.00 -46.40 0 DATA 00162642505776205200B -310.75 -46.60 0 DATA 00713067505776530176B -107.50 -46.60 0 DATA 00255466505776743563B -9.25 -46.60 0 DATA 00602614505541173035B -224.50 -46.70 0 DATA 00603240505541604313B -135.25 -46.70 0 DATA 01544150505304120172B -207.25 -46.80 1 DATA 00662373505304542650B -116.25 -46.80 0 DATA 00233343505304657051B -27.50 -46.80 0 DATA 01567655504614155217B -218.75 -47.00 1 DATA 00620744504614571217B -129.50 -47.00 0 DATA 03644615504614553105B -121.50 -47.00 3 DATA 00644615504614553105B -121.50 -47.00 0 DATA 01247470504124721410B -15.50 -47.20 1 DATA 00666502503671235257B -245.00 -47.30 0 DATA 03242024503436075310B -339.25 -47.40 3 DATA 03226641503436125247B -330.50 -47.40 3 DATA 01151535502751210372B -307.75 -47.60 1 DATA 00537762502517700117B -158.25 -47.70 0 DATA 00660461502265547360B -117.50 -47.80 0 DATA 00532160502033054327B -195.00 -47.90 0 DATA 00227137502033656607B -28.25 -47.90 0 DATA 00526275501602027656B -188.00 -48.00 0 DATA 00713126501351535316B -108.00 -48.10 0 DATA 00212600501351634072B -35.75 -48.10 0 DATA 00636572501120563631B -124.75 -48.20 0 DATA 00612170500670173011B -226.25 -48.30 0 DATA 00527724500670033277B -189.25 -48.30 0 DATA 00531461500440042471B -191.75 -48.40 0 DATA 01530101500440032455B -189.00 -48.40 1 DATA 00730365477761533303B -103.50 -48.60 0 DATA 00651246477054220200B -239.00 -48.90 0 DATA 01541272477054707646B -160.50 -48.90 1 DATA 00571121477054633236B -143.25 -48.90 0 DATA 00573147476626146645B -217.75 -49.00 0 DATA 00657157476626554601B -118.75 -49.00 0 DATA 00017254476400246722B -275.25 -49.10 0 DATA 00754301475725245617B -263.25 -49.30 0 DATA 00662725475725553731B -117.50 -49.30 0 DATA 00245617475725754301B -6.75 -49.30 0 DATA 00537211475500053644B -195.25 -49.40 0 DATA 00631663475027575202B -128.00 -49.60 0 DATA 00232066475027702411B -21.75 -49.60 0 DATA 00533202474603020455B -185.75 -49.70 0 DATA 00051352474603537544B -75.50 -49.70 0 DATA 01746115474357243147B -261.00 -49.80 1 DATA 00665107474134222730B -243.00 -49.90 0 DATA 00573561473711141702B -216.50 -50.00 0 DATA 00777221473466244153B -269.75 -50.10 0 DATA 00533633473466002114B -180.75 -50.10 0 DATA 01534112473243002112B -180.75 -50.20 1 DATA 01736655472355540446B -101.75 -50.50 1 DATA 00555531471252104167B -205.00 -50.90 0 DATA 00012407470612537453B -86.25 -51.10 0 DATA 01622220467061162471B -226.25 -51.70 1 DATA 00107324467061562242B -63.25 -51.70 0 DATA 00225354466644064143B -340.75 -51.80 0 DATA 00541573466644004111B -181.50 -51.80 0 DATA 00203634466211651452B -33.25 -52.00 0 DATA 00007426465775542731B -87.25 -52.10 0 DATA 00212663465775666130B -28.00 -52.10 0 DATA 00143031465344171166B -309.25 -52.30 0 DATA 00624567465344615762B -133.25 -52.30 0 DATA 00702147465344560123B -113.25 -52.30 0 DATA 00635476464502607456B -129.25 -52.60 0 DATA 37761061464502545164B -95.50 -52.60 31 DATA 00665764464267567525B -118.50 -52.70 0 DATA 01562305463643075446B -203.50 -52.90 1 DATA 00751656463643547132B -98.25 -52.90 0 DATA 00722751463431223252B -253.00 -53.00 0 DATA 00573461463431116613B -210.75 -53.00 0 DATA 00114531463006204634B -300.00 -53.20 0 DATA 00222702462575052637B -343.75 -53.30 0 DATA 00740256462154553033B -102.00 -53.50 0 DATA 00551573461535754157B -172.50 -53.70 0 DATA 00160417461117144340B -318.25 -53.90 0 DATA 00553737461117743160B -169.00 -53.90 0 DATA 00215130460710064051B -339.75 -54.00 0 DATA 00600264460502661004B -148.25 -54.10 0 DATA 03636766460066616317B -130.50 -54.30 3 DATA 00572305457454676651B -154.00 -54.50 0 DATA 00553766457247011033B -183.50 -54.60 0 DATA 01616641457247640135B -139.75 -54.60 1 DATA 00772671456433554706B -92.00 -54.90 0 DATA 00567372456025712723B -158.75 -55.10 0 DATA 00066566455622570422B -68.00 -55.20 0 DATA 01744705455215216642B -259.25 -55.40 1 DATA 00575314455014701002B -154.25 -55.50 0 DATA 01724565454210211167B -252.50 -55.80 1 DATA 00212243454210730254B -16.00 -55.80 0 DATA 00607762454010116542B -213.25 -55.90 0 DATA 00562610454010031424B -190.25 -55.90 0 DATA 00007350453211561621B -87.00 -56.20 0 DATA 00745403453012213430B -259.25 -56.30 0 DATA 00643035452613625051B -131.00 -56.40 0 DATA 03563471452414017775B -186.50 -56.50 3 DATA 00566222452216035715B -192.25 -56.60 0 DATA 00620746452216651172B -142.00 -56.60 0 DATA 03116762451231162717B -304.50 -57.00 3 DATA 00576563451231713611B -158.00 -57.00 0 DATA 00600760451035707342B -156.00 -57.10 0 DATA 00630204451035643320B -138.25 -57.10 0 DATA 00166675450641107331B -329.00 -57.20 0 DATA 00041136447664572716B -76.00 -57.60 0 DATA 00653237447471624445B -128.25 -57.70 0 DATA 07175345447471711350B -23.50 -57.70 7 DATA 00205546446714751015B -9.75 -58.00 0 DATA 01571164446332005704B -182.50 -58.20 1 DATA 00604606446332711103B -156.00 -58.20 0 DATA 00577704446142726772B -162.25 -58.30 0 DATA 00645300445752142714B -227.50 -58.40 0 DATA 00575660445752737430B -166.00 -58.40 0 DATA 00636131445562644615B -137.00 -58.50 0 DATA 00575521445373034231B -192.25 -58.60 0 DATA 00604027445204717627B -158.75 -58.70 0 DATA 00201557445015033444B -348.00 -58.80 0 DATA 00130234445015142740B -311.75 -58.80 0 DATA 00626055445015660141B -143.00 -58.80 0 DATA 03634532445015650100B -138.50 -58.80 3 DATA 00723242444627174350B -250.25 -58.90 0 DATA 00575105444627755015B -171.75 -58.90 0 DATA 07576570444253027752B -190.50 -59.10 7 DATA 03664640444066624477B -125.00 -59.20 3 DATA 00655070443514633344B -129.50 -59.40 0 DATA 00071356443330613360B -63.75 -59.50 0 DATA 00577424442575010767B -184.00 -59.80 0 DATA 00602415442575743020B -167.00 -59.80 0 DATA 07617767442412076567B -209.25 -59.90 7 DATA 00607560442230724161B -160.00 -60.00 0 DATA 00651057441502643473B -133.25 -60.30 0 DATA 17634545441321116221B -218.25 -60.40 15 DATA 00603361441321025752B -190.00 -60.40 0 DATA 00753204440760173745B -260.50 -60.60 0 DATA 00602556440760766107B -175.50 -60.60 0 DATA 01157501440600070700B -333.00 -60.70 1 DATA 01620165440420710213B -153.50 -60.80 1 DATA 00112374440240143603B -306.75 -60.90 0 DATA 00632752440240667205B -144.25 -60.90 0 DATA 00676541440061626354B -121.75 -61.00 0 DATA 00616363437524717637B -157.00 -61.20 0 DATA 00075213437171625676B -60.00 -61.40 0 DATA 00007352437013171731B -273.50 -61.50 0 DATA 00606410437013763166B -174.00 -61.50 0 DATA 00076033436462627544B -59.25 -61.70 0 DATA 01747272436305611437B -101.75 -61.80 1 DATA 00613205436131741636B -165.50 -61.90 0 DATA 00647351436131656115B -137.25 -61.90 0 DATA 00634747435756673732B -145.50 -62.00 0 DATA 00644212435756662261B -139.75 -62.00 0 DATA 01151073435756705567B -29.00 -62.00 1 DATA 00026144435255164722B -280.75 -62.30 0 DATA 00013317435255166347B -275.50 -62.30 0 DATA 00073577435103631427B -59.75 -62.40 0 DATA 00154316434731057105B -336.50 -62.50 0 DATA 03612223434731012641B -185.25 -62.50 3 DATA 01612571434731761052B -172.75 -62.50 1 DATA 00015711434731612471B -83.25 -62.50 0 DATA 00612141434560777370B -179.75 -62.60 0 DATA 00612456434407776763B -179.50 -62.70 0 DATA 01064662434407627115B -63.25 -62.70 1 DATA 01700045433546140452B -236.50 -63.10 1 DATA 00003422433546614166B -88.25 -63.10 0 DATA 00661514433376124604B -227.25 -63.20 0 DATA 00631473433376065230B -207.50 -63.20 0 DATA 00614645433376770346B -176.25 -63.20 0 DATA 00706730433230634105B -119.75 -63.30 0 DATA 00106642433230645267B -52.00 -63.30 0 DATA 00711234433061144570B -241.50 -63.40 0 DATA 00615435433061006377B -183.25 -63.40 0 DATA 00161336432713762445B -6.75 -63.50 0 DATA 00777402432377161331B -269.75 -63.70 0 DATA 01626254432065731011B -159.75 -63.90 1 DATA 00626032431721044777B -199.25 -64.00 0 DATA 00617620431721000765B -180.50 -64.00 0 DATA 01651577430740104467B -218.50 -64.50 1 DATA 01644545430576702775B -146.25 -64.60 1 DATA 00764440430434154633B -264.00 -64.70 0 DATA 00020731427770152667B -279.00 -65.00 0 DATA 00074522427627646717B -55.75 -65.10 0 DATA 00703626427330647447B -124.25 -65.30 0 DATA 00140156427031054673B -335.00 -65.50 0 DATA 00151736427031771035B -3.75 -65.50 0 DATA 00772732426672626273B -92.75 -65.60 0 DATA 00117630426376104116B -319.50 -65.80 0 DATA 00701745426376653276B -126.25 -65.80 0 DATA 00006672426376627221B -86.25 -65.80 0 DATA 00677711426103122032B -232.00 -66.00 0 DATA 00666032426103666543B -135.25 -66.00 0 DATA 00147542425746002206B -358.75 -66.10 0 DATA 00635362425612037041B -197.50 -66.20 0 DATA 00631030425612767343B -175.25 -66.20 0 DATA 00631304425456770277B -175.75 -66.30 0 DATA 00062666425322130766B -299.75 -66.40 0 DATA 00077767425034117006B -309.00 -66.60 0 DATA 00023544423651637141B -78.50 -67.30 0 DATA 00024021423520140242B -281.75 -67.40 0 DATA 00641726423520034606B -197.00 -67.40 0 DATA 00635602423520005114B -183.00 -67.40 0 DATA 00637733423241020741B -190.00 -67.60 0 DATA 00753633423112137011B -258.00 -67.70 0 DATA 00740070422764644534B -109.25 -67.80 0 DATA 00110300422510701053B -41.00 -68.00 0 DATA 00124235422362723130B -28.00 -68.10 0 DATA 01700032422110105623B -227.50 -68.30 1 DATA 00715656422110657564B -122.00 -68.30 0 DATA 01643343421514014461B -187.75 -68.60 1 DATA 00107602421371704663B -39.50 -68.70 0 DATA 03737450421246126555B -249.50 -68.80 3 DATA 00112636420657713474B -35.00 -69.10 0 DATA 03674601420415703346B -138.00 -69.30 3 DATA 00660227420154726746B -152.75 -69.50 0 DATA 00647277417715772141B -176.25 -69.70 0 DATA 00732077417457117320B -244.50 -69.90 0 DATA 00701034417222703574B -136.25 -70.10 0 DATA 00746031416767655545B -107.50 -70.30 0 DATA 00657026415744023636B -193.75 -71.00 0 DATA 00012750415165120371B -277.75 -71.50 0 DATA 00665164415165740205B -157.00 -71.50 0 DATA 00657555415054011113B -186.50 -71.60 0 DATA 00707360414202711704B -136.25 -72.20 0 DATA 00736275413767672217B -115.75 -72.40 0 DATA 00671626413451742436B -157.25 -72.70 0 DATA 00041702412732101617B -297.25 -73.20 0 DATA 00675655412425741662B -155.50 -73.50 0 DATA 00677002411334026544B -199.25 -74.40 0 DATA 01045004411237706354B -57.25 -74.50 1 DATA 00057042410116724373B -42.75 -75.50 0 DATA 00076673410116763375B -11.25 -75.50 0 DATA 00735604406760717431B -125.25 -76.60 0 DATA 00736523406271722073B -126.00 -77.20 0 DATA 00752170406206063715B -247.25 -77.30 0 DATA 00066755405761000753B -359.00 -77.60 0 DATA 00052726405620040735B -322.50 -77.80 0 DATA 01065676405620773031B -5.25 -77.80 1 DATA 00716705405400754516B -158.50 -78.10 0 DATA 00747173405165055102B -241.25 -78.40 0 DATA 00730423405031037530B -218.75 -78.60 0 DATA 00752317404754055215B -244.50 -78.70 0 DATA 00715720404754002500B -183.00 -78.70 0 DATA 00725717403707761553B -161.25 -80.00 0 DATA 00733762403405026047B -211.50 -80.50 0 DATA 00041531402433014732B -339.00 -81.90 0 DATA 00746403401632020313B -212.75 -83.20 0 LIST * TSTBL EQU *-TSTB DATA 0 END OF TABLE PTS SPACE 4,10 ** PTS - CREATE DATA POINTS. * * *YC PTS X1,X2 * ENTRY *YC* = Y COORDINATE. * *X1* = INITIAL X COORDINATE. * *X2* = FINAL X COORDINATE. * IF *X2* = **, ONE POINT IS GENERATED. * MGN = PREVIOUSLY DEFINED MAGNITUDE. MACRO PTS,Y,X1,X2 LOCAL A )1 IFC EQ,*X2** VFD 6/MGN-1,18/X1,18/Y,18/0 )1 ELSE A SET X1 DUP 100 VFD 6/MGN-1,18/A,18/Y,18/0 A SET A+1 IFGT A,X2,1 STOPDUP ENDD )1 ENDIF ENDM NOREF MGN LUNAR TITLE TABLE OF OTHER HEAVENLY BODIES. TSUN SPACE 4,10 ** TSUN - TABLE OF DATA POINTS FOR THE SUN. TSUN BSS 0 MGN SET 8 4 PTS -1,1 3 PTS -3,3 2 PTS -3,3 1 PTS -4,4 0 PTS -4,4 -1 PTS -4,4 -2 PTS -3,3 -3 PTS -3,3 -4 PTS -1,1 MGN SET 1 * CORONA. 11 PTS 1,2 10 PTS 0,3 9 PTS -1,3 8 PTS -5,4 7 PTS -7,7 6 PTS -7,8 5 PTS -8,8 4 PTS -7,2 4 PTS 2,7 3 PTS -7,-4 3 PTS 4,7 2 PTS -7,4 2 PTS 4,7 1 PTS -9,-5 1 PTS 5,8 0 PTS -10,-5 0 PTS 5,10 -1 PTS -10,5 -1 PTS 5,10 -2 PTS -11,-4 -2 PTS 4,9 -3 PTS -11,4 -3 PTS 4,9 -4 PTS -10,-2 -4 PTS 2,8 -5 PTS -10,8 -6 PTS -4,3 -7 PTS -3,2 -8 PTS -2,2 -9 PTS -2,1 -10 PTS -1,1 TSUNL EQU *-TSUN DATA 0 END OF TABLE TETH SPACE 4,10 ** TETH - TABLE OF DATA POINTS FOR THE EARTH. TETH BSS 0 MGN SET 2 16 PTS -2,0 15 PTS -5,0 14 PTS -6,-1 13 PTS -5,-2 12 PTS -9,-7 12 PTS -3,-2 11 PTS -7 7 PTS -8 6 PTS -9,-6 5 PTS -6 1 PTS -13,-12 0 PTS -13,-12 -1 PTS -11 -2 PTS -10,-8 -5 PTS -8 -5 PTS -6 -5 PTS -4 -6 PTS -8,-4 -7 PTS -9,-8 -11 PTS -3 -12 PTS -6,-2 -13 PTS -8,-2 -14 PTS -7,-1 -15 PTS -5,0 -16 PTS -2,0 MGN SET 1 LUNAR TITLE SUN AND EARTH DATA. 13 PTS -8,-6 11 PTS -11,-8 11 PTS -6,-5 10 PTS -11,-4 9 PTS -13,-11 9 PTS -7,-3 8 PTS -13,-12 8 PTS -4 7 PTS -14,-12 7 PTS -10,-9 6 PTS -14,-11 5 PTS -15,-14 5 PTS -8,-7 5 PTS -5,-4 4 PTS -15,-14 4 PTS -12,-11 3 PTS -15,-14 3 PTS -12,-11 3 PTS -9,-5 2 PTS -16,-13 2 PTS -8,-5 1 PTS -16,-14 1 PTS -7,-5 0 PTS -16,-14 0 PTS -11 -1 PTS -12 -1 PTS -10,-9 -1 PTS -6,-5 -2 PTS -16,-15 -2 PTS -11 -2 PTS -7,-5 -3 PTS -15 -3 PTS -10,-6 -4 PTS -14,-12 -5 PTS -15,-9 -6 PTS -14,-9 -6 PTS -14,-9 -7 PTS -11,-10 -7 PTS -7,-4 -8 PTS -10,-7 -8 PTS -4 -9 PTS -13,-11 -9 PTS -9 -9 PTS -6,-3 -10 PTS -12,-3 -11 PTS -11,-4 -12 PTS -9,-7 TETHL EQU *-TETH DATA 0 END OF TABLE SEG LUNAR TITLE INITIALIZATION CODE. USE PRESET ** BUFFERS. TSCS EQU * TABLE OF SINES AND COSINES TACS EQU TSCS+TSCSL TABLE OF ARC COSINES TSTP EQU TACS+TACSL POSITIVE DECLINATION POINTERS TSTM EQU TSTP+TSTPL NEGATIVE DECLINATION POINTERS LSDB EQU TSTM+TSTPL LEFT SCREEN VARIABLE DISPLAY BUFFER PRS SPACE 4,10 ** PRS - PRESET PROGRAM. * * ENTRY (B1) = 1. * * EXIT PROGRAM PRESET. * * CALLS AVS, CPM=, DID, DRS, KBI, SMS, SYS=. PRS SX6 TDBP ADDRESS OF DISPLAY BUFFER POINTERS SX7 TDBP+TDBPL ADDRESS+1 OF END OF BUFFER POINTERS SA6 TDET+DPFW SA7 TDET+DPLW SA5 ACTR ARGUMENT COUNT SA4 ARGR FIRST ARGUMENT SB4 X5+ ZR B4,PRS1 IF NO ARGUMENTS SB5 PRSA ARGUMENT TABLE RJ ARG PROCESS ARGUMENTS ZR X1,PRS1 IF NO ERRORS MESSAGE (=C* LUNAR ARGUMENT ERROR(S).*) ABORT PRS1 MODE 0 CLEAR HARDWARE EXIT MODES SYSTEM LUN,,TDET CALL DISPLAY DRIVER RJ AVS ADVANCE SIMULATION RJ DRS DISPLAY RIGHT SCREEN RJ DID DISPLAY INITIALIZATION INFORMATION RJ KBI PROCESS INPUT SX6 0 SA6 TDET+KBSW CLEAR KEYBOARD STATUS * TURN ON INITIALIZING DISPLAY. SX6 IBFI INITIALIZATION DISPLAY MX1 1 SA2 X6 SA6 TDET+DPFW BX7 -X1*X2 SA7 A2 * START UP SIMULATOR. JP SMS SIMULATOR START PRSA BSS 0 ARGUMENT TABLE S ARG -PRSB,SP *SMP* OPTION CON 0 END OF TABLE PRSB CON 1 VALUE TO SET SP IF S OPTION PRESENT PRS TITLE KEYBOARD INPUT PROCESSOR. KBI SPACE 4,10 ** KBI - KEYBOARD INPUT PROCESSOR. * * CALLS DKB, PCR. KBI SUBR ENTRY/EXIT KBIL RECALL SA1 TDET+KEYW LOAD KEY BX7 X7-X7 SA7 A1 CLEAR KEY ZR X1,KBIL IF NO KEY PRESSED SA0 X1+ KEY TO (A0) SB2 A0-53B CHECK CHARACTER ZR B2,KBI4 IF CHARACTER = *ERASE* SB2 A0-60B NG B2,KBI5 IF CHARACTER < 60B SB2 A0-61B ZR B2,KBI2 IF CHARACTER = *BACKSPACE* SB2 A0-60B NZ B2,KBI6 IF CHARACTER " *CARRIAGE RETURN* * CARRIAGE RETURN - PROCESS COMMAND. RJ PCR PROCESS CARRIAGE RETURN EQ KBI6 * BACKSPACE - BACKSPACE KEYBOARD 1 CHARACTER. KBI2 SA1 KBIB READ INDEX SX7 X1-1 DECREMENT NZ X1,KBI3 IF NOT FIRST CHARACTER SX7 B0+ KBI3 SA7 A1 BX7 X7-X7 CLEAR ERROR MESSAGE SA7 TDET+KBMW EQ KBI6 * LEFT BLANK - ERASE KEYBOARD BUFFER. KBI4 BX6 X6-X6 CLEAR KEYBOARD INDEX MX7 0 SA6 KBIB SA7 TDET+KBMW EQ KBI6 * PROCESS CHARACTER. KBI5 SA1 TDET+KBMW CHECK MESSAGE FLAG NZ X1,KBI6 IF MESSAGE SET SA1 KBIB READ INDEX SX7 A0 SX6 X1+B1 SX2 X1-63 CHECK INDEX PL X2,KBI6 IF BUFFER FULL SA7 KBIC+X1 ELSE, STORE CHARACTER SA6 KBIB * COMPLETE PROCESSING. KBI6 RJ DKB DISPLAY KEYBOARD BUFFER JP KBIL KBIA DATA 0 ENTRY FLAG KBIB DATA 0 KEYBOARD INDEX KBIC BSSZ 65 KEYBOARD BUFFER ASD SPACE 4,10 ** ASD - ASSEMBLE DECIMAL DIGITS. * * ENTRY (A1) = ADDRESS OF FIRST CHARACTER. * (X1) = FIRST CHARACTER. * * EXIT (X6) = NUMBER. * EXITS TO *ILE* IF ERROR ENCOUNTERED. * ACCEPTS NUMBERS OF THE FORM SIGN_MANTISSA_E_SIGN_POWER. * NONE OF THE ABOVE NEED BE PRESENT. * * USES X0, A1, X2, X6, X7, B3-B7. ASD SUBR ENTRY/EXIT SB3 TPWZ SET INITIAL POWER SB4 B0 MX6 0 CLEAR ASSEMBLY SB5 -1R0 SB6 1R9-1R0 SX0 0 SB7 X1-1R+ MX2 0 NG B7,ASD2 IF NO SIGN SB7 B7-B1 GT B7,ASD1 IF CHARACTER > *-* SX0 B7 (X0) = -1 OR 0 AX0 1 BX0 -X0 (X0) = SIGN OF MANTISSA SA1 A1+B1 READ NEXT CHARACTER JP ASD2 ASD1 SB7 X1-1R, ZR B7,ASD RETURN IF NULL FIELD SB7 X1-1R. NZ B7,ILE IF CHARACTER " *.* SA1 A1+B1 ELSE, READ NEXT CHARACTER SB4 B1 SET DECIMAL POINT FLAG ASD2 SB7 X1+B5 CHECK CHARACTER LE B7,B6,ASD3 IF CHARACTER .LE. *9* SB4 B4+B1 SET DECIMAL FLAG NE B4,B1,ASD4 IF NOT FIRST *.* SB7 X1-1R. NZ B7,ASD4 IF CHARACTER .NE. *.* SA1 A1+1 ELSE, READ NEXT CHARACTER EQ ASD2 LOOP ASD3 NG B7,ASD5 IF CHARACTER < *0* LX7 X6,B1 ASSEMBLY * 2 LX6 3 ASSEMBLY * 8 SX1 B7 IX6 X6+X7 ASSEMBLY * 10 IX6 X6+X1 ADD NEW DIGIT SA1 A1+B1 READ NEXT CHARACTER ZR B4,ASD2 LOOP IF NO *.* YET SB3 B3-1 ELSE, ADVANCE MAGNITUDE JP ASD2 LOOP ASD4 ZR X6,ASDX RETURN IF MANTISSA = 0 NG B3,ILE IF POWER TOO SMALL SB7 B3-TPWRL PL B7,ILE IF POWER TOO LARGE SA3 TPWR+B3 PX6 X6 NX6 X6 FX6 X6*X3 BX6 X6-X0 SET SIGN JP ASDX RETURN ASD5 SX7 X1-1RE CHECK CHARACTER NZ X7,ILE IF CHARACTER " *E* SA1 A1+B1 ELSE, READ NEXT CHARACTER SB7 X1+B5 LE B7,B6,ASD6 IF CHARACTER .LE. *9* SB7 B7-B1 GT B7,ASD4 IF CHARACTER .GT. *-* SX2 B7 ELSE, SET SIGN AX2 1 BX2 -X2 SA1 A1+B1 READ NEXT CHARACTER SB7 X1+B5 ASD6 GT B7,B6,ASD7 IF CHARACTER .GT. *9* LX1 X7,B1 ASSEMBLY * 2 LX7 3 ASSEMBLY * 8 IX7 X7+X1 ASSEMBLY * 10 SX1 B7 IX7 X7+X1 ADD NEW DIGIT SA1 A1+B1 READ NEXT CHARACTER SB7 X1+B5 EQ ASD6 ASD7 BX7 X7-X2 SET SIGN SB3 B3+X7 JP ASD4 TPWR SPACE 4,10 ** TABLE OF POWERS. TPWR BSS 0 NOREF P LIST A,G P SET 20 DUP 20,4 P DECMIC P P SET P-1 CON 1.E-"P" TPWZ EQU *-TPWR CON 1.0 DUP 20,4 P SET P+1 P DECMIC P CON 1.E"P" LIST -A,-G TPWRL EQU *-TPWR ASN SPACE 4,10 ** ASN - ASSEMBLE NUMBERS INTO VECTOR. * * ENTRY (B2) = ADDRESS OF VECTOR. * (KBIC) = CHARACTERS. * ACCEPTS ENTRIES IN THE FORM *X=N1,N2,N3.* * IF *NI* = (*), ELEMENT *I* IS NOT CHANGED. * * CALLS ASD. ASN SUBR ENTRY/EXIT SA1 KBIC+2 READ FIRST CHARACTER SX2 X1-1R* NZ X2,ASN1 IF CHARACTER " (*) SA2 A1+B1 ELSE, READ SEPERATOR SA1 A2+B1 READ NEXT CHARACTER SX3 X2-1R, EQ ASN2 ASN1 RJ ASD ASSEMBLE DECIMAL DIGITS SA6 B2 SET VALUE SX3 X1-1R, SA1 A1+B1 READ NEXT CHARACTER ASN2 NZ X3,ILE IF SEPERATOR " *,* SB2 B2+1 ADVANCE VECTOR ADDRESS SX2 X1-1R* CHECK NEXT CHARACTER NZ X2,ASN3 IF CHARACTER " (*) SA2 A1+B1 ELSE, READ SEPERATOR SA1 A2+B1 READ NEXT CHARACTER SX3 X2-1R, EQ ASN4 ASN3 RJ ASD ASSEMBLE DECIMAL DIGITS SA6 B2 SX3 X1-1R, CHECK SEPERATOR SA1 A1+B1 READ NEXT CHARACTER ASN4 NZ X3,ILE IF SEPERATOR " *,* SB2 B2+1 ELSE, ADVANCE VECTOR ADDRESS SX2 X1-1R* NZ X2,ASN5 IF CHARACTER " (*) SA2 A1+1 READ TERMINATOR SX3 X2-1R. EQ ASN6 ASN5 RJ ASD ASSEMBLE DECIMAL DIGITS SA6 B2+ SX3 X1-1R. ASN6 ZR X3,ASNX RETURN IF TERMINATOR = *.* ZR X1,ASNX RETURN IF END OF BUFFER EQ ILE ELSE, ILLEGAL ENTRY DID SPACE 4,10 ** DID - DISPLAY INITIALIZATION DISPLAY. * * ENTRY (RV) = RADIUS VECTOR. * (VV) = VELOCITY VECTOR. * * CALLS CFP. DID SUBR ENTRY/EXIT * DISPLAY RADIUS VECTOR. SA5 =0.001 CONVERT TO KILOMETERS SA1 RV READ RV(1) SB2 B1 RX1 X1*X5 CONVERT TO KM RJ CFP CONVERT FLOATING POINT NUMBER SA6 RX SA1 A1+B1 READ NEXT ELEMENT SB2 B1 RX1 X1*X5 CONVERT TO KM RJ CFP CONVERT FLOATING POINT NUMBER SA6 A6+B1 SB2 B1 SA1 A1+B1 READ NEXT ELEMENT RX1 X1*X5 CONVERT TO KM RJ CFP CONVERT FLOATING POINT NUMBER SA6 RZ * DISPLAY VELOCITY VECTOR. SA1 VV READ VV(1) SB2 2 RJ CFP CONVERT FLOATING POINT NUMBER SA6 VX SB2 B1+B1 SA1 A1+B1 READ NEXT ELEMENT RJ CFP CONVERT FLOATING POINT NUMBER SA6 A6+B1 SB2 2 SA1 A1+B1 READ NEXT ELEMENT RJ CFP CONVERT FLOATING POINT NUMBER SA6 A6+B1 JP DIDX RETURN DKB SPACE 4,10 ** DKB - DISPLAY KEYBOARD BUFFER. * * ENTRY (KBIB) = KEYBOARD INDEX. * (KBIC) = KEYBOARD BUFFER. * * EXIT (KDIS) = PACKED KEYBOARD BUFFER. DKB SUBR ENTRY/EXIT SA1 KBIB READ INDEX SX6 KDIS LX1 48 BX7 X6+X1 SB2 48 SB3 X6 LX1 12 SB4 X1 MX6 0 DKB1 ZR B4,DKB2 IF END OF CHARACTERS SB4 B4-B1 SA1 A1+B1 READ NEXT CHARACTER LX1 X1,B2 BX6 X6+X1 SB2 B2-12 PL B2,DKB1 LOOP FOR 5 CHARACTERS SA6 B3+ ELSE, STORE ASSEMBLY SB3 B3+B1 ADVANCE ADDRESS MX6 0 CLEAR ASSEMBLY SB2 48 EQ DKB1 LOOP DKB2 SA7 TDET+KBSW SET KEYBOARD STATUS SA6 B3+ JP DKBX RETURN PCR SPACE 4,10 ** PCR - PROCESS CARRIAGE RETURN. * * ENTRY (KBIB) = KEYBOARD INDEX. * (KBIC) = KEYBOARD BUFFER. * * CALLS ASD, ASN, AVS, DID, DRS, MAG, PCR. * ILE - ILLEGAL ENTRY RETURN. ILE SX7 PCRA MESSAGE = *ILLEGAL ENTRY.* SA7 TDET+KBMW PCR SUBR ENTRY/EXIT SA1 TDET+KBMW CHECK MESSAGE FLAG NZ X1,ILE IF MESSAGE SET SA1 KBIB SET TERMINATING ZERO SX7 1R. TESTING SA7 KBIC+X1 ZR X1,KBIX IF BUFFER EMPTY, START SIM. * CHECK FIRST CHARACTER. PCR90 SA1 KBIC READ FIRST CHARACTER SB2 X1-1RR ZR B2,PCR1 IF CHARACTER = *R* SB2 X1-1RV ZR B2,PCR4 IF CHARACTER = *V* SB2 X1-1RF ZR B2,PCRF1 IF CHARACTER = *F* SB2 X1-1RG NZ B2,ILE IF CHARACTER " *G* * *GO.* - START UP SIMULATOR. SA1 A1+B1 CHECK SECOND CHARACTER SX7 B1 SX1 X1-1RO NZ X1,ILE IF ENTRY " *GO* JP KBIX RETURN VIA ENTRY AT KBI PCRF1 SA1 A1+B1 SB3 X1-1R= SA1 A1+B1 NZ B3,ILE IF NOT = RJ ASD ASSEMBLE DIGITS SA6 RF SET REMAINING FUEL EQ PCR3 * *R=X,Y,Z.* - SET RADIUS VECTOR = (X,Y,Z). * EACH ELEMENT OF THE VECTOR IS SPECIFIED IN STANDARD FORTRAN * E-FORMAT, WITH ALL FIELDS OPTIONAL. PCR1 SB2 RV SET VECTOR ADDRESS SA1 A1+1 PCR2 SX2 X1-1R= CHECK SECOND CHARACTER NZ X2,ILE IF CHARACTER " *=* RJ ASN ELSE, ASSEMBLE NUMBERS RJ DID DISPLAY INITIALIZATION DISPLAY SA1 RV CHECK RADIUS VECTOR RJ MAG VECTOR MAGNITUDE SA1 RMOON COMPUTE ALTITUDE SA6 MR RX7 X6-X1 NX7 X7 SA7 HT PL X7,PCR3 IF NOT INSIDE MOON SX6 PCRB ELSE, MESSAGE = *INSIDE MOON.* SA6 TDET+KBMW JP PCRX RETURN PCR3 RJ AVS ADVANCE SIMULATION RJ DRS DISPLAY RIGHT SCREEN SX7 0 SA7 KBIB CLEAR KEYBOARD JP PCRX RETURN * *V=X,Y,Z.* - SET VELOCITY VECTOR = (X,Y,Z). PCR4 SB2 VV SET VECTOR ADDRESS SA1 A1+1 READ NEXT CHARACTER EQ PCR2 PCRA DATA C*ILLEGAL ENTRY.* DATA 0 PCRB DATA C*INSIDE MOON.* DATA 0 IDIS SPACE 4,10 ** INITIALIZATION DISPLAY BUFFER. IDIS BSS 0 XC 120 YC 650 CHAR (INITIALIZATION OPTIONS) XC 0 YC 570 CHAR (F=X. - SET REMAINING FUEL.) XC 0 YC 540 CHAR (R=X,Y,Z. - SET RADIUS VECTOR.) XC 0 YC 510 CHAR (V=X,Y,Z. - SET VELOCITY VECTOR.) XC 0 YC 460 CHAR (GO. - START SIMULATOR.) XC 0 YC 330 CHAR (CURRENT R VECTOR - KILOMETERS.) XC 0 YC 230 CHAR (CURRENT V VECTOR - METERS/SEC.) XC 0 YC 300 FILL RX DATA 0 RY DATA 0 RZ DATA 0 XC 0 YC 200 FILL VX DATA 0 VY DATA 0 VZ DATA 0 IDISL EQU *-IDIS IDSS SPACE 4,10 ** INITIALIZATION DISPLAY BUFFER - SMALL CHARACTERS. IDSS BSS 0 XC 20 YC 440 CHAR (UNITS - R VECTOR - METERS. V VECTOR - METERS/SECOND.) XC 20 YC 426 CHAR (NUMBER FORMAT - SIGN DDD.DDD E SIGN NNN) XC 40 YC 414 CHAR ((ALL FIELDS ARE OPTIONAL. EX. V=,,. = V=0,0,0.)) XC 20 YC 402 CHAR (IF AN ELEMENT OF AN ENTRY = (*), THEN THE CORRES-) XC 20 YC 370 CHAR (PONDING ELEMENT OF THE VECTOR IS NOT CHANGED.) XC 20 YC 356 CHAR (NOTE - MAG(R VECTOR) MUST BE .GT. "RMN" METERS.) FILL IDSSL EQU *-IDSS IKBB SPACE 4,10 ** INITIALIZATION KEYBOARD DISPLAY BUFFER. KDIS BSSZ 14 KEYBOARD DISPLAY BUFFER DECKS SPACE 4,10 ** PRESET COMMON DECKS. *CALL COMCARG SEG LUNAR TITLE TABLE INITIALIZATION CODE. ORG LSDB LOAD ABOVE TABLES USE INIT SMS SPACE 4,10 ** SMS - SIMULATOR START. * * EXIT GENERATES TABLES OVERLAYING THE INITIALIZATION CODE. * * CALLS ACS, NOR, SCS, SDP, SSP. TSMS BSS 0 * GENERATE SINE/COSINE TABLE. SMS SA1 SMSA =90. SA2 RADIAN SX3 TSCSL PX3 X3 NX3 X3 RX6 X1/X3 90/TSCSL RX6 X6/X2 CONVERT TO RADIANS SA6 S0 SET INCREMENT MX6 0 SA6 S1 SET ANGLE SA6 A6+B1 SET INDEX SMS1 SA2 S0 READ INCREMENT SA1 A2+B1 READ ANGLE RX6 X1+X2 ADVANCE ANGLE SA6 A1 RJ SCS COMPUTE SINE SA1 S2 ADVANCE INDEX SX7 X1+B1 SA7 A1 SA6 TSCS+X1 SX7 X7-TSCSL NG X7,SMS1 LOOP * GENERATE ARC COSINE TRANSFORM TABLE. SA1 PV (PRCOS) RJ ACS COMPUTE ARC COSINE SA1 RP RADIUS OF PORT RX6 X1/X7 RPORT/ARCCOSINE(PRCOS) SA6 S0 SX6 B0 SET INDEX SA6 S1 SA6 S2 SMS2 SA1 S1 ADVANCE ANGLE SA2 SMSB RX6 X1+X2 SA6 A1 RJ ACS COMPUTE ARC COSINE SA1 S0 =RPORT/ARCCOS(PRCOS) SX3 17174B ROUND TO NEAREST 1 SA2 S2 READ INDEX LX3 45 RX6 X1*X6 RX6 X6+X3 SX7 X2+B1 UX1,B7 X6 LX6 B7,X1 SA6 TACS+X2 SA7 A2+ SX7 X7-TACSL NG X7,SMS2 LOOP IF NOT END OF TABLE * SET ANGLE SUBTENDED BY THE PORT'S RADIUS. SA1 PV (PRCOS) RJ ACS ARCCOS(PRCOS) = AP SA7 AP * SET UNIT VECTORS TO SUN AND EARTH. SB2 VE NORMALIZE VE SA1 B2 RJ NOR SB2 VS NORMALIZE VS SA1 B2+ RJ NOR * SET EARTH DATA TABLE. SX6 TETH SET ADDRESSES SX7 TETH+TETHL SA6 S0 SA7 S1 SX6 VE SA6 S2 RJ SDP SET DATA POINTS * SET SUN DATA TABLE. SX6 TSUN SET ADDRESSES SX7 TSUN+TSUNL SA6 S0 SA7 S1 SX6 VS SA6 S2 RJ SDP SET DATA POINTS * SET STAR TABLE POINTERS. MX6 0 SA6 S0 (S0) = INDEX SA6 A6+B1 (S1) = ANGLE SA1 PI2 COMPUTE INCREMENT SX2 TSTPL PX2 X2 NX2 X2 RX7 X1/X2 SA7 A6+B1 (S2) = INCREMENT SMS3 SA1 S1 ADVANCE ANGLE SA2 A1+B1 RX6 X1+X2 SA6 A1 RJ SSP SET STAR POINTERS SA1 S0 ADVANCE INDEX SA6 TSTP+X1 SET POINTERS SA7 TSTM+X1 SX6 X1+B1 SA6 A1 SX7 X6-TSTPL NG X7,SMS3 LOOP TO END OF TABLES SX6 TFDB RESET DISPLAY BUFFER ADDRESS SA6 TDET+DPFW SX6 1 SA5 TDET+RTCW GET REAL TIME CLOCK SA6 IF SET INITIALIZATION FLAG OFF BX7 X5 SA1 SP SA7 LUNA INITIALIZE CYCLE TIME ZR X1,LUN1 IF NOT TO SAMPLE -P- REGISTER SYSTEM SMP,R,LWEC,FWEC CALL *SMP* JP LUN1 START UP SIMULATOR SMSA DATA 90.0 SMSB DATA 0.000976562 1/1024 IDSI BSS 0 XC 30 YC 360 CHAR (REWINDING DISKS) FILL IDSIL EQU *-IDSI SDP SPACE 4,10 ** SDP - SET DATA POINTS. * * ENTRY (S0) = ADDRESS OF TABLE. * (S1) = ADDRESS OF END OF TABLE. * (S2) = ADDRESS OF VECTOR TO THE ORIGIN. * * CALLS ADD, CSP, DOT, NOR. SDP SUBR ENTRY/EXIT * SET MAGNITUDE FACTOR. SA2 RP RADIUS OF PORT SA1 AP FACTOR = AP/RPORT NO RX6 X1/X2 SA6 S4 * SET TRANSFORM MATRIX. SA4 S2 SA1 X4 =X SA2 A1+B1 =Y SA3 A2+B1 =Z * X TRANSFORM = (-X, -Y, -Z). BX6 -X1 V1 = -X BX7 -X2 V2 = -Y SA6 SDPA SA7 A6+B1 BX6 -X3 V3 = -Z SA6 A7+B1 * Z TRANSFORM = (V3, 0, -V1) SA6 SDPC Z1 = V3 BX7 X1 MX6 0 SA6 A6+B1 Z2 = 0 SA7 A6+B1 Z3 = -V1 * Y TRANSFORM = Z TRANSFORM X X TRANSFORM. SA1 SDPC SA2 SDPA SB2 SDPB RJ CSP CROSS PRODUCT * TRANSFORM DATA POINTS. SDP1 SA4 S0 READ DATUM SA1 X4 SX7 X1 =Z COORDINATE AX1 18 PX7 X7 SX6 X1 =Y COORDINATE AX1 18 NX7 X7 PX6 X6 SX5 X1 =X COORDINATE AX1 18 NX6 X6 PX5 X5 * SET VECTOR TO POINT IN OBJECT'S COORDINATE SYSTEM. SA3 S4 =MAGNITUDE ADJUSTMENT NX5 X5 RX7 X3*X7 SA7 T1+2 RX6 X3*X6 RX7 X3*X5 SA6 A7-B1 SA7 A6-B1 BX6 X1 SAVE MAGNITUDE SA6 A3+B1 =S5 * TRANSFORM COORDINATES. SA1 SDPC TRANSFORM Z SA2 T1 RJ DOT SA6 T2 SA1 SDPB TRANSFORM Y SA2 T1 RJ DOT SA6 T2+1 SA1 SDPA TRANSFORM X SA2 T1 RJ DOT SA6 T2+2 * SET VECTOR TO POINT. SA1 T2 SA3 S2 SB2 T3 SA2 X3 RJ ADD SB2 T3 NORMALIZE T3 SA1 B2+ RJ NOR * PACK VECTOR AND MAGNITUDE BACK INTO TABLE. SA1 T3 =X MX0 -18 SA2 A1+B1 UX1,B2 X1 SB5 17 SET MAGNITUDE ADJUSTMENT UX2,B3 X2 SA3 A2+B1 =Z SB2 B2+B5 SB3 B3+B5 UX3,B4 X3 LX1 X1,B2 SB4 B4+B5 LX2 X2,B3 BX1 -X0*X1 PACK ELEMENTS LX3 X3,B4 BX2 -X0*X2 LX1 2*18 BX3 -X0*X3 SA4 S5 =MAGNITUDE LX2 18 BX6 X1+X3 LX4 3*18 BX6 X6+X2 SA5 S0 SA1 A5+B1 ADVANCE ADDRESS BX6 X6+X4 SX7 X5+B1 SA6 X5 STORE DATUM SA7 A5 IX3 X7-X1 NG X3,SDP1 LOOP TO END OF TABLE JP SDPX ELSE, RETURN SDPA DATA 0,0,0 X TRANSFORM SDPB DATA 0,0,0 Y TRANSFORM SDPC DATA 0,0,0 Z TRANSFORM SSP SPACE 4,10 ** SSP - SET STAR POINTERS. * * ENTRY (X1) = ANGLE. * * EXIT (X6) = POSITIVE STAR POINTERS. * (X7) = NEGATIVE STAR POINTERS. * * FORMAT OF POINTERS. * * VFD 30/FWA-1 OF DATA, 30/LWA+1 OF DATA. * * CALLS SCS. SSP SUBR ENTRY/EXIT SA2 AP = PORT ANGULAR RADIUS RX6 X1+X2 A+AP RX1 X1-X2 A-AP SA6 S6 NX1 X1 RJ SCS (X6) = SIN(A-AP) UX6,B2 X6 SIN*2**17 SB2 B2+17 LX6 X6,B2 SA6 S7 SA2 PI2 SA1 A6-B1 =A-AP SX6 B1 IX7 X1-X2 LX6 17 PL X7,SSP1 IF A+AP > PI/2 RJ SCS ELSE, COMPUTE SIN(A+AP) UX6,B2 X6 SIN*2**17 SB2 B2+17 LX6 X6,B2 SSP1 SB2 TSTB-1 * FIND POSITIVE FWA-1. SSP2 SA1 B2+B1 READ DATUM AX1 18 UNPACK Y COORDINATE SX1 X1 IX7 X6-X1 PL X7,SSP3 IF FWA FOUND SB2 B2+1 ELSE, LOOP EQ SSP2 * FIND POSITIVE LWA+1. SSP3 SA5 S7 SIN(A-AP) SB3 B2+1 SSP4 SA1 B3 READ DATUM SB3 B3+B1 ADVANCE INDEX AX1 18 UNPACK Y COORDINATE SX1 X1 IX7 X1-X5 PL X7,SSP4 IF NOT FOUND * FIND NEGATIVE LWA+1. BX6 -X6 SB4 TSTB+TSTBL SSP5 SA1 B4-B1 READ NEXT DATUM AX1 18 UNPACK Y COORDINATE SX1 X1 IX7 X6-X1 NG X7,SSP6 IF LWA+1 FOUND SB4 B4-1 ELSE, ADVANCE INDEX EQ SSP5 LOOP * FIND NEGATIVE FWA-1. SSP6 BX5 -X5 SB5 B4-B1 SSP7 SA1 B5 READ DATUM SB5 B5-B1 ADVANCE INDEX AX1 18 UNPACK Y COORDINATE SX1 X1 IX7 X1-X5 NG X7,SSP7 * FORM POINTERS. SX1 B2 SX6 B3 SX2 B5+ LX1 30 SX7 B4 LX2 30 BX6 X1+X6 IX7 X2+X7 JP SSPX RETURN TSMSL EQU *-TSMS RFL= EQU *+4 LAST WORD LOAD ADDRESS SPACE 4 END ~ MIC IDENT MIC,MIC PERIPH BASE MIXED SST RDS,MP TITLE MIC - MICKEY MOUSE CONSOLE CLOCK. *COMMENT MIC - MICKEY MOUSE CONSOLE CLOCK. COMMENT COPYRIGHT UNIVERSITY OF MINNESOTA. 1977. MIC SPACE 4,10 *** MIC - MICKEY MOUSE CONSOLE CLOCK. * * D. W. MEARS. 77/05/31. * S. L. SAVITT. ORIGINAL DIGITIZATION FOR DIGIGRAPHICS. MIC SPACE 4,10 *** MIC CONTROL STATEMENT CALL. * * MIC(NNN) * NNN = 1 + NUMBER OF SECONDS MICKEY MOUSE IS TO BE UP. * * MIC. * CAUSES MICKEY MOUSE TO STAY UP UNTIL IT IS DROPPED. MIC SPACE 4,10 *** MIC COMMANDS. * * * *D* DROPS THE PROGRAM. * *H* HOLDS THE DISPLAY UNTIL IT IS REASSIGNED FROM DSD. * (*) RELEASES THE DISPLAY UNTIL IT IS RETURNED BY DSD THROUGH * ANOTHER (*). MIC SPACE 4,10 *** DAYFILE MESSAGES. * * * * ILLEGAL USER ACCESS.* = MIC NOT CALLED BY SYOT JOB. MIC SPACE 4,10 *** OPERATOR MESSAGES. * * * *REQUEST DISPLAY (MICKEY). = MIC REQUESTS THE DISPLAY * CHANNEL. MIC SPACE 4,10 * COMMON DECKS. *CALL COMDMAC *CALL COMPMAC *CALL COMPCHI *CALL COMSCPS MIC SPACE 4,26 **** DIRECT CELL ASSIGNMENTS. XC EQU 16 X - COORDINATE YC EQU 17 Y - COORDINATE AB EQU 20 - 24 ASSEMBLY BUFFER MR EQU 25 MULTIPLIER MP EQU 26 - 27 MULTIPLICATION PRODUCT NC EQU 30 NUMBER OF CONTROL POINTS * EQU 31 - 34 (UNUSED) MD EQU 35 - 36 MULTIPLICAND * THE FOLLOWING 5 MUST BE ADJACENT MN EQU 37 DISPLAYED MINUTE FR EQU 40 CURRENT *FROM* ADDRESS FOR ROTATION TO EQU 41 CURRENT *TO* ADDRESS FOR ROTATION DC EQU 42 REMAINING DOT COUNT FOR ROTATION SH EQU 43 SHORT HAND FLAG FOR ROTATION RM EQU 44 REMAINING MINUTES BEFORE MICKEY RELOAD HR EQU 45 HOUR HAND COUNTER (RANGE 0 - 12D) SN EQU 46 SINE USED FOR ROTATION CS EQU 47 COSINE USED FOR ROTATION * EQU 57 (UNUSED) * EQU 60 - 64 (UNUSED) SS EQU 65 SIGN OF SINE (1 IF -) SC EQU 66 SIGN OF COSINE (1 IF -) * EQU 67 (UNUSED) MIC SPACE 4,10 ** ASSEMBLY CONSTANTS. CH EQU CHDS DISPLAY CHANNEL NAME MICRO 1,,*MICKEY* DRDC EQU 1 DOTS TO BE ROTATED PER DISPLAY CYCLE LCRC EQU 5 LARGE CHARACTER REPEAT COUNT NMRM EQU 10 NUMBER OF MINUTES BEFORE RELOAD OF MICKEY **** MIC SPACE 4,10 ** CONSTANTS USED AS INSTRUCTIONS. UJNI EQU 0300 UJN SHNI EQU 1000 SHN MIC SPACE 4,10 * DEFINE ORDER OF USE BLOCKS. USE BUFFERS USE CHTB USE 0 TITLE MAIN PROGRAM. MIC SPACE 4,10 ** MIC - MAIN PROGRAM. ORG PPFW MIC RJM PRS PRESET PROGRAM MIC1 RJM DLS DISPLAY LEFT SCREEN RJM DRS DISPLAY RIGHT SCREEN RJM PKI PROCESS KEYBOARD INPUT RJM /COMDDSP/ROF CHECK ROLLOUT FLAG AND PAUSE RJM SYS DISPLAY SYSTEM STATUS RJM MNC MONITOR CLOCK MICA RJM CQT CHECK FOR QUITTING TIME * UJN *+2 IF NO QUITTING TIME SPECIFIED UJN MIC1 LOOP MIC TITLE SUBROUTINES. CQT SPACE 4,10 ** CQT - CHECK QUITTING TIME. * * ENTRY (IR+3) = 6/MIN, 6/SEC OF LAST CYCLE. * (IR+4) = REMAINING SECONDS. * * EXIT (IR+3) = 6/CURRENT MIN, 6/CURRENT SEC. * (IR+4) = REMAINING SECONDS. * * USES IR+3, IR+4. * * CALLS DRP. CQT SUBR ENTRY/EXIT LDN PDTL READ PACKED DATE AND TIME CRD CM LDD CM+4 SBD IR+3 ZJN CQTX IF NO CHANGE RAD IR+3 UPDATE TIME SOD IR+4 NJN CQTX IF NOT QUITTING TIME LJM DRP DROP MICKEY DLS SPACE 4,10 ** DLS - DISPLAY LEFT SCREEN. * * ENTRY NONE. * * EXIT MICKEY MOUSE AND HOURS DISPLAYED ON LEFT SCREEN. * * USES T1. * * CALLS NONE. DLS SUBR ENTRY/EXIT LDN LCRC SET REPEAT COUNT FOR LARGE CHARACTERS STD T1 FNC 7002,CH SELECT LEFT SCREEN 16 CHARACTERS PER LINE ACN CH DLS1 LDC NUML SET LENGTH OF BUFFER OAM NUM,CH SOD T1 NJN DLS1 IF REPEAT COUNT NOT EXHAUSTED DCN CH+40 FNC 7010,CH SELECT LEFT SCREEN DOT MODE ACN CH LDC BODL+ARMSL+ARMLL SET LENGTH OF OUTPUT OAM BOD,CH FJM *,CH WAIT CHANNEL EMPTY (2X PPS) DCN CH+40 UJN DLSX RETURN DRP SPACE 4,10 ** DRP - DROP PPU. * * ENTRY NONE. * * EXIT DISPLAY DROPPED. * PP DROPPED. * TO PPR. * * USES NONE. * * CALLS PPR. DRP BSS 0 RJM DDS DROP DISPLAY DPP MONITOR DPPM DROP PPU LJM PPR ENTER PP RESIDENT DRS SPACE 4,10 ** DRS - DISPLAY RIGHT SCREEN. * * ENTRY NONE. * * EXIT *MICKEY MOUSE* MESSAGE DISPLAYED ON RIGHT SCREEN. * * USES T1. * * CALLS NONE. DRS SUBR ENTRY/EXIT LDN LCRC SET LARGE CHARACTER REPEAT COUNT STD T1 FNC 7102,CH SELECT RIGHT SCREEN, LARGE CHARACTERS ACN CH DRS1 LDN DRSAL OUTPUT *MICKEY MOUSE MESSAGE* OAM DRSA,CH SOD T1 DECREMENT REPEAT COUNTER NJN DRS1 IF OUTPUT NOT COMPLETE DCN CH+40 UJN DRSX RETURN DRSA DATA 6240,7460,H*MICKEY* DATA 6260,7400,H*MOUSE* DRSAL EQU *-DRSA LENGTH OF MESSAGE MNC SPACE 4,20 ** MNC - MONITOR CLOCK. * * ENTRY (DC) = COUNT OF DOTS REMAINING TO BE ROTATED. * (FR) = ADDRESS TO GET NEXT DOT TO BE ROTATED FROM. * (FR) = 0 IF NO ROTATION IN PROGRESS. * (TO) = ADDRESS TO STORE NEXT ROTATED DOT. * (HR) = REMAINING MINUTES BEFORE HOUR HAND TO BE MOVED. * (SH) = 0 IF LONG HAND TO BE MOVED. * (SH) = 1 IF SHORT HAND TO BE MOVED. * (RM) = REMAINING MINUTES BEFORE RELOADING MICKEY. * * EXIT DC, FR, TO, HR, RM, AND SH UPDATED. * SCRATCH BUFFER COPIED TO DISPLAY BUFFER IF NEW MINUTE. * *MIC* RELOADED IF NMRM MINUTES PASSED (TO ELIMINATE * CUMULATIVE DISTORTION). * * USES T1, T2, T3, FR, TO, DC, DH, HR, RM, MN. * * CALLS RDD, RLM. MNC SUBR ENTRY/EXIT LDD DC ZJN MNC1 IF NOT IN PROCESS OF BUILDING NEW DISPLAY LDD FR BUILD NEW DISPLAY STD T2 SET *FROM* ADDRESS LDN DRDC SET DOT COUNT STD T1 LDD TO SET *TO* ADDRESS STD T3 RJM RDD ROTATE DISPLAY DATA LDN 2*DRDC RAD FR BUMP *FROM* ADDRESS LDN 2*DRDC RAD TO BUMP *TO* ADDRESS LCN DRDC RAD DC REDUCE DOT COUNT PJN MNCX IF NOT TOO MANY DOTS ROTATED LDN 0 STD DC UJN MNCX RETURN MNC1 LDD FR CHECK IF NEW BUFFER ALREADY BUILT NJN MNC2 IF ALREADY BUILT LDC ARML START BUILDING NEW BUFFER STD FR SET *FROM* ADDRESS LDC BUF SET *TO* ADDRESS STD TO LDC ARMLL/2 SET DOT COUNT STD DC LJM MNCX RETURN MNC2 LDN PDTL READ PACKED DATE AND TIME CRD CM LDD CM+4 GET MINUTES SHN -6 LMD MN NJN MNC3 IF DISPLAYED TIME .NE. ACTUAL TIME LJM MNCX RETURN MNC3 LDN 0 STD T1 CLEAR COUNTER STD FR CLEAR BUFFER AVAILABLE FLAG LDD SH CHECK LONG/SHORT HAND FLAG ZJN MNC4 IF LONG HAND LJM MNC6 PROCESS SHORT HAND * COPY BUFFER TO MINUTE HAND POSITION. MNC4 LDM BUF,T1 STM ARML,T1 AOD T1 LMC ARMLL NJN MNC4 LOOP THROUGH ENTIRE BUFFER AOD MN BUMP MINUTE BEING DISPLAYED LMN 60D NJN MNC5 IF NOT HOUR BOUNDARY STD MN MNC5 SOD HR REDUCE HOUR MINUTE COUNTER NJN MNC7 IF NOT TIME TO ADVANCE HOUR HAND LDN 12D SET HOUR MINUTE COUNTER STD HR LDC ARMS SET *FROM* ADDRESS STD FR LDC BUF SET *TO* ADDRESS STD TO LDC ARMSL/2 SET DOT COUNT STD DC AOD SH SET *HOUR HAND* FLAG UJN MNC7 * COPY BUFFER TO HOUR HAND POSITION. MNC6 LDM BUF,T1 STM ARMS,T1 AOD T1 LMC ARMSL NJN MNC6 LOOP THROUGH ENTIRE BUFFER STD SH CLEAR HOUR HAND INDICATOR MNC7 SOD RM DECREMENT MINUTE COUNTER NJN MNC8 IF NOT TIME FOR RELOAD LJM RLM RELOAD MICKEY MNC8 LJM MNCX RETURN MUL SPACE 4,10 ** MUL - MULTIPLY NUMBERS. * * ENTRY (MD - MD+1) = MULTIPLICAND. * (MR) = MULTIPLIER (SIN OR COS *1000). * * EXIT (A) = RESULT BIASED BY 400. * * USES MP - MP+1. * * CALLS NONE. MUL3 LDD MP UNSCALE RESULT SHN 14 ADD MP+1 ADC 400S9 ADD BIAS SHN -9D MUL SUBR ENTRY/EXIT LDN 0 STD MP CLEAR PRODUCT ACCUMULATOR STD MP+1 LDC SHNI+77 INITIALIZE SHIFT INSTRUCTIONS STM MULA LDC SHNI+0 STM MULB UJN MUL2 ENTER MULTIPLY LOOP MUL1 SOM MULA DECREMENT MULTIPLIER SHIFT COUNT AOM MULB INCREMENT MULTIPLICAND SHIFT COUNT MUL2 LDD MR CHECK NEXT MULTIPLIER BIT MULA SHN -** ZJN MUL3 IF ALL 1 BITS OF MULTIPLIER DONE LPN 1 ZJN MUL1 IF THIS BIT NOT SET LDD MD POSITION MULTIPLICAND SHN 14 ADD MD+1 MULB SHN ** RAD MP+1 ADD MULTIPLICAND TO PRODUCT SHN -14 RAD MP UJN MUL1 LOOP THROUGH ALL 1 BITS PKI SPACE 4,10 ** PKI - PROCESS KEYBOARD INPUT. * * ENTRY NONE. * * EXIT KEYBOARD INPUT PROCESSED. * * USES NONE. * * CALLS RDS, DDS, DRP. PKI SUBR ENTRY/EXIT FNC 7020,CH REQUEST INPUT ACN CH IAN CH DCN CH+40 ZJN PKIX RETURN IF NO INPUT LMN 1R* NJN PKI1 IF NOT -*- RJM HDC HOLD DISPLAY CHANNEL UJN PKIX PKI1 LMN 1RH&1R* NJN PKI3 IF NOT *H* PKI2 RJM DDS DROP DISPLAY RJM RDS REQUEST DISPLAY LDD CM+1 CHECK CHANNEL ASSIGNMENT CHTE * LMN CH NJN PKI2 IF DIFFERENT CHANNEL ASSIGNED UJN PKIX RETURN PKI3 LMN 1RD&1RH CHECK FOR DROP MIC NJN PKIX RETURN IF NOT *D* LJM DRP DROP MICKEY MOUSE RDD SPACE 4,14 ** RDD - ROTATE DISPLAY DATA. * * ENTRY (T1) = NUMBER OF DOTS TO ROTATE. * (T2) = ADDRESS TO GET DATA FROM. * (T3) = ADDRESS TO WRITE DATA TO. * (SN) = SINE OF ROTATION ANGLE. * (CS) = COSINE OF ROTATION ANGLE. * (SS) = SIGN OF SINE (1 IF -). * (SC) = SIGN OF COSINE (1 IF -). * * EXIT ARRAY ROTATED. * * USES T1, T2, T3, AB - AB+4, MR, MD - MD+1, MP - MP+1. * * CALLS MUL, PRL. RDD SUBR ENTRY/EXIT RDD1 LDI T2 GET X-VALUE ADC -6400 UNBIAS STD MD+1 MULTIPLICAND = X SHN -14 STD MD LDD SN MULTIPLIER = SIN STD MR RJM MUL MULTIPLY X * SIN STD AB LDD CS MULTIPLIER = COS STD MR RJM MUL MULTIPLY X * COS STD AB+1 AOD T2 LDI T2 GET Y-VALUE ADC -7400 UNBIAS STD MD+1 MULTIPLICAND = Y SHN -14 STD MD LDD SN MULTIPLIER = SIN STD MR RJM MUL MULTIPLY Y * SIN STD AB+2 LDD CS MULTIPLIER = COS STD MR RJM MUL MULTIPLY Y * COS STD AB+3 LDD SS CHECK SIGN OF SINE ZJN RDD2 IF COMPLEMENT NOT REQUIRED LDC 777 SBD AB COMPLEMENT X * SIN STD AB LDC 777 COMPLEMENT Y * SIN SBD AB+2 STD AB+2 RDD2 LDD SC CHECK SIGN OF COSINE ZJN RDD3 IF COMPLEMENT NOT REQUIRED LDC 777 COMPLEMENT X * COS SBD AB+1 STD AB+1 LDC 777 COMPLEMENT Y * COS SBD AB+3 STD AB+3 RDD3 LDD AB+1 X = X*COS - Y*SIN SBD AB+2 ADC 6000+400 ADD COORDINATE AND 400 BIAS STI T3 AOD T3 LDD AB+3 Y = Y*COS + X*SIN ADD AB ADC 7000-400 ADD COORDINATE BIAS REMOVE 400 BIAS STI T3 AOD T3 BUMP *TO* ADDRESS AOD T2 BUMP *FROM* ADDRESS SOD T1 DECREMENT DOT COUNT ZJN RDD4 IF ALL DATA CONVERTED PAUSE LJM RDD1 LOOP THROUGH ALL DATA RDD4 LJM RDDX RETURN RLM SPACE 4,10 ** RLM - RELOAD MIC. * * ENTRY NONE. * * EXIT TO *PPR*. * * USES NONE. * * CALLS DDS, PPR. RLM BSS 0 ENTRY RJM DDS DROP DISPLAY LJM PPR EXIT TO PPR ROL SPACE 4,10 ** ROL - PROCESS MICKEY ROLLOUT. * * ENTRY ROLLOUT REQUESTED. * * EXIT *MIC* CALL WRITTEN TO PP-RECALL REGISTER. * TO DRP. * * CALLS DRP. ROL BSS 0 LDN ZERL RECALL REQUEST CRD CM LDD MA CWD IR ADN 1 CWD CM MONITOR RECM LJM DRP DROP PPU CHTB SPACE 4,10 * UNQUALIFIED CHANNEL INSTRUCTION ADDRESSES. USE CHTB MDCA CHTB TABLE OF CHANNEL INSTRUCTION ADDRESSES USE 0 SPACE 4,10 * COMMON DECKS. *CALL COMDDSP *CALL COMDSYS *CALL COMPC2D MIC TITLE DATA FOR MICKEY MOUSE CLOCK. SPACE 4,10 * DATA FOR MICKEY MOUSE. NUM BSS 0 NUMBERS ON THE CLOCK DATA 6540,7644,1R1 DATA 6654,7527,1R2 DATA 6710,7360,1R3 DATA 6654,7207,1R4 DATA 6540,7073,1R5 DATA 6367,7040,1R6 DATA 6217,7073,1R7 DATA 6103,7210,1R8 DATA 6050,7357,1R9 DATA 6063,7530,2R10 DATA 6200,7644,2R11 DATA 6350,7700,2R12 NUML EQU *-NUM LENGTH OF CLOCK DIGITS TABLE BOD BSS 0 DATA FOR MICKEY MOUSE BODY DATA 6443,7275,6444,7301,6440,7265,6437,7261,6441,7270 DATA 6431,7256,6435,7255,6422,7260,6425,7257,6413,7262 DATA 6416,7261,6406,7265,6410,7264,6404,7273,6405,7277 DATA 6406,7303,6407,7310,6410,7314,6411,7320,6412,7325 DATA 6413,7331,6403,7267,6415,7336,6423,7336,6420,7336 DATA 6430,7337,6426,7337,6436,7340,6433,7340,6444,7341 DATA 6441,7341,6453,7342,6447,7342,6462,7342,6457,7342 DATA 6465,7341,6471,7341,6475,7340,6477,7335,6477,7337 DATA 6477,7332,6476,7326,6476,7325,6475,7322,6472,7314 DATA 6473,7316,6470,7312,6465,7306,6466,7310,6461,7303 DATA 6463,7304,6455,7300,6457,7301,6453,7276,6447,7274 DATA 6444,7272,6441,7270,6447,7266,6444,7267,6452,7265 DATA 6456,7264,6464,7265,6462,7265,6467,7266,6473,7267 DATA 6502,7273,6477,7271,6505,7275,6503,7301,6501,7305 DATA 6477,7314,6477,7311,6476,7317,6475,7323,6464,7323 DATA 6466,7324,6470,7326,6471,7331,6470,7334,6467,7335 DATA 6466,7335,6464,7334,6463,7332,6463,7327,6463,7324 DATA 6464,7323,6465,7323,6451,7323,6453,7324,6454,7326 DATA 6455,7330,6454,7332,6453,7334,6452,7335,6451,7336 DATA 6450,7335,6447,7333,6447,7331,6446,7327,6447,7324 DATA 6450,7323,6452,7323,6406,7315,6412,7317,6376,7310 DATA 6402,7312,6370,7303,6365,7301,6372,7305,6357,7274 DATA 6362,7276,6351,7267,6353,7271,6343,7261,6346,7264 DATA 6336,7252,6340,7255,6331,7244,6333,7247,6326,7237 DATA 6327,7241,6325,7234,6323,7226,6323,7230,6322,7223 DATA 6322,7217,6323,7214,6324,7212,6325,7210,6327,7207 DATA 6331,7207,6333,7210,6335,7212,6335,7213,6335,7215 DATA 6402,7264,6400,7260,6377,7255,6403,7267,6374,7246 DATA 6373,7242,6375,7251,6370,7232,6367,7226,6371,7236 DATA 6364,7215,6365,7221,6363,7211,6365,7210,6367,7206 DATA 6371,7206,6374,7213,6376,7217,6400,7223,6402,7227 DATA 6404,7234,6406,7240,6410,7244,6412,7250,6414,7254 DATA 6373,7207,6416,7261,6377,7216,6401,7214,6402,7211 DATA 6403,7206,6402,7202,6401,7177,6376,7176,6372,7176 DATA 6370,7176,6365,7177,6362,7200,6356,7202,6353,7204 DATA 6353,7206,6352,7211,6354,7215,6355,7217,6361,7220 DATA 6363,7221,6365,7221,6346,7205,6342,7203,6336,7201 DATA 6352,7207,6331,7177,6352,7172,6354,7170,6345,7175 DATA 6347,7174,6340,7176,6342,7176,6333,7177,6335,7177 DATA 6330,7177,6324,7177,6320,7176,6322,7177,6316,7174 DATA 6313,7171,6311,7166,6310,7162,6310,7156,6312,7152 DATA 6311,7154,6316,7147,6314,7150,6322,7144,6320,7145 DATA 6330,7141,6325,7142,6336,7140,6333,7140,6345,7137 DATA 6342,7137,6352,7140,6350,7137,6360,7142,6355,7141 DATA 6366,7145,6364,7143,6372,7151,6371,7147,6376,7156 DATA 6374,7153,6400,7164,6400,7161,6401,7171,6401,7167 DATA 6401,7174,6401,7200,6461,7261,6462,7255,6461,7265 DATA 6464,7245,6465,7240,6463,7251,6470,7230,6471,7225 DATA 6467,7233,6473,7216,6472,7221,6475,7213,6500,7212 DATA 6503,7213,6505,7222,6504,7227,6503,7233,6502,7240 DATA 6500,7244,6477,7251,6476,7255,6475,7262,6506,7216 DATA 6473,7267,6505,7225,6510,7225,6512,7224,6514,7222 DATA 6516,7217,6515,7214,6515,7212,6507,7205,6512,7207 DATA 6502,7203,6504,7203,6477,7202,6473,7202,6471,7203 DATA 6467,7210,6467,7206,6466,7213,6467,7216,6471,7220 DATA 6472,7221,6520,7214,6524,7214,6530,7214,6515,7214 DATA 6534,7214,6520,7201,6523,7206,6522,7204,6525,7210 DATA 6531,7212,6537,7215,6534,7214,6544,7216,6542,7216 DATA 6547,7216,6553,7214,6556,7207,6556,7211,6557,7201 DATA 6557,7204,6556,7174,6557,7176,6554,7167,6555,7171 DATA 6551,7163,6552,7165,6545,7157,6547,7161,6540,7154 DATA 6542,7155,6533,7153,6535,7153,6525,7152,6530,7152 DATA 6516,7151,6521,7151,6507,7153,6512,7152,6504,7154 DATA 6476,7157,6500,7156,6474,7161,6471,7167,6472,7164 DATA 6470,7176,6470,7172,6471,7203,6475,7343,6475,7340 DATA 6474,7352,6473,7356,6474,7347,6471,7366,6470,7372 DATA 6472,7362,6465,7403,6466,7377,6461,7413,6463,7407 DATA 6453,7422,6456,7417,6444,7430,6450,7426,6434,7435 DATA 6440,7433,6424,7441,6430,7437,6420,7443,6401,7440 DATA 6401,7443,6377,7430,6400,7434,6376,7420,6376,7424 DATA 6377,7411,6377,7413,6401,7403,6400,7406,6403,7374 DATA 6405,7371,6402,7377,6410,7363,6407,7366,6412,7360 DATA 6414,7355,6416,7347,6415,7351,6417,7341,6417,7344 DATA 6417,7336,6446,7457,6447,7461,6442,7453,6444,7455 DATA 6436,7450,6440,7451,6433,7446,6427,7445,6425,7445 DATA 6376,7444,6401,7443,6366,7447,6362,7451,6372,7446 DATA 6352,7456,6355,7453,6344,7463,6346,7461,6341,7470 DATA 6342,7465,6337,7474,6336,7476,6336,7501,6341,7504 DATA 6340,7502,6333,7477,6335,7500,6325,7473,6330,7475 DATA 6316,7471,6321,7471,6307,7470,6312,7470,6301,7467 DATA 6304,7467,6274,7471,6276,7470,6267,7474,6271,7472 DATA 6263,7501,6264,7477,6260,7505,6261,7503,6257,7513 DATA 6257,7510,6256,7522,6256,7517,6256,7531,6256,7526 DATA 6260,7537,6257,7534,6264,7545,6262,7542,6272,7552 DATA 6267,7550,6300,7555,6276,7554,6306,7556,6303,7556 DATA 6314,7555,6311,7556,6322,7552,6317,7554,6327,7546 DATA 6325,7550,6331,7543,6334,7544,6334,7541,6336,7552 DATA 6335,7547,6340,7557,6337,7555,6343,7564,6341,7562 DATA 6347,7570,6345,7566,6353,7573,6351,7572,6356,7575 DATA 6361,7577,6353,7603,6355,7601,6347,7610,6350,7606 DATA 6344,7616,6345,7613,6343,7625,6343,7622,6344,7632 DATA 6344,7630,6346,7637,6345,7635,6350,7641,6355,7646 DATA 6353,7644,6362,7651,6357,7650,6370,7652,6365,7652 DATA 6377,7651,6374,7652,6406,7647,6403,7650,6413,7642 DATA 6411,7645,6417,7635,6416,7637,6420,7627,6420,7632 DATA 6417,7620,6420,7623,6415,7612,6416,7614,6412,7605 DATA 6413,7607,6413,7603,6410,7603,6421,7603,6416,7603 DATA 6427,7601,6424,7602,6434,7577,6432,7600,6437,7575 DATA 6444,7572,6442,7573,6447,7566,6446,7570,6452,7562 DATA 6451,7564,6455,7555,6454,7557,6457,7550,6456,7552 DATA 6460,7542,6460,7545,6461,7537,6462,7535,6433,7505 DATA 6437,7511,6435,7510,6441,7513,6444,7515,6447,7516 DATA 6444,7510,6445,7514,6451,7523,6447,7520,6456,7531 DATA 6454,7527,6462,7535,6460,7533,6467,7540,6464,7537 DATA 6472,7542,6476,7542,6502,7542,6505,7540,6507,7533 DATA 6505,7537,6505,7541,6507,7543,6511,7547,6514,7551 DATA 6517,7552,6521,7551,6523,7546,6522,7543,6521,7540 DATA 6517,7536,6515,7534,6513,7533,6511,7533,6507,7533 DATA 6506,7535,6513,7533,6515,7524,6515,7527,6516,7516 DATA 6516,7520,6514,7511,6515,7513,6512,7504,6513,7506 DATA 6506,7477,6510,7501,6501,7473,6503,7474,6474,7471 DATA 6476,7472,6466,7466,6471,7467,6460,7463,6463,7464 DATA 6452,7462,6455,7462,6444,7460,6447,7461,6441,7457 DATA 6432,7457,6435,7457,6424,7457,6427,7457,6417,7461 DATA 6421,7460,6411,7463,6414,7462,6404,7466,6406,7465 DATA 6401,7467,6376,7472,6374,7471,6376,7466,6373,7474 DATA 6400,7462,6402,7464,6401,7463,6400,7461,6400,7456 DATA 6401,7453,6403,7451,6405,7447,6410,7447,6412,7447 DATA 6414,7450,6416,7452,6417,7454,6417,7456,6410,7457 DATA 6406,7453,6436,7457,6427,7454,6432,7455,6420,7451 DATA 6424,7452,6413,7447,6405,7477,6410,7500,6376,7475 DATA 6401,7476,6371,7473,6373,7474,6363,7467,6366,7471 DATA 6360,7464,6423,7516,6426,7517,6430,7522,6431,7525 DATA 6431,7531,6430,7533,6426,7535,6424,7536,6422,7535 DATA 6417,7533,6416,7530,6416,7524,6417,7521,6421,7516 DATA 6423,7515,6425,7516,6416,7527,6416,7531,6417,7534 DATA 6421,7535,6422,7535,6423,7534,6424,7532,6424,7530 DATA 6422,7526,6421,7525,6417,7526,6416,7527,6440,7531 DATA 6440,7527,6441,7524,6442,7521,6444,7521,6446,7522 DATA 6450,7525,6450,7527,6450,7532,6450,7535,6447,7536 DATA 6445,7537,6443,7537,6442,7535,6441,7533,6441,7531 DATA 6441,7527,6442,7526,6444,7527,6444,7531,6445,7533 DATA 6445,7534,6445,7536,6444,7536,6443,7536,6442,7535 DATA 6441,7570,6440,7564,6442,7573,6436,7562,6437,7560 DATA 6433,7567,6435,7565,6427,7574,6431,7572,6423,7577 DATA 6425,7576,6416,7601,6420,7601,6411,7601,6413,7601 DATA 6404,7577,6406,7600,6401,7572,6402,7575,6376,7564 DATA 6377,7567,6374,7556,6374,7561,6373,7546,6373,7552 DATA 6374,7537,6374,7542,6376,7530,6375,7533,6400,7524 DATA 6402,7520,6400,7516,6403,7516,6375,7517,6367,7516 DATA 6371,7517,6364,7515,6357,7511,6361,7513,6352,7505 DATA 6354,7507,6350,7502,6346,7476,6345,7473,6345,7467 DATA 6346,7464,6352,7456,6347,7461,6355,7453,6374,7451 DATA 6376,7446,6401,7443,6405,7442,6411,7441,6414,7441 DATA 6417,7442,6423,7443,6430,7447,6425,7445,6433,7451 BODL EQU *-BOD LENGTH OF BODY ARML BSS 0 DATA FOR LONG ARM DATA 6377,7552,6377,7546,6377,7542,6377,7556,6376,7535 DATA 6375,7511,6375,7505,6375,7501,6375,7514,6375,7475 DATA 6376,7455,6377,7435,6377,7441,6401,7425,6400,7430 DATA 6403,7417,6402,7421,6405,7411,6404,7414,6406,7406 DATA 6410,7402,6410,7400,6407,7376,6406,7374,6405,7372 DATA 6402,7371,6400,7370,6376,7370,6374,7371,6373,7372 DATA 6371,7374,6371,7376,6370,7400,6367,7406,6367,7404 DATA 6365,7415,6366,7411,6364,7426,6364,7422,6364,7435 DATA 6363,7441,6364,7432,6362,7451,6362,7445,6362,7461 DATA 6362,7464,6362,7456,6361,7473,6361,7476,6361,7470 DATA 6362,7506,6362,7512,6362,7502,6362,7522,6362,7516 DATA 6363,7531,6363,7534,6363,7526,6364,7542,6364,7540 DATA 6365,7545,6366,7551,6365,7554,6366,7557,6367,7560 DATA 6371,7560,6373,7560,6375,7560,6376,7557,6377,7555 DATA 6377,7546,6402,7546,6405,7546,6410,7547,6412,7551 DATA 6414,7554,6415,7556,6416,7560,6415,7563,6414,7566 DATA 6415,7564,6412,7570,6407,7573,6404,7574,6376,7574 DATA 6400,7574,6373,7575,6370,7575,6364,7575,6362,7575 DATA 6360,7573,6356,7571,6355,7566,6354,7562,6354,7556 DATA 6356,7553,6360,7551,6362,7550,6365,7547,6415,7564 DATA 6417,7570,6416,7566,6420,7573,6421,7577,6421,7603 DATA 6421,7606,6420,7611,6417,7613,6415,7615,6412,7616 DATA 6407,7616,6403,7616,6400,7615,6375,7614,6373,7613 DATA 6370,7611,6366,7607,6366,7605,6366,7604,6367,7604 DATA 6370,7603,6372,7604,6374,7604,6377,7605,6402,7606 DATA 6420,7612,6421,7613,6421,7621,6421,7625,6421,7616 DATA 6420,7635,6420,7631,6420,7641,6417,7643,6415,7644 DATA 6413,7644,6411,7644,6410,7643,6407,7641,6407,7636 DATA 6407,7633,6407,7626,6407,7622,6407,7631,6407,7616 DATA 6407,7631,6406,7632,6405,7634,6403,7634,6401,7633 DATA 6400,7631,6377,7627,6377,7621,6377,7624,6377,7615 DATA 6400,7631,6376,7632,6374,7631,6372,7630,6371,7626 DATA 6371,7624,6371,7620,6371,7616,6372,7613,6371,7626 DATA 6365,7623,6366,7625,6362,7617,6363,7621,6361,7612 DATA 6361,7614,6361,7605,6361,7607,6361,7602,6361,7577 DATA 6362,7575 ARMLL EQU *-ARML LENGTH OF LONG ARM ARMS BSS 0 DATA FOR SHORT ARM DATA 6411,7477,6411,7502,6411,7470,6411,7473,6407,7462 DATA 6410,7465,6405,7453,6406,7457,6403,7443,6404,7447 DATA 6401,7432,6400,7426,6402,7436,6376,7416,6377,7422 DATA 6374,7411,6372,7405,6371,7403,6370,7401,6370,7377 DATA 6371,7375,6372,7373,6373,7372,6375,7371,6377,7370 DATA 6400,7370,6402,7371,6404,7371,6405,7372,6406,7373 DATA 6407,7375,6410,7377,6411,7400,6411,7403,6411,7406 DATA 6412,7410,6413,7420,6412,7414,6414,7430,6414,7424 DATA 6415,7437,6415,7434,6416,7447,6416,7443,6417,7456 DATA 6417,7453,6420,7465,6420,7462,6421,7470,6421,7477 DATA 6421,7474,6421,7502,6421,7503,6420,7503,6416,7504 DATA 6415,7504,6414,7504,6412,7504,6412,7503,6411,7502 DATA 6410,7471,6406,7471,6404,7472,6400,7473,6375,7475 DATA 6373,7477,6373,7501,6373,7504,6374,7506,6375,7511 DATA 6377,7513,6401,7514,6403,7515,6406,7515,6412,7515 DATA 6416,7515,6422,7514,6426,7513,6431,7512,6433,7510 DATA 6434,7506,6435,7503,6435,7477,6434,7474,6432,7473 DATA 6430,7471,6425,7471,6423,7470,6421,7470,6401,7514 DATA 6377,7516,6375,7524,6375,7522,6375,7527,6376,7532 DATA 6377,7536,6400,7540,6401,7540,6406,7541,6404,7541 DATA 6413,7540,6411,7540,6416,7537,6421,7536,6422,7535 DATA 6422,7534,6422,7532,6420,7531,6416,7530,6414,7527 DATA 6412,7527,6400,7540,6377,7546,6377,7543,6376,7554 DATA 6376,7551,6376,7560,6375,7564,6376,7565,6376,7567 DATA 6400,7567,6401,7567,6402,7566,6403,7565,6404,7563 DATA 6405,7561,6405,7555,6405,7553,6406,7545,6406,7550 DATA 6407,7542,6410,7540,6406,7553,6406,7554,6407,7555 DATA 6411,7554,6414,7553,6415,7550,6415,7545,6415,7542 DATA 6414,7537,6415,7550,6415,7551,6417,7552,6421,7552 DATA 6423,7550,6423,7546,6423,7540,6423,7544,6422,7533 DATA 6423,7547,6425,7546,6427,7544,6431,7537,6430,7541 DATA 6432,7531,6432,7534,6433,7525,6434,7521,6434,7515 DATA 6432,7511,6432,7511,6431,7505,6427,7500,6426,7474 DATA 6424,7467,6422,7463,6421,7456,6417,7452,6415,7445 DATA 6414,7440,6412,7434,6411,7427,6407,7423,6405,7416 DATA 6404,7412,6402,7405,6432,7511 ARMSL EQU *-ARMS LENGTH OF SHORT ARM SPACE 4,10 DIS HERE USE BUFFERS BUF BSS 0 SCRATCH BUFFER FOR BUILDING NEW DISPLAY BUFL MAX ARMSL,ARMLL LWA EQU BUF+BUFL+DRDC ERRNG 7776-LWA NOT ENOUGH ROOM FOR SCRATCH BUFFER MIC TITLE PRESET. PRS SPACE 4,10 ** PRS - PRESET MICKEY MOUSE CONSOLE CLOCK. * * ENTRY NONE. * * EXIT DISPLAY CHANNEL RESERVED. * (FL) = 0. * MICKEY MOUSE HANDS SET TO INITIAL POSITION. * (DPSA) SET UP FOR 10/20 PPUS. * DISPLAY CHANNEL INSTRUCTIONS MODIFIED. * (FR - SH) = 0. * (RM) = NMRM. * (MICA) = <UJN *-2> IF NO QUITTING TIME SPECIFIED. * *MIC* ABORTED IF ILLEGAL USER ACCESS. * * USES CM - CM+1, FR, TO, DC, SH, RM. PRS SUBR ENTRY/EXIT RJM CUA CHECK USER ACCESS ZJN PRS1 IF SYSTEM ORIGIN LDC PRSA SET * ILLEGAL USER ACCESS.* RJM DFM MONITOR ABTM ABORT PROGRAM LJM PPR ENTER PP RESIDENT PRS1 RJM PMH POSITION MICKEYS HANDS LDC ROL SET TO PROCESS ROLLOUT STM /COMDDSP/ROFA RJM RDS REQUEST DISPLAY RJM MDC MODIFY DISPLAY CHANNELS LDC 6000 SET X-COORDINATE STD XC MONITOR DCPM GET RID OF CPU LDN NCPL SET NUMBER OF CONTROL POINTS CRD CM AOD CM+1 STD NC PRS5 PAUSE LDD FL ZJN PRS6 IF FL = 0 LDN ZERL CRD CM MONITOR RSTM REDUCE FL TO ZERO UJN PRS5 PRS6 LDN ZERL CRD FR CLEAR *MNC* DIRECT CELLS LDN NMRM SET MINUTE COUNT BEFORE RELOAD OF MICKEY STD RM LDD IR+4 NJN PRS7 IF QUITTING TIME SPECIFIED LDC UJNI+2 TURN OFF CHECK FOR QUITTING TIME STM MICA PRS7 LJM PRSX PRSA DATA C* ILLEGAL USER ACCESS.* MIC TITLE PRESET SUBROUTINES. MDC SPACE 4,10 ** MDC - MODIFY DISPLAY CHANNEL INSTRUCIONS. * * ENTRY CM+1 = CHANNEL. * * EXIT CHANNEL INSTRUCTIONS MODIFIED. * * USES T1, T2. MDC SUBR LDC MDCA ADDRESS OF TABLE STD T1 MDC1 LDI T1 ZJN MDCX IF END OF TABLE STD T2 LDI T2 GET INSTRUCTION SCN 37 LMD CM+1 SET CHANNEL NUMBER STI T2 AOD T1 ADVANCE ADDRESS UJN MDC1 LOOP QUAL COMDSYS KLUDGE FOR COMDSYS INSTRUCTIONS USE CHTB ORG *-1 MDCA CHTB TABLE OF CHANNEL INSTRUCTIONS IN COMDSYS USE BUFFERS QUAL * PMH SPACE 4,14 ** PMH - POSITION MICKEYS HANDS. * * ENTRY NONE. * * EXIT HOUR HAND AND MINUTE HAND SET TO REFLECT PDTL. * (SN) = SINE OF 6 DEGREES * 1000. * (SS) = SIGN OF SINE OF 6 DEGREES. * (CS) = COSINE OF 6 DEGREES * 1000. * (SC) = SIGN OF COSINE OF 6 DEGREES. * * USES CM - CM+4, T0 - T5, HR, MN, CS, SN, SC, SS. * * CALLS RIP. PMH SUBR ENTRY/EXIT LDN PDTL READ PACKED DATE AND TIME CRD CM LDD CM+4 SHN -6 STD MN SET CURRENT MINUTES * COMPUTE MINUTE NUMBER POSITION OF HOUR HAND. STD T1 DIVIDE MINUTES BY 12D LCN 0 SET QUOTIENT STD T0 PMH1 AOD T0 BUMP QUOTIENT LCN 12D RAD T1 REDUCE DIVIDEND PJN PMH1 IF DIVIDE NOT COMPLETE LMC 777777 STD HR (HR) = 12D - MOD(HOUR, 12D) LDD CM+3 GET CURRENT HOUR LPN 77 SBN 12D PJN PMH2 IF P.M. ADN 12D PMH2 STD T1 GET HOUR * 5 SHN 2 ADD T1 ADD T0 ADD MINUTES / 12D STD T5 (T5) = MINUTE NUMBER OF HOUR HAND * ROTATE HOUR HAND. LDC ARMSL/2 SET DOT COUNT STD T1 LDC ARMS SET BUFFER ADDRESS STD T2 STD T3 RJM RIP ROTATE TO INITIAL POSITION * ROTATE MINUTE HAND. LDC ARMLL/2 SET DOT COUNT STD T1 LDC ARML SET BUFFER ADDRESS STD T2 STD T3 LDD MN SET AMOUNT OF ROTATION STD T5 RJM RIP ROTATE TO INITIAL POSITION * SET SINE AND COSINE VALUES FOR 6 DEGREES (1 MINUTE). PMH3 LDM PMHA SET SIN STD SN LDM PMHB SET COS STD CS LDN 0 SET SIGN OF COSINE = + STD SC LDN 1 SET SIGN OF SINE = - STD SS LJM PMHX RETURN PMHA DATA 0066 SINE OF 6 DEGREES * 1000 PMHB DATA 0775 COSINE OF 6 DEGREES * 1000 RIP SPACE 4,12 ** RIP - ROTATE ARM TO INITIAL POSITION. * * ENTRY (T1) = DOT COUNT OF BUFFER TO BE ROTATED. * (T2) = *FROM* ADDRESS OF BUFFER. * (T3) = *TO* ADDRESS. * (T5) = MINUTE NUMBER ON CLOCK OF NEW POSITION. * * EXIT ARM MOVED TO SPECIFIED MINUTE NUMBER POSITION. * * USES T0, T1, T2, T3, T4, T5, SN, CS, SS, SC. * * CALLS NONE. RIP SUBR ENTRY/EXIT LCN 0 DIVIDE MINUTES BY 15 TO GET QUADRANT STD T4 RIP1 AOD T4 BUMP QUOTIENT LCN 15D RAD T5 DECREMENT DIVIDEND PJN RIP1 IF DIVIDE NOT COMPLETE ADN 15D STD T5 (T5) = MOD(MINUTES, 15D) LDM RIPA,T4 GET CONTROL PARAMETERS STD T0 LPN 1 STD SC SET SIGN OF COSINE FLAG LDD T0 SHN -1 LPN 1 STD SS SET SIGN OF SINE FLAG LDD T5 STD T4 LDD T0 LPN 4 ZJN RIP2 IF COSINE NOT REVERSE INDEXED LDN 15D SBD T5 STD T4 RIP2 LDM RIPB,T4 GET COSINE STD CS LDD T5 STD T4 LDD T0 LPN 10 ZJN RIP3 IF SINE NOT REVERSE INDEXED LDN 15D SBD T5 STD T4 RIP3 LDM RIPB,T4 GET SINE STD SN RJM RDD ROTATE DISPLAY DATA LJM RIPX RETURN RIPA SPACE 4,10 ** RIPA - SINE/COSINE CONTROL TABLE. * * THIS TABLE IS INDEXED BY THE MINUTE/15D TO DETERMINE HOW TO * GET THE VALUES FOR SINE AND COSINE. * *T 8/ 0, 1/ SR, 1/ CR, 1/ NS, 1/ NC * * SR = 1, IF REVERSE INDEX INTO RIPB TO GET SINE. * CR = 1, IF REVERSE INDEX INTO RIPB TO GET COSINE. * NS = 1, IF SINE IS NEGATIVE. * NC = 1, IF COSINE IS NEGATIVE. RIPA VFD 8/0,1/0,1/1,1/1,1/0 MINUTES 0 - 14 VFD 8/0,1/1,1/0,1/1,1/1 MINUTES 15 - 29 VFD 8/0,1/0,1/1,1/0,1/1 MINUTES 30 - 44 VFD 8/0,1/1,1/0,1/0,1/0 MINUTES 45 - 59 RIPB BSS 0 TABLE OF SINE/COSINE VALUES DATA 0000 0 MIN DATA 0066 1 MIN DATA 0152 2 MIN DATA 0236 3 MIN DATA 0320 4 MIN DATA 0400 5 MIN DATA 0455 6 MIN DATA 0527 7 MIN DATA 0574 8 MIN DATA 0636 9 MIN DATA 0673 10 MIN DATA 0724 11 MIN DATA 0747 12 MIN DATA 0765 13 MIN DATA 0775 14 MIN DATA 1000 15 MIN DECKS SPACE 4,10 ** PRESET COMMON DECKS. *CALL COMPCUA MIC SPACE 4,10 USE CHTB ERRNG 7773-* PRESET OVERFLOWS PP STORAGE SPACE 4 END ~ PAC IDENT PAC,PPFW PERIPH SST RDS *COMMENT PAC - PACMAN FOR THE CONSOLE. BASE MIXED PAC TITLE PAC - CYBER PACMAN. PAC SPACE 4,16 *** PAC - CYBER PACMAN. * * JEFF HIBBARD 82/03/05. TITLE MACRO DEFINITIONS. SPACE 4,16 ** MACRO DEFINITIONS. *CALL COMPMAC BRD SPACE 4,16 ** BRD - GENERATE BOARD. * * BRD (XXXXXXXXXXXXXXXXXXXXXXXXXXXX) * * THIS MACRO MUST BE CALLED FOR EACH ROW OF THE BOARD. * EACH OF THE 28 X'S REPRESENTS ONE COLUMN IN THAT ROW * AND MAY BE ONE OF THE FOLLOWING: * * W WALL. * * ENERGIZER. * . NORMAL ENERGY DOT. * (BLANK) EMPTY LOCATION. * * SYMBOLS OF THE FORM "INTRRCC" AND "FLGRRCC" (WHERE "RR" * AND "CC" ARE ROW AND COLUMN NUMBERS) ARE DEFINED BY THE * MACRO *INT* BUT THEIR VALUES ARE INCLUDED IN THE TABLE * GENERATED BY THIS MACRO. FOR THIS REASON, *TBRD* MUST * BE AFTER *TINT*. * * SEE *TBRD* FOR ADDITIONAL COMMENTS. PURGMAC BRD BRD MACRO X .I1 IF -MIC,.ROW .ROW DECMIC 0,2 .I1 ELSE .ROW DECMIC ".ROW"D+1,2 .I1 ENDIF .COL DECMIC 0,2 .D1 DUP 28 .1 MICRO ".COL"+1,1,@_X_@ .I1 IF DEF,.INT".ROW"_".COL" .2 SET .INT".ROW"_".COL" .INT OCTMIC .2,2 .2 SET .FLG".ROW"_".COL" .FLAG OCTMIC .2,1 .I1 ELSE .INT OCTMIC 0,2 .FLAG OCTMIC 0,1 .I1 ENDIF .D2 ECHO ,C=(W,*,., ),N=(10,05,02,00) .I1 IFC EQ,$C$".1"$ VFD 6/".INT",2/".FLAG",4/N .I1 ENDIF .D2 ENDD .COL DECMIC ".COL"D+1,2 .D1 ENDD BSSZ 4 ENDM DSL SPACE 4,16 ** DSL - GENERATE DISPLAY LINE. * * DSL S,X,Y,TEXT * * S CHARACTER SIZE. * X X CHARACTER POSITION OF LINE. * Y Y CHARACTER POSITION OF LINE. * TEXT TEXT TO BE DISPLAYED. PURGMAC DSL DSL MACRO S,X,Y,T LOCAL B,C,XS,YS NOREF .SIZE B MICRO 1,6,$T$ C MICRO 7,,$T$ ECHO ,D=(S,M,L,),E=(1,2,3,4) Z IFC EQ,$D$S$ .SIZE SET E Z ENDIF ENDD P ERRPL .SIZE-4 BAD CHARACTER SIZE. XS SET 10B*.SIZE YS SET 12B*.SIZE VFD 12/6000B+X*XS,12/7756B-Y*YS,36/6H"B" DATA H$"C"$ ENDM INT SPACE 4,16 ** INT - GENERATE INTERSECTION TABLE. * * AN INTERSECTION IS ANY POINT ON THE MAZE FROM WHICH * IT IS POSSIBLE TO GO AT LEAST 3 DIRECTIONS. * * THIS MACRO ALSO GENERATES SYMBOLS OF THE FORM "INTRRCC" * AND "FLGRRCC" (WHERE "RR" AND "CC" ARE ROW AND COLUMN * NUMBERS) WHICH ARE NEEDED BY THE MARCO *BRD*. * * INT ROW,COL,FLAG,R,UR,U,UL,L,DL,D,DR * * ROW (SHOULD BE OBVIOUS) * COL * FLAG 1 - CONSECUTIVE MEANIES PASSING THROUGH THIS * POINT SHOULD GO DIFFERENT DIRECTIONS * (TO TRY TO SURROUND PACMAN). * 0 - OTHERWISE. * R DIRECTION TO GO IF PACMAN IS TO RIGHT OF THIS POINT. * UR DIRECTION TO GO IF PACMAN IS UPPER RIGHT FROM THIS PNT. * ETC. * USE *U*, *D*, *L* OR *R* TO INDICATE DIRECTIONS. * USE *N* IF THERE IS NO SPECIAL PROBLEM WITH THIS * LOCATION AND THE REGULAR DX/DY LOGIC IN *SMD* SHOULD * PICK THE BEST DIRECTION. PURGMAC INT INT MACRO ROW,COL,FLAG,R,UR,U,UL,L,DL,D,DR VFD 3/DL,3/L,3/U,3/D,3/UR,3/DR,3/R,3/UL,12/0,12/0 .I1 IF -DEF,.INT .INT SET 1 NOREF .INT .I1 ELSE .INT SET .INT+1 .I1 ENDIF .1 OCTMIC .INT,2 .R DECMIC ROW,2 .C DECMIC COL,2 .INT".R"_".C" SET ".1"B .FLG".R"_".C" SET FLAG NOREF .INT".R"_".C",.FLG".R"_".C" ENDM TITLE DIRECT CELLS. **** DIRECT CELL ASSIGNMENTS. * * NOTE THAT MANY SYSTEM DEFINED DIRECT CELLS HAVE BEEM OVERLAID. ORG CM+5 XC BSS 5 X COORDINATES (INDEXED BY *CI*) YC BSS 5 Y COORDINATES (INDEXED BY *CI*) DI BSS 5 CURRENT DIRECTION (INDEXED BY *CI*) PD BSS 5 POSSIBLE DIRECTIONS (SEE *GPD*) LV BSS 1 BOARD LEVEL (*FRUIT*) (1-9) ED BSS 1 NUMBER OF ENERGY DOTS UNEATEN MK BSS 1 MEANIES KILLED SINCE LAST ENERGIZER EATEN CK BSS 1 CLOCK MV BSS 1 REMAINING TIME THAT MEANIES ARE VULNERABLE FZ BSS 1 REMAINING TIME TO FREEZE DISPLAY DP BSS 1 REMAINING TIME TO DISPLAY POINTS FR BSS 1 REMAINING TIME TO DISPLAY FRUIT ST BSS 1 SCORE (TENS) SH BSS 1 SCORE (HUNDREDS - UP TO 4 DECIMAL DIGITS) RD BSS 1 REQUESTED PACMAN DIRECTION (FROM *PKI*) GM BSS 1 GAME IN PROGESS (0=WAITING AT END OF GAME) ERRNG RA-* TOO MANY DIRECT CELLS ERRNG FL-RA * SOME CELLS PAST THIS POINT (THOSE CORRESPONDING TO *RA* * AND *FL*) WILL BE CLOBBERED ON EVERY *PAUSE*. CI BSS 1 CHARACTER INDEX (0=PACMAN, 1-4=MEANIES) BA BSS 1 ADDR IN *TBRD* SP BSS 1 NO OF INCREMENT TO MOVE CHR (USED BY *MOV*) GX BSS 1 X GOAL FOR MEANIE (USED BY *SMD*) GY BSS 1 Y GOAL FOR MEANIE (USED BY *SMD*) DX BSS 1 X DISTANCE MEANIE TO PACMAN (USED BY *SMD*) DY BSS 1 Y DISTANCE MEANIE TO PACMAN (USED BY *SMD*) AX BSS 1 ABS(DX) (USED BY *SMD*) AY BSS 1 ABS(DY) (USED BY *SMD*) ERRNG ON-* TOO MANY DIRECT CELLS **** TITLE MISCELLANEOUS DEFINITIONS. SPACE 4,10 ** COMMON DECKS. QUAL MTR *CALL COMSCPS QUAL * *CALL COMSSSD SPACE 4,16 ** MISCELLANEOUS EQUIVALENCES AND DEFINITIONS. CH EQU CHDS DISPLAY CHANNEL DSCT EQU 20 MINIMUM DISPLAY CYCLE (MILLISECONDS) SEC EQU 42D TYPICAL DISPLAY CYCLES PER SECOND LDEN EQU 8D LINE DENSITY (MUST DIVIDE INTO *SZ*) REQS EQU /MTR/REQS *REQM* SUB-FUNCTION (USED BY COMDDSP) NAME MICRO 1,,*PAC* * (NOTE - *SZ* AND *BSZ* CANNOT BE CHANGED) SZ EQU 16D SIZE OF ONE BOARD POSITION BSZ EQU 32D NUMBER OF BOARD POSITIONS (ACROSS OR DOWN) * USED IN MOST AREAS TO INDICATE CURRENT OR DESIRED * DIRECTION FOR A CHARACTER. R EQU 0 RIGHT (+X) U EQU 1 UP (+Y) L EQU 2 LEFT (-X) D EQU 3 DOWN (-Y) N EQU 4 NOT MOVING * DEFINE SYMBOLS *XC00* THROUGH *XC31* AND *YC00* THROUGH * *YC31* TO BE X AND Y COORDINATES OF CORRESPONDING * BOARD LOCATIONS. NN DECMIC 0,2 DUP 32,4 XC"NN" EQU "NN"D*SZ+6000 YC"NN" EQU "NN"D*SZ+7000 NOREF XC"NN",YC"NN" NN DECMIC "NN"D+1,2 XCM EQU XC13/2+XC14/2 X COORDINATE OF MIDDLE OF SCREEN * THE FOLLOWING 2 VALUES (WHICH CAN OBVIOUSLY NEVER BE * OUTPUTTED AS X COORDINATES) ARE USED TO FAKE OUT *SMD* * TO LEAD MEANIES INTO WRAP-AROUND CHANNELS. XCL EQU 5000 X COORDINATE OFF LEFT SIDE OF BOARD XCR EQU 7777 X COORDINATE OFF RIGHT SIDE OF BOARD SPACE 4,16 ** CONSOLE FUNCTIONS. DSMLL EQU 7000 64 CHARACTERS PER LINE - LEFT SCREEN DMDML EQU 7001 32 CHARACTERS PER LINE - LEFT SCREEN DLRGL EQU 7002 16 CHARACTERS PER LINE - LEFT SCREEN DSMLR EQU 7100 64 CHARACTERS PER LINE - RIGHT SCREEN DMDMR EQU 7101 32 CHARACTERS PER LINE - RIGHT SCREEN DLRGR EQU 7102 16 CHARACTERS PER LINE - RIGHT SCREEN D512L EQU 7010 512 DOTS PER LINE - LEFT SCREEN INPUT EQU 7020 KEYBOARD INPUT SPACE 4,10 ** CONSTANTS USED AS INSTRUCTIONS. *CALL COMSPIM MAIN TITLE MAIN PROGRAM. MAIN SPACE 4,16 ** MAIN PROGRAM. ORG PPFW RJM PRS PRESET PROGRAM PAC1 PAUSE PAUSE LDD CM+1 ZJN *+3 IF NO ERRORS LJM PAC9 RJM BRD DISPLAY BOARD RJM SCR DISPLAY SCORE RJM TXT DISPLAY INSTRUCTIONS RJM PKI PROCESS KEYBOARD INPUT LDD GM ZJN PAC1 IF NO GAME IN PROGRESS LDD FZ ZJN PAC2 IF DISPLAY NOT FROZEN SOD FZ DECREMENT FREEZE TIME NJN PAC1 IF DISPLAY STILL FROZEN LDM AL NJN PAC2 IF PACMAN STILL ALIVE RJM INP INITIALIZE NEW PACMAN UJN PAC1 PAC2 RJM LNM LAUNCH NEW MEANIES IF NEEDED LDD MV ZJN PAC3 IF MEANIES NOT VULNERABLE SOD MV NJN PAC3 IF MEANIES STILL VULNERABLE RJM RMD REVERSE MEANIE DIRECTIONS PAC3 AOD CK INCREMENT CLOCK RJM SPD SET PACMAN DIRECTION RJM MOV MOVE CHARACTERS LJM PAC1 PAC9 RJM DDS DROP DISPLAY DPP MONITOR DPPM DROP PP LJM PPR EXIT TO PP RES PAC TITLE PRIMARY SUBROUTINES. BRD SPACE 4,16 ** BRD - DISPLAY BOARD. * * ENTRY NOTHING SPECIAL. * * EXIT BOARD AND MOST THINGS ON IT DISPLAYED. * * USES NONE. * * CALLS CHR, DOT, FRT, HLN, PSE, VLN. BRD SUBR **ENTRY/EXIT** RJM PSE PAUSE TO MAKE DISPLAY TIME CONSTANT FNC D512L,CH DOT MODE, LEFT SCREEN ACN CH RJM HLN DISPLAY HORIZONTAL LINES RJM VLN DISPLAY VERTICAL LINES DCN CH RJM DOT DISPLAY ENERGY DOTS RJM CHR DISPLAY CHARACTERS RJM FRT DISPLAY FRUIT UJN BRDX MOV SPACE 4,16 ** MOV - MOVE CHARACTERS. * * ONE CALL TO THIS ROUTINE MAY CHANGE A CHARACTER'S * COORDINATES BY MORE THAN ONE, BUT THE COORDINATES MUST * BE INCREMENTED ONE UNIT AT A TIME AND *CKC* (AND * POTENTIALLY *EED*, *SMD* AND *SPD*) CALLED AT EACH * STEP OR WE MIGHT MISS SOMETHING. ALL 5 CHARACTERS * ARE MOVED ON EACH CALL. * * ENTRY (DI) = CURRENT DIRECTIONS. * (XC) = X COORDINATES. * (YC) = Y COORDINATES. * * EXIT (XC) = UPDATED X COORDINATES. * (YC) = UPDATED Y COORDINATES. * *EED* AND *SPD* CALLED IF PACMAN EXACTLY ON A SQUARE. * *SMD* CALLED IF MEANIE EXACTLY ON A SQUARE. * *CKC* CALLED SEVERAL TIMES DURING MOVE. * * USES CI, T1 - T3, SP. * * CALLS CKC, EED, SMD, SPD, SSP. MOV SUBR **ENTRY/EXIT** LDN 0 INITIAL INDEX STD CI MOV1 RJM SSP SET SPEED FOR THIS CHARACTER STD SP NJN MOV2 IF REALLY MOVING THIS CHAR THIS TIME LJM MOV8 SKIP TO NEXT CHARACTER MOV2 LDM DI,CI GET DIRECTION THIS CHARACTER IS GOING STD T1 LDM MOVA+1,T1 SBN 1 (A) = CHANGE IN X (-1, 0 OR +1) RAM XC,CI UPDATE X COORDINATE LPN 17 STD T2 LDM XC,CI ADC -XC00 MJN MOV3 IF OFF LEFT SIDE OF BOARD ADC XC00-XC27-1 MJN MOV5 IF NOT OFF RIGHT SIDE OF BOARD LDC XC00 UJN MOV4 MOV3 LDC XC27 MOV4 STM XC,CI STORE WRAPPED-AROUND X COORDINATE MOV5 LDM MOVA,T1 SBN 1 (A) = CHANGE IN Y RAM YC,CI UPDATE Y COORDINATE LPN 17 RAD T2 RJM CKC CHECK FOR CASUALTIES MJN MOV9 IF PACMAN EATEN LDD CI ZJN MOV6 IF PACMAN BEING MOVED LDD T2 (MOVING MEANIE) NJN MOV7 IF NOT EXACTLY ON A SQUARE RJM SMD CHANGE MEANIE DIRECTION IF NECESSARY UJN MOV7 MOV6 LDD T2 (MOVING PACMAN) NJN MOV7 IF NOT EXACTLY ON A SQUARE RJM EED EAT ENERGY DOT MJN MOV9 IF LAST DOT JUST EATEN RJM SPD BE SURE WE CAN CONTINUE IN THIS DIRECTION MOV7 SOD SP DECREMENT SPEED COUNT ZJN MOV8 IF WE'RE DONE MOVING THIS CHARACTER LJM MOV2 MOVE THIS CHARACTER AGAIN MOV8 AOD CI INCREMENT CHARACTER INDEX SBN 5 PJN MOV9 IF NO MORE CHARACTERS TO MOVE LJM MOV1 MOVE NEXT CHARACTER MOV9 LJM MOVX MOVA DATA 1,2,1,0,1,1 PKI SPACE 4,16 ** PKI - PROCESS KEYBOARD INPUT. * * ENTRY NOTHING SPECIAL. * * EXIT (RD) = REQUESTED DIRECTION (IF ONE ENTERED). * (FZ) = 2*SEC IF -H- OR -*- ENTERED. * JUMP TO *PPR* IF *D* ENTERED. * CALL TO *ING* IF *S* ENTERED. * * USES NONE. * * CALLS DDS, HDC, ING, RDS. PKI9 LDC 2*SEC STD FZ PKI SUBR **ENTRY/EXIT** FNC INPUT,CH ACN CH IAN CH READ KEYBOARD DCN CH ZJN PKIX IF NO KEY PRESSED SBN 1RD NJN PKI1 IF NOT -D- RJM DDS DROP DISPLAY LJM DPP DROP PP PKI1 SBN 1RH-1RD NJN PKI2 IF NOT -H- RJM DDS DROP DISPLAY RJM RDS REQUEST DISPLAY UJN PKI9 PKI2 SBN 1R*-1RH NJN PKI3 IF NOT -*- RJM HDC TOGGLE DISPLAY UJN PKI9 PKI3 ADN 1R*-1RS NJN PKI4 IF NOT -S- RJM ING START GAME UJN PKIX PKI4 ADN 1RS-1RN PJN PKI5 IF KEY PRESSED > *M* ADN 1RN-1RI MJN PKI5 IF KEY PRESSED < *I* STD T1 LDM PKIA,T1 CONVERT LETTER TO DIRECTION CODE STD RD PKI5 LJM PKIX PKIA CON U,L,N,R,D SCR SPACE 4,16 ** SCR - DISPLAY SCORE (AND A FEW OTHER THINGS). * * ENTRY (SCORE) = COORDINATES AND CHARACTERS TO DISPLAY * SCORE (AS BUILT BY *USC*). * (NP) = NUMBER OF PACMEN REMAINING. * (LV) = CURRENT GAME LEVEL (FRUIT). * (DP) = REMAINING NUMBER OF CYCLES TO DISPLAY POINTS * (FOR EATING MEANIE OR FRUIT). * (PNTS) = COORDINATES AND CHARACTERS TO DISPLAY IF * (DP) .NE. 0. * (GM) = 0 IF NO GAME IN PROGRESS. * (NG) = 0 IF FIRST GAME NOT COMPLETED YET. * * EXIT SCORE DISPLAYED. * ONE CHARACTER DISPLAYED FOR EACH REMAINING PACMAN. * FRUITS DISPLAYED FOR EACH LEVEL CONQUERED. * IF (DP) NON-ZERO - * POINTS FOR EATING MEANIE OR FRUIT DISPLAYED. * (DP) DECREMENTED. * (AL(0)) SET TO 1 ON CALL WHICH DECREMENTS (DP) * TO ZERO. MORE ABOUT THIS IN THE COMMENTS * FOR *PME*. * *GAME OVER* DISPLAYED IF APPROPRIATE. * * USES NONE. * * CALLS NONE. SCR SUBR **ENTRY/EXIT** FNC DMDML,CH LARGE LETTERS, LEFT SCREEN ACN CH LDN 5 OAM SCORE,CH OUTPUT SCORE DCN CH * DISPLAY REMAINING PACMEN. FNC DLRGR,CH LARGE LETTERS, RIGHT SCREEN ACN CH LDM NP NUMBER OF REMAINING PACMEN SHN -1 THERE ARE 2 CHARACTERS PER WORD ADN 2 ADD 2 FOR COORDINATES OAM SCRA,CH OUTPUT PACMEN LDM NP LPN 1 ZJN SCR1 IF EVEN NUMBER OF PACMEN LDC 2R* OAN CH DISPLAY THE ODD PACMAN SCR1 DCN CH * OUTPUT LEVEL KEYS (FRUITS). FNC DMDMR,CH MEDIUM LETTERS, RIGHT SCREEN ACN CH LDD LV CURRENT LEVEL SBN 1 NUMBER OF LEVELS CONQUERED SHN -1 THERE ARE 2 CHARACTERS PER WORD ADN 2 ADD 2 FOR COORDINATES OAM SCRB,CH OUTPUT O'S (TO PUT NUMBER IN) LDD LV LPN 1 NJN SCR2 IF EVEN NUMBER OF KEYS TO DISPLAY LDC 2RO OAN CH OUTPUT ONE MORE -O- IF ODD SCR2 DCN CH FNC DSMLR,CH SMALL LETTERS, RIGHT SCREEN ACN CH LDD LV CURRENT LEVEL ADN 1 SUBTRACT 1, ADD 2 FOR COORDINATES OAM SCRC,CH OUTPUT NUMBERS INSIDE O'S DCN CH * OUTPUT NUMBER OF POINTS (NEAR MEANIE OR FRUIT JUST EATEN). LDD DP NUMBER OF REMAINING CYCLES TO DISPLAY PNTS ZJN SCR4 IF NO POINTS TO DISPLAY SOD DP NJN SCR3 IF NOT LAST CYCLE TO DISPLAY POINTS LDN 1 STM AL REINCARNATE PACMAN SCR3 FNC DSMLL,CH SMALL LETTERS, LEFT SCREEN ACN CH LDN 4 OAM PNTS,CH OUTPUT POINTS AND THEIR COORDINATES DCN CH * DISPLAY *GAME OVER* IF APPROPRIATE. SCR4 LDD GM NJN SCR5 IF GAME IN PROGRESS LDM NG ZJN SCR5 IF WE'RE WAITING FOR FIRST GAME TO START FNC DSMLL,CH SMALL LETTERS, LEFT SCREEN ACN CH LDN SCRDL OAM SCRD,CH *GAME OVER* DCN CH SCR5 LJM SCRX SCRA CON XC00,YC02,2L**,2L** SCRB CON XC00,YC00,2LOO,2LOO,2LOO,2LOO SCRC CON XC00,YC00,1L1,1L2,1L3,1L4,1L5,1L6,1L7,1L8,1L9 SCRD CON XC11+8D,YC16+12D DATA H*GAME OVER* SCRDL EQU *-SCRD SMD SPACE 4,16 ** SMD - SET MEANIE DIRECTION. * * THIS ROUTINE IS ONLY CALLED WHEN THE MEANIE IS EXACTLY ON * A SQUARE. IT WILL NOT SET A NEW DIRECTION UNLESS THE * MEANIE IS AT AN "INTERSECTION" (A POINT FROM WHICH THERE * ARE 3 OR MORE POSSIBLE DIRECTIONS) OR UNLESS CONTINUING IN * IN CURRENT DIRECTION WOULD NECESSITATE GOING THROUGH A * WALL (SOME CORNERS ONLY HAVE 2 POSSIBLE DIRECTIONS). IF * THE MEANIES ARE VULNERABLE, THEN A DIRECTION WILL BE * RANDOMLY SELECTED FROM THE POSSIBLE DIRECTIONS WHICH WILL * NOT MOVE THE MEANIE CLOSER TO THE PACMAN. OTHERWISE, * THE FIRST THING DONE IS TO CHECK *TINT*. IN SOME CASES * JUST MOVING IN THE DIRECTION OF THE PACMAN DOES NOT * PUT US ON THE SHORTEST ROUTE TO HIM (BECAUSE OF WALLS * IN THE WAY). *TINT* CONTAINS RECOMMENDATIONS FOR THE * MEANIE'S DIRECTION IN THESE SPECIAL CASES. IF *TINT* HAS * NO RECOMMENDATION, THEN THE MEANIE WILL BE SET TO MOVE IN THE * DIRECTION OF THE PACMAN. FOR SPECIAL INTERSECTIONS * (BIT 4 OF CORRESPONDING *TBRD* WORD = 1) THE CURRENT * CLOCK VALUE, MEANIE NUMBER AND DIRECTION SELECTED ARE * STORED IN THE *TINT* ENTRY WORDS 2 AND 3. IF ANOTHER * MEANIE COMES THROUGH THE SAME INTERSECTION WITHIN 10D*SZ * CYCLES THEN THE SECOND MEANIE (BUT NOT SUBSEQUENT MEANIES) * WILL BE FORCED TO CHOOSE A DIFFERENT DIRECTION. THIS IS * DONE PRIMARILY TO MAKE THE MEANIES SURROUND THE PACMAN INSTEAD * OF JUST LINING UP BEHIND HIM. IN ALL CASES, SETTING THE * REVERSE OF THE CURRENT DIRECTION IS AVOIDED WHENEVER * POSSIBLE. * * ENTRY (CI) = INDEX OF MEANIE. * (XC) = X COORDINATES OF EVERYBODY. * (YC) = Y COORDINATES OF EVERYBODY. * (DI) = CURRENT DIRECTIONS. * (MV) = NON-ZERO IF MEANIES VULNERABLE. * (AL) = STATUS (ALIVE/EATEN) OF CHARACTERS. * (CK) = CLOCK (TO STORE IN *TINT*). * (TBRD) = NORMAL CONSTANT INFO. * (TINT) = TIME AND DIRECTION OF LAST MEANIE THROUGH * SPECIAL INTERSECTIONS (TBRD BIT 4 = 1). * ALSO ALL THE CONSTANT INFO. * * EXIT (DI(CI)) = NEW DIRECTION FOR MEANIE. * (TINT) = TIME AND DIRECTION UPDATED FOR SPECIAL * INTERSECTIONS. * * USES T1, T2, T4 - T6, AX, AY, DX, DY, GX, GY, PD. * * CALLS GBA, GDT, GPD, SDP, SM1, SM2, SRD. SMD7 LDD DX ZJN SMD8 IF X COORDINATE OF MEANIE SAME AS PACMAN LDN 10 STM PD,T5 FORBID X DIRECTION OF PACMAN SMD8 LDD DY ZJN SMD9 IF Y COORDINATE OF MEANIE SAME AS PACMAN LDN 10 STM PD,T6 FORBID Y DIRECTION OF PACMAN SMD9 RJM SRD SET RANDOM DIRECTION (OF THOSE REMAINING) SMD SUBR **ENTRY/EXIT** LDM AL,CI SBN 1 NJN SMDX IF MEANIE NOT ALIVE RJM GBA SET *BA* RJM GPD SET *PD* LDI BA SHN -6 SHIFT OUT ALL BUT *TINT* INDEX NJN SMD1 IF WE'RE AT AN INTERSECTION LDM DI,CI GET OUR CURRENT DIRECTION STD T1 LDM PD,T1 CHECK POSSIBLE DIRECTIONS ZJN SMDX IF WE CAN CONTINUE IN SAME DIRECTION RJM SRD CHANGE DIR (ONLY 1 POSSIBLE IF NOT INTRSC) UJN SMDX SMD1 SBN 1 SHN 2 STD T4 (T4) = DISPLACEMENT INTO *TINT* LDD XC COPY COORDINATES OF PACMAN STD GX LDD YC STD GY RJM SM1 ADJUST GX & GY FOR SPECIAL CASE #1 RJM SM2 ADJUST GX & GY FOR SPECIAL CASE #2 LDD GX SBM XC,CI STD DX X DISTANCE MEANIE TO PACMAN PJN *+3 LMC -0 STD AX ABS(DX) LDD GY SBM YC,CI STD DY Y DISTANCE MEANIE TO PACMAN PJN *+3 LMC -0 STD AY ABS(DY) LDD DX LPC 4000 SHN 1-13 (A) = 0 (R) IF DX POS, 2 (L) IF DX NEG STD T5 X DIRECTION OF PACMAN LDD DY LPC 4000 SHN 1-13 ADN 1 (A) = 1 (U) IF DY POS, 3 (D) IF DY NEG STD T6 Y DIRECTION OF PACMAN LDD MV ZJN *+3 LJM SMD7 IF MEANIES ON THE RUN LDM DI,CI GET CURRENT DIRECTION OF MEANIE ADN 2 LPN 3 STD T1 REVERSE OF CURRENT DIRECTION LDN 10 STM PD,T1 MARK IT AS UNAVAILABLE LDI BA LPN 20 NJN *+3 LJM SMD2 IF NOT SPECIAL INTERSECTION LDD AX ADC -5*SZ-1 PJN SMD2 IF TOO FAR AWAY TO WORRY ABOUT TIME-STAMP LDD AY ADC -5*SZ-1 PJN SMD2 IF TOO FAR AWAY TO WORRY ABOUT TIME-STAMP LDM TINT+2,T4 ZJN SMD2 IF TIME-STAMP ZEROED LDM TINT+3,T4 LPN 77 (A) = INDEX OF LAST MEANIE THROUGH HERE SBD CI ZJN SMD2 IF SAME MEANIE LDD CK SBM TINT+2,T4 LPC 7777 ADC -10D*SZ PJN SMD2 IF TOO LONG AGO LDM TINT+3,T4 SHN -6 STD T1 DIRECTION PICKED LAST TIME THROUGH LDN 10 STM PD,T1 MARK IT UNAVAILABLE SMD2 RJM GDT GET RECOMMENDED DIRECTION SBN N ZJN SMD3 IF NO SPECIAL RECOMMENDATION ADN N RESTORE RECOMMENDED DIRECTION RJM SDP TRY IT PJN SMD6 IF OK SMD3 LDD AY SBD AX PJN SMD4 IF ABS(DY) .GE. ABS(DX) LDD T5 RJM SDP TRY X DIRECTION TO PACMAN PJN SMD6 IF OK SMD4 LDD T6 RJM SDP TRY Y DIRECTION TO PACMAN PJN SMD6 IF OK LDD T5 RJM SDP TRY X DIRECTION TO PACMAN PJN SMD6 IF OK LDD DI CURRENT PACMAN DIRECTION SBN N ZJN SMD5 IF PACMAN NOT MOVING ADN N RJM SDP TRY COPYING PACMAN DIRECTION PJN SMD6 IF OK SMD5 RJM SRD SET RANDOM DIRECTION SMD6 SHN 6 ADD CI STM TINT+3,T4 6/DI,6/CI LDD CK STM TINT+2,T4 CLOCK LJM SMDX SPD SPACE 4,16 ** SPD - SET PACMAN DIRECTION. * * ENTRY (RD) = REQUESTED DIRECTION. * (XC(0)) = CURRENT X COORDIANTE OF PACMAN. * (YC(0)) = CURRENT Y COORDIANTE OF PACMAN. * * EXIT (DI(0)) = DIECTION TO MOVE PACMAN. * * USES CI. * * CALLS GBA, GPD. SPD3 LDN 0 STD CI (NEEDED BY *GBA*) RJM GBA RJM GPD SET *PD* LDM PD,RD NJN SPD5 IF REQUESTED DIRECTION NOT ALLOWED SPD4 LDD RD UJN SPD7 SPD5 LDM PD,DI ZJN SPDX IF CURRENT DIRECTION STILL ALLOWED SPD6 LDN N STOP PACMAN SPD7 STD DI SPD SUBR **ENTRY/EXIT** LDD RD GET REQUESTED DIRECTION SBN N ZJN SPD6 IF REQUEST TO STOP LDD XC LPN 17 ZJN SPD2 IF EXACTLY ON X COORDINATE LDD RD LPN 1 NJN SPDX IF REQUEST FOR Y MOVEMENT UJN SPD4 SPD2 LDD YC LPN 17 ZJN SPD3 IF EXACTLY ON Y COORDINATE LDD RD LPN 1 ZJN SPDX IF REQUEST FOR X MOVEMENT UJN SPD4 TXT SPACE 4,16 ** TXT - DISPLAY HELP TEXT. * * ENTRY (GM) = 1 IF GAME IN PROGESS. * * EXIT HELP TEXT DISPLAYED. * * USES NONE. * * CALLS NONE. TXT SUBR **ENTRY/EXIT** FNC DMDMR,CH MEDIUM TEXT ACN CH LDC TXTAL OAM TXTA,CH OUTPUT TITLE LINE DCN CH FNC DSMLR,CH SMALL TEXT ACN CH LDC TXTBL OAM TXTB,CH OUTPUT HELP LDD GM NJN TXT1 IF GAME IN PROGRESS LDC TXTCL OAM TXTC,CH TELL THEM HOW TO START GAME TXT1 DCN CH UJN TXTX RETURN BASE D TXTA DSL M,5,3,(CYBER PACMAN) TXTAL EQU *-TXTA TXTB BSS 0 DSL S,10,15,(KEY FUNCTION) DSL S,10,16,(--- --------) DSL S,10,17,( I MOVE UP) DSL S,10,18,( M MOVE DOWN) DSL S,10,19,( J MOVE LEFT) DSL S,10,20,( L MOVE RIGHT) DSL S,10,21,( K STOP) DSL S,10,23,( D DROP GAME) DSL S,10,24,( * TOGGLE TO REGULAR DISPLAY) DSL S,10,25,( H HOLD) TXTBL EQU *-TXTB TXTC DSL S,10,27,( S START GAME) TXTCL EQU *-TXTC BASE * PAC TITLE SECONDARY SUBROUTINES. CHR SPACE 4,16 ** CHR - DISPLAY CHARACTERS. * * A LARGE ASTERISK IS DISPLAYED FOR THE PACMAN. EACH MEANIE * IS REPRESENTED BY A MEDIUM-SIZED LETTER (I, P, B OR C) INSIDE * A LARGE LETTER -O-. * * ENTRY (XC) = X COORDINATES. * (YC) = Y COORDINATES. * (AL) = STATUS OF CHARACTERS (ALIVE/EATEN). * CHANNEL INACTIVE. * * EXIT CHARACTERS DISPLAYED. * CHANNEL INACTIVE. * * USES CI, T1, T2. * * CALLS NONE. CHR4 AOD CI SBN 5 MJN CHR1 IF MORE CHARACTERS TO DO DCN CH CHR SUBR **ENTRY/EXIT** LDN 0 STD CI FNC DLRGL,CH LARGE LETTERS, LEFT SCREEN ACN CH CHR1 LDM AL,CI ZJN CHR4 IF THIS CHARACTER HAS BEEN EATEN LDM YC,CI OAN CH OUTPUT Y COORDINATE LDN 5 INTENSITY COUNTS STD T1 STD T2 CHR2 LDM XC,CI OAN CH OUTPUT X COORDINATE LDM CHRA,CI OAN CH OUTPUT -*- FOR PACMAN, -O- FOR MEANIES SOD T1 NJN CHR2 LOOP TO INTENSIFY LDD CI ZJN CHR4 IF PACMAN (DON'T NEED MEDIUM CHARACTER) LDD MV ZJN CHR6 IF MEANIES NOT VULNERABLE ADC -100D PJN CHR5 IF WILL BE VULNERABLE FOR A WHILE YET LDD MV LPN 20 ZJN CHR5 FLASH LETTER RIGHT BEFORE CHANGE CHR6 DCN CH FNC DMDML,CH MEDIUM LETTERS, LEFT SCREEN ACN CH CHR3 LDM XC,CI OAN CH OUTPUT X COORDINATE LDM CHRB,CI OAN CH OUTPUT MEANIE'S NAME SOD T2 NJN CHR3 LOOP TO INTENSIFY DCN CH FNC DLRGL,CH LARGE LETTERS, LEFT SCREEN ACN CH CHR5 LJM CHR4 CHRA CON 1L*,1LO,1LO,1LO,1LO CHRB EQU *-1 CON 1LI,1LP,1LB,1LC CKC SPACE 4,16 ** CKC - CHECK FOR CASUALTIES. * * THIS ROUTINE IS CALLED EVERY TIME A CHARACTER IS MOVED (WHICH * MAY BE MORE THAN ONCE PER CHARACTER PER CYCLE). IF THE * CHARACTER JUST MOVED IS A MEANIE, ALL THAT IS NECESSARY * IS TO COMPARE THAT MEANIE'S COORDINATES TO THE PACMAN'S. * IF THE CHARACTER JUST MOVED IS THE PACMAN, ITS COORDINATES * MUST BE COMPARED TO ALL THE MEANIES' COORDINATES. * IF THE PACMAN JUST MOVED, IT IS ALSO NECESSARY TO SEE IF HE * ATE A FRUIT. * * * ENTRY (CI) = INDEX OF CHARACTER JUST MOVED. * (XC) = NEW X COORDINATES OF EVERYBODY. * (YC) = NEW Y COORDINATES OF EVERYBODY. * (MV) = NON-ZERO IF MEANIES ON THE RUN. * (FR) = NON-ZERO IF FRUIT BEING DISPLAYED. * (FRTA) = X COORDINATE OF FRUIT. * (FRTA+1) = Y COORDINATE OF FRUIT. * * EXIT IF MEANIE EATEN - * *PME* CALLED WITH (T1) = INDEX OF MEANIE EATEN. * IF PACMAN EATEN - * *PPE* CALLED. * (A) SET NEGATIVE. * IF FRUIT EATEN - * *PFE* CALLED. * * USES T1. * * CALLS PFE, PME, PPE. CKC5 LCN 0 SET RETURN CODE CKC SUBR **ENTRY/EXIT** LDD CI NJN *+2 IF NOT PACMAN THAT WAS JUST MOVED LDN 1 STD T1 CKC1 LDM AL,T1 ZJN CKC3 IF THIS MEANIE ALREADY DEAD LDM XC,T1 X COORDINATE OF MEANIE SBD XC X COORDINATE OF PACMAN NJN CKC3 IF X COORDINATES DIFFERENT LDM YC,T1 SBD YC NJN CKC3 IF Y COORDINATES DIFFERENT LDD MV NJN CKC2 IF MEANIES ON THE RUN RJM PPE PROCESS PACMAN EATEN UJN CKC5 CKC2 RJM PME PROCESS MEANIE EATEN CKC3 LDD CI NJN CKCX IF CHARACTER JUST MOVED IS MEANIE AOD T1 SBN 5 MJN CKC1 IF MORE MEANIES TO CHECK LDD FR ZJN CKCX IF FRUIT NOT BEING DISPLAYED LDD XC PACMAN X COORDINATE SBM FRTA NJN CKC4 IF X COORDINATE DIFFERENT FROM FRUIT LDD YC PACMAN Y COORDINATE SBM FRTA+1 NJN CKC4 IF Y COORDINATE DIFFERENT FROM FRUIT RJM PFE PROCESS FRUIT EATEN CKC4 LDN 0 SET RETURN CODE LJM CKCX DOT SPACE 4,16 ** DOT - DISPLAY ENERGY DOTS. * * ENTRY (TBRD) = STANDARD INFO ABOUT EACH BOARD POSITION. * REAL TIME CLOCK USED TO FLASH ENERGIZER DOTS. * CHANNEL INACTIVE. * * EXIT ENERGY DOTS DISPLAYED ON SCREEN. * CHANNEL INACTIVE. * * USES T1 - T4. * * CALLS NONE. DOT4 DCN CH DOT SUBR **ENTRY/EXIT** LDC RTCL REAL TIME CLOCK CRD CM LDD CM+4 LPC 1000 SHN 2-11 (A) = 0 OR 4 ADN 1 STD T4 INTENSITY TO FLASH ENERGIZERS (1 OR 5) FNC DSMLL,CH SMALL LETTERS, LEFT SCREEN ACN CH LDN BSZ START WITH SECOND LINE STD T1 DOT1 AOD T1 INCREMENT *TBRD* INDEX ADC -TBRDL PJN DOT4 IF END OF BOARD LDM TBRD,T1 LPN 1 ZJN DOT1 IF NO DOT TO DISPLAY LDD T1 LPN 37 SHN 4 ADC 6000 STD T2 SAVE X COORDINATE LDD T1 LPC 1740 SHN -1 ADC 7000 OAN CH OUTPUT Y COORDINATE LDM TBRD,T1 LOOK AT BOARD AGAIN LPN 4 NJN DOT2 IF ENERGIZER LDD T2 OAN CH OUTPUT X COORDINATE LDC 2RO OAN CH DISPLAY -O- UJN DOT1 DOT2 DCN CH FNC DMDML,CH CHANGE TO MEDIUM LETTERS ACN CH LDD T4 INTENSITY STD T3 DOT3 LDD T2 X COORDINATE OAN CH LDC 2R* ENERGIZER DOT OAN CH SOD T3 NJN DOT3 IF INTENSITY COUNT NOT EXHAUSTED DCN CH FNC DSMLL,CH CHANGE BACK TO SMALL LETTERS ACN CH LJM DOT1 EED SPACE 4,16 ** EED - EAT ENERGY DOT. * * ENTRY (XC(0)) = X COORDINATE OF PACMAN. * (YC(0)) = Y COORDINATE OF PACMAN. * (CI) = 0. * (TBRD) = STANDARD INFO ABOUT PACMAN'S LOCATION. * (ST) = CURRENT SCORE (TENS DIGIT). * (ED) = NUMBER OF DOTS REMAINING. * (LV) = CURRENT GAME LEVEL. * * EXIT (TBRD) = MODIFIED TO SHOW DOT HAS BEEN EATEN. * (ST) = NEW SCORE (TENS DIGIT). * (ED) = (ED)-1 IF DOT EATEN. * IF ENERGIZER EATEN: * MEANIES PUT IN VULNERABLE MODE. * (MV) = (TMVT(LV)). * (MK) = 0. * IF LAST DOT EATEN: * NEW BOARD INITIALIZED. * (A) SET NEGATIVE. * * USES NONE. * * CALLS GBA, INB, RMD, USC. EED SUBR **ENTRY/EXIT** RJM GBA LPN 1 ZJN EEDX IF NO DOT TO EAT AOD ST ADD 10 TO SCORE LDI BA LMN 1 CLEAR DOT STI BA LPN 4 ZJN EED1 IF NOT ENERGIZER LDN 4 ADD ANOTHER 40 TO SCORE RAD ST LDN 0 STD MK RESET COUNT OF MEANIES KILLED LDM TMVT,LV STD MV SET MEANIES VULNERABLE FOR A WHILE ZJN EED1 IF MEANIES INVULNERABLE AT CURRENT LEVEL RJM RMD REVERSE MEANIE DIRECTIONS EED1 RJM USC UPDATE SCORE SOD ED DECREMENT COUNT OF ENERGY DOTS NJN EEDX IF SOME DOTS REMAIN RJM INB INITIALIZE NEW BOARD LCN 0 SET RETURN CODE UJN EEDX FRT SPACE 4,16 ** FRT - DISPLAY FRUIT. * * THE "FRUIT" IS REALLY A MEDIUM -O- WITH A SMALL NUMBER * (THE CURRENT LEVEL) INSIDE IT, SINCE IT'S RATHER * DIFFICULT TO DRAW RECOGNIZABLE STRAWBERRIES, CHERRIES, * ETC. ON THE CONSOLE. * * ENTRY (FR) = REMAINING CYCLES TO DISPLAY CURRENT FRUIT. * (FT) = RANDOM TIME TO CREATE NEW FRUIT. * (NF) = NUMBER OF FRUITS REMAINING. * (CK) = CURRENT CLOCK READING. * (LV) = CURRENT GAME LEVEL (FOR NUMBER INSIDE FRUIT). * * EXIT IF (FR) ALREADY NON-ZERO - * FRUIT DISPLAYED. * (FR) DECREMENTED. * IF (NF) .GT. 0 * AND LOWER 11 BITS OF (CK) AND (FT) MATCH - * FRUIT DISPLAYED. * (FR) = 20D*SEC. * (NF) = (NF)-1. * * USES NONE. * * CALLS NONE. FRT SUBR **ENTRY/EXIT** LDD FR NJN FRT1 IF ALREADY DISPLAYING A FRUIT LDD CK LMM FT LPC 3777 NJN FRTX IF NOT TIME TO CREATE ANOTHER FRUIT LDM NF ZJN FRTX IF MAXIMUM NUMBER OF FRUITS CREATED ALREADY SOM NF LDC 20D*SEC STD FR START NEW FRUIT DISPLAYING FRT1 SOD FR ZJN FRTX IF FRUIT EXPIRED FNC DMDML,CH MEDIUM LETTERS, LEFT SCREEN ACN CH LDN 3 OAM FRTA,CH DISPLAY MEDIUM -O- DCN CH FNC DSMLL,CH SMALL LETTERS, LEFT SCREEN ACN CH LDM FRTA OAN CH RESET X COORDINATE LDD LV LEVEL ADN 1R0 CONVERT LEVEL TO CHARACTER SHN 6 OAN CH OUTPUT SMALL NUMBER INSIDE -O- DCN CH LJM FRTX FRTA CON XCM,YC15,2RO GBA SPACE 4,16 ** GBA - GET BOARD ADDRESS. * * ENTRY (CI) = INDEX OF CHARACTER WHOSE ADDRESS IS DESIRED. * (XC(CI)) = X COORDINATE OF CHARACTER. * (YC(CI)) = Y COORDINATE OF CHARACTER. * * EXIT (BA) = ADDR IN *TBRD* CORRESPONDING TO THIS CHARACTER'S * LOCATION. * (A) = ((BA)). * * USES T1. * * CALLS NONE. GBA SUBR **ENTRY/EXIT** LDM YC,CI GET Y COORDINATE (16 * BOARD-ROW) LPC 760 GET RID OF 7000 SHN 1 START OF PROPER ROW (32 ENTRIES PER ROW) STD T1 LDM XC,CI GET X COORDINATE (16 * BOARD-COLUMN) LPC 760 GET RID OF 6000 SHN -4 COMPUTE COLUMN ADD T1 ADD START OF ROW ADC TBRD COMPUTE ACTUAL ADDR IN TABLE STD BA LDI BA UJN GBAX GDT SPACE 4,16 ** GDT - GET DIRECTION FROM *TINT*. * * ENTRY (DX) = X DISTANCE MEANIE TO PACMAN. * (DY) = Y DISTANCE MEANIE TO PACMAN. * (T4) = INDEX TO START OF PROPER *TINT* ENTRY. * * EXIT (A) = DIRECTION CODE. * * USES T1, T2. * * CALLS NONE. GDT3 LDN N STOP MEANIE GDT SUBR **ENTRY/EXIT** LDD DX SHN -13 STD T1 (A) = 1 IF DX NEGATIVE NJN GDT1 LDD DX ZJN GDT1 LDN 2 RAD T1 GDT1 LDD T1 (T1) = 0 IF DX ZERO, 1 IF NEG, 2 IF POS SHN 1 RAD T1 (T1) = (T1) * 3 LDD DY SHN -13 STD T2 RAD T1 ADD 1 IF DY NEGATIVE LDD T2 NJN GDT2 LDD DY ZJN GDT2 LDN 2 ADD 2 IF DY POSITIVE RAD T1 GDT2 SOD T1 MJN GDT3 IF WE'RE SITTING ON PACMAN * CURRENT VALUE OF T1 CORRESPONDING DIRECTION * * DX<0 DX=0 DX>0 DX<0 DX=0 DX>0 * DY>0 4 1 7 UL U UR * DY=0 2 - 5 L - R * DY<0 3 0 6 DL D DR SHN -2 (A) = DESIRED WORD INDEX IN TINT ENTRY ADD T4 ADD INDEX TO START OF ENTRY STD T2 LDD T1 LPN 3 SLOT IN TINT WORD STD T1 SHN 1 ADD T1 SHIFT COUNT (SLOT * 3) LMN 77 MAKE IT NEGATIVE ADC SHNI BUILD SHN INSTRUCTION STM GDTA LDM TINT,T2 GET PROPER WORD FROM TINT GDTA SHN 0 SHIFT TO PROPER SLOT LPN 7 ZERO OUT REMAINDER OF WORD LJM GDTX GPD SPACE 4,16 ** GPD - GET POSSIBLE DIRECTIONS. * * ENTRY (BA) = ADDR IN *TBRD* OF LOCATION WE'RE INTERESTED IN. * * EXIT (PD(R)) = 10B IF WALL TO RIGHT; ZERO OTHERWISE. * (PD(L)) = 10B IF WALL TO LEFT; ZERO OTHERWISE. * (PD(U)) = 10B IF WALL ABOVE; ZERO OTHERWISE. * (PD(D)) = 10B IF WALL BELOW; ZERO OTHERWISE. * (PD(N)) REMAINS ZERO (FROM *PRS*). * * USES NONE. * * CALLS NONE. GPD SUBR **ENTRY/EXIT** LDM 1,BA BOARD LOCATION TO RIGHT LPN 10 CLEAR ALL BUT 'WALL' BIT STD PD+R LDM -1,BA BOARD LOCATION TO LEFT LPN 10 STD PD+L LDM BSZ,BA BOARD LOCATION ABOVE US LPN 10 STD PD+U LDM -BSZ,BA BOARD LOCATION BELOW US LPN 10 STD PD+D UJN GPDX HLN SPACE 4,16 ** HLN - DRAW HORIZONTAL LINES. * * THE BOARD IS SYMMETRIC ABOUT *XCM*, AND *THLN* CONTAINS * ONLY LINES ON THE LEFT HALF OF THE BOARD. THIS ROUTINE * DRAWS 2 LINES (OR ONE LONGER ONE) FOR EACH TABLE ENTRY. * * ENTRY (THLN) = DATA TO DRAW ALL HORIZONTAL LINES ON BOARD. * CHANNEL ACTIVE AND IN DOT MODE. * * EXIT LINES DISPLAYED ON SCREEN. * CHANNEL ACTIVE AND IN DOT MODE. * * USES T1 - T5. * * CALLS NONE. HLN SUBR **ENTRY/EXIT** LDN 0 STD T1 INITIALIZE *THLN* INDEX HLN1 LDM THLN,T1 Y COORDINATE ZJN HLNX IF END OF TABLE STD T3 STD T5 LDM THLN+1,T1 LEFTMOST X COORDINATE STD T2 HLN2 LDN 2 OAM T2,CH OUTPUT LEFT PAIR OF COORDINATES LDC XCM SBD T2 X DISTANCE FROM CENTER ZJN HLN3 IF EXACTLY ON CENTER ADC XCM STD T4 X COORDINATE FOR RIGHT HAND SIDE LDN 2 OAM T4,CH OUTPUT RIGHT PAIR OF COORDINATES HLN3 LDN LDEN INCREMENT X COORDINATE RAD T2 SBM THLN+2,T1 COMPARE TO LAST X COORDINATE MJN HLN2 IF MORE LINE TO DRAW ZJN HLN2 IF LAST POINT OF LINE LDN 3 RAD T1 INCREMENT TABLE INDEX UJN HLN1 INB SPACE 4,16 ** INB - INITIALIZE BOARD. * * ENTRY NOTHING SPECIAL. * * EXIT ALL ENERGY DOTS TURNED BACK ON. * TIME-STAMPS (*TINT* WORD 2) CLEARED. * A FEW OTHER THINGS SET. * * USES T1. * * CALLS INP. INB SUBR **ENTRY/EXIT** RJM INP SET UP NEW PACMAN LDN 0 STD CK START CLOCK AT ZERO STD FR START WITH NO FRUIT BEING DISPLAYED STM LNMA (SEE *LNM*) LDN 2 TOTAL TIMES FRUIT DISPLAYED STM NF LDC 250D TOTAL NUMBER OF ENERGY DOTS STD ED LDC RTCL REAL TIME CLOCK CRD CM LDD CM+4 STM FT RANDOM TIME TO START DISPLAYING FRUIT LDD LV CURRENT LEVEL SBN 9D ZJN INB1 IF LEVEL ALREADY AT MAXIMUM AOD LV INCREMENT LEVEL * RESET ENERGY DOTS. INB1 LDN BSZ+1 (FIRST ROW IS ENTIRELY WALL) STD T1 INB2 LDM TBRD,T1 LPN 6 ZJN INB3 IF NOT ENERGY DOT (EITHER KIND) LDM TBRD,T1 SCN 1 LMN 1 INDICATE DOT PRESENT STM TBRD,T1 INB3 AOD T1 INCREMENT INDEX ADC -TBRDL MJN INB2 IF NOT END OF BOARD * CLEAR TIME-STAMPS. LDN 0 STD T1 INB4 LDN 0 STM TINT+2,T1 CLEAR TIME-STAMP LDN 4 LENGTH OF ONE ENTRY RAD T1 ADC -TINTL MJN INB4 IF NOT END OF TABLE LJM INBX UJN INB2 ING SPACE 4,16 ** ING - INITIALIZE GAME. * * ENTRY NOTHING SPECIAL. * * EXIT LOTS OF THINGS INITIALIZED. * * USES NONE. * * CALLS INB, USC. ING SUBR **ENTRY/EXIT** AOD GM INDICATE GAME-IN-PROGRESS LDN 0 STM EP INDICATE EXTRA PACMAN NOT YET GIVEN STD LV RESET LEVEL STD SH RESET SCORE STD ST RJM USC RJM INB SET UP FIRST BOARD LDN 3 SET NUMBER OF PACMEN STM NP UJN INGX INP SPACE 4,16 ** INP - INITIALIZE PACMAN. * * * ENTRY (NP) = NUMBER OF REMAINING PACMEN (MUST BE .GE. 1) * (AL(0)) = 1 IF LAST PACMAN STILL ALIVE (ATE ALL DOTS) * * EXIT NEW PACMAN BROUGHT INTO THIS WORLD. * (NP) = (NP)-1 IF (AL(0)) = 0. * * USES CI. * * CALLS NONE. INP SUBR **ENTRY/EXIT** LDM AL NJN INP1 IF PREVIOUS PACMAN STILL ALIVE SOM NP DECREMENT NUMBER OF PACMEN INP1 LDN N STD RD STD DI INITIAL PACMAN DIRECTION LDC 2*SEC FREEZE BOARD A LITTLE BEFORE PLAY STARTS STD FZ LDN 0 STD MV SET MEANIES NOT VULNERABLE STD DP NO POINT DISPLAYS STM LNMA (SEE *LNM*) STM LNMB LDN 2 START LOOP WITH 2ND MEANIE STD CI INP2 LDN N STM DI,CI SET 'NOT MOVING' LDN 0 STM AL,CI SET CHARACTER DEAD AOD CI SBN 5 MJN INP2 IF MORE CHARACTERS LDN 1 STM AL SET PACMAN ALIVE STM AL+1 SET 1ST MEANIE (OTHERS SET UP BY *LNM*) LDC XCM STD XC INITIAL X COORDINATE FOR PACMAN STD XC+1 INITIAL X COORDINATE FOR 1ST MEANIE LDC YC07 STD YC INITIAL Y COORDINATE FOR PACMAN LDC YC20 STD YC+1 INITIAL Y COORDINATE FOR 1ST MEANIE LDN L STD DI+1 START 1ST MEANIE MOVING TO LEFT LJM INPX LNM SPACE 4,16 ** LNM - LAUNCH NEW MEANIES. * * IF A MEANIE IS DEAD (AND IT'S BEEN A WHILE SINCE THE * LAST MEANIE WAS LAUNCHED) REINCARNATE IT INSIDE THE * CENTER BOX AND START IT MOVING UP. ON SUBSEQUENT CALLS, * THE PROGRESS OF THIS MEANIE IS CHECKED AND WHEN *MOV* * FINALLY HAS IT ALL THE WAY OUT OF THE BOX, ITS DIRECTION * WILL BE RANDOMLY SET TO LEFT OR RIGHT (THE ONLY DIRECTIONS * AVAILABLE) ACCORDING TO THE CLOCK. *LMD* MUST MONITOR * MEANIES MOVING OUT OF THE BOX BECAUSE *MOV* WILL NEVER CALL * *SMD* (BECAUSE THE X COORDIANTE IS BETWEEN SQUARES) AND * THE MEANIE WOULD OTHERWISE JUST SAIL ON THROUGH THE WALL * ABOVE THE BOX. THE PARTICULAR BIT USED FROM THE CLOCK * WAS SELECTED TO CAUSE MEANIES LAUNCHED IMMEDIATELY * AFTER ONE ANOTHER TO GO IN OPPOSITE DIRECTIONS. NO MEANIES * ARE LAUNCHED WHILE THEY ARE VULNERABLE. * * ENTRY (AL) = STATUS OF CHARACTERS. * (YC) = Y COORDINATES. * (CK) = CURRENT CLOCK VALUE. * (MV) = NON-ZERO IF NMEANIES VULNERABLE. * * EXIT IF A NEW MEANIE IS STARTED OUT OF THE BOX - * AL(CI) = 2. * DI(CI) = U. * XC(CI) = XCM (STARTING LOCATION IN BOX). * YC(CI) = YC18 (STARTING LOCATION IN BOX). * WHEN THE MEANIE GETS ALL THE WAY OUT - * AL(CI) = 1. * DI(CI) = L OR R (RANDOMLY). * * USES CI. * * CALLS NONE. LNM5 AOD CI SBN 5 MJN LNM1 IF MORE MEANEIS TO CHECK LNM SUBR **ENTRY/EXIT** LDN 1 SET *CI* TO FIRST MEANIE STD CI LNM1 LDM AL,CI ZJN LNM3 IF THIS MEANIE IS DEAD SBN 2 NJN LNM5 IF THIS MEANIE NOT BEING LAUNCHED LDM YC,CI CHECK PROGRESS OF NEW MEANIE ADC -YC20 NJN LNM5 IF NOT ALL THE WAY OUT YET LDD CK CLOCK SHN -6 LPN 2 RANDOMLY SELECT 0 OR 2 (R OR L) STM DI,CI SET DIRECTION SOM AL,CI SET NORMAL ALIVE STATUS LDN 0 STM LNMA CLEAR *LAUNCH IN PROGRESS* LDC 100 DELAY UNTIL NEXT LAUNCH STM LNMB LNM2 UJN LNM5 LNM3 LDD MV IF MEANIES VULNERABLE ADM LNMA IF ANOTHER LAUNCH IN PROGRESS NJN LNM2 IF EITHER ABOVE CONDITION IS TRUE LDM LNMB ZJN LNM4 IF LONG ENOUGH SINCE LAST LAUNCH SOM LNMB UJN LNM2 LNM4 LDN 2 SET *BEING LAUNCHED* STATUS STM AL,CI STM LNMA LDN U SET DIRECTION STM DI,CI LDC XCM INITIAL X COORDIANTE STM XC,CI LDC YC18 INITIAL Y COORDINATE STM YC,CI UJN LNM2 LNMA BSSZ 1 NON-ZERO IF LAUNCH IN PROGRESS LNMB BSSZ 1 CYCLES UNTIL ANOTHER LAUNCH ALLOWED PFE SPACE 4,16 ** PFE - PROCESS FRUIT EATEN. * * CALLED WHENEVER THE PACMAN EATS A FRUIT. * * ENTRY (SH) = CURRENT SCORE (HUNDREDS). * (LV) = CURRENT GAME LEVEL. * * EXIT (SH) = NEW SCORE (AMOUNT ADDED DEPENDS ON (LV)). * (FR) = 0 (TO STOP FRUIT FROM DISPLAYING). * (DP) = 3*SEC (DISPLAY POINTS FOR 3 SECONDS). * (PNTS) = COORDIANTES AND POINTS FOR *SCR* TO DISPLAY. * * USES NONE. * * CALLS USC. PFE SUBR **ENTRY/EXIT** LDN 0 STOP FRUIT FROM DISPLAYING STD FR LDM PFEA-1,LV SCORE FOR EATING FRUIT (HUNDREDS) RAD SH RJM USC LDM FRTA X COORDINATE OF FRUIT SBN SZ STM PNTS LDM FRTA+1 Y COORDINATE OF FRUIT STM PNTS+1 LDM PFEB-1,LV SCORE (DISPLAY CODE) STM PNTS+2 LDC 3*SEC STD DP UJN PFEX PFEA DATA 1,3,5,7,10D,20D,30D,50D,50D PFEB CON 1R1,1R3,1R5,1R7,2R10,2R20,2R30,2R50,2R50 PME SPACE 4,16 ** PME - PROCESS MEANIE EATEN. * * CALLED WHENEVER THE PACMAN EATS A MEANIE. * * ENTRY (T1) = INDEX OF MEANIE EATEN. * (MK) = NUMBER OF MEANIES KILLED SINCE LAST ENERGIZER * EATEN. * (SH) = CURRENT SCORE (HUNDREDS). * (XC) = X COORDINATE OF PACMAN. * (YC) = Y COORDINATE OF PACMAN. * * EXIT (SH) = NEW SCORE. * (MK) = (MK)+1. * (AL(0)) = 0 (SEE COMMENTS BELOW). * (AL(T1)) = 0 (TO INDICATE MEANIE IS DEAD). * (FZ) = 1*SEC (FREEZES DISPLAY FOR 1 SECOND). * (DP) = 1*SEC (DISPLAYS POINTS FOR 1 SECOND). * (PNTS) = COORDINATES AND SCORE FOR *SCR* TO DISPLAY. * * USES NONE. * * CALLS USC. * * AL(0) IS SET TO ZERO (WHICH WOULD WOULD NORMALLY INDICATE * THAT THE PACMAN HAS BEEN EATEN) SO THAT *CHR* WILL NOT * DISPLAY THE PACMAN CHARACTER AND THE POINTS FOR EATING THE * MEANIE WILL BE EASIER TO SEE. *SCR* WILL RECOGNIZE THIS * CONDITION AND SET AL(0) BACK TO 1 WHEN (DP) RUNS OUT. PME SUBR **ENTRY/EXIT** LDN 1*SEC STD FZ STD DP LDN 0 STM AL,T1 STM AL AOD MK INCREMENT NUMBER OF MEANIES EATEN LDM PMEA-1,MK SCORE FOR EATING THIS ONE (HUNDREDS) RAD SH RJM USC LDD XC SBN SZ STM PNTS X COORDINATE TO DISPLAY POINTS LDD YC SBN SZ/2 STM PNTS+1 Y COORDINATE TO DISPLAY POINTS LDM PMEB-1,MK STM PNTS+2 POINTS (HUNDREDS, ZEROS CONSTANT) UJN PMEX PMEA DATA 2,4,8D,16D PMEB DATA 1R2,1R4,1R8,2R16 PPE SPACE 4,16 ** PPE - PROCESS PACMAN EATEN. * * CALLED WHENEVER THE PACMAN IS EATEN. * * ENTRY (NP) = NUMBER OF PACMEN REMAINING (BEFORE THIS * ONE EATEN). * * EXIT (AL(0)) = 0 (INDICATES PACMAN DEAD). * (FZ) = 2*SEC (FREEZES DISPLAY FOR 2 SECONDS). * (GM) = 0 (TO INDICATE GAME OVER) IF NO PACMEN * REMAINING (OTHERWISE (GM) NOT CHANGED). * (DP) = 0 (JUST IN CASE FRUIT BEING DISPLAYED; * OTHERWISE *SCR* MIGHT REINCARNATE PACMAN). * (NG) = (NG)+1. * * USES NONE. * * CALLS NONE. PPE SUBR **ENTRY/EXIT** LDC 2*SEC FREEZE DISPLAY STD FZ LDN 0 KILL PACMAN STM AL STD DP LDM NP NJN PPEX IF MORE PACMEN STD GM END GAME AOM NG UJN PPEX PSE SPACE 4,16 ** PSE - PAUSE TO MAKE DISPLAY TIME CONSTANT. * * USES THE REAL TIME CLOCK IN CM TO INSURE THAT THE DISPLAY * RATE IS CONSTANT. * * ENTRY NONE. * * EXIT NONE. * * USES T1, CM - CM+4. * * CALLS NONE. PSE SUBR **ENTRY/EXIT** LDC RTCL READ CLOCK CRD CM LDD CM+4 COMPUTE ELAPSED TIME SBM PSEA PJN PSE1 ADC 10000 PSE1 SBN DSCT COMPUTE DELAY TIME PJN PSE3 IF NO DELAY LMC -0 SET DELAY STD T1 PSE2 LDC 500D DELAY SBN 1 NJN *-1 SOD T1 NJN PSE2 PSE3 LDC RTCL RESET TIME CRD CM LDD CM+4 STM PSEA UJN PSEX RETURN PSEA DATA 0 RMD SPACE 4,16 ** RMD - REVERSE MEANIE DIRECTIONS. * * THIS ROUTINE IS CALLED WHEN THE MEANIES FIRST BECOME * VULNERABLE (SO THEY WILL IMMEDIATELY START RUNNING FROM * THE PACMAN INSTEAD OF WAITING FOR THE NEXT INTERSECTION) * AND IS CALLED AGAIN AS SOON AS THE MEANIES ARE NO LONGER * VULNERABLE (SO THAT THEY WILL TURN AND CHASE THE PACMAN * IF HE WAS CHASING THEM). ONLY MEANIES WHICH ARE NEAR THE * PACMAN ARE REVERSED - OTHERS ARE NOT BOTHERED AT ALL. * * ENTRY (XC) = CURRENT X COORDINATES. * (YC) = CURRENT Y COORDINATES. * (DI) = CURRENT DIRECTIONS. * (AL) = STATUS OF CHARACTERS (ALIVE/EATEN). * * EXIT (DI) = NEW DIRECTIONS (DI(0) NOT CHANGED). * * USES CI, T1. * * CALLS SMD. RMD5 AOD CI SBN 5 MJN RMD1 IF MORE MEANIES TO DO RMD SUBR **ENTRY/EXIT** LDN 1 STD CI RMD1 LDM AL,CI SBN 1 NJN RMD5 IF THIS MEANIE IS DEAD LDM XC,CI LPN 17 ADM YC,CI LPN 17 ZJN RMD3 IF MEANIE EXACTLY ON A SQUARE LDD YC Y COORDINATE OF PACMAN ADM YC,CI Y COORDINATE OF MEANIE ADC -2*YC01 ZJN RMD2 IF MEANIE AND PACMAN BOTH IN BOTTOM ROW LDD XC SBM XC,CI PJN *+3 LMC -0 STD T1 X DISTANCE BETWEEN PACMAN AND MEANIE LDD YC SBM YC,CI PJN *+3 LMC -0 ADD T1 X DISTANCE + Y DISTANCE ADC -9D*SZ PJN RMD4 IF PACMAN TOO FAR AWAY TO WORRY ABOUT RMD2 LDM DI,CI CURRENT DIRECTION ADN 2 LPN 3 REVERSE OF CURRENT DIRECTION STM DI,CI UJN RMD4 RMD3 RJM SMD SET NEW MEANIE DIRECTION RMD4 LJM RMD5 CHECK NEXT MEANIE SDP SPACE 4,16 ** SDP - SET DIRECTION IF POSSIBLE. * * ENTRY (A) = REQUESTED DIRECTION. * (CI) = INDEX OF CHARACTER WHOSE DIRECTION TO SET. * (PD) = POSSIBLE DIRECTIONS (FROM *GPD*). * * EXIT (A) = DIRECTION IF SET. * (A) NEGATIVE IF NOT SET. * (DI(CI)) = NEW DIRECTION IF SET. * * USES T1. * * CALLS NONE. SDP1 LCN 0 INDICATE DIRECTION NOT POSSIBLE SDP SUBR **ENTRY/EXIT** STD T1 LDM PD,T1 NJN SDP1 IF DIRECTION NOT POSSIBLE LDD T1 STM DI,CI SET DIRECTION UJN SDPX SM1 SPACE 4,16 ** SM1 - SPECIAL CASE #1 FOR *SMD*. * * IF BOTH THE PACMAN AND THE MEANIE ARE IN THE WRAP-AROUND * CHANNEL BUT ON OPPOSITE SIDES OF THE BOARD (LOGICALLY BUT * NOT PHYSICALLY CLOSE) SET *GX* SOMEWHERE OFF TO THE SIDE * OF THE BOARD SO THAT THE MEANIE WILL GO AFTER IT (OR RUN * FROM IT). * * ENTRY (GX) = X COORDINATE OF PACMAN. * (GY) = Y COORDINATE OF PACMAN. * (CI) = INDEX OF MEANIE. * (XC(CI)) = X COORDINATE OF MEANIE. * (YC(CI)) = Y COORDINATE OF MEANIE. * * EXIT (ONLY IF CONDITION DESCRIBED ABOVE IS TRUE) * (GX) = XCL OR XCR (DEPENDING ON WHICH SIDE THE * BOARD THE CHARACTERS ARE. * * USES NONE. * * CALLS NONE. SM11 LDM XC,CI (PACMAN IN LEFT WRAP-AROUND CHANNEL) ADC -XC14 MJN SM1X IF MEANIE ON LEFT HALF OF BOARD LDC XCR STD GX LEAD MEANIE INTO WRAP-AROUND CHANNEL SM1 SUBR **ENTRY/EXIT** LDM YC,CI ADC -YC17 NJN SM1X IF MEANIE NOT ON WRAP-AROUND LEVEL LDD GY ADC -YC17 NJN SM1X IF PACMAN NOT ON WRAP-AROUND LEVEL LDD GX ADC -XC06 MJN SM11 IF PACMAN IN LEFT WRAP-AROUND CHANNEL LDC XC21 SBD GX PJN SM1X IF PACMAN NOT IN RIGHT WRAP-AROUND CHANNEL LDM XC,CI (PACMAN IN RIGHT WRAP-AROUND CHANNEL) ADC -XC13 PJN SM1X IF MEANIE ON RIGHT HALF OF BOARD LDC XCL STD GX LEAD MEANIE INTO WRAP-AROUND CHANNEL UJN SM1X SM2 SPACE 4,16 ** SM2 - SPECIAL CASE #2 FOR *SMD*. * * IF THE PACMAN IS IN A CORNER AND THE MEANIE IS IN THE OTHER * CORNER ON THE SAME SIDE, SET GX/GY TO THE MIDDLE OF THE * CHANNEL CONNECTING THOSE CORNERS. WITHOUT THIS ADJUSTMENT * THE MEANIE MIGHT JUST GO FURTHER INTO ITS CORNER (AWAY FROM * THE PATH TO THE PACMAN). * * ENTRY (GX) = X COORDINATE OF PACMAN. * (GY) = Y COORDINATE OF PACMAN. * (CI) = INDEX OF MEANIE. * (XC(CI)) = X COORDINATE OF MEANIE. * (YC(CI)) = Y COORDINATE OF MEANIE. * * EXIT (ONLY IF CONDITION DESCRIBED ABOVE IS TRUE) * (GX) = XC06 OR XC21 (DEPENDING ON WHICH SIDE THE * BOARD THE CHARACTERS ARE. * (GY) = YC17. * * USES T1, T2. * * CALLS NONE. SM2 SUBR **ENTRY/EXIT** LDD MV NJN SM2X TEST IRRELEVANT IF MEANIES ON THE RUN LDD GY ADC -YC17 ZJN SM2X TEST WILL SCREW UP IF IN WRAP-AROUND CHNL LDC XC06 STD T1 LDD GX SBD T1 PJN SM21 IF PACMAN NOT IN A LEFT CORNER LDM XC,CI SBD T1 MJN SM22 IF MEANIE IS IN A LEFT CORNER SM21 LDC XC21 STD T1 SBD GX PJN SM2X IF PACMAN NOT IN A RIGHT CORNER LDD T1 SBM XC,CI PJN SM2X IF MEANIE NOT IN RIGHT CORNER * AT THIS POINT, WE KNOW THAT THE MEANIE AND THE PACMAN ARE * EACH IN A CORNER ON THE SAME SIDE OF THE BOARD (OR IN THE * PATH BETWEEN THEM). SM22 LDD GY ADC -YC17 Y DISTANCE (+ OR -) BETWEEN PACMAN & YC17 STD T2 LDM YC,CI ADC -YC17 Y DISTANCE (+ OR -) BETWEEN MEANIE & YC17 LMD T2 LPC 4000 LOGICAL DIFFERENCE OF SIGNS ZJN SM23 IF PACMAN & MEANIE ON SAME SIDE OF YC17 LDD T1 STD GX X COORDINATE OF CONNECTING PATH LDC YC17 STD GY Y COORDINATE OF MIDPOINT IN PATH SM23 LJM SM2X SRD SPACE 4,16 ** SRD - SET RANDOM DIRECTION. * * RANDOMLY PICK ANY OF THE POSSIBLE DIRECTIONS (EXCEPT * THAT JUST REVERSING THE CURRENT DIRECTION WILL BE * AVOIDED WHEN POSSIBLE). * * BE VERY CAREFUL WHEN CALLING THIS ROUTINE. ALTHOUGH EVERY * SQUARE ON THE BOARD HAS AT LEAST 2 POSSIBLE DIRECTIONS, * SOMETIMES ONE OF THESE IS ARTIFICIALLY MADE UNAVAILABLE * FOR VARIOUS REASONS. IF A SECOND ONE IS MADE UNAVAILABLE, * THE PP MIGHT JUST LOOP FOREVER IN THIS ROUTINE. * * ENTRY (CI) = CHARACTER INDEX. * (PD) = POSSIBLE DIRECTIONS (FROM *GPD*). * (CK) = CLOCK (USED FOR RANDOM FACTOR). * (DI(CI)) = CURRENT DIRECTION. * * EXIT (DI(CI)) = NEW DIRECTION. * (A) = NEW DIRECTION. * * USES T1 - T3. * * CALLS NONE. SRD SUBR **ENTRY/EXIT** LDD CK CLOCK SHN -4 (LOWER 4 BITS USUALLY SAME FOR SAME CHAR) STD T1 INITIAL GUESS AT DIRECTION LDM DI,CI STD T2 LDM SRDA,T2 STD T2 REVERSE OF CURRENT DIRECTION LDN 0 STD T3 SRD1 AOD T3 INCREMENT LOOP COUNTER AOD T1 INCREMENT GUESS AT DIRECTION LPN 3 TRUNCATE TO VALID DIRECTION CODE STD T1 LDM PD,T1 NJN SRD1 IF THIS DIRECTION NOT IS POSSIBLE LDD T1 SBD T2 NJN SRD2 IF NOT DOUBLING BACK LDD T3 SBN 4 MJN SRD1 IF WE'RE NOT DESPARATE YET SRD2 LDD T1 STM DI,CI STORE NEW DIRECTION UJN SRDX SRDA DATA 2,3,0,1,4 SSP SPACE 4,16 ** SSP - SET SPEED. * * THE SPEEDS IN *TSPD* ARE ACTUALLY FOUR TIMES THE NUMBER * OF COORDINATES THAT THE CORRESPONDING CHARACTER SHOULD * BE MOVED ON EACH CYCLE. IF THE "SPEED" IS A MULTIPLE * OF FOUR, THEN THAT CHARACTER MOVES AT A STEADY SPEED. * IF THE SPEED IS 6, FOR EXAMPLE, THE THE CHARACTER WILL * BE MOVED 1 UNIT, THEN 2 UNITS, THEN 1 UNIT, ETC. SO AS * TO AVERAGE 1.5 (6/4) UNITS PER CYCLE. * * THE SPEED FOR MEANIES ON THEIR WAY OUT OF THE CENTER * BOX (AL=2) IS 2. IN ALL OTHER CASES, SPEEDS ARE TAKEN * FROM *TSPD* EXCEPT THAT ONE MEANIE (CI=3) IS MADE TO MOVE * SLIGHTLY FASTER THAN THE OTHERS. * * ENTRY (CI) = INDEX OF CHARACTER BEING MOVED. * (LV) = CURRENT GAME LEVEL. * (MV) = NON-ZERO IF MEANIES VULNERABLE. * (AL) = STATUS OF CHARACTERS. * (CK) = CURRENT CLOCK VALUE. * (TSPD) = TABLE OF SPEEDS. * * EXIT (A) = NUMBER OF UNITS TO MOVE THIS CHARACTER ON * THIS CYCLE. * * USES T1, T2. * * CALLS NONE. SSP SUBR **ENTRY/EXIT** LDM AL,CI STD T1 SBN 2 ZJN SSP3 IF MEANIE BEING LAUNCHED (SET SPEED = 2) SSP1 LDD LV CURRENT GAME LEVEL SHN 1 ADD LV STD T1 (T1) = (LV) * 3 LDD CI NJN SSP2 IF MEANIE AOD T1 ADD 1 IF PACMAN LDD MV ZJN SSP2 IF MEANIES NOT ON THE RUN AOD T1 ADD 1 MORE IF PACMAN CHASING MEANIES SSP2 LDM TSPD,T1 PROPER SPEED STD T1 LDD CI SBN 3 NJN SSP3 IF NOT *BLINKY* AOD T1 UP SPEED A LITTLE SSP3 LDD CK LPN 3 STD T2 LAST 2 BITS OF CLOCK LDD T1 SPEED LPN 3 FRACTIONAL PART OF SPEED SHN 2 RAD T2 LDD T1 SHN -2 FULL UNITS OF SPEED ADM SSPA,T2 ADJUST FOR FRACTIONAL PORTION LJM SSPX * CLOCK=0 1 2 3 SPEED SSPA DATA 0,0,0,0 N.00 DATA 0,1,0,0 N.25 DATA 0,1,0,1 N.50 DATA 0,1,1,1 N.75 USC SPACE 4,16 ** USC - UPDATE SCORE. * * ENTRY (ST) = SCORE (TENS). * (SH) = SCORE (HUNDREDS). * (NP) = NUMBER OF PACMEN REMAINING. * (EP) = 0 IF EXTRA PACMAN NOT YET GIVEN. * * EXIT (ST) = SCORE (TENS) REDUCED TO 0-9. * (SH) = SCORE (HUNDREDS) INCLUDING EXCESS TENS CARRIED. * (SCORE+2 - SCORE+4) = SIX DECIMAL CHARACTERS OF SCORE * WITH LEADING ZERO SUPPRESSION. * THE FIRST TIME THE SCORE .GE. 10,000 - * (NP) = (NP)+1. * (EP) = 1. * * USES CM - CM+3, T5 - T7. * * CALLS NONE. USC SUBR **ENTRY/EXIT** USC1 LDD ST TENS DIGIT SBN 10D MJN USC2 IF TENS DIGIT NOT OVER 9 STD ST SUBTRACT 10 FROM *ST* AOD SH CARRY 1 TO HUNDREDS UJN USC1 USC2 LDD SH ADC -100D MJN USC3 IF SCORE LESS THAN 10,000 LDM EP NJN USC3 IF EXTRA PACMAN ALREADY GIVEN AOM NP INCREMENT NUMBER OF PACMEN AOM EP SET FLAG FOR NEXT TIME USC3 LDD SH HUNDREDS (MAY BE UP TO 4 DECIMAL DIGITS) STD T5 COPY OF *SH* WE CAN DESTROY LDN 0 STD T6 00 UNTIL 1ST SIGNIFICANT DIGIT, THEN 33 STD T7 DIGIT NUMBER USC4 LDD T6 STM CM,T7 INITIALIZE TO 00 OR 33 (1R0) USC5 LDD T5 SBM USCA,T7 SUBTRACT APPROPRIATE POWER OF 10 MJN USC6 IF SUBTRACTED ONE TOO MANY STD T5 AOM CM,T7 UJN USC5 USC6 LDD T6 NJN USC7 IF PREVIOUS DIGIT SIGNIFICANT LDM CM,T7 ZJN USC7 IF THIS NOT 1ST SIGNIFICANT DIGIT LDN 1R0 STD T6 RAM CM,T7 USC7 AOD T7 INCREMENT DIGIT NUMBER SBN 4 MJN USC4 IF MORE DIGITS TO DO LDD CM SHN 6 ADD CM+1 STM SCORE+2 STORE 1ST AND 2ND DIGITS LDD CM+2 SHN 6 ADD CM+3 STM SCORE+3 STORE 3RD AND 4TH DIGITS LDD ST TENS DIGIT ADD T6 ADD 00 OR 33 STD T5 (NEW USE FOR T5) ZJN USC8 IF TOTAL SCORE IS ZERO LDD T6 NJN USC8 IF PREVIOUS SIGNIFICANT DIGIT(S) LDN 1R0 RAD T5 CONVERT TENS DIGIT TO CHARACTER USC8 LDD T5 5TH DIGIT SHN 6 ADN 1R0 6TH DIGIT ALWAYS ZERO STM SCORE+4 STORE 5TH AND 6TH DIGITS LJM USCX USCA DATA 1000D,100D,10D,1 VLN SPACE 4,16 ** VLN - DRAW VERTICAL LINES. * * THE BOARD IS SYMMETRIC ABOUT *XCM*, AND *TVLN* CONTAINS * ONLY LINES ON THE LEFT HALF OF THE BOARD. THIS ROUTINE * DRAWS 2 LINES FOR EACH TABLE ENTRY. * * ENTRY (TVLN) = DATA TO DRAW ALL VERTICAL LINES ON BOARD. * CHANNEL ACTIVE AND IN DOT MODE. * * EXIT LINES DISPLAYED ON SCREEN. * CHANNEL ACTIVE AND IN DOT MODE. * * USES T1 - T3. * * CALLS NONE. VLN SUBR **ENTRY/EXIT** LDN 0 STD T1 INITIALIZE *TVLN* INDEX VLN1 LDM TVLN,T1 X COORDINATE ZJN VLNX IF END OF TABLE VLN2 STD T2 OAN CH OUTPUT X COORDINATE LDM TVLN+1,T1 LOWER Y COORDINATE ADN LDEN SKIP FIRST POINT (*HLN* DID IT) STD T3 VLN3 LDD T3 OAN CH OUTPUT Y COORDINATE LDN LDEN INCREMENT Y COORDINATE RAD T3 SBM TVLN+2,T1 COMPARE TO UPPER Y COORDINATE MJN VLN3 IF MORE LINE TO DRAW LDC XCM SBD T2 X COORDINATE DISTANCE FROM CENTER MJN VLN4 IF ALREADY TO RIGHT OF CENTER ADC XCM COMPUTE NEW X COORDINATE UJN VLN2 DRAW SECOND LINE VLN4 LDN 3 INCREMENT TABLE INDEX RAD T1 UJN VLN1 PRS TITLE PRESET. PRS SPACE 4,16 ** PRS - PRESET PROGRAM. PRS SUBR **ENTRY/EXIT** LDD CP READ JOB ORIGIN TYPE ADN JOTW CRD CM LDD CM+3 CHECK ORIGIN CODE LPN 77 LMN SYOT NJN PRS2 IF NOT SYSTEM ORIGIN LDN 0 STD CM+1 STD CM+2 LDD FL ZJN PRS1 IF FL = 0 MONITOR RSTM REDUCE FIELD LENGTH PRS1 LDN IRSI INHIBIT ROLLOUT STD CM+4 LDN /MTR/SSIS CHANGE SUBSYSTEM ID STD CM+1 MONITOR SJCM RJM RDS REQUEST DISPLAY RJM ING INITIALIZE FIRST GAME LDN 0 SET *NO GAME IN PROGRESS* STD GM STD PD+N (SEE *GPD*) LJM PRSX PRS2 LDC PRSA RJM DFM SEND DAYFILE MESSAGE MONITOR ABTM ABORT PP LJM PPR EXIT TO PP RES PRSA DATA C* ILLEGAL USER ACCESS.* DECKS SPACE 4,16 ** COMMON DECKS. *CALL COMDDSP TITLE MISCELLANEOUS DATA AREAS. ** MISCELLANEOUS DATA AREAS. NP BSS 1 NUMBER OF PACMEN REMAINING EP BSS 1 =1 AFTER EXTRA PACMAN GIVEN AL BSS 5 STATUS OF CHARACTERS (INDEXED BY *CI*) * 0 = DEAD (EATEN). * 1 = ALIVE AND FULLY FUNCTIONAL. * 2 = MEANIE IN THE PROCESS OF BEING * MOVED OUT OF THE CENTER BOX. FT BSS 1 TIME AT WHICH FRUIT WILL BE CREATED NF BSS 1 NUMBER OF FRUIT DISPLAYS REMAINING NG BSSZ 1 NUMBER OF GAMES COMPLETED SCORE CON 6240,7777,0,0,0 PNTS CON 0,0,0,2R00 TITLE TABLES. TINT SPACE 4,16 ** TINT - INTERSECTION TABLE. * * THIS TABLE IS NEEDED BY *SMD*. SEE COMMENTS WITH THE * MACRO *INT* FOR MORE INFORMATION. * * THIS TABLE MUST BE BEFORE *TBRD*. BASE D TINT BSS 0 INT 01,12,0,N,R,N,N,N,N,N,N INT 01,15,0,N,N,N,L,N,N,N,N INT 04,03,1,N,R,N,N,N,N,L,L INT 04,24,1,N,N,N,L,N,R,R,N INT 07,06,1,N,N,N,N,N,N,N,R INT 07,09,1,N,N,N,N,N,N,N,R INT 07,12,1,N,R,N,N,N,N,L,N INT 07,15,1,N,N,N,L,N,N,R,N INT 07,18,1,N,N,N,N,N,L,N,N INT 07,21,1,N,N,N,N,N,L,N,N INT 11,06,1,N,N,N,N,N,N,N,N INT 11,09,0,N,U,N,N,N,N,N,N INT 11,18,0,N,N,N,U,N,N,N,N INT 11,21,1,N,N,N,N,N,N,N,N INT 15,09,1,N,N,N,N,U,N,N,N INT 15,18,1,U,N,N,N,N,N,N,N INT 17,06,0,N,N,N,N,N,N,N,N INT 17,09,0,D,N,N,L,N,L,N,N INT 17,18,0,N,R,N,N,D,N,N,R INT 17,21,0,N,N,N,N,N,N,N,N INT 20,12,0,N,R,N,U,N,N,L,N INT 20,15,0,N,U,N,L,N,N,R,N INT 23,06,1,U,N,N,N,N,N,N,N INT 23,21,1,N,N,N,U,N,N,N,N INT 26,01,0,N,N,N,N,N,N,N,N INT 26,06,1,N,N,N,N,N,N,N,R INT 26,09,0,N,N,N,N,N,L,N,D INT 26,12,0,N,R,N,N,N,L,L,N INT 26,15,0,N,N,N,L,N,N,R,R INT 26,18,0,N,N,N,N,N,D,N,R INT 26,21,1,N,N,N,N,N,L,N,N INT 26,26,0,N,N,N,N,N,N,N,N INT 30,06,1,N,N,N,N,N,N,N,N INT 30,21,1,N,N,N,N,N,N,N,N TINTL EQU *-TINT BASE * TBRD SPACE 4,16 ** GAME BOARD. * * GAME BOARD - ONE WORD FOR EACH LOCATION. THE ACTUAL BOARD * IS 31 X 28, BUT 4 DUMMY LOCATIONS ARE ADDED TO THE END OF * EACH LINE SO THAT SHIFTS MAY BE USED TO MULTIPLY WHEN * COMPUTING ROW DISPLACEMENTS. THE BITS IN EACH WORD HAVE * THE FOLLOWING MEANINGS: * * BIT MEANING IF NOT ZERO * ---- ------------------- * 11-6 *TINT* INDEX * 5 (UNUSED) * 4 CONSECUTIVE MEANIES PASSING THROUGH THIS * POINT SHOULD GO DIFFERENT DIRECTIONS * (TO TRY TO SURROUND PACMAN) * 3 CANNOT MOVE TO THIS POSITION * 2 ENERGIZER * 1 REGULAR DOT * 0 DOT (REGULAR OR ENERGIZER) HAS NOT YET BEEN EATEN * * NOTE THAT THE BOARD HERE IS UPSIDE-DOWN COMPARED * TO HOW IT WILL BE DISPLAYED ON THE CONSOLE. TBRD BSS 0 * 0000000000111111111122222222 * 0123456789012345678901234567 BRD (WWWWWWWWWWWWWWWWWWWWWWWWWWWW) 00 BRD (W..........................W) 01 BRD (W.WWWWWWWWWW.WW.WWWWWWWWWW.W) 02 BRD (W.WWWWWWWWWW.WW.WWWWWWWWWW.W) 03 BRD (W......WW....WW....WW......W) 04 BRD (WWW.WW.WW.WWWWWWWW.WW.WW.WWW) 05 BRD (WWW.WW.WW.WWWWWWWW.WW.WW.WWW) 06 BRD (W*..WW....... .......WW..*W) 07 BRD (W.WWWW.WWWWW.WW.WWWWW.WWWW.W) 08 BRD (W.WWWW.WWWWW.WW.WWWWW.WWWW.W) 09 BRD (W.WWWW.WWWWW.WW.WWWWW.WWWW.W) 10 BRD (W............WW............W) 11 BRD (WWWWWW.WW WWWWWWWW WW.WWWWWW) 12 BRD (WWWWWW.WW WWWWWWWW WW.WWWWWW) 13 BRD (WWWWWW.WW WWWWWWWW WW.WWWWWW) 14 BRD (WWWWWW.WW WW.WWWWWW) 15 BRD (WWWWWW.WW WWWWWWWW WW.WWWWWW) 16 BRD ( . WWWWWWWW . ) 17 BRD (WWWWWW.WW WWWWWWWW WW.WWWWWW) 18 BRD (WWWWWW.WW WWWWWWWW WW.WWWWWW) 19 BRD (WWWWWW.WW WW.WWWWWW) 20 BRD (WWWWWW.WWWWW WW WWWWW.WWWWWW) 21 BRD (WWWWWW.WWWWW WW WWWWW.WWWWWW) 22 BRD (W......WW....WW....WW......W) 23 BRD (W.WWWW.WW.WWWWWWWW.WW.WWWW.W) 24 BRD (W.WWWW.WW.WWWWWWWW.WW.WWWW.W) 25 BRD (W..........................W) 26 BRD (W.WWWW.WWWWW.WW.WWWWW.WWWW.W) 27 BRD (W*WWWW.WWWWW.WW.WWWWW.WWWW*W) 28 BRD (W.WWWW.WWWWW.WW.WWWWW.WWWW.W) 29 BRD (W............WW............W) 30 BRD (WWWWWWWWWWWWWWWWWWWWWWWWWWWW) 31 * 0000000000111111111122222222 * 0123456789012345678901234567 TBRDL EQU *-TBRD-4 TMVT SPACE 4,16 ** TMVT - TIME MEANIES REMAIN VULNEABLE AT EACH LEVEL. TMVT EQU *-1 DATA 500,500,400,400,300,300,200,100,000 TSPD SPACE 4,16 ** TSPD - SPEEDS AT EACH LEVEL. * * SPEEDS FOR EACH LEVEL ARE IN THE FOLLOWING ORDER: * MEANIES. * PACMAN - NOT CHASING MEANIES. * PACMAN - CHASING MEANIES. BASE D TSPD EQU *-3 DATA 04,07,08 LEVEL 1 DATA 04,06,08 LEVEL 2 DATA 05,06,08 LEVEL 3 DATA 05,06,07 LEVEL 4 DATA 06,06,08 LEVEL 5 DATA 07,07,09 LEVEL 6 DATA 08,08,10 LEVEL 7 DATA 09,08,10 LEVEL 8 DATA 10,08,11 LEVEL 9 BASE * THLN SPACE 4,16 ** THLN - DATA TO DRAW HORIZONTAL LINES. * * THE BOARD IS SYMMETRIC. THIS TABLE CONTAINS ONLY THE * PORTION OF THE LINES TO THE LEFT OF *XCM*. * * Y COORDINATE, LEFT X COORDINATE, RIGHT X COORDINATE THLN CON YC00,XC00,XCM CON YC02,XC02,XC11 CON YC02,XC13,XCM CON YC03,XC02,XC07 CON YC03,XC08,XC11 CON YC05,XC00,XC02 CON YC05,XC04,XC05 CON YC05,XC10,XC13 CON YC06,XC00,XC02 CON YC06,XC07,XC08 CON YC06,XC10,XCM CON YC08,XC02,XC04 CON YC08,XC07,XC11 CON YC08,XC13,XCM CON YC10,XC02,XC05 CON YC10,XC07,XC11 CON YC12,XC00,XC05 CON YC12,XC07,XC08 CON YC12,XC10,XC13 CON YC14,XC10,XCM CON YC16,XC00,XC05 CON YC16,XC07,XC08 CON YC16,XC10,XCM CON YC18,XC00,XC05 CON YC18,XC07,XC08 CON YC19,XC10,XCM CON YC21,XC08,XC11 CON YC21,XC13,XCM CON YC22,XC00,XC05 CON YC22,XC08,XC11 CON YC24,XC02,XC05 CON YC24,XC10,XC13 CON YC25,XC02,XC05 CON YC25,XC07,XC08 CON YC25,XC10,XCM CON YC27,XC02,XC05 CON YC27,XC07,XC11 CON YC27,XC13,XCM CON YC29,XC02,XC05 CON YC29,XC07,XC11 CON YC31,XC00,XCM CON 0 TVLN SPACE 4,16 ** TVLN - DATA TO DRAW VERTICAL LINES. * * THE BOARD IS SYMMETRIC. THIS TABLE CONTAINS ONLY THE LINES * ON THE LEFT HALF OF THE BOARD. * * X COORDINATE, LOWER Y COORDINATE, UPPER Y COORDINATE TVLN CON XC00,YC00,YC16 CON XC00,YC18,YC31 CON XC02,YC02,YC03 CON XC02,YC05,YC06 CON XC02,YC08,YC10 CON XC02,YC24,YC25 CON XC02,YC27,YC29 CON XC04,YC05,YC08 CON XC05,YC05,YC10 CON XC05,YC12,YC16 CON XC05,YC18,YC22 CON XC05,YC24,YC25 CON XC05,YC27,YC29 CON XC07,YC03,YC06 CON XC07,YC08,YC10 CON XC07,YC12,YC16 CON XC07,YC18,YC25 CON XC07,YC27,YC29 CON XC08,YC03,YC06 CON XC08,YC12,YC16 CON XC08,YC18,YC21 CON XC08,YC22,YC25 CON XC10,YC05,YC06 CON XC10,YC12,YC14 CON XC10,YC16,YC19 CON XC10,YC24,YC25 CON XC11,YC02,YC03 CON XC11,YC08,YC10 CON XC11,YC21,YC22 CON XC11,YC27,YC29 CON XC13,YC02,YC05 CON XC13,YC08,YC12 CON XC13,YC21,YC24 CON XC13,YC27,YC31 CON 0 ERRNG 7777-* PP TOO BIG END ~ SNK IDENT SNK,SNK PERIPH SST RDS *COMMENT SNK - SNAKES FOR THE CONSOLE. COMMENT COPYRIGHT (C) STEVE FREYDER AND JOE CYCHOSZ - 1978. BASE MIXED SNK TITLE SNK - SNAKES FOR THE CONSOLE. SNK SPACE 4,10 *** SNK - SNAKES FOR THE CONSOLE. * * STEVE FREYDER 78/01/24. * JOE CYCHOSZ 78/06/18. SNK SPACE 4,10 *** SNK - SNAKES FOR THE CONSOLE. * * SNK IS A PP TO DISPLAY SNAKES ON THE CONSOLE. * WALLS ARE ADDED TO MAKE IT INTERESTING. SPACE 4,10 *** KEYBOARD INPUT. * * *D* DROP DISPLAY AND PP. * * *H* HOLD DISPLAY. * * (*) TOGGLE TO DSD. * * (1-9) SELECT NUMBER OF SNAKES TO DISPLAY. * * ALL OTHER KEYS ARE IGNORED. SPACE 4,10 *** DAYFILE MESSAGES. * * * ILLEGAL USER ACCESS.* * SNK WAS CALLED BY A NON-SYSTEM ORIGIN JOB. TITLE MACROS DEFINITIONS. SPACE 4,10 * COMMON DECKS. *CALL COMPMAC SPACE 4,10 LOG2 SPACE 4,10 ** LOG2 - SET SYMBOL TO LOG BASE 2 OF EXPRESSION. * * SYM LOG2 EXP * * ENTRY *SYM* = SYMBOL TO SET. * *EXP* = EXPRESSION. PURGMAC LOG2 MACRO LOG2,SYM,EXP IFLE EXP,1 SYM SET 0 ELSE 2 SYM LOG2 EXP/2 SYM SET SYM+1 ENDM XYINC SPACE 4,10 ** XYINC - INCREMENT/DECREMENT TABLE ENTRY. * * XYINC TABLE,INDEX * * ENTRY (A) = 0 THEN DECREMENT * ELSE INCREMENT. * *TABLE* = TABLE TO INCREMENT. * *INDEX* = TABLE ENTRY TO INCREMENT. PURGMAC XYINC XYINC MACRO TABLE,INDEX LOCAL Q NJN Q SOM TABLE,INDEX UJN *+3 Q AOM TABLE,INDEX ENDM TITLE ASSEMBLY DEFINITIONS. SPACE 4,10 * COMMON DECKS. *CALL COMSCPS SPACE 4,10 **** DIRECT CELL ASSIGNMENTS. NS EQU 20 NUMBER OF SNAKES SN EQU 21 CURRENT SNAKE NUMBER LC EQU 22 LOOP COUNTER WC EQU 23 WALL COUNT WT EQU 24 WALL TYPE (0=HORIZONTAL, 1=VERTICAL) SPACE 4,10 ** ASSEMBLY CONSTANTS. CH EQU CHDS DISPLAY CHANNEL NAME MICRO 1,,*SNAKES* SMAX EQU 9D MAXIMUM NUMBER OF SNAKES HMAX EQU 5 MAXIMUM NUMBER OF HORIZONTAL WALLS VMAX EQU 5 MAXIMUM NUMBER OF VERTICAL WALLS MAXSL EQU 128D MAXIMUM SNAKE LENGTH SHIFT. LOG2 MAXSL SMAXSL EQU SHIFT. EQUIVALENT SHIFT COUNT SBUFL EQU 2*SMAX*MAXSL SNAKE BUFFER LENGTH **** SNAKE TITLE MAIN PROGRAM. SNAKE SPACE 4,10 ORG PPFW SNK RJM PRS PRESET PROGRAM * CLEAR SNAKE BUFFER. LDC SBUFL STD T1 SNK1 LDN 0 STM SBUFF-1,T1 SOD T1 NJN SNK1 IF MORE TO CLEAR RJM RDS REQUEST DISPLAY * PROCESS KEYBOARD INPUT. SNK2 RJM PKI PROCESS KEYBOARD INPUT RJM PSS PAUSE FOR SYSTEM * MOVE AND DISPLAY SNAKES. LDN 0 RESET SNAKE COUNTER STD SN FNC 7010,CH SELECT LEFT SCREEN 512 DOTS/LINE ACN CH SNK3 RJM MVS MOVE SNAKE LDD SN SET SBUFF ADDRESS OF SNAKE SHN SMAXSL+1 NS * 2 * MAXSL ADC SBUFF STM SNKA LDC 2*MAXSL LENGTH OF SNAKE OAM **,CH SNKA EQU *-1 AOD SN INCREMENT SNAKE COUNTER SBD NS MJN SNK3 IF MORE SNAKES TO MOVE/DISPLAY FJM *,CH WAIT CHANNEL EMPTY DCN CH * DISPLAY WALLS. AOD LC INCREMENT LOOP COUNTER LPN 3 NJN SNK4 IF NOT TIME TO DISPLAY WALLS RJM WALLS DISPLAY WALLS SNK4 LJM SNK2 LOOP TITLE SUBROUTINES. DPP SPACE 4,10 ** DPP - DROP PP. DPP MONITOR DPPM LJM PPR EXIT TO PP-RES SPACE 4,10 PKI SPACE 4,10 ** PKI - PROCESS KEYBOARD INPUT. * * EXIT (NS) = NUMBER OF SNAKES. * * CALLS RDS, DDS, HDC, DPP. * * USES NONE. PKI SUBR ENTRY/EXIT FNC 7020,CH FUNCTION KEYBOARD FOR INPUT ACN CH IAN CH READ KEYBOARD DCN CH ZJN PKIX IF NO KEY PRESSED LPN 77 SBN 1R* (*) TOGGLE TO DSD NJN PKI1 IF NOT TOGGLE RJM HDC TOGGLE DISPLAY UJN PKIX RETURN PKI1 ADN 1R*-1R0 (1-SMAX) SET NUMBER OF SNAKES MJN PKI2 IF A LETTER ZJN PKIX IF *0* SBN SMAX+1 PJN PKIX IF NOT A LEGAL NUMBER ADN SMAX+1 SET NUMBER OF SNAKES STD NS UJN PKIX RETURN PKI2 ADN 1R0-1RH *H* HOLD DISPLAY NJN PKI3 IF NOT HOLD RJM DDS DROP DISPLAY RJM RDS GET DISPLAY UJN PKIX RETURN PKI3 ADN 1RH-1RD *D* DROP PPU NJN PKIX IF NOT DROP RJM DDS DROP DISPLAY LJM DPP DROP PPU MVS SPACE 4,10 ** MVS - MOVE SNAKE. * * MVS ALTERS THE COORDINATES FOR ONE SNAKE. * * ENTRY (SN) = SNAKE NUMBER. * * CALLS NONE. * * USES T2, T5 - T7. MVS SUBR ENTRY/EXIT * ADVANCE SNAKE HEAD. LDM XINC,SN GET X INCREMENT XYINC X,SN ALTER X COORDINATE LPC 777 STM X,SN STD T6 LDM YINC,SN GET Y INCREMENT XYINC Y,SN ALTER Y COORDINATE LPC 777 STM Y,SN STD T7 * SEARCH HORIZONTAL WALLS. LDN 0 INITIALIZE WALL POINTER STD T2 MVS1 AOD T2 ADVANCE TO NEXT WALL SBN HMAX+1 ZJN MVS2 IF DONE LDM HY-1,T2 GET Y LOCATION OF WALL LMD T7 NJN MVS1 IF SNAKE NOT HITTING WALL LDD T6 CURRENT X COORDINATE SBM HXL-1,T2 - LOWER X COORDINATE OF WALL MJN MVS1 IF LEFT OF LEFT END OF WALL LDM HXU-1,T2 UPPER X COORDINATE OF WALL SBD T6 - CURRENT X COORDINATE MJN MVS1 IF RIGHT OF RIGHT END OF WALL LDM YINC,SN TOGGLE Y INCREMENT (DIRECTION) LMN 1 STM YINC,SN LDM HY-1,T2 ZJN MVS4 IF WALL AT BOTTOM OF SCREEN LMC 511D MVS2 ZJN MVS4 IF WALL AT TOP OF SCREEN LDM YINC,SN LMN 1 XYINC HY-1,T2 MOVE WALL IN OLD Y DIRECTION LDM HXL-1,T2 LEFT END OF WALL ZJN MVS3 IF WALL TOUCHES LEFT EDGE OF SCREEN LDM XINC,SN XYINC HXL-1,T2 SHIFT WALL MVS3 LDM HXU-1,T2 RIGHT END OF WALL LMC 511D MVS4 ZJN MVS5 IF WALL TOUCHES RIGHT EDGE OF SCREEN LDM XINC,SN XYINC HXU-1,T2 SHIFT WALL * SEARCH VERTICAL WALLS. MVS5 LDN 0 INITIALIZE WALL POINTER STD T2 MVS6 AOD T2 ADVANCE TO NEXT WALL SBN VMAX+1 ZJN MVS7 IF DONE LDM VX-1,T2 GET X LOCATION OF WALL LMD T6 NJN MVS6 IF SNAKE NOT HITTING WALL LDD T7 CURRENT Y COORDINATE SBM VYL-1,T2 - LOWER Y COORDINATE OF WALL MJN MVS6 IF BELOW BOTTOM OF WALL LDM VYU-1,T2 UPPER Y COORDINATE OF WALL SBD T7 - CURRENT Y COORDINATE MJN MVS6 IF ABOVE TOP OF WALL LDM XINC,SN TOGGLE X INCREMENT (DIRECTION) LMN 1 STM XINC,SN LDM VX-1,T2 ZJN MVS9 IF WALL AT LEFT EDGE OF SCREEN LMC 511D MVS7 ZJN MVS9 IF WALL AT RIGHT EDGE OF SCREEN LDM XINC,SN LMN 1 XYINC VX-1,T2 MOVE WALL IN OLD X DIRECTION LDM VYL-1,T2 BOTTOM OF WALL ZJN MVS8 IF WALL TOUCHES BOTTOM EDGE OF SCREEN LDM YINC,SN XYINC VYL-1,T2 SHIFT WALL MVS8 LDM VYU-1,T2 TOP OF WALL LMC 511D MVS9 ZJN MVS10 IF WALL TOUCHES TOP EDGE OF SCREEN LDM YINC,SN XYINC VYU-1,T2 SHIFT WALL * ADD THIS X,Y PAIR TO CIRCULAR BUFFER. MVS10 LDD SN SHN SMAXSL NS * MAXSL ADM BP,SN + BP(SN) SHN 1 * 2 STD T5 (T5) = SBUFF INDEX LDD T6 CURRENT X COORDINATE ADC 6000 ADD COORDINATE BIAS STM SBUFF,T5 LDD T7 CURRENT Y COORDINATE ADC 7000 ADD COORDINATE BIAS STM SBUFF+1,T5 * ADVANCE BUFFER POINTER. AOM BP,SN ADVANCE POINTER LPC MAXSL-1 WRAP IF NECESSARY STM BP,SN LJM MVSX RETURN WALLS SPACE 4,10 ** WALLS - DISPLAY THE WALLS. * * WALLS DISPLAYS ALL OF THE HORIZONTAL AND VERTICL WALLS. * *HMAX* AND *VMAX* DETERMINE THE NUMBER OF WALLS TO BE * DISPLAYED. CURRENTLY THE FIRST TWO WALLS IN THE WALL * TABLE ARE NOT DISPLAYED. * * CALLS DWALLS. * * USES WT, WC. WALLS SUBR ENTRY/EXIT * DISPLAY HORIZONTAL WALLS. LDC HY+2 SKIP TOP/BOTTOM WALLS STM DWLA Y COORDINATE ADN HMAX STM DWLB LOWER X COORDINATE ADN HMAX STM DWLC UPPER X COORDINATE LDN 0 SET HORIZONTAL WALL STD WT LDN HMAX-2 SET NUMBER OF WALLS TO DISPLAY STD WC RJM DWALLS DISPLAY HORIZONTAL WALLS * DISPLAY VERTICAL WALLS. LDC VX+2 SKIP SIDE WALLS STM DWLA X COORDINATE ADN VMAX STM DWLB LOWER Y COORDINATE ADN VMAX STM DWLC UPPER Y COORDINATE LDN 1 SET VERTICAL WALL STD WT LDN VMAX-2 SET NUMBER OF WALLS TO DISPLAY STD WC RJM DWALLS DISPLAY VERTICAL WALLS LJM WALLSX RETURN DWALLS SPACE 4,15 ** DWALLS - DISPLAY HORIZONTAL / VERTICAL WALLS. * * ENTRY (DWLA) = START OF STATIONARY COORDINATES. * (DWLB) = START OF LOWER COORDINATES. * (DWLC) = START OF UPPER COORDINATES. * (WC) = NUMBER OF WALLS. * (WT) = WALL TYPE (0 = HORIZONTAL, 1 = VERTICAL) * * USES T4 - T7. DWALLS SUBR ENTRY/EXIT * START NEXT WALL. DWL1 SOD WC DECREMENT WALL COUNT LDM **,WC STATIONARY COORDINATE DWLA EQU *-1 ADM DWLD,WT GET X/Y COORDINATE BIAS STD T7 SET INITIAL COORDINATE LDD WT LMN 1 BIAS TO OTHER COORDINATE STD T5 SET BIAS ENTRY TO USE LDM **,WC GET STARTING COORDINATE FOR LOOP DWLB EQU *-1 ADM DWLD,T5 ADD COORDINATE BIAS STD T6 LDM **,WC END COORDINATE FOR LOOP DWLC EQU *-1 ADM DWLD,T5 ADD COORDINATE BIAS STD T4 SET END COORDINATE * DISPLAY WALL. FNC 7010,CH SELECT LEFT SCREEN 512 DOTS/LINE ACN CH DWL2 LDN 2 OUTPUT NEXT DOT OAM T6,CH AOD T6 ADVANCE RUNNING COORDINATE SBD T4 MJN DWL2 IF END NOT REACHED FJM *,CH WAIT CHANNEL EMPTY DCN CH * CHECK IF MORE WALLS TO DISPLAY. LDD WC GET WALLS LEFT TO DISPLAY ZJN DWL3 IF ALL WALLS DISPLAYED LJM DWL1 DWL3 LJM DWALLSX RETURN DWLD VFD 12/7000 X/Y COORDINATE BIAS VFD 12/6000 SPACE 4,10 * COMMON DECKS. *CALL COMDDSP BUFFERS TITLE BUFFERS TO HOLD SNAKES AND WALLS. BUFFERS SPACE 4,10 ** BUFFERS TO HOLD THE SNAKES AND WALLS. SPACE 4,10 ** BP HOLDS THE CURRENT POINT IN THE SNAKE BUFFER FOR EACH * SNAKE. BP BSSZ SMAX SPACE 4,10 ** X/Y COORDINATES FOR EACH SNAKE HEAD. BASE D NOREF C$ X BSS 0 C$ SET 0 DUP SMAX VFD 12/50+C$ C$ SET C$+50 ENDD Y BSS 0 C$ SET 0 DUP SMAX VFD 12/50+C$ C$ SET C$+50 ENDD SPACE 4,10 ** X/Y INCREMENTS FOR EACH SNAKE (0 = -1). XINC DATA 1,0,1,0,1,0,1,0,1 YINC DATA 0,1,0,1,0,1,0,1,1 NSN. EQU *-YINC ERRNG NSN.-SMAX NOT ENOUGH SNAKES DEFINED. SPACE 4,10 ** DEFINE THE WALLS. THE FIRST TWO ENTRIES ARE NOT DISPLAYED. * DEFINE HORIZONTAL WALLS. HY DATA 000,511,064,320,384 HXL DATA 000,000,064,128,064 HXU DATA 511,511,256,448,384 NHW. EQU *-HXU ERRNG NHW.-HMAX NOT ENOUGH HORIZONTAL WALLS DEFINED. * DEFINE VERTICAL WALLS. VX DATA 000,511,256,320,416 VYL DATA 000,000,064,416,001 VYU DATA 511,511,256,480,128 NVW. EQU *-VYU ERRNG NVW.-VMAX NOT ENOUGH VERTICAL WALLS DEFINED. BASE * SPACE 4,10 ** SBUF HOLDS THE COORDINATES FOR ALL THE SNAKES ON THE * SCREEN. THIS BUFFER IS OVERLAYED BY PRESET. SBUFF BSS SBUFL SNAKE BUFFER * CHECK FOR PROGRAM OVERFLOW. LWA BSS 0 ERRNG 7776-LWA PROGRAM OVERFLOW PRS TITLE PRESET. PRS SPACE 4,10 ** PRS - PRESET PROGRAM. * * THIS CODE IS RESIDENT IN THE DISPLAY BUFFER AND * IS OVER-WRITTEN. ORG SBUFF PRS SUBR ENTRY/EXIT RJM CUA CHECK USER ACCESS NJN PRS2 IF ILLEGAL USER ACCESS LDN 0 INITIALIZE LOOP COUNTER STD LC LDN 1 SET NUMBER OF SNAKES STD NS * RELEASE STORAGE. PRS1 LDN ZERL CRD CM MONITOR RSTM REDUCE FL TO ZERO PAUSE LDD FL NJN PRS1 IF FL .NE. 0 UJN PRSX RETURN * ILLEGAL USER ACCESS. PRS2 LDC =C* ILLEGAL USER ACCESS.* RJM DFM MONITOR ABTM ABORT PP LJM PPR EXIT PP-RES SPACE 4,10 * PRESET COMMON DECKS. *CALL COMPCUA SPACE 4 END ~ TTT IDENT TTT,PPFW PERIPH SST RDS *COMMENT TTT - TIC-TAC-TOE FOR THE CONSOLE. BASE MIXED TTT TITLE TTT - TIC-TAC-TOE FOR THE CONSOLE. TTT SPACE 4,10 *** TTT - TIC-TAC-TOE FOR THE CONSOLE. * * JEFF HIBBARD 79/07/15. TITLE MACROS AND DEFINITIONS. SPACE 4,10 ** COMMON DECKS *CALL COMPMAC *CALL COMSCPS SPACE 4,10 ** MACRO DEFINITIONS. DSL SPACE 4,16 ** DSL - GENERATE DISPLAY LINE. * * DSL S,X,Y,TEXT * * S CHARACTER SIZE. * X X CHARACTER POSITION OF LINE. * Y Y CHARACTER POSITION OF LINE. * TEXT TEXT TO BE DISPLAYED. PURGMAC DSL DSL MACRO S,X,Y,T LOCAL B,C,XS,YS B MICRO 1,6,$T$ C MICRO 7,,$T$ ECHO ,D=(S,M,L,),E=(1,2,3,4) Z IFC EQ,$D$S$ .SIZE SET E Z ENDIF ENDD P ERRPL .SIZE-4 BAD CHARACTER SIZE. XS SET 10B*.SIZE YS SET 12B*.SIZE VFD 12/6000B+X*XS,12/7756B-Y*YS,36/6H"B" DATA H$"C"$ ENDM SPACE 4,10 **** DIRECT CELL ASSIGNMENTS. XC EQU 20 YC EQU 21 MV EQU 22 MOVE NUMBER (MUST PRECEED *S1*, SEE *INT*) * * S1 - S9 CORRESPOND TO SQUARES ON THE BOARD AS PICTURED. * EACH CONTAINS ONE OF THE FOLLOWING CODES. * * 0 = NO MARK. 1 I 2 I 3 * 1 = X. ---I---I--- * 4 = O. 4 I 5 I 6 * ---I---I--- * 7 I 8 I 9 * S1 EQU MV+1 S2 EQU S1+1 S3 EQU S1+2 S4 EQU S1+3 S5 EQU S1+4 S6 EQU S1+5 S7 EQU S1+6 S8 EQU S1+7 S9 EQU S1+8D * INTENSITIES. I1 EQU S9+1 I2 EQU I1+1 I3 EQU I1+2 I4 EQU I1+3 I5 EQU I1+4 I6 EQU I1+5 I7 EQU I1+6 I8 EQU I1+7 I9 EQU I1+8D **** SPACE 4,10 ** MISCELLANEOUS EQUIVALENCES AND DEFINITIONS. CH EQU CHDS DISPLAY CHANNEL DSCT EQU 20 DISPLAY CYCLE (MILLISECONDS) SQSZ EQU 120D SIZE OF ONE SQUARE OF BOARD LTSZ EQU 80D SIZE OF LETTERS SP EQU SQSZ/2-LTSZ/2 XB EQU 6112 X COORDINATE OF BOARD YB EQU 7230 Y COORDINATE OF BOARD WAIT EQU 140 NUMBER OF CYCLES TO DISPLAY FINAL BOARD INTEN EQU 5 INTENSITY OF WINNING MARKS NAME MICRO 1,,*TTT* SPACE 4,10 ** CONSOLE FUNCTIONS. INPUT EQU 7020 KEYBOARD INPUT D512L EQU 7010 512 DOTS / LINE LEFT SCREEN DLRGL EQU 7002 16 CHARACTERS / LINE LEFT SCREEN DMDMR EQU 7101 32 CHARACTERS / LINE RIGHT SCREEN DSMLR EQU 7100 64 CHARACTERS / LINE RIGHT SCREEN MAIN TITLE MAIN PROGRAM. MAIN SPACE 4,10 ** MAIN PROGRAM. ORG PPFW RJM PRS PRESET PROGRAM TTT1 PAUSE PAUSE LDD CM+1 NJN TTT2 IF ERRORS RJM BRD DISPLAY BOARD RJM TXT RJM PKI PROCESS KEYBOARD INPUT ZJN TTT1 IF 1 THRU 9 NOT PRESSED RJM MVO POST PLAYER MOVE ZJN TTT1 IF MOVE INVALID RJM MVX MAKE COMPUTER MOVE UJN TTT1 TTT2 RJM DDS * UJN DPP DPP SPACE 4,10 ** DPP - DROP PP. * DPP MONITOR DPPM DROP PP LJM PPR EXIT TO PP RES TTT TITLE PRIMARY SUBROUTINES. BRD SPACE 4,16 ** BRD - DISPLAY BOARD AND ALL MARKS. * * ENTRY NOTHING SPECIAL. * * EXIT BOARD AND MARKS DISPLAYED. * * USES T5 - T6, CM - CM+1. * * CALLS LIN, OOO, PSE, XXX. BRD SUBR ENTRY EXIT RJM PSE PAUSE TO MAKE DISPLAY TIME CONSTANT FNC D512L,CH ACN CH LDC XB+1*SQSZ VERTICAL LINES RJM VLN LDC XB+2*SQSZ RJM VLN LDC YB+1*SQSZ HORIZONTAL LINES RJM HLN LDC YB+2*SQSZ RJM HLN LDN 9D 9 SQUARES ON BOARD STD T5 BRD1 LDM XS-1,T5 X COORDINATE FOR THIS X OR O STD CM LDM YS-1,T5 Y COORDINATE FOR THIS X OR O STD CM+1 LDM S1-1,T5 CONTENTS OF THIS SQUARE ZJN BRD4 IF NO MARK SBN 1 ZJN BRD3 IF X RJM OOO DISPLAY O UJN BRD4 BRD3 RJM XXX DISPLAY X BRD4 SOD T5 NJN BRD1 IF NOT ALL SQUARES DONE YET DCN CH LJM BRDX MVO SPACE 4,16 ** MVO - POST PLAYER MOVE (O). * * ENTRY (A) = SQUARE REQUESTED. * * EXIT (A) = 0 IF REQUESTED SQUARE ALREADY OCCUPIED. * (A) NON-ZERO IF MOVE O.K. * *O* MARKED IN REQUESTED SQUARE. * * USES T1. * * CALLS NONE. MVO SUBR ENTRY/EXIT STD T1 LDM S1-1,T1 NJN MVO1 IF SQUARE ALREADY OCCUPIED LDN 4 STM S1-1,T1 UJN MVOX MVO1 LDN 0 UJN MVOX MVX SPACE 4,16 ** MVX - MAKE COMPUTER MOVE (X). * * ENTRY (MV) = NUMBER OF TIMES THIS ROUTINE * PREVIOUSLY CALLED IN THIS GAME. * * EXIT (MV) = ENTRY *MV* + 1. * MOVE COMPUTED AND POSTED. * JUMP TO *WIN* IF WINNING MOVE MADE. * JUMP TO *TIE* IF ITS NOW IMPOSSIBLE FOR GAME * TO BE WON. * * USES NONE. * * CALLS ADJ, OOB, SUM, XXB. * * CALLED ROUTINES MAY NOT RETURN TO THE POINT * FROM WHICH THEY WERE CALLED. THEY WILL JUMP * *DONE* IF THEY POST A MOVE, OR TO *TIE* OR * *WIN* IF APPROPRIATE. MVX SUBR ENTRY/EXIT AOD MV SBN 1 NJN MVX2 IF NOT 1ST TIME CALLED FOR THIS GAME * TAKE CENTER SQUARE IF PLAYER DIDN'T. OTHERWISE TAKE CORNER. LDD S5 NJN MVX1 IF CENTER SQUARE ALREADY TAKEN AOD S5 LJM DONE MVX1 AOD S3 LJM DONE MVX2 RJM SUM RJM XXB MAKE WINNING MOVE IF THERE IS ONE RJM OOB BLOCK PLAYER IF NECESSARY LDD S5 SBN 1 ZJN MVX3 IF *X* IN CENTER SQUARE LJM MVX21 * IF EITHER DIAGONAL CONTAINS 2 PLAYER MOVES WITH * A COMPUTER MOVE IN THE CENTER, MARK A SQUARE IN * A CLOCKWISE POSITION FROM ONE OF THE PLAYERS * CORNER POSITIONS. MVX3 LDN 6 STD T1 LDM TSUM,T1 SBN 9D NJN MVX5 IF THIS DIAGONAL DOESNT CONTAIN 2 *O*S LDD S2 NJN MVX4 IF SQUARE 2 TAKEN AOD S2 LJM DONE MVX4 LDD S8 NJN MVX5 IF SQUARE 8 TAKEN AOD S8 LJM DONE MVX5 LDM TSUM+1,T1 SBN 9D NJN MVX11 IF THIS DIAGONAL DOESNT CONTAIN 2 *O*S LDD S6 NJN MVX6 IF SQUARE 6 TAKEN AOD S6 LJM DONE MVX6 LDD S4 NJN MVX11 IF SQUARE 4 TAKEN AOD S4 LJM DONE * IF THE FOLLOWING SITUATION EXISTS (THERE ARE 8 POSSIBLE * ROTATIONS AND INVERSIONS OF THIS PATTERN), MARK X IN THE * CORNER TO KEEP THE PLAYER FROM TRAPPING US (SQUARE 1 * WHEN THE PATTERN IS IN THIS POSITION). * * I I O * --------- * O I X I * --------- * I I MVX11 LDN 0 STD T1 MVX12 LDM TSPC,T1 STD T2 LDM TSPC+1,T1 STD T3 LDI T2 ADI T3 SBN 8D NJN MVX13 IF BOTH SQUARE DON'T HAVE *O*S LDM TSPC+2,T1 STD T2 LDM TSPC+3,T1 STD T3 LDM TSPC+4,T1 STD T4 LDI T2 ADI T3 ADI T4 NJN MVX13 IF ALL 3 SQUARES NOT BLANK AOI T4 MARK X LJM DONE MVX13 LDN 5 RAD T1 SBN TSPCL NJN MVX12 IF TABLE NOT FINISHED YET * IF EITHER DIAONAL CONTAINS 2 PLAYER MOVES WITH * A COMPUTE MOVE OTHER THAN IN THE CENTER, MARK A * SQUARE IN A CORNER NOT CONTAINED IN THAT DIAGONAL. MVX21 LDN 6 STD T1 LDM TSUM,T1 SBN 9D NJN MVX23 IF THIS DIAGONAL DOESNT CONTAIN *OOX* LDD S3 NJN MVX22 IF SQUARE 3 TAKEN AOD S3 LJM DONE MVX22 LDD S7 NJN MVX23 IF SQUARE 7 TAKEN AOD S7 LJM DONE MVX23 LDM TSUM+1,T1 SBN 9D NJN MVX31 IF THIS DIAGONAL DOESNT CONTAIN *OOX* LDD S1 NJN MVX24 IF SQUARE 1 TAKEN AOD S1 LJM DONE MVX24 LDD S9 NJN MVX31 IF SQUARE 9 TAKEN AOD S9 LJM DONE * PLACE A MARK ADJACENT TO A PLAYER MOVE, TRYING * THE CORNERS FIRST. MVX31 LDN 1 RJM ADJ LDN 3 RJM ADJ LDN 7 RJM ADJ LDN 9D RJM ADJ LDN 2 RJM ADJ LDN 4 RJM ADJ LDN 6 RJM ADJ LDN 8D RJM ADJ LDN 5 RJM ADJ LJM DPP (IT SHOULD NEVER GET THIS FAR) DONE LDD MV SBN 4 ZJN MVX41 THIS TEST OUGHT TO BE SAFE RJM SUM REAL TEST FOR TIE GAME LJM MVXX MVX41 LJM TIE PKI SPACE 4,16 ** PKI - PROCESS KEYBOARD INPUT. * * ENTRY NOTHING SPECIAL. * * EXIT (A) = 1 - 9 IF CORRESPONDING KEY PRESSED. * (A) = 0 IF NO KEY OR OTHER KEY PRESSED. * JUMP TO *PPR* IF *D* ENTERED. * * CALLS DDS, HDC, RDS. PKI0 LDN 0 PKI SUBR ENTRY/EXIT FNC INPUT,CH ACN CH IAN CH READ KEYBOARD DCN CH ZJN PKIX IF NO KEY PRESSED SBN 1RD NJN PKI1 IF NOT -D- RJM DDS DROP DISPLAY LJM DPP DROP PP PKI1 SBN 1RH-1RD NJN PKI2 IF NOT -H- RJM DDS DROP DISPLAY RJM RDS REQUEST DISPLAY UJN PKI0 PKI2 SBN 1R*-1RH NJN PKI3 IF NOT -*- RJM HDC TOGGLE DISPLAY UJN PKI0 PKI3 ADN 1R*-1R+ PJN PKI0 IF KEY PRESSED > 9 ADN 1R+-1R0 MJN PKI0 IF KEY PRESSED < 0 UJN PKIX TXT SPACE 4,16 ** TXT - DISPLAY HELP TEXT. * * ENTRY NONE. * * EXIT HELP TEXT DISPLAYED. * * USES NONE. * * CALLS NONE. TXT SUBR ENTRY/EXIT FNC DMDMR,CH MEDIUM TEXT ACN CH LDC TXTAL OAM TXTA,CH OUTPUT TITLE LINE DCN CH FNC DSMLR,CH SMALL TEXT ACN CH LDC TXTBL OAM TXTB,CH OUTPUT HELP DCN CH UJN TXTX RETURN TXTA DSL M,5,3,(CONSOLE TIC-TAC-TOE) TXTAL EQU *-TXTA TXTB BSS 0 DSL S,5,10D,(TO MAKE A MOVE SIMPLY PRESS THE NUMBER) DSL S,5,11D,(WHICH CORRESPONDS TO THE SQUARE IN WHICH) DSL S,5,12D,(YOU WISH TO PLACE YOUR MARK. THE COMPUTER) DSL S,5,13D,(PLAYS X WHILE YOU PLAY O. THE BOARD IS LAID) DSL S,5,14D,(AS FOLLOWS) DSL S,7,16D,( 1 I 2 I 3) DSL S,7,17D,(---I---I---) DSL S,7,18D,( 4 I 5 I 6) DSL S,7,19D,(---I---I---) DSL S,7,20D,( 7 I 8 I 9 DSL S,5,23D,(KEY DISCRIPTION) DSL S,5,24D,(--- -----------) DSL S,5,25D,( * TOGGLE TO DSD) DSL S,5,26D,( D DROP TIC-TAC-TOE) DSL S,5,27D,( H HOLD DISPLAY) DSL S,5,28D,(1-9 MAKE MOVE) TXTBL EQU *-TXTB TTT TITLE SECONDARY SUBROUTINES. ADJ SPACE 4,16 ** ADJ - MARK SQUARE ADJACENT TO SPECIFIED SQUARE. * * CALL IS IGNORED IF SPECIFIED SQUARE DOES NOT * CONTAIN AN *O*. * * ENTRY (A) = SQUARE NUMBER ADJACANET TO WHICH * MARK SHOULD BE PLACED. * * EXIT MARK PLACED ADJACENT TO SPECIFIED SQUARE, * IF POSSIBLE. * JUMP TO *DONE* IF A MARK MADE. * * USES T1 - T3. * * CALLS NONE. ADJ SUBR ENTRY/EXIT STD T1 STD T2 SHN T2 RAD T2 (T2) = (A) * 5 LDM S1-1,T1 SBN 4 NJN ADJX IF NO *O* IN SPECIFIED SQUARE ADJ1 LDM TADJ-5,T2 ZJN ADJX IF NO MORE ADJACENT SQUARES STD T3 LDM S1-1,T3 ZJN ADJ2 IF NO MARK IN SPECIFIED SQUARE AOD T2 UJN ADJ1 ADJ2 AOM S1-1,T3 LJM DONE HLN SPACE 4,16 ** HLN - DRAW HORIZONTAL LINE. * * DRAWS A HORIZONTAL LINE (SQSZ*3) DOTS LONG FROM X * COORDINATE *XB* (TO THE RIGHT) ALONG THE Y * COORDINATE PASSED IN *A*. * * ENTRY (A) - Y COORDINATE OF LINE. * CHANNEL OPEN AND IN DOT MODE. * * EXIT LINE DISPLAYED ON SCREEN. * CHANNEL OPEN AND IN DOT MODE. * * USES T1 - T3. * * CALLS NONE. HLN SUBR ENTRY/EXIT STD T2 LDC XB STD T1 LDC SQSZ*3/2 STD T3 HLN1 LDN 2 OAM T1,CH SOD T3 ZJN HLNX IF LINE FINISHED LDN 2 RAD T1 UJN HLN1 INT SPACE 4,16 ** INT - INITIALIZE BOARD FOR NEW GAMES. * * ENTRY NOTHING SPECIAL. * * EXIT MV, S1 - S9 SET TO 0. * I1 - I9 SET TO 1. * * USES T1. * * CALLS NONE. INT SUBR ENTRY/EXIT LDN ZERL CRD MV CRD S5 LDN 8D STD T1 INT1 LDN 1 STM I1,T1 SOD T1 PJN INT1 UJN INTX OOB SPACE 4,16 ** OOB - CHECK FOR 2 *O*S AND A BLANK IN A ROW, COL, DIAG. * * ENTRY NOTHING SPECIAL. * * EXIT NOTHING IF ABOVE SITUATION NOT FOUND. * OTHERWISE, JUMP TO *DONE* AFTER MARKING BLANK. * * USES T1. * * CALLS VAC. OOB SUBR ENTRY/EXIT LDN 7 STD T1 OOB1 LDM TSUM,T1 SBN 8D ZJN OOB2 IF 2 *O*S AND A BLANK SOD T1 PJN OOB1 UJN OOBX OOB2 RJM VAC MARK VACANT SQUARE LJM DONE OOO SPACE 4,16 ** OOO - DRAW THE LETTER O. * * ENTRY (CM) = X COORDINATE OF LOWER LEFT CORNER OF LETTER. * (CM+1) = Y COORDINATE OF LOWER LEFT CORNET OF LETTER. * CHANNEL OPEN AND IN DOT MODE. * * EXIT LETTER DISPLAYED ON SCREEN. * CHANNEL OPEN AND IN DOT MODE. * * USES T1 - T4. * * CALLS NONE. OOO SUBR ENTRY/EXIT OOO1 LDC LTSZ/2 ADD CM STD T1 X COORDINATE OF CENTER OF LETTER LDC LTSZ/2 ADD CM+1 STD T2 Y COORDINATE OF CENTER OF LETTER LDC TSINL-1 STD T3 LDN 0 STD T4 OOO2 LDD T1 ADM TSIN,T3 OAN CH LDD T2 ADM TSIN,T4 OAN CH LDD T2 SBM TSIN,T4 OAN CH LDD T1 SBM TSIN,T3 OAN CH LDD T2 ADM TSIN,T4 OAN CH LDD T2 SBM TSIN,T4 OAN CH LDN 2 RAD T4 LDD T3 SBN 2 STD T3 PJN OOO2 LJM OOOX PSE SPACE 4,16 ** PSE - PAUSE TO MAKE DISPLAY TIME CONSTANT. * USES THE REAL TIME CLOCK IN CM TO INSURE THAT THE DISPLAY * RATE IS CONSTANT. * * ENTRY NONE. * * EXIT NONE. * * USES T1, CM - CM+4. * * CALLS NONE. PSE SUBR ENTRY/EXIT LDC RTCL READ CLOCK CRD CM LDD CM+4 COMPUTE ELAPSED TIME SBM PSEA PJN PSE1 ADC 10000 PSE1 SBN DSCT COMPUTE DELAY TIME PJN PSE3 IF NO DELAY LMC -0 SET DELAY STD T1 PSE2 LDC 500D DELAY SBN 1 NJN *-1 SOD T1 NJN PSE2 PSE3 LDC RTCL RESET TIME CRD CM LDD CM+4 STM PSEA UJN PSEX RETURN PSEA DATA 0 SUM SPACE 4,16 ** SUM - SUM THE VALUES IN EACH ROW, COLUMN AND DIAGONAL. * * SEE COMMENTS NEAR *TSUM* FOR SIGNIFICANCE OF THE TOTALS. * * ENTRY NOTHING SPECIAL. * * EXIT (TSUM) = TOTALS (IN SAME ORDER AS *TWIN*). * JUMP TO *TIE* IF NO LONGER POSSIBLE FOR A WIN. * * USES T1 - T3. * * CALLS NONE. SUM SUBR ENTRY/EXIT LDN 7 STD T1 LDN 0 STD T2 SUM1 LDM TWIN,T1 STD T3 LDI T3 STM TSUM,T1 LDM TWIN+8D,T1 STD T3 LDI T3 RAM TSUM,T1 LDM TWIN+16D,T1 STD T3 LDI T3 RAM TSUM,T1 SBN 5 ZJN SUM2 IF WIN NOT POSSIBLE IN THIS ROW SBN 6-5 ZJN SUM2 IF WIN NOT POSSIBLE IN THIS ROW SBN 9D-6 ZJN SUM2 IF WIN NOT POSSIBLE IN THIS ROW AOD T2 IF POSSIBLE TO WIN SUM2 SOD T1 PJN SUM1 IF NOT ALL 8 COMBINATIONS DONE YET LDD T2 NJN SUM3 IF STILL POSSIBLE TO WIN LJM TIE SUM3 LJM SUMX TIE SPACE 4,16 ** TIE - GAME TERMINATION FOR TIE GAME. * * ENTRY NOTHING SPECIAL. * * EXIT APPROPRIATE MESSAGE DISPLAYED. * BOARD CLEARED FOR NEXT GAME. * * USES T2, T7. * * CALLS BRD, INT, PKI. * * THIS ROUTINE IS ENTERED WITH AN *LJM* (INSTEAD * OF THE USUAL *RJM*) AND EXITS TO *TTT1*. TIE LDC WAIT ENTRY STD T7 TIE1 RJM BRD STANDARD BOARD DISPLAY LDN 6 STD T2 FNC DLRGL,CH LARGE TEXT ACN CH TIE2 LDN 6 OAM TIEA,CH PUT MESSAGE UNDER BOARD SOD T2 NJN TIE2 DCN CH RJM PKI LEAVE -*-, -D-, ETC. ACTIVE SOD T7 NJN TIE1 RJM INT LJM TTT1 TIEA CON XB,YB-40 DATA H*TIE GAME* VAC SPACE 4,16 ** VAC - MARK VACANT SQUARE IN A ROW, COLUMN OR DIAGONAL. * * ENTRY (T1) = ROW NUMBER (RELATIVE TO 0, SAME ORDER AS * *TWIN*). * * EXIT MARK MADE. * * USES T2. * * CALLS NONE. VAC SUBR ENTRY/EXIT LDM TWIN,T1 RJM VAC1 LDM TWIN+8D,T1 RJM VAC1 LDM TWIN+16D,T1 RJM VAC1 UJN VACX VAC1 SUBR ENTRY/EXIT STD T2 LDI T2 NJN VAC1X AOI T2 UJN VACX VLN SPACE 4,16 ** VLN - DRAW VERTICAL LINE. * * DRAWS A VERTICAL LINE (SQSZ*3) DOTS LONG FROM Y * COORDINATE YB (UPWARDS) ALONG THE X COORDINATE * PASSEDIN *A*. * * ENTRY (A) - X COORDINATE OF LINE. * CHANNEL OPEN AND IN DOT MODE. * * EXIT LINE DISPLAYED ON SCREEN. * CHANNEL OPEN AND IN DOT MODE. * * USES T1 - T2. * * CALLS NONE. VLN SUBR ENTRY/EXIT OAN CH LDC SQSZ*3/2 STD T2 LDC YB STD T1 VLN1 OAN CH SOD T2 ZJN VLNX IF LINE FINISHED LDN 2 RAD T1 UJN VLN1 WIN SPACE 4,16 ** WIN - GAME TERMINATION FOR COMPUTER WINNING. * * ENTRY (T1) = WINNING ROW NUMBER (RELATIVE TO 0, SAME * ORDER AS *TWIN*). * * EXIT APPROPRIATE MESSAGE DISPLAYED. * WINNING MARKS INTENSIFIED. * BOARD CLEARED FOR NEXT GAME. * * USES T2, T7. * * CALLS BRD, INT, PKI. * * THIS ROUTINE IS ENTERED WITH AN *LJM* (INSTEAD * OF THE USUAL *RJM*) AND EXITS TO *TTT1*. WIN LDM TWIN,T1 ENTRY STD T2 LDN INTEN STM I1-S1,T2 LDM TWIN+8D,T1 STD T2 LDN INTEN STM I1-S1,T2 LDM TWIN+16D,T1 STD T2 LDN INTEN STM I1-S1,T2 LDC WAIT STD T7 WIN1 RJM BRD STANDARD BOARD DISPLAY LDN 6 STD T2 FNC DLRGL,CH LARGE TEXT ACN CH WIN2 LDN 5 OAM WINA,CH PUT MESSAGE UNDER BOARD SOD T2 NJN WIN2 DCN CH RJM PKI LEAVE -*-, -D-, ETC. ACTIVE SOD T7 NJN WIN1 IF TIME TO DISPLAY WINNING BRD NOT EXPIRED RJM INT LJM TTT1 WINA CON XB,YB-40 DATA H*I WIN* XXB SPACE 4,16 ** XXB - CHECK FOR 2 *X*S AND A BLANK IN A ROW, COL, DIAG. * * ENTRY NOTHING SPECIAL. * * EXIT NOTHING IF ABOVE SITUATION NOT FOUND. * OTHERWISE, JUMP TO *WIN* AFTER MARKING BLANK. * * USES T1. * * CALLS VAC. XXB SUBR ENTRY/EXIT LDN 7 STD T1 XXB1 LDM TSUM,T1 SBN 2 ZJN XXB2 IF 2 *X*S AND A BLANK SOD T1 PJN XXB1 UJN XXBX XXB2 RJM VAC MARK BLANK SQUARE LJM WIN XXX SPACE 4,16 ** XXX - DRAW THE LETTER X. * * ENTRY (T5) = SQUARE NUMBER. * (CM) = X COORDINATE OF LOWER LEFT CORNER OF LETTER. * (CM+1) = Y COORDINATE OF LOWER LEFT CORNET OF LETTER. * CHANNEL OPEN AND IN DOT MODE. * * EXIT LETTER DISPLAYED ON SCREEN. * CHANNEL OPEN AND IN DOT MODE. * * USES T1 - T4. * * CALLS NONE. XXX SUBR ENTRY/EXIT LDD CM STD T1 LDD CM+1 STD T2 LDC LTSZ/2 STD T3 XXX2 LDM I1-1,T5 INTENSITY COUNT FOR THIS SQUARE STD T4 XXX3 LDN 2 OAM T1,CH SOD T4 NJN XXX3 LDN 2 RAD T1 LDN 2 RAD T2 SOD T3 NJN XXX2 LDC LTSZ/2 STD T3 LDD CM STD T1 XXX4 LDM I1-1,T5 STD T4 XXX5 LDN 2 OAM T1,CH SOD T4 NJN XXX5 LDN 2 RAD T1 LDC -2 RAD T2 SOD T3 NJN XXX4 LJM XXXX PRS TITLE PRESET. PRS SPACE 4,16 ** PRS - PRESET PROGRAM. PRS SUBR ENTRY/EXIT RJM CUA NJN PRS2 IF NOT SYSTEM ORIGIN LDN 0 STD CM+1 STD CM+2 LDD FL ZJN PRS1 IF FL = 0 MONITOR RSTM REDUCE FIELD LENGTH PAUSE PRS1 LDC 6000 STD XC RJM RDS REQUEST DISPLAY RJM INT INITIALIZE BOARD FOR FIRST GAME UJN PRSX PRS2 LDC PRSA RJM DFM SEND DAYFILE MESSAGE MONITOR ABTM ABORT PP LJM PPR EXIT TO PP RES PRSA DATA C* ILLEGAL USER ACCESS.* DECKS SPACE 4,10 ** COMMON DECKS. *CALL COMPCUA *CALL COMDDSP BUFFERS TITLE BUFFERS AND TABLES. TSUM SPACE 4,16 ** THESE WORDS (COMPUTED BY *SUM*) CONTAIN THE * SUM OF A ROW, COLUMN, OR DIAGONAL (THEY ARE IN * THE SAME ORDER AS *TWIN*. SINCE NO MARK = 0, * X = 1, AND O = 4, THE SUMS WILL INDICATE THE * FOLLOWING ABOUT THEIR CORRESPONDING ROW, COLUMN * OR DIAGONAL. * * WIN * SUM #X-S #O-S POSSIBLE * 0 0 0 Y * 1 1 0 Y * 2 2 0 Y * 3 3 0 Y * 4 0 1 Y * 5 1 1 N * 6 2 1 N * 7 NOT POSSIBLE * 8 0 2 Y * 9 1 2 N * 10 NOT POSSIBLE * 11 NOT POSSIBLE * 12 0 3 (SHOUD NOT BE POSSIBLE) TSUM BSS 8D TABLES SPACE 4,16 ** TABLES. * * *TWIN* SHOWS ALL WINNING COMBINATIONS (READ DOWN). TWIN CON S1,S4,S7,S1,S2,S3,S1,S3 CON S2,S5,S8,S4,S5,S6,S5,S5 CON S3,S6,S9,S7,S8,S9,S9,S7 ** ADJACENT SQUARES. BASE D TADJ DATA 2,4,0,0,0 SQUARES ADJACENT TO SQUARE 1 DATA 1,3,5,0,0 SQUARES ADJACENT TO SQUARE 2 DATA 2,6,0,0,0 ETC. DATA 1,7,5,0,0 DATA 2,8,4,6,0 DATA 3,9,5,0,0 DATA 4,8,0,0,0 DATA 7,9,5,0,0 DATA 6,8,0,0,0 BASE * ** ROTATIONS AND INVERSIONS OF SPECIAL SITUATION DESCRIBED * NEAR *MVX11*. FOR EACH ROW, IF THE 1ST 2 SQUARES LISTED * CONTAIN *O*S AND THE LAST 3 ARE BLANK, AN *X* WILL BE * PLACED IN THE LAST SQUARE LLISTED. TSPC CON S1,S6,S2,S9,S3 CON S1,S8,S4,S9,S7 CON S3,S4,S2,S7,S1 CON S3,S8,S6,S7,S9 CON S7,S2,S3,S4,S1 CON S7,S6,S3,S8,S9 CON S9,S2,S1,S6,S3 CON S9,S4,S1,S8,S7 TSPCL EQU *-TSPC LETTERS SPACE 4,16 ** X COORDINATES FOR LETTERS IN SQUARES. XS CON XB+0*SQSZ+SP CON XB+1*SQSZ+SP CON XB+2*SQSZ+SP CON XB+0*SQSZ+SP CON XB+1*SQSZ+SP CON XB+2*SQSZ+SP CON XB+0*SQSZ+SP CON XB+1*SQSZ+SP CON XB+2*SQSZ+SP ** Y COORDINATES FOR LETTERS IN SQUARES. YS CON YB+2*SQSZ+SP CON YB+2*SQSZ+SP CON YB+2*SQSZ+SP CON YB+1*SQSZ+SP CON YB+1*SQSZ+SP CON YB+1*SQSZ+SP CON YB+0*SQSZ+SP CON YB+0*SQSZ+SP CON YB+0*SQSZ+SP CIRCLE SPACE 4,16 ** DATA TO DRAW CIRCLE. * * CONSTANTS ARE THE TRIGONOMETRIC SIN OF THE NUMBER * IN THE COMMENTS FIELD. BASE D TSIN CON LTSZ/2*0000000/1000000 0 CON LTSZ/2*0034899/1000000 2 CON LTSZ/2*0069756/1000000 4 CON LTSZ/2*0104528/1000000 6 CON LTSZ/2*0139173/1000000 8 CON LTSZ/2*0173648/1000000 10 CON LTSZ/2*0207912/1000000 12 CON LTSZ/2*0241922/1000000 14 CON LTSZ/2*0275637/1000000 16 CON LTSZ/2*0309017/1000000 18 CON LTSZ/2*0342020/1000000 20 CON LTSZ/2*0374607/1000000 22 CON LTSZ/2*0406737/1000000 24 CON LTSZ/2*0438371/1000000 26 CON LTSZ/2*0469472/1000000 28 CON LTSZ/2*0500000/1000000 30 CON LTSZ/2*0529919/1000000 32 CON LTSZ/2*0559193/1000000 34 CON LTSZ/2*0587785/1000000 36 CON LTSZ/2*0615661/1000000 38 CON LTSZ/2*0642788/1000000 40 CON LTSZ/2*0669131/1000000 42 CON LTSZ/2*0694658/1000000 44 CON LTSZ/2*0719340/1000000 46 CON LTSZ/2*0743145/1000000 48 CON LTSZ/2*0766044/1000000 50 CON LTSZ/2*0788011/1000000 52 CON LTSZ/2*0809017/1000000 54 CON LTSZ/2*0829038/1000000 56 CON LTSZ/2*0848048/1000000 58 CON LTSZ/2*0866015/1000000 60 CON LTSZ/2*0882948/1000000 62 CON LTSZ/2*0898794/1000000 64 CON LTSZ/2*0913545/1000000 66 CON LTSZ/2*0927184/1000000 68 CON LTSZ/2*0939693/1000000 70 CON LTSZ/2*0951057/1000000 72 CON LTSZ/2*0961262/1000000 74 CON LTSZ/2*0970295/1000000 76 CON LTSZ/2*0978148/1000000 78 CON LTSZ/2*0984808/1000000 80 CON LTSZ/2*0990268/1000000 82 CON LTSZ/2*0994522/1000000 84 CON LTSZ/2*0997564/1000000 86 CON LTSZ/2*0999391/1000000 88 CON LTSZ/2*1000000/1000000 90 TSINL EQU *-TSIN LENGTH OF TABLE BASE * P ERRNG 7777-* PP TOO BIG END ~ ABCX IDENT ABC,ABC PERIPH SST RDS *COMMENT ABC - SDF/JMC 6602/6612 DISPLAY DRIVER. BASE MIXED UP ABC TITLE ABC - PPU PROGRAM TO RUN THE 6602/6612 DISPLAY. TITLE PPU INFORMATION. ABC SPACE 4,10 *** ABC - PPU PROGRAM TO RUN THE 6602/6612 DISPLAY. * S. D. FREYDER. DATE UNKNOWN. * J. M. CYCHOSZ. SPACE 4,10 *** ABC IS AVAILABLE TO ANY CENTRAL MEMORY PROGRAM TO * DRIVE THE 6602/6612 DISPLAY CONSOLE. IT IS PARTICULARLY * SUITABLE FOR DISPLAYING TEXT DATA WHICH MUST BE DYNAMICALLY * UPDATED IN REAL TIME BY A CENTRAL PROCESSOR PROGRAM. SPACE 4,16 *** INTERFACE. * * * THE CPU/PPU INTERFACE THROUGH A TWO WORD STATUS BUFFER. * THE START OF THIS BUFFER IS SPECIFIED IN THE LOWER 18 * BITS OF THE PPU INPUT REGISTER. * * * RA+1 CALL: * *T 18/ *ABC*, 6/, 18/, 18/ STATUS * * * FORMAT OF THIS 2 WORD STATUS BUFFER IS: * * WORD BITS CONTENT * * 1 17-0 FWA OF A DISPLAY TABLE WHICH CONTAINS * INFORMATION TO BE DISPLAYED. THIS * ADDRESS IS SAMPLED BEFORE EACH DISPLAY * OF DATA SO THAT THE ADDRESS MAY BE * CHANGED. THE FIRST WORD OF THIS TABLE * CONTAINS THE NUMBER OF ENTRIES TO BE * PROCESSED. SEE *DISPLAYS* FOR THE * FORMAT OF ENTRIES IN THIS TABLE. * 2 59-48 DISPLAY REQUEST/STATUS BYTE. * STATUSES - * 0000 = DISPLAY IS ASSIGNED. * 4000 = DISPLAY IS NOT ASSIGNED. * REQUESTS - * 0001 = TOGGLE TO DSD. * 0002 = HOLD DISPLAY. * 0004 = DROP DISPLAY AND PP. * 47-30 ADDRESS OF A 1 WORD BUFFER THAT WILL * CONTAIN THE LAST KEY INPUT FROM THE * CONSOLE KEYSET. THE CHARACTER IS * RETURNED IN THE UPPER 6 BITS OF THE * WORD. * 17-0 ADDRESS OF A WORD THAT CONTAINS THE * NUMBER OF CHARACTERS IN THE KEYBOARD * BUFFER. SPACE 4,16 *** DISPLAYS. * * * EACH ENTRY IN THE DISPLAY TABLE IS A CONTROL WORD WHICH * DESCRIBES HOW DATA IS TO BE DISPLAYED. * * * THE FORMAT OF A CONTROL WORD IS: * * BYTE BITS CONTENT * * 0 X COORDINATE (0 - 511) * 1 Y COORDINATE (0 - 511) * 2 11-9 FLASH RATE (0 - 7, 0=NO FLASH) * 8-6 BRIGHTNESS (0 - 7) * 5-3 UNUSED. * 2-1 SIZE (0=SMALL, 1=MEDIUM, 2=LARGE) * 0 SCREEN (0=LEFT, 1=RIGHT) * 3 11-6 CM WORD COUNT. * 5 ABSOLUTE ADDRESS FLAG (1=ABS) * 5-0 UPPER 5 BITS OF DISPLAY DATA ADDRESS. * 4 LOWER 12 BITS OF DISPLAY DATA ADDRESS. SPACE 4,16 *** ERROR MESSAGES. * * * * ILLEGAL USER ACCESS.* * THE USER WAS NOT VALIDATED TO CALL *ABC*. * * * STATUS WORD OUT OF RANGE AT NNNNNN.* * THE STATUS BUFFER IS OUTSIDE OF THE CALLER'S FIELD * LENGTH. NNNNNN EQUALS THE ADDRESS. * * * ADDRESS OUT OF RANGE.* * ONE OF THE ADDRESSES SPECIFIED IN THE STATUS BUFFER * IS OUTSIDE OF THE CALLER'S FIELD LENGTH. * * * PP ABORT.* * AN ERROR FLAG WAS DETECTED BY THE PP. TITLE MACROS AND ASSEMBLY DEFINITIONS. SPACE 4,10 ** COMMON DECKS. *CALL COMPMAC *CALL COMSCPS LDRS SPACE 4,10 ** LDRS - LOAD RELATIVE TO STATUS WORD. * * ENTRY *LOC* = RELATIVE STATUS WORD ADDRESS. * * EXIT (A) = ABSOLUTE ADDRESS. PURGMAC LDRS LDRS MACRO LOC LDN LOC RJM GPA ENDM LDRA SPACE 4,10 ** LDRA - LOAD RELATIVE ADDRESS. * * ENTRY *LOC* = LOCATION OF CM ADDRESS. * * EXIT (A) = ABSOLUTE ADDRESS. PURGMAC LDRA LDRA MACRO LOC LDC LOC RJM LRA ENDM SPACE 4,10 **** DIRECT CELL ASSIGNMENTS. ST EQU 16 - 17 ADDRESS OF STATUS BUFFER CW EQU 20 - 24 CONTROL WORD W0 EQU CW+0 CONTROL WORD BYTE 0 W1 EQU CW+1 CONTROL WORD BYTE 1 W2 EQU CW+2 CONTROL WORD BYTE 2 W3 EQU CW+3 CONTROL WORD BYTE 3 W4 EQU CW+4 CONTROL WORD BYTE 4 TI EQU 25 TABLE INDEX BR EQU 26 BRIGHTNESS CONTROL KY EQU 27 LAST KEY PRESS KB EQU 30 - 31 KEY BUFFER ADDRESS KC EQU 32 - 33 KEYBOARD CHARACTER COUNT ADDRESS SPACE 4,10 ** ASSEMBLY CONSTANTS. CH EQU CHDS DISPLAY CHANNEL DELAY EQU 20D MILLI SECONDS/DISPLAY CYCLE NAME MICRO 1,,*LIFE* **** STATUS SPACE 4,10 ** RELATIVE STATUS WORD ADDRESSES. W=DTF EQU 0 DISPLAY TABLE FWA W=STS EQU 1 STATUS/REQUEST WORD SPACE 4,10 ** CONSTANTS USED AS INSTRUCTIONS. *CALL COMSPIM ABC TITLE MAIN PROGRAM. ABC SPACE 4,10 ** MAIN PROGRAM. ORG PPFW ABC RJM PRS PRESET ABC1 RJM PSE CHECK CONTROL POINT STATUS RJM CCR CHECK CENTRAL REQUESTS RJM PKI PROCESS KEYBOARD INPUT RJM ODB OUTPUT DISPLAY BUFFERS RJM DLY DELAY - MAKE LOOP TIME CONSTANT RJM RCL RECALL CPU UJN ABC1 ITERATE ABT SPACE 4,6 ** ABT - ABORT PP. * * ENTRY (A) = ADDRESS OF MESSAGE TO ISSUE. * * EXIT TO *PPR*. * * CALLS DFM, DDS. ABT STM ABTB SET ADDRESS OF MESSAGE ABTA UJN ABT1 * PSN (IF DISPLAY ASSIGNED) RJM DDS DROP DISPLAY ABT1 LDC ** ISSUE DAYFILE MESSAGE ABTB EQU *-1 RJM DFM MONITOR ABTM ABORT PP LJM PPR EXIT PP-RES DPP SPACE 4,6 ** DPP - DROP PP. DPP MONITOR DPPM DROP PP LJM PPR EXIT PP-RES ROL SPACE 4,10 ** ROL - PROCESS ROLLOUT REQUEST. * * ENTRY ROLLOUT REQUESTED. * * EXIT PP RECALL ISSUED. * * USES CM - CM+4. * * CALLS PPR. ROL RJM DDS DROP DISPLAY LDD MA WRITE REQUEST TO MESSAGE BUFFER CWD IR LDN ZERL REQUEST DEFAULT RECALL PARAMETERS CRD CM MONITOR RECM LJM PPR EXIT PP-RES TITLE SUBROUTINES. CCR SPACE 4,16 ** CCR - CHECK CENTRAL REQUESTS. * * PROCESS ANY REQUEST FROM THE CENTRAL PROGRAM TO * TOGGLE, HOLD OR DROP THE DISPLAYS. * * ENTRY (ST,ST+1) = ADDRESS OF STATUS WORD. * * EXIT STATUS WORD READ, REQUEST DONE. * * USES CM - CM+4. * * CALLS DDS, HDC, RDS, SCF. CCR SUBR ENTRY/EXIT LDRS W=STS READ STATUS/REQUEST WORD CRD CM GET CENTRAL FLAGS WORD LDD CM LPN 7 GET D,H,T BITS ZJN CCRX IF NO REQUESTS PENDING ADC LDNI STM CCRA LDC 4000 SET DISPLAY NOT ASSIGNED RJM SSF SET STATUS FLAGS CCRA LDN ** LOAD REQUEST FLAG SHN 17 GET D BIT MJN CCR3 DROP DISPLAY SHN 1 GET H BIT MJN CCR2 IF *HOLD* FUNCTION RJM HDC TOGGLE TO *DSD* CCR1 LDN 0 SET DISPLAY ASSIGNED RJM SSF SET STATUS FLAGS LJM CCRX RETURN CCR2 RJM DDS DROP DISPLAY RJM RDS REQUEST DISPLAY UJN CCR1 CCR3 RJM DDS DROP DISPLAY LJM DPP DROP PP DLY SPACE 4,16 ** DLY - DELAY, MAKE LOOP TIME CONSTANT. * * ENTRY NONE. * * EXIT DELAY TIME ELLAPSED. * * USES CM - CM+4. * * CALLS PSE. DLY SUBR ENTRY/EXIT DLY1 DELAY SLOW CENTRAL ACCESSES RJM PSE PAUSE AND CHECK FOR ERRORS LDC RTCL READ REAL TIME CLOCK CRD CM LDD CM+4 SBM DLYB MINUS START TIME PJN DLY2 IF NO OVERFLOW ADC 7777 DLY2 SBN DELAY MINUS DELAY TIME IN MILLISECS MJN DLY1 IF DELAY TIME NOT EXPIRED LDD CM+4 STM DLYB UJN DLYX RETURN DLYB DATA 0 GPA SPACE 4,16 ** GPA - GET PARAMETER ADDRESS. * * ENTRY (A) = RELATIVE STATUS WORD ADDRESS. * (ST,ST+1) = ADDRESS OF STATUS BUFFER. * * EXIT (A) = ABSOLUTE ADDRESS OF PARAMETER. * TO *ABT* IF ADDRESS ERROR. * * USES T1. * * CALLS ACS, ANS, CAA, DDS. GPA SUBR ENTRY/EXIT STD T1 LDD ST SHN 14 ADD ST+1 ADD T1 RJM CAA CONVERT ADDRESS NJN GPAX IF VALID ADDRESS * STATUS WORD OUT OF RANGE. LDC DATA ASSEMBLE ERROR MESSAGE STD T1 LDN 0 STI T1 LDC GPAB * STATUS WORD OUT OF RANGE AT * RJM ACS MOVE MESSAGE LDD ST SHN 14 LMD ST+1 RJM ANS SET ADDRESS IN MESSAGE LDC GPAC APPEND *.* RJM ACS LDC DATA SET ADDRESS OF MESSAGE LJM ABT ABORT PP GPAB DATA Z* STATUS WORD OUT OF RANGE AT * GPAC DATA Z*.* LRA SPACE 4,16 ** LRA - LOAD RELATIVE ADDRESS. * * ENTRY (A) = ADDRESS OF WORD CONTAINING HIGH ORDER BITS * OF THE RELATIVE ADDRESS. * (A)+1 CONTAINS THE LOWER ORDER BITS. * * EXIT (A) = ABSOLUTE ADDRESS. * TO *ABT* IF ADDRESS ERROR. * * USES T1. * * CALLS CAA. LRA SUBR ENTRY/EXIT STD T1 SAVE ADDRESS LDI T1 LOAD ADDRESS LPN 77 SHN 14 ADM 1,T1 RJM CAA CONVERT ADDRESS NJN LRAX IF VALID ADDRESS * ADDRESS OUT OF RANGE. LDC LRAA SET MESSAGE ADDRESS LJM ABT ABORT PP LRAA DATA C* ADDRESS OUT OF RANGE.* ODB SPACE 4,16 ** ODB - OUTPUT DISPLAY BUFFERS. * * ENTRY (ST,ST+1) = ADDRESS OF STATUS WORD. * * EXIT ALL BUFFERS DISPLAYED. * * USES CM - CM+4, CW - CW+4, TI. * * CALLS CAA, PCW. ODB SUBR ENTRY/EXIT LDRS W=DTF CRD CM READ STATUS WORD * NOTE: ONLY THE FIRST WORD OF THE DISPLAY TABLE IS CHECKED * TO BE IN THE CALLER'S FIELD LENGTH. LDRA CM+3 CRD CM READ ENTRY COUNT STM ODBA+1 SHN -14 ADC ADCI STM ODBA LDD CM+4 GET WORD COUNT LPC 777 ZJN ODB2 IF NO DATA ADN 1 STD TI INITIALIZE TABLE INDEX ODB1 SOD TI NJN *+3 ODB2 LJM ODBX IF FINISHED WITH ALL WORDS ODBA ADC ** TABLE ADDRESS PLANTED HERE CRD CW READ CONTROL WORD RJM PCW AND PROCESS IT UJN ODB1 PROCESS NEXT CONTROL WORD PCW SPACE 4,16 ** PCW - PROCESS CONTROL WORD. * * ENTRY (W0-W4) = CONTROL WORD TO BE PROCESSED. * * USES BR, CM - CM+4, T1. * * CALLS CAA. PCW SUBR ENTRY/EXIT LDM W2 LOAD FLASH RATE LPC 7000 ZJN PCW1 IF NO FLASH DESIRED SHN -11 STD T1 LDC RTCL MILLISECOND CLOCK CRD CM LDD CM+4 SHN -6 LPN 7 SBD T1 PCW0 PJN PCWX IF FLASH TIME NOT EXPIRED PCW1 LDD W2 LOAD BRIGHTNESS SHN -6 LPN 7 STD BR STORE FOR LOOP LDD W2 LOAD SIZE/SCREEN LPN 7 STD T1 LDM PCWA,T1 SET DISPLAY FUNCTION CODE FAN CH LDD W3 LOAD CM WORD COUNT SHN -6 LPN 77 ALLOW ONLY 63D WORDS ZJN PCW0 IF NO DATA STD T1 SAVE WORD COUNT LDD W3 LPN 77 SHN 12 LMD W4 MJN PCW2 IF ABSOLUTE ADDRESS RJM CAA CONVERT ADDRESS UJN PCW3 PCW2 LPC 377777 CLEAR ABS FLAG PCW3 CRM DATA+2,T1 READ DATA LDD T1 SHN 2 *4 ADD T1 PPU WORD COUNT ADN 2 STD T1 LDD W0 LOAD X COORDINATE ADC 6000 STM DATA SET IN OUTPUT BUFFER LDD W1 LOAD Y COORDINATE ADC 7000 STM DATA+1 SET IN OUTPUT BUFFER ACN CH PCW4 LDD T1 LOAD WORD COUNT OAM DATA,CH OUTPUT X,Y,DATA SOD BR PJN PCW4 FJM *,CH WAIT FOR CHANNEL TO GO EMPTY DCN CH LJM PCWX RETURN PCWA BSS 0 DISPLAY FUNCTION CODE TABLE DATA 7000 0,LEFT DATA 7100 0,RIGHT DATA 7001 1,LEFT DATA 7101 1,RIGHT DATA 7002 2,LEFT DATA 7102 2,RIGHT DATA 7000 0,LEFT UNDEFINED DATA 7000 0,LEFT UNDEFINED PKI SPACE 4,16 ** PKI - PROCESS KEYBOARD INPUT. * * PKI PROCESSES ALL KEYBOARD INPUT. IF THE KEY IS A '*', * THE KEYBOARD CHARACTER COUNT IS CHECKED, AND IF THE BUFFER * IS EMPTY OR IF THE LAST KEY WAS A LEFT BLANK, THE DISPLAY * IS RELEASED TO *DSD*. OTHERWISE THE KEY IS WRITTEN TO THE * SPECIFIED MEMORY LOCATION. * * ENTRY (KY) = LAST KEY PRESSED. * (KB) = KEY BUFFER ADDRESS. * (KC) = KEYBOARD CHARACTER COUNT ADDRESS. * * EXIT (KY) = LAST KEY UPDATED. * * USES CM - CM+4, T2. * * CALLS HDC, SSF. PKI SUBR ENTRY/EXIT FNC 7020,CH FUNCTION KEYBOARD FOR INPUT ACN CH IAN CH INPUT KEY DCN CH ZJN PKIX IF NO KEY PRESSED STD T2 SAVE KEY LMN 1R* CHECK FOR (*) ZJN PKI2 IF (*) KEY * RETURN KEY TO CENTRAL PROGRAM. PKI1 LDN ZERL CRD CM LDD T2 STD KY UPDATE LAST KEY SHN 6 LEFT JUSTIFY STD CM LDRA KB GET ABSOLUTE ADDRESS OF KEY CWD CM WRITE KEY MONITOR RCLM RECALL CPU LJM PKIX RETURN * SPECIAL PROCESSING FOR (*) KEY. PKI2 LDRA KC CHECK KEYBOARD CHARACTER COUNT CRD CM LDD CM+4 ZJN PKI3 IF KEYBOARD BUFFER EMPTY LDD KY CHECK PREVIOUS KEY LMN 53B ZJN PKI3 IF PREVIOUS KEY = LEFT BLANK LJM PKI1 RETURN (*) TO CENTRAL PROGRAM * RELEASE DISPLAY TO *DSD*. PKI3 LDC 4000 SET DISPLAY NOT ASSIGNED RJM SSF SET STATUS FLAGS RJM HDC HOLD DISPLAY LDN 0 SET DISPLAY ASSIGNED RJM SSF SET STATUS FLAGS LJM PKIX RETURN PSE SPACE 4,16 ** PSE - PAUSE AND CHECK FOR ERRORS. * * EXIT TO *ABT* IF ERROR FLAG DETECTED. * * USER CM - CM+4. PSE SUBR ENTRY/EXIT PAUSE LDD CM+1 ZJN PSEX IF NO ERRORS, RETURN LDC PSEA SET MESSAGE ADDRESS LJM ABT ABORT PP PSEA DATA C* PP ABORT.* RCL SPACE 4,16 ** RCL - RECALL CPU. * * ENTRY NONE. * * EXIT CPU RECALLED IF 100MS HAVE ELLAPSED. * * USES CM - CM+4. RCL SUBR ENTRY/EXIT LDC RTCL READ MILLISECOND CLOCK CRD CM LDD CM+4 SBM RCLA MINUS START TIME PJN RCL1 IF NO OVERFLOW ADC 7777 RCL1 ADC -100D MINUS DELAY TIME IN MILLISECS MJN RCLX IF TIME NOT EXPIRED LDD CM+4 STM RCLA MONITOR RCLM RECALL CPU UJN RCLX RETURN RCLA DATA 0 SSF SPACE 4,16 ** SSF - SET STATUS FLAGS. * * ENTRY (A) = STATUS TO SET. * * EXIT STATUS WORD *W=STS* UPDATED. * * USES CM - CM+4, T2. * * CALLS CAA. SSF SUBR ENTRY/EXIT STD T2 SAVE STATUS FLAGS LDRS W=STS READ STATUS WORD CRD CM LDD T2 SET FLAGS STD CM LDRS W=STS REWRITE CWD CM UJN SSFX RETURN SPACE 4,10 * COMMON DECKS. *CALL COMDDSP *CALL COMPACS *CALL COMPANS *CALL COMPCAA DATA SPACE 4,10 ** DISPLAY DATA BUFFER. DATA BSS 0 START OF DATA BUFFER PRS TITLE PP PRESET. PRS SPACE 4,10 ** PRS - PP PRESET. * * CALLED AT PP LOAD TIME AND IS OVERWRITTEN DURRING * EXECUTION. PRS SUBR ENTRY/EXIT RJM CUA CHECK USER ACCESS ZJN PRS1 LDC =C* ILLEGAL USER ACCESS.* RJM DFM MONITOR ABTM LJM PPR EXIT TO PP-RES PRS1 PAUSE LDD IR+3 SET STATUS WORD ADDRESS LPN 77 STD ST LDD IR+4 STD ST+1 LDRS W=STS READ STATUS WORD CRD CM LDD CM+2 SET KEYBOARD CHARACTER COUNT ADDRESS SCN 77 SHN 6 LMD CM+1 SHN 6 STD KC+1 SHN -14 STD KC LDD CM+3 SET KEY BUFFER ADDRESS LPN 77 STD KB LDD CM+4 STD KB+1 LDN ZERL CLEAR RA+1 CRD CM LDD RA SHN 6 ADN 1 CWD CM LDC PSNI SET DISPLAY ASSIGNED STM ABTA RJM RDS REQUEST DISPLAY LDC PSNI STM /COMDDSP/RDSA FORCE OPERATOR ASSIGNMENT LDC ROL STM /COMDDSP/ROFA SET ADDRESS OF ROLLOUT PROCESSOR LDN 0 SET DISPLAY ASSIGNED RJM SSF SET STATUS FLAGS PAUSE LDD CM SHN -11 LMN 6 NJN PRS2 IF NOT IN *I* STATUS MONITOR RCPM RESTART CPU PRS2 LJM PRSX RETURN SPACE 4,10 * PRESET COMMON DECKS. *CALL COMPCUA END ~ DUD IDENT DUD,DUD TITLE DUD - DYNAMIC USER DISPLAY. *COMMENT DUD - DYNAMIC USER DISPLAY. PERIPH BASE MIXED SST HDC,RDS SYSCOM DUD SPACE 4,10 *** DUD - DYNAMIC USER DISPLAY. * * * K. E. GORLEN. 69/06/08. * VOGELBACK COMPUTING CENTER * NORTHWESTERN UNIVERSITY * 6400/6500/6600 SCOPE. * * MODIFIED FOR SCOPE 3.4. * T R RAMSEY 72/08/15. * * CONVERTED FOR KRONOS 2.1.2. * M. D. RUSTAD. 78/08/16.RESEQUENCE. * * CONVERTED FOR NOS 2.2. * J. M. CYCHOSZ. 84/12/12. DUD SPACE 4,10 *** FUNCTION. * * DUD IS A GENERAL PURPOSE DRIVER FOR THE 6602/6612 * CONSOLE DISPLAY. IT IS PARTICULARLY SUITABLE FOR DISPLAYING * LARGE QUANTITIES OF DATA, OR DATA WHICH MUST BE DYNAMICALLY * UPDATED IN REAL TIME BY A CENTRAL PROCESSOR PROGRAM. DUD SPACE 4,10 *** INTERFACE. * * THE CPU/PPU INTERFACE IS THROUGH A DISPLAY ENVIRONMENT * TABLE OF THE FOLLOWING FORMAT. * * WORD MNEMONIC CONTENTS * * 0 W=STAT FUNCTION/STATUS WORD DURING NORMAL * (NON-INTERRUPT) PROCESSING. THE * ADDRESS OF THIS WORD IS PASSED TO DUD * WHEN IT IS CALLED. * * 1 W=ISTAT FUNCTION/STATUS WORD DURING INTERRUPT * PROCESSING. * * 2 W=RFL FIELD LENGTH REQUEST WORD * BIT 0 - COMPLETE BIT * BITS 12-23 - FL/100B * BITS 30-47 - INTERRUPT ADDRESS. IF * NON-ZERO, CPU IS INTERRUPTED TO THIS * ADDRESS WHEN THE COMPLETE BIT IS SET. * * 3 W=ARCL AUTO-RECALL CONTROL WORD - BIT 0 OF * THIS WORD MUST ALWAYS BE 1. * ADDITIONAL INFORMATION AVAILABLE TO * THE CPU (READ ONLY) IS * BYTE 0 - CONTROL POINT RA/100B * BYTE 1 - CONTROL POINT FL/100B * * 4 W=MSC REAL TIME CLOCK WORD * BYTE 0 - DISPLAY CYCLE COUNTER, * INCREMENTED ONCE PER DISPLAY CYCLE. * (APPROX. 20 MSEC.) * BYTE 1 - SECONDS CLOCK, RESET EVERY * 1000 MSEC. * BYTE 2 - MILLISECOND CLOCK, RESET * EVERY 1000 MILLISECONDS. * BYTE 3 - MILLISECONDS REMAINING UNTIL * NEXT CLOCK INTERRUPT. * BYTE 4 - STATUS BITS: * BIT 0 SET IF DISPLAY IS UP. * BIT 1 SET IF INTERRUPT IS * DISABLED. * BIT 2 SET IF CLOCK INTERRUPT. * * 5 W=KSW KEYBOARD STATUS WORD - LOW 18 BITS * CONTAIN A POINTER TO THE FIRST WORD * OF A 13 WORD KEYBOARD BUFFER, WHICH * IS DISPLAYED AT THE BOTTOM OF THE * LEFT SCREEN. THE BUFFER MUST BE * UPDATED BY THE CPU (SEE KEYBOARD * PROCESSING) CHARACTERS ARE STORED 1 * PER BYTE IN THE LOW 6 BITS. * BYTE 0 OF THIS WORD CONTAINS A COUNT * OF THE CHARACTERS CURRENTLY IN THE * BUFFER. * BYTE 1 MAY BE SET NONZERO TO INDICATE * THAT THE KEYBOARD ENTRY IS CORRECT * AND READY TO BE EXECUTED. * * 6 W=KMAD KEYBOARD MESSAGE ADDRESS - BITS 0-17 * CONTAIN A POINTER TO A 0-30 CHARACTER * STRING WITH ZERO BYTE TERMINATOR. * THIS MESSAGE IS DISPLAYED IMMEDIATELY * ABOVE THE TYPE-IN LINE. * * 7 W=DPF BITS 0-17 CONTAIN THE FWA OF THE * DISPLAY BUFFER POINTER TABLE. * * 10 W=DPL BITS 0-17 CONTAIN THE LWA+1 OF THE * DISPLAY BUFFER POINTER TABLE. * * 11-30B W=XJP EXCHANGE JUMP PACKAGE BUFFER * * 31B W=ARP AUTO-RECALL POINTER BUFFER * * 32B W=IKEY BITS 30-47 CONTAIN THE KEYBOARD * INTERRUPT ADDRESS * * 33B W=ICLK BITS 30-47 CONTAIN THE CLOCK * INTERRUPT ADDRESS. NOTE THIS ADDRESS * MAY BE SET WITH AN RJ INSTRUCTION DUD SPACE 4,10 *** DISPLAYS. * * EACH USER DISPLAY CONSISTS OF A BLOCK OF DATA SET UP * EXACTLY AS IT IS TO BE TRANSMITTED TO THE 6612/6602. THUS, THE * DISPLAY DATA MUST BE FORMATTED AS SPECIFIED IN THE 6000 SERIES * PERIPHERAL EQUIPMENT REFERENCE MANUAL. THE TYPE AND LOCATION * OF EACH DISPLAY BUFFER IS DEFINED BY A DISPLAY BUFFER POINTER * HAVING THE FOLLOWING FORMAT * * BITS CONTENTS * * 0-17 LAST WORD ADDRESS +1 OF DISPLAY DATA * 30-47 FIRST WORD ADDRESS OF DISPLAY DATA * MAX. BUFFER LENGTH = 4096 CM WORDS * * 48-49 1 - SMALL * 2 - MEDIUM * 3 - LARGE * * 50 0 - CHARACTER MODE * 1 - DOT MODE * * 51 0 - LEFT SCREEN * 1 - RIGHT SCREEN * * 54-57 0-17B - INTENSIFICATION COUNT * * 59 0 - DISPLAY ON * 1 - DISPLAY OFF * * THE DISPLAY BUFFER POINTERS RESIDE IN A CONTINUOUS * BLOCK CALLED THE DISPLAY BUFFER POINTER TABLE. THE LOCATION * OF THIS TABLE IS DEFINED BY POINTERS IN THE DISPLAY ENVIRON- * MENT TABLE, W=DPF AND W=DPL. DUD SPACE 4,10 *** CPU INTERRUPT. * * THE CENTRAL PROCESSOR INTERRUPT SYSTEM ENABLES DYNAMIC * CPU PROCESSING OF KEYBOARD INPUT AND DISPLAY OUTPUT. THERE * ARE FOUR TYPES OF INTERRUPT AVAILABLE * 1.KEYBOARD INTERRUPT - THE CPU IS INTERRUPTED TO THE * KEYBOARD INTERRUPT ADDRESS (W=IKEY) WITH THE CHARACTER IN A0. * 2.CLOCK INTERRUPT - THE CPU MAY REQUEST THAT AN INTER- * RUPT OCCUR AFTER A DELAY OF 1-4096 MSEC. AFTER THIS DELAY, THE * CPU IS INTERRUPTED TO THE CLOCK INTERRUPT ADDRESS (W=ICLK) * WITH A0 = 777777B. * 3.INTERRUPT REQUEST - THE CPU MAY ISSUE A FUNCTION * (F=INT) TO DUD, CAUSING IT TO BE INTERRUPTED TO THE ADDRESS * PASSED IN BITS 30-47 OF THE REQUEST WITH A0 = 0. * 4.FIELD LENGTH REQUEST INTERRUPT - THE CPU MAY REQUEST * THAT IT BE INTERRUPTED TO A SPECIFIED ADDRESS WHEN A REQUEST * FOR FIELD LENGTH HAS BEEN HONORED. A0 IS SET TO CONTAIN THE * NEW FIELD LENGTH. * * AN INTERRUPT CONDITION CAUSES THE FOLLOWING SEQUENCE OF * EVENTS TO OCCUR * * 1.THE CENTRAL PROCESSOR IS DROPPED FROM THE CONTROL * POINT. * 2.THE EXCHANGE PACKAGE AND AUTO-RECALL POINTER ARE * SAVED IN THE AREAS PROVIDED IN THE DISPLAY ENVIRONMENT TABLE. * 3.THE AUTO-RECALL POINTER IS SET TO W=ARCL. THIS ALLOWS * AN INTERRUPT TO OCCUR WHILE THE CPU IS IN AUTO-RECALL. * 4.THE P AND A0 REGISTERS ARE RESET IN THE EXCHANGE * JUMP PACKAGE. * 5.THE CPU IS REQUESTED. * * NOTE - IN INTERRUPT MODE, FUNCTIONS ARE HONORED FROM * THE INTERRUPT FUNCTION/STATUS WORD ONLY. * * EXIT FROM THE INTERRUPT ROUTINE IS ACCOMPLISHED AS * FOLLOWS * * 1.THE CPU RESTORES REGISTERS A4,B4,A5, AND B5. * 2.AN RCP (F=RCP) FUNCTION IS ISSUED THROUGH THE * INTERRUPT STATUS WORD. * 3.THE CPU GOES INTO AUTO-RECALL ON THE INTERRUPT STATUS * WORD. THIS ALLOWS AUTO-RECALL PRIOR TO THE INTERRUPT TO BE * RESTORED. * 4.WHEN THE CPU HAS ENTERED AUTO-RECALL, IT IS DROPPED. * 5.IF THE RCP FUNCTION SPECIFIED A DELAYED INTERRUPT, * THE DELAY TIME IS SET. * 6.THE SAVED EXCHANGE JUMP PACKAGE IS READ, THE CONTROL * POINT RA,FL, AND EXIT MODE ARE UPDATED, AND THE REMAINDER OF * THE REGISTERS ARE RESTORED. * 7.THE AUTO-RECALL POINTER IS RESTORED * 8.THE COMPLETE BIT IS SET IN THE INTERRUPT STATUS WORD. * 9.THE CPU IS REQUESTED. DUD SPACE 4,10 *** FUNCTIONS. * * DUD PROVIDES THE FOLLOWING FUNCTIONS * * 0B F=NOP NO OPERATION * (**** **** **** **** 0000) * * 2B F=INT INTERRUPT CENTRAL PROCESSOR * (**** AAAA AA** **** 0002) * ILLEGAL IN INTERRUPT MODE * AAAAAA = INTERRUPT ROUTINE ADDRESS * * 4B F=ION ENABLE INTERRUPT * (**** **** **** **** 0004) * * 6B F=IOF DISABLE INTERRUPT * (**** **** **** **** 0006) * * 10B F=RCP RESTORE CENTRAL PROCESSOR * (**** **** **** DDDD 0010) * IGNORED IN NORMAL MODE * DDDD = CLOCK INTERRUPT DELAY * DDDD = 0 - NO CHANGE IN CLOCK INT. * * 12B F=RPR USED TO REQUEST PRIORITY, NOW IT * IS A NO-OP. * * 14B F=REM USED TO REQUEST EXIT MODE, NOW A NO-OP. * * 16B F=HOLD HOLD DISPLAY. * (**** **** **** **** 0016) * * 20B F=DROP DROP PP * (**** **** **** **** 0020) * IF ISSUED DURING INTERRUPT MODE, DROP * OCCURS AFTER EXIT FROM INTERRUPT * * 22B F=KILL KILL PROGRAM * (**** **** **** **** 0022) DUD SPACE 4,10 *** KEYBOARD PROCESSING. * * PROCESSING OF CHARACTERS TYPED IN AT THE CONSOLE IS * DONE BY THE CPU ON AN INTERRUPT BASIS. EACH CHARACTER CAUSES * THE CPU TO BE INTERRUPTED INTO THE KEYBOARD ROUTINE * (SEE W=IKEY) WITH THE CHARACTER IN REGISTER A0. THE KEYBOARD * ROUTINE THEN PROCESSES THE CHARACTER, UPDATING THE KEYBOARD * STATUS WORD (W=KSW) AND THE KEYBOARD BUFFER. THE KEYBOARD * BUFFER MAY CONTAIN UP TO 63 CHARACTERS, STORED 1 PER BYTE IN * BITS 0-5. ITS CONTENTS ARE DISPLAYED IN MEDIUM-SIZE CHARACTERS * ON THE LOWER LEFT SCREEN. ZERO BYTES ARE NOT NEEDED AFTER THE * LAST CHARACTER. IF THE KEYBOARD READY FLAG IS SET, THE * KEYBOARD BUFFER IS DISPLAYED WITH EVERY 4TH CHARACTER INTEN- * SIFIED IN ROTATION. * * THE ASTERISK (*) CAUSES DUD TO RELEASE THE DISPLAYS * TO DSD IF IT OCCURS WHEN THE CHARACTER COUNT IS ZERO OR IF THE * PREVIOUS CHARACTER WAS A LEFT BLANK (53B) AND DOES NOT * CAUSE AN INTERRUPT IN THIS CASE. * * THE KEYBOARD MESSAGE LINE IS DISPLAYED IN MEDIUM-SIZE * CHARACTERS IMMEDIATELY ABOVE THE TYPE-IN LINE. NORMALLY, THIS * MESSAGE IS THE STRING OF UP TO 30 CHARACTERS THAT BEGINS AT * THE ADDRESS IN W=KMAD. HOWEVER, THE FOLLOWING MESSAGES ARE * SUBSTITUTED WHEN APPROPRIATE * * WAIT - CM. * WAIT - PPS. * * IF THE FIRST CHARACTER OF THE MESSAGE IS A $, THE * MESSAGE IS DISPLAYED WITH PERIODIC INTENSIFICATION. THE * CHARACTER STRING MUST ALWAYS END WITH A ZERO BYTE TO ASSURE * PROPER DISPLAY. DUD SPACE 4,10 *** ERROR MESSAGES. * * * * ILLEGAL USER ACCESS.* * THE CALLER IS NOT VALIDATED TO USE *DUD*. * * * ILLEGAL FUNCTION CODE.* * AN UNDEFINED OR IMPROPER REQUEST HAS BEEN PLACED IN * W=STAT OR W=ISTAT. * * * ILLEGAL MEMORY REQUEST.* * A REQUEST FOR MEMORY EXCEEDS THE MAXIMUM ALLOWED * FIELD LENGTH. * * * ADDRESS OUT OF RANGE.* * AN ADDRESS IS NOT WITHIN THE ASSIGNED FIELD LENGTH. DUD SPACE 4,10 ** COMMON DECKS. *CALL COMDMAC *CALL COMPMAC QUAL MTR *CALL COMSCPS QUAL * *CALL COMSSSD LIST X *CALL COMSDUD LIST * TITLE ASSEMBLY CONSTANTS. **** DIRECT LOCATION ASSIGNMENTS. AB EQU 20 - 24 ASSEMBLY BUFFER (5 BYTES) XC EQU 25 X-COORDINATE YC EQU 26 Y-COORDINATE MC EQU 27 MONITOR CYCLE COUNT KM EQU 30 KEYBOARD MESSAGE ADDRESS NC EQU 31 NUMBER OF CONTROL POINTS (FOR *COMDSYS*) ST EQU 32 STARTING TIME (MS) S1 EQU 33 TRANSIENT STORAGE S2 EQU 34 TRANSIENT STORAGE S3 EQU 35 TRANSIENT STORAGE S4 EQU 36 TRANSIENT STORAGE S5 EQU 37 TRANSIENT STORAGE CC EQU 40 DISPLAY CYCLE COUNT SC EQU 41 SECOND CLOCK MS EQU 42 MILLISECOND CLOCK ID EQU 43 CLOCK INTERRUPT DELAY DI EQU 44 INTERRUPT DISABLE FLAG CI EQU 45 CLOCK INTERRUPT ACTIVE FLAG IS EQU 46 INTERRUPT STATUS FLAG FT EQU 60 - 61 *FIRST* BUFFER POINTER (2 BYTES) LN EQU 62 BUFFER DATA LENGTH (IN CM WORDS) BL EQU 63 DISPLAY BUFFER LENGTH (IN CM WORDS) PA EQU 64 - 65 PARAMETER ADDRESS CONSTS SPACE 4,10 ** ASSEMBLY CONSTANTS. CH EQU CHDS DISPLAY CHANNEL BUFL EQU 620 LENGTH OF MAIN DISPLAY BUFFER (WORDS) DSCT EQU 20D DISPLAY CYCLE TIME IN MSEC. D EQU 2 INTERRUPT DISABLE FLAG C EQU 4 CLOCK INTERRUPT ACTIVE FLAG W EQU 4 *STSW* W STATUS X EQU 5 *STSW* X STATUS I EQU 6 *STSW* I STATUS RFLMX EQU 1777 MAXIMUM FL LEGAL FL REQUEST REQS EQU /MTR/REQS *REQM* SUB-FUNCTION (USED BY COMDDSP) NAME MICRO 1,,*DUD* **** SPACE 4,10 ** CONSTANTS USED AS INSTRUCTIONS. *CALL COMSPIM TITLE MACRO DEFINITIONS. FCN SPACE 4,10 ** FCN - GENERATE FUNCTION PROCESSOR TABLE. * * NAME FCN CODE,ADDR * * ENTRY *NAME* = NAME OF TABLE (I.E. FWA OF TABLE) * *CODE* = FUNCTION CODE. * *ADDR* = ADDRESS OF PROCESSING ROUTINE. PURGMAC FCN MACRO FCN,NAME,CODE,ADDR . IFC NE,$NAME$ NAME BSS 0 .1 SET NAME .MAXFUN SET 0 . ELSE .. IFC NE,$CODE$ .MAXFUN MAX .MAXFUN,CODE ORG .1+CODE/2 CON ADDR .. ELSE ORG .1+.MAXFUN/2+1 .. ENDIF BSS 0 . ENDIF ENDM LDRS SPACE 4,16 ** LDRS - LOAD CM ADDRESS RELATIVE TO STATUS WORD. * * LDRS LOC * * ENTRY *LOC* = RELATIVE STATUS WORD ADDRESS. * * EXIT (A) = ABSOLUTE ADDRESS. PURGMAC LDRS LDRS MACRO ORD LDN ORD RJM GPA ENDM LDRA SPACE 4,16 ** LDRA - LOAD RELATIVE CM ADDRESS. * * LDRA LOC * * ENTRY *LOC* = LOCATION OF CM ADDRESS. * * EXIT (A) = ABSOLUTE ADDRESS. PURGMAC LDRA LDRA MACRO ADR LDN ADR RJM LRA ENDM TITLE MAIN DISPLAY LOOP. ** MDL - MAIN DISPLAY LOOP. ORG PPFW DUD RJM PRS PRESET PROGRAM MDL1 RJM SYS DISPLAY SYSTEM STATUS DCN CH+40 SYNC CHANNEL STATE (COMDSYS) RJM DLM RETURN TO DISPLAY LOOP MANAGER RJM DLM RJM DKB DISPLAY KEYBOARD TYPE-IN RJM RKB READ KEYBOARD RJM DLM RJM DUB ELSE, DISPLAY USER DISPLAY BUFFERS RJM DLM MDL2 RJM DLM LDD MS CURRENT TIME ADC -0 MINUS START TIME MDLA EQU *-1 ZJN MDL4 IN CASE MTR DEAD PJN MDL3 IF NO OVERFLOW ADC 1000D COMPENSATE FOR OVERFLOW MDL3 SBN DSCT MINUS DISPLAY CYCLE TIME MJN MDL2 DELAY TO MAKE CYCLE CONSTANT LDD MS SET NEW START TIME LMC -0 STM MDLA AOD CC INCREMENT CYCLE COUNT MDL4 LJM MDL1 LOOP TITLE DISPLAY KEYBOARD BUFFERS. ** DKB - DISPLAY KEYBOARD BUFFERS. * ADAPTED FROM G.R.MANSFIELD (MACE DSD). * * ENTRY (KM) = KEYBOARD MESSAGE ADDRESS. * * USES T1, T2, CM - CM+4, AB - AB+4. DKB SUBR ENTRY/EXIT LDRS W=KSW CRD CM READ KEYBOARD STATUS WORD ADN W=KMAD-W=KSW CRD AB READ KEYBOARD MESSAGE ADDRESS LDD CM STM DKBB SAVE CHARACTER COUNT LPN 77 ADC KBB FORM FWA FOR TRAILING ZERO BYTES STM DKBA LDD CM+1 STM DKBC SAVE KEYBOARD READY FLAG LDN 15 STD T2 SET LENGTH OF KEYBOARD BUFFER LDRA CM+3 CRM KBB,T2 READ KEYBOARD BUFFER LDN ZERL CRM *,ON SET TRAILING ZERO BYTES DKBA EQU *-1 LDD AB+3 ADD AB+4 STM KMB ZJN DKB0 IF NO KEYBOARD MESSAGE LDRA AB+3 CRM KMB,TR READ KEYBOARD MESSAGE DKB0 FNC 7001,CH SELECT 32 CHAR/LINE, LEFT SCREEN LDC 7000 SET Y-COORDINATE STD YC LDN 3 SET INTENSIFICATION COUNT STD T2 LDC 1004 SET COORDINATE SHIFT STM DKBD * DISPLAY KEYBOARD BUFFER IN MEDIUM CHARACTERS IF @ 32 * CHARACTERS IN BUFFER. ELSE, DISPLAY IN SMALL CHARACTERS. LDC * CHECK KEYBOARD INDEX DKBB EQU *-1 SBN 33 MJN DKB1 IF @ 32 CHARACTERS FNC 7000,CH SELECT 64 CHAR./LINE, LEFT SCREEN LDN 4 RAD YC INCREMENT Y LCN 2 RAD T2 DECREMENT INTENSIFICATION COUNT SOM DKBD DECREMENT SHIFT DKB1 ACN CH DKB2 LDN 2 OAM XC,CH OUTPUT COORDINATES LCN 1 SET INDEX STD T1 DKB3 LDN 2 ADVANCE INDEX RAD T1 LDM KBB,T1 DISPLAY 2 CHARACTERS SHN 6 ADM KBB+1,T1 OAN CH NJN DKB3 LOOP TO END OF BUFFER LDC * DKBC EQU *-1 KEYBOARD READY FLAG ZJN DKB5 IF KEYBOARD NOT READY * IF THE KEYBOARD IS READY TO BE EXECUTED, INTENSIFY * EVERY 4TH CHARACTER IN ROTATION LDD CC SET INDEX LPN 14 SHN -2 STD T1 DKB4 LDD T1 GENERATE X COORDINATE DKBD SHN 3 ADD XC OAN CH LDM KBB,T1 OUTPUT CHARACTER SHN 6 OAN CH ZJN DKB5 IF END OF BUFFER LDN 4 ADVANCE INDEX RAD T1 UJN DKB4 LOOP DKB5 SOD T2 MJN DKB6 IF INTENSIFICATION DONE LJM DKB2 LOOP DKB6 DCN CH+40 * DISPLAY KEYBOARD MESSAGE. LDD KM ZJN DKB11 IF NO KEYBOARD MESSAGE SBN 1 STD T1 SET MESSAGE ADDRESS LDI KM ZJN DKB11 IF NO MESSAGE SHN -6 LMN 1R$ SENSE FIRST CHARACTER $ NJN DKB7 NO INTENSIFICATION LDD CC LPN 30B ZJN DKB8 IF TIME TO INTENSIFY DKB7 LCN 6 DKB8 ADN 11 STD T2 SET INTENSIFICATION COUNT FNC 7001,CH SELECT 32 CHAR./LINE, LEFT SCREEN ACN CH DKB9 LDN 2 OAM DKBE,CH OUTPUT COORDINATES LDD T1 STD T3 SET FWA-1 OF MESSAGE DKB10 AOD T3 ADVANCE MESSAGE ADDRESS LDI T3 OAN CH DISPLAY BYTE NJN DKB10 LOOP TO END OF MESSAGE SOD T2 NJN DKB9 LOOP FOR INTENSIFICATION DCN CH+40 DKB11 LJM DKBX RETURN DKBE DATA 6000,7022 TITLE READ KEYBOARD. ** RKB - READ KEYBOARD. * * CALLS HDC. RKB5 STM RKBA CLEAR PREVIOUS CHARACTER RKB SUBR ENTRY/EXIT FNC 7020,CH SELECT KEYBOARD INPUT ACN CH IAN CH INPUT CHARACTER DCN CH+40 ZJN RKB5 IF NO CHARACTER STD T1 SAVE LDC ** RKBA EQU *-1 ZJN RKB1 IF NO PREVIOUS CHARACTER SOM RKBC DECREMENT DELAY COUNTER NJN RKBX IF DELAY NOT EXPIRED LDN 20 SET REPEAT DELAY RKB1 LMN 24 SET INITIAL DELAY STM RKBC SET DELAY COUNTER LDD T1 GET CHARACTER AGAIN LMN 1R* SENSE CHARACTER = * NJN RKB3 IF NOT * LDC ** LOAD PREVIOUS CHARACTER RKBB EQU *-1 LMN 53B SENSE PREVIOUS CHARACTER = LEFT BLANK ZJN RKB2 DROP DISPLAY IF LEFT BLANK * SEQUENCE LDM DKBB KEYBOARD CHARACTER COUNT NJN RKB3 IF * NOT FIRST CHARACTER RKB2 RJM HDC HOLD DISPLAY CHANNEL LJM MDL1 RKB3 LDD T1 STM RKBB UPDATE PREVIOUS CHARACTER STM RKBA LDM IDLB CHECK FOR CHARACTER ALREADY BEING NJN RKB4 PROCESSED BY INTERRUPT ROUTINE LDD T1 IF NOT, REQUEST CPU INTERRUPT STM IDLB FOR THIS CHARACTER RKB4 LJM RKBX RETURN RKBC DATA 24 DELAY COUNTER TITLE DISPLAY USER BUFFERS. ** DUB - DISPLAY USER BUFFERS. DUB SUBR ENTRY/EXIT LDRS W=DPF READ FWA OF POINTER TABLE CRD CM ADN W=DPL-W=DPF READ LWA+1 OF POINTER TABLE CRD AB LDD CM+3 LPN 77 SHN 14 ADD CM+4 SBN 1 STD S2 SHN -14 STD S1 LDD AB+3 LPN 77 STD S3 LDD AB+4 STD S4 DUB1 AOD S2 ADVANCE TABLE ADDRESS SHN -14 RAD S1 SBD S3 COMPARE TO TABLE LIMIT SHN 14 ADD S2 SBD S4 PJN DUBX FINISHED LDRA S1 READ NEXT BUFFER POINTER CRD CM LDD CM SHN 6 MJN DUB1 SUPPRESS DISPLAY IF SIGN BIT SET SHN -14 LPN 17 ISOLATE INTENSIFICATION COUNT ZJN DUB1 SKIP IF INTENSITY ZERO STM DUBB SET INTENSIFICATION COUNT LDD CM LPN 17 ISOLATE FUNCTION INDEX ZJN DUB1 IF ZERO STD T1 LDM DUBB,T1 FAN CH FUNCTION CHANNEL LDD CM+2 SET BUFFER FWA SCN 77 SHN 6 ADD CM+1 SHN 6 STD FT+1 STM DUBA+1 SHN -14 STD FT ADC LDCI FORM LDC INSTRUCTION STM DUBA LDD CM+3 LPN 77 SHN 14 ADD CM+4 STD T1 SET BUFFER LWA+1 SHN -14 SBD FT COMPUTE BUFFER LENGTH SHN 14 ADD T1 SBD FT+1 PJN DUB3 DUB2 LJM DUB1 IF BAD BUFFER LENGTH DUB3 ZJN DUB2 STD LN STD S5 ACN CH UJN DUB6 DUB4 LDD LN RESET BUFFER DATA LENGTH STD S5 ADC -BUFL PJN DUB5 IF MORE THAN PP BUFFER LENGTH LJM DUB8 DUB5 LDC * DUBA EQU *-2 BUFFER FWA STD FT+1 SHN -14 STD FT DUB6 LDC -BUFL RAD S5 DECREMENT WORD COUNT MJN DUB7 IF LESS THAN PP BUFFER FULL LDRA FT CRM BUF,BL FILL PP BUFFER LDC BUFL ADVANCE POINTER RAD FT+1 SHN -14 RAD FT LDC BUFL*5 WORD COUNT IN BUFFER OAM BUF,CH DISPLAY BUFFER UJN DUB6 LOOP DUB7 ADC BUFL ZJN DUB9 IF DONE STD S5 SET WORD COUNT LDRA FT CRM BUF,S5 READ REMAINING DATA DUB8 LDD S5 CALCULATE WORD COUNT SHN 2 *4 ADD S5 *5 OAM BUF,CH DISPLAY BUFFER DUB9 SOM DUBB DECREMENT INTENSIFICATION COUNT ZJN DUB10 IF DONE LJM DUB4 LOOP DUB10 DCN CH+40 LJM DUB1 LOOP FOR NEXT BUFFER DUBB DATA 0 INTENSIFICATION COUNT DATA 7000 SMALL,LEFT DATA 7001 MEDIUM,LEFT DATA 7002 LARGE,LEFT DATA 7010 DOT,LEFT DATA 7010 DOT,SMALL,LEFT DATA 7011 DOT,MEDIUM,LEFT DATA 7012 DOT,LARGE,LEFT DATA 7100 SMALL,RIGHT DATA 7100 SMALL,RIGHT DATA 7101 MEDIUM,RIGHT DATA 7102 LARGE,RIGHT DATA 7110 DOT,RIGHT DATA 7110 DOT,SMALL,RIGHT DATA 7111 DOT,MEDIUM,RIGHT DATA 7112 DOT,LARGE,RIGHT TITLE DISPLAY/INTERFACE LOOP MANAGER. ** DLM/ILM - DISPLAY/INTERFACE LOOP MANAGER. * * USES T0 - T7, CM - CM+4, AB - AB+4. DLM SUBR ENTRY/EXIT LDC RTCL CRD CM READ REAL TIME CLOCK LDD CM+4 COMPUTE ELAPSED TIME SBD ST START TIME ZJN DLM6 IF 1 MSEC. NOT ELAPSED PJN DLM1 IF NO WRAP ADC 10000 DLM1 STD T1 SAVE ELAPSED TIME RAD MS ADVANCE MILLISECONDS ADC -1000D MJN DLM3 IF LESS THAN 1000D DLM2 STD MS ELSE RESET ADC -1000D PJN DLM2 IF MS NOT BELOW 1000D AOD SC ADVANCE SECONDS LMC 1000D NJN DLM3 IF NO WRAP STD SC RESET SECONDS DLM3 LDD ID ZJN DLM5 IF DELAY EXPIRED SBD T1 DECREMENT DELAY TIME PJN DLM4 IF STILL POSITIVE LDN 0 ELSE, SET TO ZERO DLM4 STD ID UPDATE DELAY TIME DLM5 LDD CM+4 STD ST RESET STARTING TIME LDRS W=MSC CWD CC UPDATE CLOCK IN CM DLM6 LJM IDL ILM EQU *-1 CURRENT INTERFACE LOOP TASK ADDRESS LJM DLMX RETURN TO DISPLAY LOOP TITLE IDLE TASK. ** IDL - IDLE TASK. IDLX RJM ILM RETURN TO MANAGER IDL LDD DI ADD IS NJN IDL3 IF INTERRUPT IN PROGRESS OR DISABLED IDLA LDC ** PLUGGED WITH LJM DPP IDLB EQU *-1 KEYBOARD INPUT ZJN IDL2 IF NO INPUT TO BE PROCESSED LDRS W=IKEY CRD CM READ KEYBOARD INTERRUPT ADDRESS LDM IDLB LOAD CHARACTER TO BE PROCESSED RJM ICP INTERRUPT CENTRAL PROCESSOR LDN 0 STM IDLB CLEAR CHARACTER IDL1 UJN IDLX IDL2 LDD CI ZJN IDL4 IF CLOCK INTERRUPT INACTIVE LDD ID IDL3 NJN IDL4 IF DELAY NOT EXPIRED STD CI CLEAR CLOCK INTERRUPT ACTIVE LDRS W=ICLK READ INTERRUPT ADDRESS CRD CM LCN 0 RJM ICP INTERRUPT CENTRAL PROCESSOR UJN IDL1 IDL4 LDRS W=STAT ADD IS +1 IF INTERRUPT MODE CRD CM CHECK FOR FUNCTION TO PROCESS LDD CM+4 SHN 21 MJN IDL5 IF COMPLETE NJN FCN IF NOT NO-OP IDL5 LDRS W=RFL CRD AB READ STATUS WORD LDD AB+4 LPN 1 NJN IDL6 IF COMPLETED RJM RFL ELSE, PROCESS FIELD LENGTH REQUEST IDL6 AOD MC ADVANCE MONITOR COUNT LPN 37 NJN IDL7 FALL THROUGH ONCE PER 32 TIMES RJM PSM PAUSE FOR STORAGE MOVE IDL7 LJM IDLX TITLE CPU REQUEST PROCESSING. ** FCN - CPU REQUEST PROCESSING. * * ENTRY (CM - CM+4) = FUNCTION/STATUS WORD *W=STAT* OR * *W=ISTAT*. FCN LDD CM+4 SHN -1 STD T1 SAVE FUNCTION INDEX SBN FCNB-FCNA+1 MJN FCN2 IF LEGAL FUNCTION FCN1 LDC =C* ILLEGAL FUNCTION CODE.* LJM ABT FCN2 LDM FCNA,T1 LOAD ROUTINE ADDRESS STD T1 LJM 0,T1 JUMP TO PROCESS FUNCTION CODE FCNX LDD IS RJM SCB SET COMPLETE BIT UJN IDL7 RETURN TO IDLE TASK NOREF .1 FCNA FCN FCN F=NOP,FCNX 00 - NO OPERATION FCN F=INT,INT 02 - INTERRUPT CENTRAL PROCESSOR FCN F=ION,ION 04 - ENABLE INTERRUPT FCN F=IOF,IOF 06 - DISABLE INTERRUPT FCN F=RCP,RCP 10 - RESTORE CENTRAL PROCESSOR FCN F=RPR,FCNX 12 - REQUEST PRIORITY (NO-OP) FCN F=REM,FCNX 14 - REQUEST EXIT MODE (NO-OP) FCN F=HOLD,HLD 16 - HOLD DISPLAY FCN F=DROP,DRP 20 - DROP PP FCN F=KILL,KIL 22 - KILL PROGRAM FCN FCNB BSS 0 TITLE CPU REQUEST PROCESSORS. HLD SPACE 4,10 ** HLD - HOLD DISPLAY. HLD BSS 0 ENTRY RJM DDS DROP DISPLAY RJM RDS REQUEST DISPLAY UJN FCNX RETURN ICP SPACE 4,10 ** ICP - INTERRUPT CENTRAL PROCESSOR. * * ENTRY (A) = (A0). * CM+1-CM+2 = INTERRUPT ADDRESS, LEFT JUSTIFIED. ICP SUBR ENTRY/EXIT SHN 6 FORM MODEL OF FIRST WORD OF XJP STM ICPA+3 SET (A0) = (A) SHN 6 STM ICPA+2 LDD CM+2 SET P TO INTERRUPT ADDRESS SCN 77 SHN 6 ADD CM+1 SHN 6 STM ICPA+1 SHN -14 LPN 37 STM ICPA MONITOR DCPM DROP CPU MONITOR RCLM ENSURE XJ PACKAGE IDLE ICP1 RJM CPA CHECK PP ACTIVITY ZJN ICP2 IF ONLY *DUD* ACTIVE RJM PSM PAUSE FOR STORAGE MOVE RJM ILM UJN ICP1 ICP2 LDC KMB STD KM LDD RA CHECK FOR REQUEST IN RA+1 SHN 6 ADN 1 CRD CM LDD CM ADD CM+1 ADD CM+2 ADD CM+3 ADD CM+4 ZJN ICP3 IF CLEAR LDD CM ADD CM+1 NJN ICP3 LDN 0 STD CM+2 STD CM+3 STD CM+4 ICP3 LDRS W=ARP SAVE RA+1 CWD CM LDN ZERL CRD CM LDD RA SHN 6 ADN 1 CWD CM CLEAR RA+1 LDN 20 STD T1 LENGTH OF EXCHANGE JUMP PACKAGE LDD CP CRM XJP,T1 SAVE EXCHANGE PACKAGE LDRS W=XJP CWM XJP,T1 SAVE EXCHANGE PACKAGE IN CM LDD CP CWM ICPA,ON REPLACE P MONITOR RCPM REQUEST CPU AOD IS SET INTERRUPT STATUS TO ONE LJM ICPX RETURN ICPA VFD 60/0 INT SPACE 4,10 ** INT - INTERRUPT CENTRAL PROCESSOR. * * ENTRY (IS) = INTERRUPT STATUS. * * CALLS ICP, SCB. INT BSS 0 ENTRY LDD IS ZJN INT1 IF NOT IN INTERRUPT MODE LJM FCN1 ABORT OTHERWISE INT1 RJM ICP LDN W=STAT SET COMPLETE BIT RJM SCB LJM IDLX IOF SPACE 4,10 ** IOF - DISABLE INTERRUPT. IOF BSS 0 ENTRY LDN D SET INTERRUPT DISABLE FLAG IOF1 STD DI IOF2 LJM FCNX RETURN ION SPACE 4,10 ** ION - ENABLE INTERRUPT. ION BSS 0 ENTRY LDN 0 CLEAR INTERRUPT DISABLE FLAG UJN IOF1 FINISH PROCESSING RCP SPACE 4,10 ** RCP - RESTORE CENTRAL PROCESSOR. RCP BSS 0 ENTRY LDD IS ZJN IOF2 IF NOT IN INTERRUPT MODE LDD CM+3 ZJN RCP1 IF NO DELAYED INTERRUPT REQUESTED STD ID SET INTERRUPT DELAY LDN C SET CLOCK INTERRUPT ACTIVE FLAG STD CI RCP1 MONITOR DCPM DROP CPU MONITOR RCLM INSURE XJ PACKAGE IDLE * WAIT FOR PPS OTHER THAN *DUD* TO DROP. RCP2 RJM CPA CHECK PP ACTIVITY ZJN RCP3 IF ONLY *DUD* ACTIVE STD KM RJM PSM PAUSE FOR RELOCATION RJM ILM UJN RCP2 RCP3 LDC KMB STD KM LDN 20 STD T1 SET WORD COUNT LDRS W=XJP CRM XJP,T1 READ SAVED EXCHANGE JUMP PACKAGE LDN 3*5 SET INDEX STD T1 LDD CP ADN 3 SET PACKAGE ADDRESS STD T2 RCP4 LDD T2 CRD CM LDD CM UPDATE RA,FL,EM STM XJP,T1 LDD CM+1 STM XJP+1,T1 SOD T2 LCN 5 RAD T1 NJN RCP4 LOOP LDN 4 RESTORE EXCHANGE JUMP PACKAGE STD T1 LDN 20-6 STD T2 LDD CP CWM XJP,T1 ADN 2 A4,B4,A5,B5 RESTORED BY CPU CWM XJP+6*5,T2 LDRS W=ARP RESTORE FORMER RA+1 CRD CM LDD RA SHN 6 ADN 1 CWD CM LDN W=ISTAT SET COMPLETE BIT RJM SCB SOD IS CLEAR INTERRUPT STATUS FLAG LJM IDLX RETURN TO IDLE TASK RFL SPACE 4,10 ** RFL - REQUEST FIELD LENGTH (CALLED FROM IDL). * * ENTRY (AB - AB+4) = FIELD LENGTH REQUEST WORD *W=RFL*. * * EXIT TO *ABT* IF FL REQUEST EXCEEDS MAXIMUM. * * CALLS ICP, PSM, RSI, SCB. RFL4 LDC =C* ILLEGAL MEMORY REQUEST.* LJM ABT ABORT JOB RFL3 LDD AB+3 SET UP REQUEST LMC RFLMX MJN RFL4 IF ILLEGAL FL REQUEST LDD AB+3 RJM RSI REQUEST INCREASE ZJN RFL1 LDC =C*WAIT - CM.* STD KM DISPLAY KEYBOARD MESSAGE RJM PSM PAUSE FOR RELOCATION RFL SUBR ENTRY/EXIT LDD AB+3 ZJN RFL1 IF REQUEST FOR ZERO STORAGE LMD FL NJN RFL3 IF REQUEST NOT HONORED RFL1 AOD AB+4 SET COMPLETE BIT LDC KMB CLEAR KEYBOARD MESSAGE STD KM LDD AB+2 PROCESS INTERRUPT REQUEST IF ANY SHN -6 ADD AB+1 NJN RFL2 IF INTERRUPT ADDRESS SPECIFIED LDN W=RFL SET COMPLETE BIT WITHOUT INTERRUPT RJM SCB UJN RFLX RETURN RFL2 LDD DI ADD IS NJN RFLX IF INTERRUPT DISABLED OR ACTIVE LDRS W=RFL ELSE, SET COMPLETED CWD AB LDD AB+1 STD CM+1 LDD AB+2 STD CM+2 LDD FL SET A0 = NEW FIELD LENGTH SHN 6 RJM ICP INTERRUPT CENTRAL PROCESSOR LJM RFLX RETURN DRP SPACE 4,10 ** DRP - DROP PP. DRP BSS 0 ENTRY LDC LJMI SET LJM DPP INSRUCTION STM IDLA IN IDLE TASK LDC DPP STM IDLB LJM FCNX RETURN TITLE MISCELLANEOUS SUBROUTINES. ABT SPACE 4,10 ** ABT - ABORT CONTROL POINT. * * ENTRY (A) = DAYFILE MESSAGE FWA. * * CALLS DDS, DFM. ABT STM ABTB PLANT MESSAGE ADDRESS ABTA UJN ABT1 * PSN (IF DISPLAY ASSIGNED) RJM DDS DROP DISPLAY ABT1 LDC ** MESSAGE ADDRESS ABTB EQU *-1 RJM DFM ISSUE DAYFILE MESSAGE * MONITOR ABTM LDN ABTM ABORT PPU UJN DPP1 DPP SPACE 4,10 ** KIL - KILL JOB. * DPP - DROP PP. KIL MONITOR DCPM DPP RJM DDS DROP DISPLAY * MONITOR DPPM LDN DPPM DROP PPU DPP1 RJM FTN LJM PPR EXIT TO IDLE LOOP CPA SPACE 4,16 ** CPA - CHECK PP ACTIVITY. * * EXIT (A) = 0 IF ONLY *DUD* ACTIVE. * (KM) = *WAIT - PPS.* IF PPS OTHER THAT *DUD* ACTIVE. * * USES CM - CM+4. CPA SUBR ENTRY/EXIT LDC SBNI+1 STM CPAA LDD CP CHECK IF *DIS* ACTIVE ADN JCIW CRD CM LDD CM+3 GET *DIS* ACTIVE FLAG SHN -11 LPN 1 RAM CPAA ADJUST PP COUNT LDD CP GET ACTIVE PP COUNT ADN STSW CRD CM LDD CM LPN 37 CPAA SBN 1 ZJN CPAX IF ONLY *DUD* ACTIVE LDC =C*WAIT - PPS.* STD KM SET KEYBOARD MESSAGE UJN CPAX RETURN GPA SPACE 4,10 ** GPA - GET PARAMETER ADDRESS. * * ENTRY (A) = ADDRESS RELATIVE TO DISPLAY ENVIRONMENT TABLE. * * EXIT (A) = ABSOLUTE ADDRESS OF PARAMETER. * TO *ABT* IF INVALID ADDRESS. * * USES T2. * * CALLS CAA. GPA SUBR STD T2 SAVE ADDRESS LDD PA SHN 14 ADD PA+1 ADD T2 RJM CAA CONVERT ADDRESS NJN GPAX RETURN IF WITHIN RANGE GPA1 DCN CH+40 LDC =C* ADDRESS OUT OF RANGE.* LJM ABT LRA SPACE 4,10 ** LRA - LOAD RELATIVE ADDRESS. * * ENTRY (A) = ADDRESS OF WORD CONTAINING HIGH ORDER BITS. * (A)+1 CONTAINS LOW ORDER BITS. * * EXIT (A) = ABSOLUTE ADDRESS. * TO *ABT* IF INVALID ADDRESS. * * USES T1. * * CALLS CAA. LRA SUBR ENTRY/EXIT STD T1 SAVE ADDRESS LDI T1 LOAD ADDRESS LPN 37 SHN 14 ADM 1,T1 RJM CAA CONVERT ADDRESS NJN LRAX RETURN IF WITHIN RANGE UJN GPA1 PSM SPACE 4,10 ** PSM - PAUSE FOR STORAGE MOVE. * * EXIT TO *DPP* IF ERROR FLAG DETECTED. * * USES CM - CM+4. * * MACROS LDRS, PAUSE. PSM1 PAUSE NE LDRS W=ARCL CWD RA UPDATE IN CM PSM SUBR ENTRY/EXIT LDD CP ADN STSW CRD CM LDD CM+1 ZJN PSM1 IF NO ERROR FLAG SET LJM DPP DROP OUT OTHERWISE SCB SPACE 4,10 ** SCB - SET COMPLETE BIT IN STATUS WORD. * * ENTRY (A) = ADDRESS OF WORD RELATIVE TO W=STAT. * * USES T1, CM - CM+4. * * CALLS GPA. SCB SUBR ENTRY/EXIT STD T1 SAVE ORDINAL LDN W=STAT ADD T1 RJM GPA CRD CM READ STATUS WORD LDD CM+4 SCN 1 ADN 1 SET COMPLETE BIT STD CM+4 LDN W=STAT ADD T1 RJM GPA CWD CM LDD CP READ CURRENT CPU STATUS ADN STSW CRD CM LDD CM SHN -11 ISOLATE PROCESSOR STATUS LPN 7 NJN SCBX EXIT IF CPU ACTIVE MONITOR RCPM REQUEST CPU UJN SCBX RETURN TITLE COMMON DECKS AND BUFFERS. ** COMMON DECKS. *CALL COMDSYS *CALL COMPRSI *CALL COMPCAA SPACE 4,10 ** REMOTE TEXT. DIS HERE TEXT FROM *COMDSYS* BUFFERS SPACE 4,10 ** BUFFERS. USE BUFFERS XJP BSSZ 5*20 EXCHANGE JUMP PACKAGE BUFFER KBB BSSZ 5*14D KEYBOARD BUFFER KMB BSSZ 5*3+1 KEYBOARD MESSAGE BUFFER BUF BSS 0 MAIN DISPLAY BUFFER ERRNG 7777-BUF-5*BUFL TITLE PRESET. ** PRESET. PRS4 LDC PRSA RJM DFM ISSUE DAYFILE MESSAGE PRS5 MONITOR ABTM LJM PPR EXIT TO IDLE LOOP PRS SUBR ENTRY/EXIT RJM CUA CHECK USER ACCESS NJN PRS4 IF ILLEGAL ACCESS LDN IRSI INHIBIT ROLLOUT STD CM+4 LDN /MTR/SSIS CHANGE SUBSYSTEM ID STD CM+1 MONITOR SJCM LDN 0 STD IS CLEAR FLAGS, ETC. STD CI STD ST LDC 6000 STD XC LDC BUFL STD BL LDC KMB STD KM LDD IR+3 CLEAN UP STATUS WORD ADDRESS LPN 37 STD IR+3 STD PA SHN 14 ADD IR+4 STD PA+1 NJN PRS1 SENSE NON-ZERO STATUS ADDRESS LJM PRS5 DROP PP PRS1 LDN ZERL CRD CC RESET REAL TIME CLOCK LDD RA SHN 6 ADN 1 CWD CC LDN W=STAT RJM SCB SET COMPLETE BIT IN STATUS WORD * MOVE DISPLAY PROGRAM ROUTINES INTO DRIVER AREA. LDN 0 STD T7 STM MSD CLEAR MASS STORAGE DRIVER PRS2 LDM PRSB,T7 STM MSFW,T7 AOD T7 INCREMENT COUNTER LMC PRSBL NJN PRS2 IF MORE TO MOVE LDC PSNI SET DISPLAY ASSIGNED STM ABTA RJM RDS REQUEST DISPLAY PAUSE LDD CM SHN -11 ISOLATE PROCESSOR STATUS LMN I NJN PRS3 IF NOT *I* STATUS RJM CRS CHECK RECALL STATUS ZJN PRS3 IF NO RECALL SET MONITOR RCPM RECALL CPU PRS3 LJM PRSX RETURN PRSA DATA C* ILLEGAL USER ACCESS.* PRSB BSS 0 LOC MSFW *CALL COMDDSP ERRNG PPFW-* PP RESIDENT OVERFLOW LOC *O PRSBL EQU *-PRSB DUD SPACE 4,10 ** COMMON DECKS USED IN PRESET. *CALL COMPCRS *CALL COMPCUA DUD SPACE 4,10 END ~ }