|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 3840 (0xf00) Types: TextFile Names: »cpcconvert«
└─⟦621cfb9a2⟧ Bits:30002817 RC8000 Dump tape fra HCØ. Detaljer om "HC8000" projekt. └─⟦0364f57e3⟧ └─⟦this⟧ »cpcconvert«
program convert 1 format(1a1) 99 format(/1x) 999 format(///a3) 2 format(1x,3h***,1a1) external readerr integer readerr, eof, i, j, k, char, maxofline integer l(80) zone readf(128,1,stderror) zone writef(128,1,stderror) call zassign(readf,1) call zassign(writef,7) call open(readf,4,'inf',0) call open(writef,4,'outf',0) i=10 char=10 maxofline=0 a='0' write(7,2) a c indlæseløkke - skip af kommentarlinier 10 i=i+1 if(i.lt.maxofline) goto 20 a='1' write(7,2) a i=1 12 read(1,1) l(i) write(7,2) l(i) char=readerr.shift.(-8) if(char.eq.25) goto 1000 if(char.eq.10) goto 14 i=i+1 goto 12 14 continue c linien er indlæst maxofline=i c kommentarlinie if(l(1).eq.'C') goto 16 i=0 goto 10 16 do 18 k=1,maxofline 18 write(7,1) l(k) write(7,99) i=maxofline goto 10 c ' ' 20 continue a=2 write(7,2) a if(l(i).ne.' ') goto 30 write(7,1) l(i) goto 10 c 'DO' eller 'DABS' eller 'DSQRT' 30 continue a=3 write(7,2) a if(l(i).ne.'D') goto 40 if(L(i+1).eq.'0') goto 32 if(l(i+1).eq.'A'.and.l(i+2).eq.'B'.and.l(i+3).eq.'S') goto 34 if(l(i+1).eq.'S'.and.l(i+2).eq.'Q'.and.l(i+3).eq.'R'.and. 1 l(i+4).eq.'T') goto 36 32 l(i)='E' do 33 j=0,1 33 write(7,1) l(i+j) i=i+1 goto 10 34 do 35 j=1,2 35 write(7,1) l(i+j) i=i+3 goto 10 36 do 37 j=1,3 37 write(7,1) l(i+j) i=i+4 goto 10 c 'IMPLI' 40 continue a='4' write(7,2) a if(l(i).ne.'I') goto 50 if(l(i+1).eq.'M'.and.l(i+2).eq.'P'.and.l(i+3).eq.'L'.and. 1 l(i+4).eq.'I') goto 42 write(7,1) l(i) goto 10 42 write(7,99) l(1)='C' do 44 i=1,72 44 write(7,1) l(i) goto 10 c 'LOGICAL' 50 continue a='5' write(7,2) a if(l(i).ne.'L') goto 60 if(l(i+1).eq.'0'.and.l(i+2).eq.'G'.and.l(i+3).eq.'I'.and. 1 l(i+4).eq.'C'.and.l(i+5).eq.'A'.and.l(i+6).eq.'L'.and. 2 l(i+7).eq.'*') goto 52 write(7,1) l(i) goto 10 52 do 54 j=1,7 54 write(7,1) l(i+j) i=i+8 goto 10 c 'REAL*8' 60 continue a='6' write(7,2) a if(l(i).ne.'R') goto 70 if(l(i+1).eq.'E'.and.l(i+2).eq.'A'.and.l(i+3).eq.'L'.and. 1 l(i+4).eq.'*'.and.l(i+5).eq.'8') goto 62 write(7,1) l(i) goto 10 62 do 64 j=0,3 64 write(7,1) l(i+j) i=i+5 goto 10 c 'STOP' 70 continue a='7' write(7,2) a if(l(i).ne.'S') goto 80 if(l(i+1).eq.'T'.and.l(i+2).eq.'O'.and.l(i+3).eq.'P') goto 72 write(7,1) l(i) goto 10 72 l(i)='c' l(i+1)='a' l(i+2)='l' l(i+3)='l' l(i+4)=' ' l(i+5)='e' l(i+6)='x' l(i+7)='i' l(i+8)='t' do 74 j=0,8 74 write(7,1) l(i+j) write(7,99) i=72 goto 10 80 continue 1000 continue a='9' write(7,2) a eof=25.shift.16+25.shift.8+25 write (7,999) call close(writef,.true.) stop end ▶EOF◀