OSWORD &72 - Double Density Disk Access ======================================= OSWORD &72 passes a SCSI-style control block to the floppy or hard disk controller to access double density floppies or hard drives. On extry: XY+0=0, holds result on exit XY+1..4=address XY+5=command XY+6=drive number in b5-b7, sector b16-b20 in b0-b4 XY+7=sector middle byte, XY+8=sector low byte, XY+9=number of sectors, XY+10=n/u, XY+11..14=data length if XY+9=0. Note than the sector address is stored in big-endian form. The drive number in XY+6 is ORed with ADFS's current drive. Most ADFS implementations require ADFS to be the currently selected filing system. The call silently returns if any other filing system is selected. Commands include &08=Read data, &0A=Write data, &0B=Seek track. On exit, XY+0=result: &00=Ok &04=Not ready &40=Write protected &48=CRC error, &50=Sector not found, &60=Bad command, &61=Bad sector address &63=Volume error, &65=Bad drive. &6F=Abort The following function can be used to perform the call. It requires X%=>15-byte control block, Y%=X%DIV256. DEFFNscsi(cmd%,addr%,num%,sect%,drv%):LOCAL fs% fs%=FNfs:IF fs%<>8:*FX143,18,8 X%?0=0:X%!1=addr%:X%?5=cmd%:X%?6=drv%*32+((sect%AND&1F0000)DIV65536) X%?7=((sect%AND&FF00)DIV256):X%?8=sect%:X%!9=num%DIV256:X%!11=num% A%=114:CALL&FFF1:A%=?X%:IF fs%<>8:OSCLI"FX143,18,"+STR$ fs% =A% DEFFNfs:LOCAL A%,E%,Y%:=(USR&FFDA)AND&FF