home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
501-525
/
apd515
/
rem-killer.amos
/
rem-killer.amosSourceCode
< prev
Wrap
AMOS Source Code
|
1971-02-04
|
4KB
|
135 lines
Set Buffer 100
'
'
'
' REM KILLER
'
' BY
'
' TEX!
'
' � OSCARSoft 1991
'
'
' File to be loaded must have been saved out as an ASCII File before
' it can be converted!
'
'
'
Dim NS$(1000)
Global NS$(),F$,PC,XX
Unpack 10 To 0 : Gr Writing 0 : Limit Mouse 0,0 To 640,390
Reserve Zone 6
Set Zone 1,11,230 To 115,249
Set Zone 2,123,230 To 227,248
Set Zone 3,235,230 To 339,249
Set Zone 4,11,258 To 115,277
Set Zone 5,123,258 To 227,277
Set Zone 6,235,258 To 339,276
STATUS[1]
Do
Repeat
MZ=Mouse Zone : MC=Mouse Click
Until MZ>0 and MC=1
On MZ Proc LD,KLL,SV,ABT,HLP
Exit If MZ=6
Loop
Proc QT
Procedure LD
F$=Fsel$("*.ASC","","")
If F$<>"" Then Proc CLR1 : Proc STATUS[3] : A=Instr(F$,":") : T$=Mid$(F$,A+1,20) : T=Len(T$) : T$=Left$(T$,T-4) : Ink 11 : Bar 120,165 To 285,173 : Ink 14 : Text 120,173,T$
End Proc
Procedure CLR1
Ink 11 : Bar 77,210 To 285,220
End Proc
Procedure KLL
If F$="" Then Proc CLR1 : Proc STATUS[2] : Wait 100 : Proc CLR1 : Proc STATUS[1] : Goto KLL99
Proc CLR1 : Proc STATUS[4]
Open In 1,F$
Set Input 10,-1 : X=1
L:
Inc Q : Ink 11 : Bar 207,175 To 285,183 : Ink 6 : T$=Mid$(Str$(Q),2) : Text 207,183,T$
Ink 11 : Bar 192,185 To 285,193 : Ink 7 : T$=Mid$(Str$(NF),2) : Text 192,193,T$
If Eof(1)=-1 Then Close 1 : Goto KLL98
Line Input #1,A$
If Left$(A$,1)="'" Then Inc NF : Goto L
A=Instr(A$,": Rem") : If A<>0 Then Gosub RM1 : Goto L
A=Instr(A$,"Rem") : If A<>0 Then Gosub RM2 : Goto L
If Left$(A$,1)=" " Then Gosub SP : Goto L
NS$(X)=A$ : Inc X : Goto L
RM1:
NS$(X)=Left$(A$,A-1) : Inc NF : Inc X : Return
RM2:
If A=1 Then Inc NF : Return
S=1
Do
If Mid$(A$,S,3)="Rem" Then Inc NF
Exit If Mid$(A$,S,3)="Rem"
If Mid$(A$,S,1)<>" " Then NS$(X)=A$ : Inc X : Exit
Inc S
Loop
Return
SP:
S=1
Do
If Mid$(A$,S,1)="'" Then Inc NF
Exit If Mid$(A$,S,1)="'"
If Mid$(A$,S,1)<>" " Then NS$(X)=A$ : Inc X : Exit
Inc S
Loop
Return
KLL98:
Proc CLR1 : Proc STATUS[5] : Wait 100 : Proc CLR1 : Proc STATUS[1] : PC=1
KLL99:
XX=X
End Proc
Procedure SV
If F$="" Then Proc CLR1 : Proc STATUS[2] : Wait 100 : Proc CLR1 : Proc STATUS[1] : Goto SV99
If PC<>1 Then Proc CLR1 : Proc STATUS[6] : Wait 100 : Proc CLR1 : Proc STATUS[1] : Goto SV99
F$=Fsel$("*.ASC","","")
If F$="" Then Proc CLR1 : Proc STATUS[2] : Wait 100 : Proc CLR1 : Proc STATUS[1] : Goto SV99
Proc CLR1 : Proc STATUS[7]
Open Out 1,F$
For Z=1 To XX-1
Print #1,NS$(Z)
Next Z
Close 1
Proc CLR1 : Proc STATUS[1] : Ink 11 : Bar 120,165 To 285,173 : Bar 207,175 To 285,183 : Bar 192,185 To 285,193 : F$="" : PC=0
SV99:
End Proc
Procedure ABT
Unpack 11 To 2
Repeat : Until Mouse Click>0
Screen Close 2
End Proc
Procedure HLP
Unpack 12 To 2
Repeat : Until Mouse Click>0
Screen Close 2
End Proc
Procedure QT
Def Scroll 1,0,0 To 354,145,0,1
Def Scroll 2,0,146 To 354,290,0,-1
For X=1 To 145 : Scroll 1 : Scroll 2 : Next X
End
End Proc
Procedure STATUS[S]
On S Goto S1,S2,S3,S4,S5,S6,S7
S1:
T$="WAITING PATIENTLY" : Goto S99
S2:
T$="NO FILE SELECTED!" : Goto S99
S3:
T$="FILE SELECTED" : Goto S99
S4:
T$="PROCESSING PROGRAM!" : Goto S99
S5:
T$="ALL REMS KILLED!" : Goto S99
S6:
T$="NOTHING CONVERTED!" : Goto S99
S7:
T$="WRITING SOURCE!" : Goto S99
S99:
Get Rom Fonts : Set Font 1
Ink 2 : T=Text Length(T$) : Text(177-T/2)+4,218,T$
End Proc