home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
601-625
/
apd602
/
amos_copy.amos
/
amos_copy.amosSourceCode
next >
Wrap
AMOS Source Code
|
1993-02-25
|
24KB
|
1,105 lines
'This is a class piece of programming and it's Shareware so respect that
'if you are going to use the routines from this software, Steve
'
'not for EASY AMOS users!
'
' AMOSCopy V1.0a
' ----------------
'
' Author
' Volker Stepprath
' Spandauerstr.4
' 4019 / Monheim ( Rhld )
' GERMANY
'
'
' �1991 AMOS Basic V1.31 by Europress Software
' �28/10/1992 AMOSCopy V1.0a by Depeche Software
'
'
'
' AMOSCopy V1.0a is Shareware
' If you use this product regular,
' please send me what you want !?$
' �� BUT NOT YOUR MOTHER-IN-LAW ��
'
'
'
Unpack 16 To 0
Colour Back $779
Change Mouse 2
'Erase 16
'Break Off
Request Off
'
'**** Variablen definieren ****
Dim UPP(79),LOW(79)
Global UPP(),LOW()
Global SOURCE,TARGET,VERIFY
Global ABORT,UPP,LOW,_DOIT
Global XUPP,YUPP,XLOW,YLOW,UPPSIDE,LOWSIDE
SOURCE=0 : TARGET=1 : VERIFY=1 : OPTION=1 : UPPSIDE=1 : LOWSIDE=1
For I=0 To 79
UPP(I)=1
LOW(I)=1
Next I
'
Set Dir 30,""
Amos To Front
'
'**** Speicher f�r Blockdaten reservieren ****
If Length(7)=0 Then Reserve As Chip Data 7,1024
'
'**** Hauptschleife ( Men�abfrage ) ****
Do
UPP=0 : LOW=0 : _DOIT=0 : XUPP=-1 : YUPP=0 : XLOW=-1 : YLOW=0
Wait 15 : Clear Key
Repeat : Until Mouse Key=0
Repeat : Until Mouse Key>0
XM=X Screen(X Mouse) : YM=Y Screen(Y Mouse)
'
'**** SOURCE & TARGET festlegen ****
If XM>30 and XM<67
Ink 4,5
If YM>35 and YM<71 or YM>81 and YM<117
Add SOURCE,1,0 To 1
Text 44,53,Str$(SOURCE)-" "
Add TARGET,1,0 To 1
Text 44,99,Str$(TARGET)-" "
End If
End If
'
'**** Disketteseiten modifizieren *****
If XM>82 and XM<184 and YM>57 and YM<156
_UPPERSIDE[XM,YM]
End If
If XM>200 and XM<302 and YM>57 and YM<156
_LOWERSIDE[XM,YM]
End If
'
'**** Verify ON / OFF ****
If XM>37 and XM<71 and YM>147 and YM<157
If VERIFY
VERIFY=0
G[38,148,51,158,0]
G[53,148,70,158,1]
Else
VERIFY=1
G[38,148,51,158,1]
G[53,148,70,158,0]
End If
End If
'
'**** Option festlegen ****
If XM>9 and XM<309 and YM>161 and YM<186
For I=0 To 6
G[10+I*43,162,50+I*43,172,0]
G[10+I*43,175,50+I*43,185,0]
Next I
Add XM,-9
XM=XM/43
If YM>161 and YM<173
OPTION=XM+1
G[10+XM*43,162,50+XM*43,172,1]
End If
If YM>174 and YM<186
OPTION=XM+8
G[10+XM*43,175,50+XM*43,185,1]
End If
End If
'
'**** Option starten ****
If XM>9 and XM<40 and YM>134 and YM<146
G[10,135,39,145,1]
_CLEARSIDE[-1]
_MESSAGE[""]
Gosub "O"+Str$(OPTION)-" "
G[10,135,39,145,0]
End If
Loop
'
'**** DISKCopy ****
O1:
_DISKCOPY
Return
'**** Format ****
O2:
_TRACK[1]
_TRACKBLOCK[0,-1]
Return
'**** QFormat ****
O3:
N$="DF"+Str$(TARGET)-" "+":"
If Exist(N$)
Ink 1
_TRACKBLOCK[0,-1]
YUPP=0 : XUPP=0
_RASTER[0,0]
_TRACK[2]
YUPP=4 : XUPP=0
_RASTER[40,0]
Else
_MESSAGE["No DOS disk in targetdrive !"]
End If
Return
'**** Erase ****
O4:
_TRACK[3]
Return
'**** Check ****
O5:
_TRACK[4]
Return
'**** Install ****
O6:
_TRACKBLOCK[0,-1]
Return
'**** Block Edit ****
O7:
_MESSAGE["Blocknumber (0-1758):"]
_TEXTINPUT[23]
BLOCK=Val(N$)
BLOCK=Min(1758,BLOCK)
_EDITBLOCK[BLOCK]
Return
'**** Show RAW ****
O8:
_MESSAGE["Tracknumber (0-79):"]
_TEXTINPUT[21]
TRACK=Val(N$)
TRACK=Min(79,TRACK)
_RAWSHOW[TRACK]
Return
'**** Info ****
O9:
N$="DF"+Str$(TARGET)-" "+":"
If Exist(N$)
Dir$=N$
N$=Dir$
N$=N$-":"
N$=Left$(N$,23)
_MESSAGE[N$+" Free:"+Str$(Dfree)-" "]
Else
_MESSAGE["No DOS disk in targetdrive !"]
End If
Return
'**** Dir ****
O10:
_DIR
Return
'**** SYS Check ****
O11:
_SYSCHECK
Return
'**** SYS Reset ****
O12:
_SYSRESET
Return
'**** About ****
O13:
_ABOUT
Return
'**** Exit ****
O14:
Erase 7
Request On
Wait 20
End
'System
Return
'
'**** Diskettenseiten + Seitenoptionen ****
Procedure _UPPERSIDE[XM,YM]
'
'**** UPPER Side BAM ****
If XM>82 and XM<183 and YM>57 and YM<146
Add XM,-83 : XM=XM/10
Add YM,-58 : YM=YM/11
TRACK=YM*10+XM
If UPP(TRACK)
UPP(TRACK)=0
G[83+XM*10,58+YM*11,92+XM*10,68+YM*11,0]
Else
UPP(TRACK)=1
G[83+XM*10,58+YM*11,92+XM*10,68+YM*11,1]
End If
End If
'
If YM>146 and YM<156
'
'**** UPP On ****
If XM>83 and XM<95
G[83,147,96,155,1]
G[98,147,115,155,0]
UPPSIDE=1
End If
'
'**** UPP Off ****
If XM>97 and XM<116
G[83,147,96,155,0]
G[98,147,115,155,1]
UPPSIDE=0
End If
'
'**** UPP Reverse ****
If XM>117 and XM<150
G[117,147,149,155,1]
For I=0 To 79
If UPP(I)
UPP(I)=0
Else
UPP(I)=1
End If
Next I
For I=0 To 7
For I2=0 To 9
G[83+I2*10,58+I*11,92+I2*10,68+I*11,UPP(I3)]
Add I3,1
Next I2
Next I
I3=0
G[117,147,149,155,0]
End If
'
'**** UPP Default ****
If XM>150 and XM<183
G[151,147,182,155,1]
_CLEARSIDE[0]
For I=0 To 7
For I2=0 To 9
UPP(I3)=1
G[83+I2*10,58+I*11,92+I2*10,68+I*11,UPP(I3)]
Add I3,1
Next I2
Next I
I3=0
UPPSIDE=1
G[83,147,96,155,1]
G[98,147,115,155,0]
G[151,147,182,155,0]
End If
End If
End Proc
Procedure _LOWERSIDE[XM,YM]
'
'**** LOWER Side BAM ****
If XM>200 and XM<301 and YM>57 and YM<146
Add XM,-201 : XM=XM/10
Add YM,-58 : YM=YM/11
TRACK=YM*10+XM
If LOW(TRACK)
LOW(TRACK)=0
G[201+XM*10,58+YM*11,210+XM*10,68+YM*11,0]
Else
LOW(TRACK)=1
G[201+XM*10,58+YM*11,210+XM*10,68+YM*11,1]
End If
End If
If YM>146 and YM<156
'
'**** LOW On ****
If XM>201 and XM<215
G[201,147,214,155,1]
G[216,147,233,155,0]
LOWSIDE=1
End If
'
'**** LOW Off ****
If XM>215 and XM<234
G[201,147,214,155,0]
G[216,147,233,155,1]
LOWSIDE=0
End If
'
'**** LOW Reverse ****
If XM>235 and XM<268
G[235,147,267,155,1]
For I=0 To 79
If LOW(I)
LOW(I)=0
Else
LOW(I)=1
End If
Next I
For I=0 To 7
For I2=0 To 9
G[201+I2*10,58+I*11,210+I2*10,68+I*11,LOW(I3)]
Add I3,1
Next I2
Next I
I3=0
G[235,147,267,155,0]
End If
'
'**** LOW Default ****
If XM>268 and XM<301
G[269,147,300,155,1]
_CLEARSIDE[1]
For I=0 To 7
For I2=0 To 9
LOW(I3)=1
G[201+I2*10,58+I*11,210+I2*10,68+I*11,LOW(I3)]
Add I3,1
Next I2
Next I
I3=0
LOWSIDE=1
G[201,147,214,155,1]
G[216,147,233,155,0]
G[269,147,300,155,0]
End If
End If
End Proc
Procedure _CLEARSIDE[N]
Ink 0
For I=0 To 7
For I2=0 To 9
If N=0 or N<0
Bar 84+I2*10,59+I*11 To 91+I2*10,67+I*11
End If
If N or N<0
Bar 202+I2*10,59+I*11 To 209+I2*10,67+I*11
End If
Next I2
Next I
End Proc
'**** Track kopieren ****
Procedure _DISKCOPY
'
Reserve As Chip Data 2,5632
'
'**** Variablen & Adressen definieren ****
DISKREP$=Space$(40)+Chr$(0)
DEVNAME$="trackdisk.device"+Chr$(0)
DISKREP=Varptr(DISKREP$)
'
IOREQ$=Space$(80)+Chr$(0)
IOREQADR=Varptr(IOREQ$)
'
IOREQ2$=Space$(80)+Chr$(0)
IOREQADR2=Varptr(IOREQ2$)
'
'**** Eigene Taskadresse suchen ****
Areg(0)=0
Areg(1)=0
Dreg(0)=0
Dreg(1)=0
XFINDTASK=Execall(-294)
Loke DISKREP+$10,XFINDTASK
'
'**** Device �ffnen I & II ****
Areg(0)=Varptr(DEVNAME$)
'
Areg(1)=IOREQADR
Dreg(0)=SOURCE
XOPENDEVICE=Execall(-444)
'
Areg(1)=IOREQADR2
Dreg(0)=TARGET
XOPENDEVICE=Execall(-444)
'
'**** Befehl aufrufen ****
Loke IOREQADR+14,DISKREP
Loke IOREQADR+40,Start(2)
Loke IOREQADR+36,5632
Doke IOREQADR+28,2
'
Loke IOREQADR2+14,DISKREP
Loke IOREQADR2+40,Start(2)
Loke IOREQADR2+36,5632
Doke IOREQADR2+28,11
'
Gosub _DISKCOPY
'
'**** Motor ausschalten I & II ****
Areg(1)=IOREQADR
Doke IOREQADR+28,9
Loke IOREQADR+36,0
XDOIO=Execall(-456)
Areg(1)=IOREQADR2
Doke IOREQADR2+28,9
Loke IOREQADR2+36,0
XDOIO=Execall(-456)
'
'**** Device schlie�en I & II ****
Areg(1)=IOREQADR
XCLOSEDEVICE=Execall(-450)
Areg(1)=IOREQADR2
XCLOSEDEVICE=Execall(-450)
'
Erase 2
'
Pop Proc
'
_DISKCOPY:
UL=-1
'
For TRACK=0 To 159
Add UL,1,0 To 1
_BAMCHECK[UL]
If _DOIT
'
'**** Track einlesen ****
Ink 1,0
Areg(1)=IOREQADR
Loke IOREQADR+44,TRACK*5632
XDOIO=Execall(-456)
_LESETEST[TRACK,XDOIO]
'
'**** Track schreiben ****
Areg(1)=IOREQADR2
Loke IOREQADR2+40,Start(2)
Loke IOREQADR2+44,TRACK*5632
XDOIO=Execall(-456)
_RASTER[TRACK,XDOIO]
'
'**** Verify ****
If VERIFY and ABORT=0
Doke IOREQADR2+28,2
XDOIO=Execall(-456)
_VERIFY[TRACK,XDOIO]
Doke IOREQADR2+28,11
End If
End If
'
'**** Abbruch ? ****
If Mouse Key<>0
_ABORT
End If
If ABORT : TRACK=159 : ABORT=0 : End If
'
Next TRACK
Return
End Proc
'**** Block Einlesen / Schreiben ****
Procedure _TRACKBLOCK[BLOCK,COMMAND]
'
'**** Variablen & Adressen definieren ****
DISKREP$=Space$(40)+Chr$(0)
DEVNAME$="trackdisk.device"+Chr$(0)
IOREQ$=Space$(80)+Chr$(0)
DISKREP=Varptr(DISKREP$)
IOREQADR=Varptr(IOREQ$)
'
'**** BootBlock erstellen ****
If COMMAND=-1
COMMAND=3
For I=0 To 1023
Poke Start(7)+I,0
Next I
For I=0 To 12
Read N
Loke Start(7)+I*4,N
Next I
End If
'
'**** Eigene Taskadresse suchen ****
Areg(0)=0
Areg(1)=0
Dreg(0)=0
Dreg(1)=0
XFINDTASK=Execall(-294)
Loke DISKREP+$10,XFINDTASK
'
'**** Device �ffnen ****
Areg(0)=Varptr(DEVNAME$)
Areg(1)=IOREQADR
Dreg(0)=TARGET
Dreg(1)=0
XOPENDEVICE=Execall(-444)
'
'**** Devicekommando ausf�hren ****
Loke IOREQADR+14,DISKREP
Doke IOREQADR+28,COMMAND
Loke IOREQADR+40,Start(7)
Loke IOREQADR+36,1024
Loke IOREQADR+44,BLOCK*512
XDOIO=Execall(-456)
'
'**** UPDATE[4] falls COMMAND=WRITE[3] ****
If COMMAND=3
Doke IOREQADR+28,4
XDOIO=Execall(-456)
End If
'
'**** Motor ausschalten ****
Doke IOREQADR+28,9
Loke IOREQADR+36,0
XDOIO=Execall(-456)
'
'**** Device schlie�en ****
XCLOSEDEVICE=Execall(-450)
'
'**** BootBlockDaten ****
Data $444F5300,$C0200F19,$370,$43FA0018,$4EAEFFA0,$4A80670A
Data $20402068,$167000,$4E7570FF,$60FA646F,$732E6C69,$62726172,$79000000
End Proc
'**** Format / QFormat / Erase / Test ****
Procedure _TRACK[N]
'
Reserve As Chip Data 2,5632
'
'**** Variablen & Adressen definieren ****
DISKREP$=Space$(40)+Chr$(0)
DEVNAME$="trackdisk.device"+Chr$(0)
IOREQ$=Space$(80)+Chr$(0)
DISKREP=Varptr(DISKREP$)
IOREQADR=Varptr(IOREQ$)
'
'**** Eigene Taskadresse suchen ****
Areg(0)=0
Areg(1)=0
Dreg(0)=0
Dreg(1)=0
XFINDTASK=Execall(-294)
Loke DISKREP+$10,XFINDTASK
'
'**** Device �ffnen ****
Areg(0)=Varptr(DEVNAME$)
Areg(1)=IOREQADR
Dreg(0)=TARGET
Dreg(1)=0
XOPENDEVICE=Execall(-444)
'
'**** Befehl aufrufen ****
Loke IOREQADR+14,DISKREP
Loke IOREQADR+40,Start(2)
Loke IOREQADR+36,5632
Ink 1,0
On N Gosub _FORMAT,_QFORMAT,_ERASE,_TEST
'
'**** Motor ausschalten ****
Doke IOREQADR+28,9
Loke IOREQADR+36,0
XDOIO=Execall(-456)
'
'**** Device schlie�en ****
XCLOSEDEVICE=Execall(-450)
'
Erase 2
'
Pop Proc
'
'**** Track formattieren ****
_FORMAT:
Doke IOREQADR+28,11
UL=-1
For TRACK=0 To 159
Add UL,1,0 To 1
_BAMCHECK[UL]
If _DOIT
Loke IOREQADR+44,TRACK*5632
XDOIO=Execall(-456)
_RASTER[TRACK,XDOIO]
'
'**** Verify ****
If VERIFY and ABORT=0
Doke IOREQADR+28,2
XDOIO=Execall(-456)
_VERIFY[TRACK,XDOIO]
Doke IOREQADR+28,11
Ink 1
End If
End If
'
'**** Abbruch ? ****
If Mouse Key<>0
_ABORT
End If
If ABORT : TRACK=159 : ABORT=0 : End If
'
Next TRACK
Gosub _QFORMAT
Return
'
_QFORMAT:
Doke IOREQADR+28,11
N=Start(2)
For I=$204 To $2DF
Poke N+I,$FF
Next I
Doke N+2,$2
Poke N+15,$48
Loke N+20,$A661AEF3
Doke N+$13A,$1
Doke N+$13E,$371
Poke N+$1B0,$5
Poke N+$1B1,$45
Poke N+$1B2,$4D
Poke N+$1B3,$50
Poke N+$1B4,$54
Poke N+$1B5,$59
Poke N+$1FF,$1
Loke N+$200,$C000C037
Poke N+$272,$3F
Poke N+$2DC,$3F
Loke IOREQADR+44,$6E000
XDOIO=Execall(-456)
Return
'
_ERASE:
Doke IOREQADR+28,17
UL=-1
For TRACK=0 To 159
Add UL,1,0 To 1
_BAMCHECK[UL]
If _DOIT
Loke IOREQADR+44,TRACK
XDOIO=Execall(-456)
_RASTER[TRACK,XDOIO]
End If
'
'**** Abbruch ? ****
If Mouse Key<>0
_ABORT
End If
If ABORT : TRACK=159 : ABORT=0 : End If
'
Next TRACK
Return
'
'**** Track testen ****
_TEST:
Doke IOREQADR+28,2
UL=-1
For TRACK=0 To 159
Add UL,1,0 To 1
_BAMCHECK[UL]
If _DOIT
Loke IOREQADR+44,TRACK*5632
XDOIO=Execall(-456)
Ink 1
_RASTER[TRACK,XDOIO]
End If
'
'**** Abbruch ? ****
If Mouse Key<>0
_ABORT
End If
If ABORT : TRACK=159 : ABORT=0 : End If
'
Next TRACK
Return
'
End Proc
'**** Block edieren ****
Procedure _EDITBLOCK[BLOCK]
Erase 7
Reserve As Chip Data 7,1024
Screen Open 1,624,168,4,Hires
Screen To Back
Flash Off
Cls 0
Get Palette 0
Colour 3,$FFF
Screen Display 1,112,81,,
_TRACKBLOCK[BLOCK,2]
Pen 2 : Paper 0
Ink 2,0
Text 102,164,"ASC:" : Text 194,164,"HEX:"
Text 289,164,"POS: "+Hex$(0,8)
G[89,155,177,167,0] : G[181,155,269,167,0]
G[273,155,415,167,0]
G[419,155,507,167,0] : G[511,155,599,167,0]
Text 448,164,"Save" : Text 536,164,"Abort"
Locate 38,1 : Print "Block #";Str$(BLOCK)-" "
Curs Off
For I=1 To 16
N$=""
For I2=1 To 64
N=Peek(Start(7)+I3)
If N<32 or(N>127 and N<161) Then N=46
N$=N$+Chr$(N)
Add I3,1
Next I2
Locate 11,2+I : Print N$
Next I
Curs Off
Clear Key
XC=11 : YC=3
Gosub _ASCHEXPOS
N=%11111111 : Set Curs N,0,0,0,0,0,0,N
Locate XC,YC : Curs On : Pen 1
Screen To Front
Do
Repeat
Clear Key
N=0
N2=0
While N=0 and N2=0 : N2=Mouse Key : N=Asc(Inkey$) : Wend
If N and N2=0
If N=28 and XC<74 : Inc XC : End If
If N=29 and XC>11 : Dec XC : End If
If N=30 and YC>3 : Dec YC : End If
If N=31 and YC<18 : Inc YC : End If
If N>31
N2=(YC-3)*64+(XC-11)
Print Chr$(N)
Curs Off
Poke Start(7)+N2,N
End If
Gosub _ASCHEXPOS
Locate XC,YC
Curs On
End If
Until Mouse Key>0
XM=X Screen(X Mouse) : YM=Y Screen(Y Mouse)
If YM>154 and YM<168
If XM>87 and XM<178
G[89,155,177,167,1]
Gosub _TXTEINGABE
Gosub _ASCHEXPOS
G[89,155,177,167,0]
End If
If XM>418 and XM<508
G[419,155,507,167,1]
_TRACKBLOCK[BLOCK,3]
G[419,155,507,167,0]
End If
If XM>510 and XM<600
G[511,155,599,167,1]
Wait 20
Exit 1
End If
End If
Loop
Screen Close 1
Pop Proc
_ASCHEXPOS:
N$=""
Ink 2
N2=(YC-3)*64+(XC-11)
N=Peek(Start(7)+N2)
If N<10 : N$="00" : End If
If N<100 and N>9 : N$="0" : End If
N$=N$+Str$(N)-" "
Text 142,164,N$
Text 234,164,Hex$(N,2)
Text 329,164,Hex$(BLOCK*512+N2,8)
N=0
Return
_TXTEINGABE:
N$=""
Ink 0 : Bar 142,156 To 170,164
Ink 1
Repeat
N=0
Clear Key : Wait 10
While N=0 : N=Asc(Inkey$) : Wend
If N>47 and N<58 and Len(N$)<3
N$=N$+Chr$(N)
Text 142,164,N$
End If
Until N=13 or Len(N$)=3
N=Min(255,Val(N$))
N2=(YC-3)*64+(XC-11)
Poke Start(7)+N2,N
If N<31 or(N>127 and N<160)
N=46
End If
Print Chr$(N);
Locate XC,YC
Return
End Proc
'**** Zeige Trackdaten in Rawformat ****
Procedure _RAWSHOW[TRACK]
'
Reserve As Chip Data 2,$3A70
'
'**** Variablen & Adressen definieren ****
DISKREP$=Space$(40)+Chr$(0)
DEVNAME$="trackdisk.device"+Chr$(0)
DISKREP=Varptr(DISKREP$)
'
IOREQ$=Space$(80)+Chr$(0)
IOREQADR=Varptr(IOREQ$)
'
'**** Eigene Taskadresse suchen ****
Areg(0)=0
Areg(1)=0
Dreg(0)=0
Dreg(1)=0
XFINDTASK=Execall(-294)
Loke DISKREP+$10,XFINDTASK
'
'**** Device �ffnen ****
Areg(0)=Varptr(DEVNAME$)
Areg(1)=IOREQADR
Dreg(0)=TARGET
XOPENDEVICE=Execall(-444)
'
'**** Befehl aufrufen ****
Loke IOREQADR+14,DISKREP
Loke IOREQADR+40,Start(2)
Loke IOREQADR+36,$397C
Doke IOREQADR+28,16
Poke IOREQADR+30,1
Areg(1)=IOREQADR
Loke IOREQADR+44,TRACK
XDOIO=Execall(-456)
'
'**** Motor ausschalten I & II ****
Areg(1)=IOREQADR
Doke IOREQADR+28,9
Loke IOREQADR+36,0
XDOIO=Execall(-456)
'
'**** Device schlie�en I & II ****
Areg(1)=IOREQADR
XCLOSEDEVICE=Execall(-450)
'
Gosub _RAWSHOW
'
Screen Close 1
Erase 2
'
Pop Proc
'
_RAWSHOW:
'
'**** Track in RAW Format zeigen ****
N=Start(2)
Screen Open 1,640,168,4,Hires
Flash Off : Cls 0 : Get Palette 0
Screen Display 1,128,81,,
Pen 2 : Paper 0 : I=0
Gosub _RAW
Do
UL=0 : Clear Key
Repeat : UL=Asc(Inkey$) : Until UL
If UL=28 or UL=31 Then Add I,1,0 To 10 : Gosub _RAW
If UL=29 or UL=30 Then Add I,-1,0 To 10 : Gosub _RAW
If UL=27 or UL=32 Then Exit
Loop
Return
_RAW:
Locate 0,1 : Cls 0 : Centre "Track:"+Str$(TRACK)+" Sector:"+Str$(I)
Locate 0,3 : Curs Off
For I2=0 To 1359
N2=Peek(N+I*1360+I2)
If N2<32 or N2>127 and N2<161 Then N2=46
Print Chr$(N2);
Next I2
Return
End Proc
'**** Directory ausgabe ****
Procedure _DIR
N$="DF"+Str$(TARGET)-" "+":"
If Exist(N$)
Screen Open 1,320,176,4,Lowres
Screen To Back
Screen Display 1,144,82,,
Flash Off
Get Palette 0
Cls 0
Dir$=N$
Pen 1 : Paper 0 : Print "Directory of ";Dir$
N$=Dir First$("")
Pen 2 : Print N$
Screen To Front
I=1
While N$<>""
Inc I
If I<20
N$=Dir Next$
Print N$
Else
Pen 1 : Print "press any key" : Curs Off : Wait Key
Pen 2
I=0
End If
Wend
Pen 1 : Print "press any key" : Curs Off : Wait Key
Screen Close 1
Else
_MESSAGE["No DOS disk in targetdrive !"]
End If
End Proc
'**** Vektoren nach Viren testen ****
Procedure _SYSCHECK
EXECBASE=4
EXECBASE=Leek(EXECBASE)
For I=0 To 4
Read N$,OFFSET
N=EXECBASE+OFFSET
N=Leek(N)
If N
Colour Back $F00 : Screen Show
Fade 1,$F00 : Wait 70
_MESSAGE[N$+" is abnormal: "+Hex$(N,8)]
Colour Back $779 : Screen Show
Fade 1,$779 : Wait 15
Pop Proc
End If
Next
_MESSAGE["No abnormal vector !"]
Data "ColdCapture",$2A
Data "CoolCapture",$2E
Data "WarmCapture",$32
Data "KickMemPtr",$222
Data "KickTagPtr",$226
End Proc
'**** Virus l�schen ****
Procedure _SYSRESET
For I=0 To 109 : Read N : N$=N$+Chr$(N) : Next I
Call Varptr(N$)
Data 51,252,64,0,0,223,240,154,44,120
Data 0,4,32,86,145,252,0,0,2,118
Data 48,60,33,0,66,152,81,200,255,252
Data 32,124,0,0,0,0,48,60,0,254
Data 66,152,81,200,255,252,61,124,170,170
Data 0,36,45,124,204,204,204,204,0,38
Data 45,124,0,48,0,0,0,62,45,124
Data 0,222,0,0,0,78,45,124,187,187
Data 187,187,0,82,45,124,221,221,221,221
Data 2,42,32,124,1,0,0,0,34,124
Data 0,255,255,236,36,81,145,202,78,208
End Proc
'**** Programminformationen ****
Procedure _ABOUT
N=Chip Free : N1=Fast Free
Screen Open 1,640,168,4,Hires
Screen To Back
Flash Off
Curs Off
Cls 0
Get Palette 0
Colour 3,$FFF
Screen Display 1,128,81,,
Pen 2 : Paper 0
For I=1 To 18
Read N$
Locate ,I : Centre N$
Next I
Centre "Chip:"+Str$(N)+" "+"Fast:"+Str$(N1)+" "+"Total:"+Str$(N+N1)
G[511,155,599,167,0]
Text 519,164,"I read it"
Screen To Front 1
Do
While Mouse Key=0 : Wend
X=X Screen(X Mouse) : Y=Y Screen(Y Mouse)
If X>510 and X<600 and Y>154 and Y<168
G[511,155,599,167,1]
Wait 20 : Exit
End If
Loop
Screen Close 1
Data "AMOSCopy V1.0a is shareware !",""
Data "If you use AMOSCopy V1.0a regular or take some routines from AMOS code,"
Data "please send me a little token !"
Data "This would be a very honorable gesture !",""
Data "Contact follow ( for critics or tips, too ):"
Data "Volker Stepprath , Spandauerstr.4 , 4019/Monheim ( Rhld. ) , Germany",""
Data "Thanks to Halime and Jens for their realy friendship !",""
Data "AMOSCopy V1.0a","� copyright 1992 by Depeche Software",""
Data "AMOS V1.31 / ACmp V1.0","� copyright 1991 by Europress Software","",""
End Proc
'**** Texteingabe ****
Procedure _TEXTINPUT[N]
Shared N$
N$=""
Do
Clear Key
N2=0
While N2=0 : N2=Asc(Inkey$) : Wend
Exit If N2=13
If N2<>8 and Len(N$)+N<37
N$=N$+Chr$(N2)
End If
If N2=8
If Len(N$)>0
N$=Left$(N$,Len(N$)-1)
End If
End If
Text N*8,196,N$+" "
Loop
End Proc
'**** Trackanzeige ****
Procedure _RASTER[TRACK,XDOIO]
N=TRACK mod 2
If XDOIO
Ink 2
Add XDOIO,-19
If XDOIO>8
If XDOIO=9 : N$="Disk is write protected !" : End If
If XDOIO=10 : N$="No disk in drive !" : End If
_MESSAGE[N$]
ABORT=True
Pop Proc
End If
End If
If N=0
Text 84+XUPP*10,66+YUPP*11,Str$(XDOIO)-" "
Else
Text 202+XLOW*10,66+YLOW*11,Str$(XDOIO)-" "
End If
End Proc
Procedure _VERIFY[TRACK,XDOIO]
If XDOIO=0 Then Pop Proc
N=TRACK mod 2
Add XDOIO,-19
_MESSAGE["Verify error ! � ESC=Abort process �"]
If N=0
Text 84+XUPP*10,66+YUPP*11,Str$(XDOIO)-" "
Else
Text 202+XLOW*10,66+YLOW*11,Str$(XDOIO)-" "
End If
Repeat : N2=Asc(Inkey$) : Until N2
_MESSAGE[""]
If N2=27 Then ABORT=True
End Proc
Procedure _LESETEST[TRACK,XDOIO]
If XDOIO=0 Then Pop Proc
If XDOIO=29 : _RASTER[TRACK,29] : Pop Proc : End If
N=TRACK mod 2
Add XDOIO,-19
Ink 2
If N=0
Text 84+XUPP*10,66+YUPP*11,Str$(XDOIO)-" "
Else
Text 202+XLOW*10,66+YLOW*11,Str$(XDOIO)-" "
End If
_MESSAGE["Read error ! � ESC=Abort process �"]
Repeat : N2=Asc(Inkey$) : Until N2
_MESSAGE[""]
If N2=27 Then ABORT=True
End Proc
'**** Testen ob Track selektiert ****
Procedure _BAMCHECK[UL]
If UL=0
Add XUPP,1
If XUPP=10
Add YUPP,1 : XUPP=0
End If
If UPP(UPP) and UPPSIDE : _DOIT=True Else _DOIT=False : End If
Inc UPP
Else
If LOW(LOW) and LOWSIDE : _DOIT=True Else _DOIT=False : End If
Inc LOW
Add XLOW,1
If XLOW=10
Add YLOW,1 : XLOW=0
End If
End If
End Proc
'**** Prozess vorzeitig beenden ****
Procedure _ABORT
XM=X Screen(X Mouse)
YM=Y Screen(Y Mouse)
If XM>40 and XM<72 and YM>134 and YM<146
G[41,135,71,145,1]
ABORT=True
Wait 5
G[41,135,71,145,0]
End If
End Proc
'**** Mitteilung ****
Procedure _MESSAGE[N$]
Ink 0,0 : Bar 14,189 To 301,198
Ink 2 : Text 14,196,N$
End Proc
'**** Schalter An / Aus ****
Procedure G[X,Y,X2,Y2,S]
If S Then C1=2 : C2=1 Else C1=1 : C2=2
Ink C1 : Draw X,Y To X2-1,Y : Draw X,Y To X,Y2 : Ink C2 : Draw X+1,Y2 To X2,Y2 : Draw X2,Y To X2,Y2 : Ink 1,0
End Proc