Op 8/04/2019 om 14:58 schreef pjwitte via Ql-Users:
What seems to be the problem? To me the only "problem" seems to be one or two small inconsistencies:

DMEDIUM_TYPE returns -1 on DOS devices (the underlying iof.xinf call suggests: IOI_FTYP $2C Byte Format type (1=qdos, 2=msdos etc) but -1 is arguable..)

The other relates to iof.xinf directly, but that is not wired up to any DMEDIUM_ command, namely: IOI_HDRL $28 Long File header length (per file storage overhead) - which returns 512b on DOS, while all other devices return 64b. The inconsistency here is that 512b doesnt relate to the actual file header size, as I always assumed was the intention..

Those two points also differ from SMSQmulator's NFA device, which returns the "expected" values, ie 2 and 64, respectively.

Just my penny's worth..
Per

On 06/04/2019 12:55, François Van Emelen via Ql-Users wrote:
Hi,

There seems to be a new release of QPC2 in the pipeline.

It would be very useful if someone would/could debug the 'DMEDIUM_XXX' functions.

Have a fine day,

François Van Emelen


Hi,

As my programming skills are limited to some easy basic, I can't argue about "DMEDIUM_TYPE returns -1 on DOS devices (the underlying iof.xinf call suggests: IOI_FTYP $2C Byte Format type (1=qdos, 2=msdos etc) but -1 is arguable..)"

I noticed some months ago that some DMEDIUM-functions returned wrong values (see SBASIC/SuperBASIC Reference Manual Online Documentation Release 4.0.1 Rich Mellor).

Not only wrong values but also differences between Smsqmulator and Qpc. And as there is a new release of QPC in the pipeline, I thought it was right time to try to convince Marcel to do some work on those DMEDIUM-functions .

You could try this in QPC and SMSQMULATOR to see the difference.

90  REMark test for for some dmediium_xxx functions
100 OPEN_OVER#3,'ram2_rdonly_txt'   ::datad_temp$=DATAD$
110  REMark Why does 'dmedium_rdonly(\dev$) return 0 instead of 1
120  REMark Why does 'dmedium_type(\dev$) return -1 instead of 3
130  REMark Why does 'line 240  return  -23  WITH qpc2 (which seems correc)t BUT -7 with SMSQMULATOR
140  dev$='dos3_' :d$=DATE$
150 REMark DOS3_   is an external USB CD DRIVE
160 DATA_USE 'dos3_'
170  fichier$=dev$&d$
180 WHEN ERRor
190 IF  ERNUM:PRINT#3,ERLIN,ERNUM:END IF
200 END WHEN
210 d= FTEST(dev$)
220 IF d<0:CLOSE#3:DELETE 'ram2_rdonly_txt' :DATA_USE datad_temp$:STOP:END IF
230 f=FOP_NEW(fichier$):
240  PRINT#3,240,' f=fop_new(fichier$) = ',f
250  PRINT#3,250,'dmedium_rdonly(\dev$) = '; DMEDIUM_RDONLY(\dev$),'rdonly' ,' 0= Read/Write 1=Read Only' 260  PRINT#3,260,'dmedium_type(\dev$) = ', DMEDIUM_TYPE(\dev$),'type'  ,'0= Ram disk : 1= floppy drive :2= hard disk :3=CDrom drive'
270  PRINT#3,270,'dmedium_name$(\dev$) = ', DMEDIUM_NAME$(\dev$) ,'name'
280   CLOSE#3
290 DATA_USE datad_temp$  :PAUSE

Thanks for your reply..

Have a fine day.

François Van Emelen




_______________________________________________
QL-Users Mailing List

Reply via email to