<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to F$SSvc</title><link>https://sourceforge.net/p/nitros9/wiki/F%2524SSvc/</link><description>Recent changes to F$SSvc</description><atom:link href="https://sourceforge.net/p/nitros9/wiki/F$SSvc/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 27 Jun 2014 23:18:39 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/nitros9/wiki/F$SSvc/feed" rel="self" type="application/rss+xml"/><item><title>F$SSvc modified by Lothan</title><link>https://sourceforge.net/p/nitros9/wiki/F%2524SSvc/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;strong&gt;Set SVC&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Adds or replaces a system call&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;OS9 F$SSvc 103F 32&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Entry Conditions&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Y &lt;em&gt;address of the system call initialization table&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Exit Conditions&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;None &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Error Output&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;CC carry set on error&lt;br /&gt;
B &lt;em&gt;error code&lt;/em&gt;, if any &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Additional Information&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Set SVC adds or replaces a system call, which you have written, to NitrOS-9’s user and system mode system call tables. &lt;/li&gt;
&lt;li&gt;Register Y passes the address of a table, which contains the function codes and offsets, to the corresponding system call handler routines. This table has the following format: &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Relative&lt;br /&gt;
Address&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Use&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;&lt;/p&gt;
&lt;p&gt;$00 &lt;br /&gt;
Function Code &lt;/p&gt;
&lt;p&gt;$02 &lt;br /&gt;
Offset From Byte 3&lt;br /&gt;
To Function Handler &lt;br /&gt;
&amp;nbsp;&lt;/p&gt;
&lt;p&gt;$03 &lt;br /&gt;
Function Code &lt;/p&gt;
&lt;p&gt;$05 &lt;br /&gt;
Offset From Byte 6&lt;br /&gt;
To Function Handler &lt;br /&gt;
&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;More Entries&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;br /&gt;
$80 &lt;br /&gt;
End-of-table mark &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If the most significant bit of the function code is set, NitrOS-9 updates the system table. If the most significant bit of the function code is not set, NitrOS-9 updates the system and user tables. &lt;/li&gt;
&lt;li&gt;The function request codes are in the range $29-$34. I/O calls are in the range $80-$90. &lt;/li&gt;
&lt;li&gt;To use a privileged system call, you must be executing a program that resides in the system map and that executes in the system state. &lt;/li&gt;
&lt;li&gt;The system call handler routine must process the system call and return from the subroutine with an RTS instruction. &lt;/li&gt;
&lt;li&gt;The handler routing might alter all CPU registers (except Register SP). &lt;/li&gt;
&lt;li&gt;Register U passes the address of the register stack to the system call hander as shown in the following diagram: &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;br /&gt;
&lt;strong&gt;Relative&lt;br /&gt;
Address&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Name&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;U --&amp;gt;&lt;br /&gt;
CC &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
$00 &lt;br /&gt;
R$CC &lt;/p&gt;
&lt;p&gt;A &lt;br /&gt;
$01 &lt;br /&gt;
R$A (R$D) &lt;/p&gt;
&lt;p&gt;B &lt;br /&gt;
$02 &lt;br /&gt;
R$B &lt;/p&gt;
&lt;p&gt;DP &lt;br /&gt;
$03 &lt;br /&gt;
R$DP &lt;/p&gt;
&lt;p&gt;X &lt;br /&gt;
$04 &lt;br /&gt;
R$X &lt;/p&gt;
&lt;p&gt;Y &lt;br /&gt;
$06 &lt;br /&gt;
R$Y &lt;/p&gt;
&lt;p&gt;U &lt;br /&gt;
$08 &lt;br /&gt;
R$U &lt;/p&gt;
&lt;p&gt;PC &lt;br /&gt;
$0A &lt;br /&gt;
R$PC &lt;/p&gt;
&lt;p&gt;&lt;em&gt;krn&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lothan</dc:creator><pubDate>Fri, 27 Jun 2014 23:18:39 -0000</pubDate><guid>https://sourceforge.net741a6b0c972ebabb3837ee09cee92c86ba2f5cd4</guid></item></channel></rss>