<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
On 30-Jul-18 11:45, Johnny Billquist wrote:<br>
<blockquote type="cite"
cite="mid:9ca573b4-7669-773d-7cac-4ee855aba0de@softjar.se">On
2018-07-30 15:51, Timothe Litt wrote:
<br>
<blockquote type="cite">On 30-Jul-18 09:30, Paul Koning wrote:
<br>
<blockquote type="cite">Yes, that is the standard way to do
this. I have never seen the code you quoted before and I
can't imagine any reason for doing that.
<br>
</blockquote>
A memory address test's verification pass. Check that memory
contains address of self. Of course, you need a
<br>
<br>
bne fail
<br>
following the compare :-)
<br>
</blockquote>
<br>
Not to mention that it will succeed or fail depending on which
PDP-11 model you run the code on? :-)
<br>
</blockquote>
Oddly enough, we did have quality control, and it usually worked.<br>
<br>
Diagnostics are often CPU-specific. This was fixed after the 11/20.<br>
I might have done this - it represents a 40% savings in instructions
for the loop:<br>
;11/20 safe Many other
11s Some other 11s<br>
<tt> 10$: mov</tt><tt> r3, r0 10$: cmp r3,(r3)+ 10$: cmp
r3,(r3)+<br>
</tt> cmp r0, (r3)+ bne fail
bne fail<br>
bne fail sob r1,
10$ dec r1<br>
dec
r1
bne 10$<br>
bne 10$<br>
<br>
20-40% reduction in instructions of an inner loop at boot time is
worth a runtime check<br>
for the 11/20 - if I cared (e.g. a BIST is probably in
processor-specific ROM, so no need to check).<br>
<br>
<br>
</body>
</html>