1 REM PORTFOL:7/28/80:REL. 1.1
10 REM "COPYRIGHT  CONTROL  DATA  1980"
20 DIM ZZCP$(36)
30 ZZCP$="COPYRIGHT  CONTROL  DATA  1980"
31 ZZ0=0:ZZ1=1:ZZ2=2:ZZ3=3:ZZ4=4:ZZ5=5:ZZ6=6:ZZ10=10:ZZ14=14:ZZ21=21:ZZ125=125:ZZ126=126:ZZ180=180:ZZ200=200
32 ZZ7=7:ZZ8=8:ZZ9=9:ZZ12=12:ZZ20=20:ZZ22=22:ZZ128=128:ZZ150=150:ZZ170=170:ZZ190=190:ZZ23=23:ZZ764=764:ZZFF=255
33 ZZDIS=PEEK(106)*256-961
34 ZZ13=13:ZZ100=100
35 DIM ZZSP$(ZZ10),ZZB1$(ZZ1),Q$(1):ZZB1$="}":ZZSP$="          "
36 GOTO 41
37 FOR ZZINDX=ZZ1 TO 400:NEXT ZZINDX:RETURN 
38 POKE 82,ZZ2:POKE 83,37:RETURN 
41 GOSUB 38:GRAPHICS ZZ2+16:SETCOLOR ZZ4,ZZ9,ZZ2:POSITION ZZ7,ZZ5:? #ZZ6;"ATARI"
42 GOSUB 37:GOSUB 37:GRAPHICS ZZ0
46 GOSUB ZZ126:GOSUB ZZ150:? ZZB1$
60 POSITION ZZ6,ZZ2:? "A CONTROL DATA CORPORATION":? :? " ",ZZSP$;"tm":? " "," CYBERWARE":? :? 
61 ? "     Personal Computer Product":POSITION ZZ2,13
62 ? ZZSP$;"  ****  ****":? ZZSP$;" *****  *****":? ZZSP$;"******  ******":? ZZSP$;"***        ***"
63 ? ZZSP$;"***        ***":? ZZSP$;"******  ******":? ZZSP$;" *****  *****":? ZZSP$;"  ****  ****"
70 GOSUB 37:? ZZB1$:? "PORTFOLIO ANALYSIS":? :? 
71 ? "   This program computes various":? :? "measures of return and variance"
72 ? :? "for any portfolio from the holding":? :? "period returns of the component":? :? "stocks."
80 DIM ZZER$(35),ZZQ1$(ZZ1),ZZQ2$(ZZ1),ZZB$(ZZ1)
82 ZZER$="ÅÒÒÏÒ - Invalid data. Resubmit it.":ZZB$="}":ZZEFLG=0:TRAP 110
83 DIM ZZBZ$(ZZ1):ZZBZ$=CHR$(253)
85 POSITION ZZ3,15:? ZZCP$:GOSUB ZZ180
88 GOTO 500
110 ZZGOTO=256*PEEK(187)+PEEK(186):ZZPEEK=PEEK(195):IF ZZPEEK=ZZ8 OR ZZPEEK=18 THEN GOSUB 170:TRAP 110:GOTO ZZGOTO
111 IF ZZPEEK<>ZZ3 AND ZZPEEK<>7 AND ZZPEEK<>11 THEN GOTO ZZGOTO
125 POKE 752,ZZ0:RETURN 
126 POKE 752,ZZ1:RETURN 
128 POKE 764,255:GOSUB ZZ125:RETURN 
150 SETCOLOR ZZ2,ZZ9,ZZ2:SETCOLOR ZZ4,ZZ5,ZZ4:SETCOLOR ZZ1,ZZ0,ZZ12:RETURN 
170 POSITION ZZ3,ZZ21:? ZZER$:ZZEFLG=ZZ1:? ZZBZ$:RETURN 
180 POSITION ZZ2,ZZ23:GOSUB 128:? "Type Ð to print, ÒÅÔÕÒÎ to continue";
181 OPEN #ZZ7,ZZ4,ZZ0,"K:ZZKK":GET #ZZ7,ZZDATA:CLOSE #ZZ7
182 IF ZZDATA=80 THEN TRAP 189:OPEN #ZZ5,ZZ8,ZZ0,"P:ZZPP":GOTO 186
183 IF ZZDATA<>155 THEN 180
184 GOSUB ZZ126:? ZZB$:RETURN 
186 FOR ZZJJ=ZZ1 TO 920:ZZJK=PEEK(ZZDIS+ZZJJ):IF ZZJK>127 THEN ZZJK=ZZJK-ZZ128
187 IF ZZJK>95 THEN ZZJK=ZZJK-32
188 ? #ZZ5;CHR$(ZZJK+32);:NEXT ZZJJ
189 CLOSE #ZZ5:TRAP 110:GOTO 180
190 IF ZZEFLG<>ZZ0 THEN POSITION ZZ1,ZZ21:? "œ":ZZEFLG=ZZ0
191 RETURN 
500 ? ZZB$
510 ? "This program requires a data file":? :? "containing a portfolio."
515 ? :? "One, BACK, is supplied with the":? :? "program. It is intended solely"
520 ? :? "for demonstration purposes, and":? :? "should be left as is.":? 
530 ? "The user should create his own":? :? "files.  Each file must have a":? :? "unique name."
540 GOSUB 180:? "The user may maintain several":? :? "portfolio files on the disk,"
550 ? :? "but only one may be used in an":? :? "individual analysis."
551 ? :? :? "             ÔÁØ ÎÏÔÅ"
552 ? 
553 ? "This program makes no assumptions"
554 ? "or calculations for taxes."
650 GOSUB 180
690 ? ZZB$
850 GOSUB 9990:RUN "D:PORTFOL1"
9990 GOSUB 126:POSITION 7,22:? " ÌÏÁÄÉÎÇ ÔÈÅ ÎÅØÔ ÓÅÃÔÉÏÎ ":RETURN 
