s1paulr wrote:
If I use the Read Data Multi-Sector command (&53) with OSWORD 7F when the Tube is enabled, no matter which buffer address I specify, the data is always returned to 0x130A in the second processor.
That would only happen if you actually specify &130A as the data address. Are you filling the control block correctly:
Code:
Control block
XY?&00 Drive
XY!&01 Data address
XY?&05 Number of parameters (n)
XY?&06 Command
XY+7... Parameters
XY?(7+n) Result
Try using the code on the
BeebWiki:
Code:
REM Set up a global control block early in the program:
DIM ctrl% 31:X%=ctrl%:Y%=X%DIV256
...
DEFFNdisk(addr%,cmd%,drv%,trk%,sec%,num%,den%):LOCAL fs%
fs%=FNfs:IF fs%<>4:*FX143,18,4
REPEAT
X%?0=drv%+den%*24+8:X%!1=addr%:X%?5=3-7*(cmd%>127)
X%?6=cmd%:X%?7=trk%:X%?8=sec%:X%!9=num%OR&1E20
A%=127:CALL&FFF1:A%=X%?(X%?5+7)
UNTIL A%<>&10:IF fs%<>4:OSCLI"FX143,18,"+STR$ fs%
=A%
DEFFNfs:LOCAL A%,E%,Y%:=(USR&FFDA)AND&FF
result%=FNdisk(address, &53, drive, track, sector, count, 1) will read 'count' sectors into memory at 'address'.