[Coco] using another VAR in a script.
Stephen H. Fischer
SFischer1 at MindSpring.com
Sat Oct 16 19:54:18 EDT 2004
Hi,
This a little OLD and may not be useful to many as I have the unusual 96 TPI
5 1/2 Teac Floppy drives.
Also there is no need to use SFormat and the current Format has different
options now. It still may be useful reading on Shell+ scripts.
-------------------------------------------------
*format.s 89/11/29
* This Version Assumes /D0, /D1 96tpi Double Sided Drives, /D2 48tpi 1 side.
* set var.9 to "FORMAT" or "SFORMAT"
var.9=FORMAT
if %1=
var.1=/D1
endif
if %2=
var.2=80
endif
if %3=
var.3=2
endif
*repeat
if %1=/D2
goto onD2
else
if %1=/d2
goto onD2
endif
endif
*onD0D1
if %2=80
var.4=
else
if %9=FORMAT
ECHO \7 ERROR - FORMAT Will NOT Format 48tpi on 96tpi drive \7
var.2=80
var.3=2
var.4=
goto +getinput
else
var.4=4
endif
endif
*onD2
*ready
ECHO Ready To %9 %1 %2Tracks %3Sides (y/n):\c
if -y
SDATE
t
%9 %1 '%2' %3 %4 "OS-9 CoCo %2Tracks %3Sides %%4:%%5" R
FREE %1
-t
goto +endformat
else
*getinput
var.4=
ECHO Enter Device Name (/D0,/D1,/D2):\c
var.1
ECHO Enter Number Of Tracks Or Sectors (35,40,80) (630,720,1440,2880):\c
var.2
if +%2=630
var.2=35
var.3=1
else
if +%2=720
var.2=40
var.3=1
else
if +%2=2880
var.2=80
var.3=2
else
if +%2<>1440
ECHO Enter Number Of Sides (1,2):\c
var.3
else
ECHO Enter Number Of Sides (1,2):\c
var.3
if +%3=1
var.2=80
var.4=
else
if +%3=2
var.2=40
var.4=4
endif
endif
endif
endif
endif
endif
endif
goto repeat
*endformat
ECHO Another Disk To Format (y/n):\c
if -y
goto repeat
endif
-------------------------------------------
> Paul T. Barton wrote:
>> Boisy, et al...
>>
>> I'd like to issue a command like:
>> format %1 %2 "diskname" r
>> where the %2 is the "-L" option.
>> Will/can this work?
>>
>> How do I set it up for the "-L" input?
>> accept "-L" or " " ?
>>
>> Paul
More information about the Coco
mailing list