Posted 22 Dec 2022 (edited) Soft Edited 26 Dec 2022 by Chapmann Share this post Link to post Share on other sites
Posted 25 Dec 2022 (edited) Search the manual for your CPU for the GTS and SBR instructions. The subroutine is inserted after the main program END instruction. The subroutine is started with the SBR instruction and ended with an RT (return) instruction. You may use a RTC (return conditional) if your subroutine requires it) Unlike many other programming languages there is no structure for passing or returning values, The subroutine is identified by a constant provided as an argument to the SBR instruction. You invoke the subroutine from within the main program using the GTS instruction with the same numeric argument as the target subroutine. I don't remember if you can use the GTS from inside another subroutine. Otherwise the operation is similar to other language subroutines. On invocation the main code stops, the code within the subroutine is executed, then the processing of the main program continues from the instruction immediately after the GTS. Edited 25 Dec 2022 by b_carlton Mistyped RTC Share this post Link to post Share on other sites
Posted 26 Dec 2022 I am curious what you mean by changing your question to 'soft' Share this post Link to post Share on other sites