Difference between revisions of "OSWORD &14"

From BeebWiki
Jump to: navigation, search
(Added notes)
(Updated return from OSWORD &14,0.)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Category:OSWORD]]
 
[[Category:OSWORD]]
 
[[Category:Networking]]__NOTOC__
 
[[Category:Networking]]__NOTOC__
{{PageTitle|OSWORD &14 (20) - Various Network functions}}
+
{{PageTitle|OSWORD &14 (20): Various Network functions}}
 
  XY?0=0 - Communicate with fileserver
 
  XY?0=0 - Communicate with fileserver
 
  XY?0=1 - Send text string to remote station
 
  XY?0=1 - Send text string to remote station
Line 17: Line 17:
 
   XY+7... contains rest of infomation
 
   XY+7... contains rest of infomation
 
  On exit:
 
  On exit:
  XY?1=updated size of block
 
 
   XY?2=command code, 0 for ok <>0 to continue with another function
 
   XY?2=command code, 0 for ok <>0 to continue with another function
 
   XY?3=error code, 0 for ok <>0 for error, CR-terminated error
 
   XY?3=error code, 0 for ok <>0 for error, CR-terminated error
 
       string at XY+4
 
       string at XY+4
 
   XY+4.. contains returned data.
 
   XY+4.. contains returned data.
 +
 +
Note that XY?1 is documented as returning the updated size of block, but it is actually unchanged. Only XY+2 onwards are specified as returning data. The return values in XY?0 and XY?1 should be treated as undefined.
  
 
==XY?0=1 - Send text string to remote station==
 
==XY?0=1 - Send text string to remote station==
Line 36: Line 37:
  
 
==Notes==
 
==Notes==
On RISC OS and Arthur OSWORD &14 calls SWI "NetFS_DoFSOp", but if you call
+
On RISC OS and Arthur OSWORD &14,0 calls SWI NetFS_DoFSOp, but if you call
 
NetFS_DoFSOp directly the control block is passed and returned differently.
 
NetFS_DoFSOp directly the control block is passed and returned differently.
 
   OSWORD &14,0:
 
   OSWORD &14,0:
Line 44: Line 45:
 
    
 
    
 
   NetFS_DoFSOp:
 
   NetFS_DoFSOp:
 +
        R0=function
 
         R1+00 01 02 03 04 05 06 07 08 09...
 
         R1+00 01 02 03 04 05 06 07 08 09...
 
   Send:    |command data...
 
   Send:    |command data...
   Receive: |er|returned data...
+
   Receive: |returned data...
 +
        R0=0 if ok or R0=>returned error block
  
 
==See Also==
 
==See Also==

Latest revision as of 12:29, 21 June 2024

OSWORD &14 (20): Various Network functions
XY?0=0 - Communicate with fileserver
XY?0=1 - Send text string to remote station
XY?0=2 - Generate error on remote machine.

XY?0=0 - Communicate with fileserver

On entry:
 XY?0=0
 XY?1=size of rest of block
 XY?2=0
 XY?3=function
 XY?4=0
 XY?5=0
 XY?6=0
 XY+7... contains rest of infomation
On exit:
 XY?2=command code, 0 for ok <>0 to continue with another function
 XY?3=error code, 0 for ok <>0 for error, CR-terminated error
      string at XY+4
 XY+4.. contains returned data.

Note that XY?1 is documented as returning the updated size of block, but it is actually unchanged. Only XY+2 onwards are specified as returning data. The return values in XY?0 and XY?1 should be treated as undefined.

XY?0=1 - Send text string to remote station

On entry:
 XY?0   =1
 XY+1..2=destination station
 XY+3... string to send, terminated by CR or &00. The CR also gets
       sent.

XY?0=2 - Generate error on remote machine

On entry:
 XY?0   =2
 XY+1..2=destination machine.

Notes

On RISC OS and Arthur OSWORD &14,0 calls SWI NetFS_DoFSOp, but if you call NetFS_DoFSOp directly the control block is passed and returned differently.

 OSWORD &14,0:
        XY+00 01 02 03 04 05 06 07 08 09...
 Send:    |00|sz|00|fn|00|00|00|command data...
 Receive: |  |  |ok|er|returned data...
 
 NetFS_DoFSOp:
        R0=function
        R1+00 01 02 03 04 05 06 07 08 09...
 Send:    |command data...
 Receive: |returned data...
        R0=0 if ok or R0=>returned error block

See Also

Networking calls

Jgharston 13:27, 26 May 2009 (UTC)