h6. [[Programmer's Reference Manuals]] h6(. » [[Service Calls]] h6((. » Service_FindProtocols h2. Service_FindProtocols h5. (Service &41580) |_<^{width:4em}. Entry | | |<^. R1 |<^. Reason Code 267648 (&41580) | |<^. R2 |<^. Lowest TIP version supported × 100 | |<^. R3 |<^. Last TIP version known × 100 | |<^. R4 |<^. "Emulator flags":#emflags | |_<^{width:4em}. Exit | | |<^. R1 |<^. 0 to claim, else preserved to pass on | |<^. R2 |<^. Pointer to protocol name string (null terminated) | |<^. R3 |<^. Base SWI number of protocol module | |<^. R4 |<^. Pointer to "protocol information block":linkinfoblock | |<^. R5 |<^. "Protocol flags":#protoflags | h4(#emflags). Emulator Flags |_<^{width:4em}. Bits |_<^{width:4em}. Value |_<^. Meaning | |/2<^. 0 |<^. 0 |<^. Emulator does not support file transfer calls | |<^. 1 |<^. Emulator supports file trans`fer calls | |/4<^. 1 - 2 |<^. 00 |<^. Direction of link not important | |<^. 01 |<^. One-way link required - protocol to emulator | |<^. 10 |<^. One-way link required - emulator to protocol | |<^. 11 |<^. Two-way link required | |/2<^. 3 |<^. 0 |<^. Bits 1 - 2 are minimum requirement | |<^. 1 |<^. Bits 1 - 2 are exact requirement | |<^. 4 - 31 |<^. 0 |<^. All other bits are reserved and must be zero | h4(#protoflags). Protocol Flags |_<^{width:4em}. Bits |_<^{width:4em}. Value |_<^. Meaning | |/2<^. 0 |<^. 0 |<^. Can open new link | |<^. 1 |<^. Cannot open new link, or not useful | |/2<^. 1 |<^. 0 |<^. Protocol does not support file transfer SWIs | |<^. 1 |<^. Protocol supports file transfer SWIs | |/2<^. 2 |<^. 0 |<^. Protocol does not support [[Protocol_DirOp]] | |<^. 1 |<^. Protocol supports [[Protocol_DirOp]] | |<^. 3 - 31 |<^. 0 |<^. All other bits are reserved and must be zero | *Note:* If the protocol is mainly for file transfer (such as Ftp) and the terminal emulator doesn’t support file transfer calls (bit 0 of R3 was clear on entry) the protocol module should set bit 0 to show it’s ‘not useful’. h4. Use This service call is used in your terminal emulator to find all available compatible protocol modules. h4. Notes To use this SWI, you should follow these steps: # Repeatedly issue this service call until it is not claimed – without polling the Wimp in the meantime # Issue [[Service_FindProtocolsEnd]] The protocol module checks to see if: * It uses a version of the Acorn TIP in the range supported by the terminal emulator * It supports links in the direction required by the terminal emulator If one of the above isn’t true, the protocol module must not claim the call – that is, it must return with registers preserved. If both the above are true it must claim the call – that is, it must return with the values shown above in the section entitled _On exit_. It must then set an internal flag so it doesn’t claim this call again until it receives a [[Service_FindProtocolsEnd]]. h4. See also * [[OS_ServiceCall]] * [[Service_FindProtocolsEnd]] * [[Service_ProtocolNameToNumber]] * [[The Acorn Terminal Interface Protocol]] [linkinfoblock]The%20Acorn%20Terminal%20Interface%20Protocol#infoblock