1 REMark rjob (c) Timo Salmi
2 REMark Sun 1987 Aug 09 18:50:19
3 REMark version 1.1
4 :
100 CLEAR:kokoaika=DATE:mp=50
110 DIM ohj$(10),tpvm$(8)
120 DIM jb$(mp),mj$(mp)
130 p_tsotsake("Remove JOBs"),("09.08.87")
140 p_ikkunat
150 :
160 JOBS:PRINT:jobid=0
170 REPeat tyo
180  edjobid=jobid:jobid=NXJOB((jobid),(0))
190  IF jobid=0 THEN EXIT tyo
200  jb$=JOB$(jobid)
210  IF jb$=="rjob_exe" THEN NEXT tyo
220  mj$="REMOVE JOB "&jb$
230  IF f_kysynoye((mj$),("N")) THEN 
240   RJOB (jobid),(1):jobid=edjobid
250   PRINT"REMOVED"!jb$
260  END IF 
270 END REPeat tyo
280 JOBS:PRINT:p_elapsed(1)
290 :
17000 DEFine PROCedure p_ikkunat
17010  LOCal rv%:rv%=19
17020  WINDOW#1,levg%,10*rv%,alkug%,38
17040  PAPER#1,2:BORDER#1,0,0:CSIZE#1,2,0:CLS#1
17060 END DEFine p_ikkunat
17070 :
19000 DEFine PROCedure p_beep1
19010  BEEP 800,12
19020 END DEFine p_beep1
19030 :
20000 DEFine PROCedure p_tsotsake(ohj$,tpvm$)
20010  LOCal il1%,il2%,il%,i:MODE 8:il%=2
20020  levg%=448:alkug%=INT((512-levg%)/2)
20030  WINDOW 512,256,0,0:PAPER 0:CLS
20040  OPEN#3,con_:WINDOW#3,levg%,22,alkug%,16
20050  PAPER#3,0:CLS#3:BORDER#3,1,7:CSIZE#3,il%,1
20060  CURSOR#3,5,0:INK#3,6:PRINT#3,ohj$
20070  il2%=levg%-(4+4*il%)*LEN(tpvm$)-4-5*(il%<3)
20080  il1%=(il2%+(4+4*il%)*LEN(ohj$)-35-40*il%)/2
20090  INK#3,4:CURSOR#3,il1%,0:RESTORE 20100
20100  DATA 84,105,109,111,32,83,97,108,109,105
20110  FOR i=1 TO 10:READ il%:PRINT#3,CHR$(il%);:END FOR i
20120  INK#3,2:CURSOR#3,il2%,0:PRINT#3,tpvm$:CLOSE#3
20130 END DEFine p_tsotsake
20140 :
28500 DEFine FuNction f_kysynoye(mj$,oletus$)
28510  LOCal vl$(3),kysy,ml$(50)
28520  IF oletus$=="y" THEN 
28530   ml$=mj$&" (n,Y)? "
28540   ELSE :ml$=mj$&" (N,y)? ":END IF 
28550  REPeat kysy
28560   INK 7:PRINT ml$;:clb=KEYROW(0):INPUT vl$
28570   IF vl$="" THEN vl$=oletus$
28580   IF vl$=="n" THEN RETurn 0
28590   IF vl$=="y" THEN RETurn 1
28600   p_beep1
28610  END REPeat kysy
28620 END DEFine f_kysynoye
28630 :
30000 DEFine PROCedure p_elapsed(ch%)
30010  LOCal tl,ml,sl
30020  PRINT#ch%,"ELAPSED"!;
30030  sl=DATE-kokoaika
30040  tl=INT(sl/3600):sl=sl-tl*3600
30050  ml=INT(sl/60):sl=sl-60*ml
30060  PRINT#ch%,tl DIV 10;tl MOD 10;":";
30070  PRINT#ch%,ml DIV 10;ml MOD 10;":";
30080  PRINT#ch%,sl DIV 10;sl MOD 10
30090 END DEFine p_elapsed
30100 :
31000 DEFine PROCedure reset(i)
31010  LOCal il:MODE i
31020  WINDOW 513,256,0,0:PAPER 0:CLS
31030  OPEN#2,con_:WINDOW#2,448,200,32,16
31040  PAPER#2,1:INK#2,7
31050  WINDOW#0,448,40-(i=4),32,216+(i=4)
31060  WINDOW 448+8*(i=4),200+2*(i=4),32-4*(i=4),16-(i=4)
31070  PAPER 2*(i=8):BORDER (i=4),4*(i=4)
31080  FOR il=0,1,2:CSIZE#il,(i=4)+2*(i=8),0:END FOR il
31090  PAPER#0,0:INK#0,7-3*(i=0):INK 7:CLS
31100  SCALE 100,0,0:FILL 0
31110 END DEFine reset
31120 :
31990 STOP
32000 vsave 1:STOP
32010 vsave 2:STOP
32020 vsave 3:STOP
32030 vsave 4:STOP
32040 vsave 5:STOP
32050 vsave 6:STOP
32060 DEFine PROCedure vsave(dr)
32070  LOCal a$,b$,d$(6,5):a$="rjob"
32080  b$=DATE$:b$=b$(1 TO 4)
32090  IF b$<>1987 THEN
32100   PRINT#0,DAY$!DATE$!"Not saved, set SDATE"
32110   BEEP 4000,12:STOP:END IF 
32120  ver1%=1:ver2%=1
32130  d$(1)="mdv1_":d$(2)="mdv2_"
32140  d$(3)="fdk1_":d$(4)="fdk2_"
32150  d$(5)="ram1_":d$(6)="ram2_"
32160  b$=d$(dr)&a$
32170  DELETE b$:OPEN_NEW#3,b$:ver%=ver2%+1
32180  PRINT#3,"1 REMark ";a$!"(c) Timo Salmi"
32190  PRINT#3,"2 REMark ";DAY$!DATE$
32200  PRINT#3,"3 REMark version"!ver1%;".";ver%
32210  PRINT#3,"4 :"
32220  LIST#3,100 TO 32110
32230  PRINT#3,"32120  ver1%=";ver1%;":ver2%=";ver%
32240  LIST#3,32130 TO:CLOSE#3
32250  PRINT#0,"Saved"!b$!"version"!ver1%;".";ver%
32260 END DEFine vsave
