Played a little with it this morning. The amount of free space in bytes returned, divided by 512, seems to agree with the number of sectors returned by DIR on a drive, so looks like DEA successfully extracted the code; the only change needed was to change it from being a procedure to a function.
In case you plan to link it to a compiled program, you'll need a directive like this in QLiberator:
REMark $$asmb=win1_ds_cde,0,12
Or in Turbo:
REMark %%win1_ds_cde,0,12
Not actually tried this to test it, though.
The following notes are only intended to help you as you said you didn't have much experience of QL assembler.
In case it looks odd that I've defined "2" functions in the definition table in the assembler, it's just that as the keyword name is more than 7 characters long, it uses the formula on page 134 of the QL Technical Guide, to help you understand:
The 'approximate number' of procedures or functions is used to reserve internal table space. It should be exactly equal to the number of procedures or functions unless the average length of the procedure or function names exceeds 7, in which case it should be:
(total number of characters + number of functions or procedures+7)/8
So if you opt to rename the function "DEVICE_SPACE" to avoid a name clash with the Turbo version, e.g. to DEVSPC or a similar 7 character or less name, you might need to change that part of the assembler to something like this. I've put semi-colons in front of the comments as I think your C1 assembler needs them, not all 68K assemblers do.
Code: Select all
* FuNctions
dc.w 1 ;1 function
dc.w lab118ee-* ;point to code start
dc.b 6,"DEVSPC" ;name length+keyword name
dc.b 0 ;align to even address - omit if name is odd number of characters in length or use ALIGN directive
dc.w 0 ;end of functions
If you run into difficulties with this, I can create a new version for you with a new name to avoid a clash with Turbo Toolkit.