<div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, 31 Oct 2018 at 11:49, Ralph Corderoy <<a href="mailto:ralph@inputplus.co.uk" target="_blank">ralph@inputplus.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Reuben,<br>
<br>
Couple of minor comments.<br>
<br>
> +     /* Intercept OS_Reset to check for turning off<br>
> +        <a href="https://www.riscosopen.org/wiki/documentation/show/OS_Reset" rel="noreferrer" target="_blank">https://www.riscosopen.org/wiki/documentation/show/OS_Reset</a><br>
> +     */<br>
> +     if (swinum == SWI_OS_Reset) {<br>
> +             if (arm.reg[0] == 0x46464F26) { /* 0x0ff */<br>
<br>
It's "&0ff", not 0x0ff.<br></blockquote><div><br></div><div><div style="font-family:arial,helvetica,sans-serif;font-size:small" class="gmail_default">Thanks (corrected to "&OFF"; a case where the code lagged behind the comment). Indeed, the online documentation at <a href="https://www.riscosopen.org/wiki/documentation/show/OS_Reset" target="_blank">https://www.riscosopen.org/wiki/documentation/show/OS_Reset</a> has the right hex but the wrong ASCII.<br></div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Use `else if' as the previous if being true might not result in the<br>
exit().<br></blockquote><div><br></div><div><div style="font-family:arial,helvetica,sans-serif;font-size:small" class="gmail_default">Fixed. Arguably the whole opSWI function would benefit from switching on swinum and only then applying other conditions; the logic is a little tortuous at the moment.</div><div style="font-family:arial,helvetica,sans-serif;font-size:small" class="gmail_default"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small" class="gmail_default">New version attached.<br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small" class="gmail_default"><br></div></div></div>-- <br><div dir="ltr" class="m_-8259600837631981644gmail_signature"><div dir="ltr"><a href="https://rrt.sc3d.org" target="_blank">https://rrt.sc3d.org</a></div></div></div></div>