home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CBM Funet Archive
/
cbm-funet-archive-2003.iso
/
cbm
/
c128
/
utilities
/
svnt128d.sfx
/
1581.diag
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1992-10-05
|
1KB
|
38 lines
100 rem check 1581 disk for controller type & j1 jumper
110 rem 12/09/87 fred bowen
115 :
120 print"insert any formatted disk in drive."
121 input"check which unit";u: print
125 :
130 open 1,u,15 :l=218 : h=1
140 open 2,u,2,"#"
145 print#1,"m-r"chr$(0)chr$(192)chr$(1): get#1,a$
150 if asc(a$)<>192 then print"device"u"is not a 1581.": goto360
155 :
160 print#1,"m-r"chr$(l)chr$(h)chr$(5): rem modify controller cmds
170 fori=1to5:get#1,a$:b$=b$+chr$(asc(a$)or3):c$=c$+a$:next
180 print#1,"m-w"chr$(l)chr$(h)chr$(5)b$
190 :
200 print#1,"u1";2;0;1;0 :gosub500: rem seek track 1 & reset timer
210 print#1,"u1";2;0;80;0 :gosub600: rem seek track 80 & read timer
220 :
230 print#1,"m-w"chr$(8)chr$(64)chr$(1)chr$(0): rem test jumper j1
240 print#1,"m-r"chr$(8)chr$(64)chr$(1): get#1,j$
250 :
260 print#1,"m-w"chr$(l)chr$(h)chr$(5)c$: rem restore controller cmds
270 if val(f$)>0 then print"seek error- check diskette.": print: run
285 :
290 print"unit"u"contains a ";: rem report
300 if t>20 then print"wd1770";
310 if t<20 then print"wd1772";
320 print" and j1 is ";
330 if j$="" then print"open"
340 if j$>"" then print"closed"
360 :
370 close2: close1: end
380 :
390 :
474 -256
500 fori=11to8step-1: poke56320+i,0: next: return
600 input#1,f$,r$,e$,d$: t=peek(56329)*10+peek(56328): return