<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">On 04-Nov-16 23:52, Pascal Parent
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAEH2hpQeqBvv5PwfYaM0vJb3rm7KYabe-9Z=G18xPQ0Hv2Eo1g@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>The problem is with this machine intruction:</div>
        <div><br>
        </div>
        <div>EXTEND 11(13b8) = CVTBDT convert binary to decimal
          translated</div>
        <div><br>
        </div>
        <div>The processor reference manual states:</div>
        <div><br>
        </div>
        <div><i>If the instruction is CVTBDT, for the digit substitute a
            byte from the</i></div>
        <div><i>right half of location E1+D in the translation table,
            where D is the</i></div>
        <div><i>value of the digit, unless this is the last digit in the
            conversion, in which</i></div>
        <div><i>case make the substitution from the right half of the
            location if M is 0,</i></div>
        <div><i>but from the left half if M is 1.</i></div>
        <div><br>
        </div>
        <div>However, for the last digit the emulator checks the L bit
          instead of the M.</div>
        <div><br>
        </div>
        <div>The fix in pdp10_xtnd.c is:</div>
        <div><br>
        </div>
        <div><font face="monospace, monospace">308c308</font></div>
        <div><font face="monospace, monospace"><                 if
            ((i == 1) && (AC(p3) & XT_LFLG))</font></div>
        <div><font face="monospace, monospace">---</font></div>
        <div><font face="monospace, monospace">>                 if
            ((i == 1) && (AC(p3) & XT_MFLG))</font></div>
        <div><br>
        </div>
        <div>I hope this is correct. The CBL74T test completes
          successfully with this change.</div>
        <div><br>
        </div>
        <div>Pascal.</div>
      </div>
      <div class="gmail_extra"><br>
      </div>
    </blockquote>
    Sorry about the slow response, I've been off-line.<br>
    <br>
    Good diagnosis.  This appears to be a day 0 typo in the SimH
    implementation.  COBOL is the prime<br>
    consumer of the EXTEND instructions, so it's not surprising that it
    turned up the issue.<br>
    <br>
    The goal is to set the value of the last digit according to the
    sign, e.g. zoned BCD.<br>
    The negative representation of each digit is in the left half of the
    table, the positive in the right.<br>
    If you want separate (or no) sign, the table is setup with identical
    values in both halves, and<br>
    software can test the M (and  perhaps N) bit to decide what to
    append using the byte pointer<br>
    in AC+4/5. (The pointer is setup for IDPB.)<br>
    <br>
    M (Minus, bit 2 = 1000000,,0) reflects the sign bit.  L (400000,,0)
    controls leading fill. <br>
    <br>
    The KS microcode agrees:<br>
    <pre style="font-family: monospace; font-size: medium; background-color: rgb(238, 238, 238); padding: 1em; text-align: left; border: 2px solid black; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;">; 6413          CALL [LOADAR]           ;GO PUT WORD IN AR (This is the next digit's table entry)
; 6414          TR [BRX], #/777777      ;LAST DIGIT (skip next if 0 digits follow this)
; 6415  =0      [AR]_0, HOLD RIGHT, J/BDSET ; (Not last.Clear left half, use RH. Jump to store)
; 6416          TL [BRX], #/100000      ;AND NEGATIVE (Last. Test LH, skip next if M is zero)
; 6417  =0      [AR]_[AR] SWAP          ;LAST AND MINUS, USE LH (M is set, swap LH & RH)
; 6418          [AR]_0, HOLD RIGHT, J/BDSET ; (Clear left half and store from RH)
</pre>
    (Lowercase comments) are new.<br>
    <br>
    The patch should be accepted.<br>
    <br>
    Thanks.<br class="Apple-interchange-newline">
    <br>
    <blockquote
cite="mid:CAEH2hpQeqBvv5PwfYaM0vJb3rm7KYabe-9Z=G18xPQ0Hv2Eo1g@mail.gmail.com"
      type="cite">
      <div class="gmail_extra">
        <div class="gmail_quote">On Thu, Oct 27, 2016 at 10:55 PM,
          Pascal Parent <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:pascguyz@gmail.com" target="_blank">pascguyz@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">
              <div>I installed TOPS-20 V4.1 and COBOL-74 12C in SIMH.
                However, I am running into an error when trying to run
                the XT74 sample in UETP.LIB.</div>
              <div><br>
              </div>
              <div>I also installed Cobol 12C from the same tape on the
                Panda Distribution using the KLH10 emulator. There the
                test is successful.</div>
              <div><br>
              </div>
              <div>See the from both systems below.</div>
              <div><br>
              </div>
              <div>Could this be explained by a difference between the
                KL-10 (KLH10) and KS (SIMH) simulated hardware or is it
                a symptom of a bug in SIMH? I am running this version:</div>
              <div><br>
              </div>
              <div>"PDP-10 simulator V4.0-0 Beta        git commit id:
                cf1e7b9c"</div>
              <div><br>
              </div>
              <div>Let me know if there is any other information I can
                provide that would be useful.</div>
              <div><br>
              </div>
              <div>Thank you,</div>
              <div>Pascal.</div>
              <div><br>
              </div>
              <div><font face="monospace, monospace">=========</font></div>
              <div><font face="monospace, monospace">SIMH Test</font></div>
              <div><font face="monospace, monospace">=========</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">@CONNECT
                  <UETP.LIB></font></div>
              <div><font face="monospace, monospace"> PS:<OPERATOR>
                  Over working storage allocation by 509 page(s).</font></div>
              <div><font face="monospace, monospace">@GET SYS:CBL74</font></div>
              <div><font face="monospace, monospace">@INF VER</font></div>
              <div><font face="monospace, monospace"> PGP TOPS-20 V4.1,
                  TOPS-20 Monitor 4.1(5471)</font></div>
              <div><font face="monospace, monospace"> TOPS-20 Command
                  processor 5.1(1354)</font></div>
              <div><font face="monospace, monospace"> Program is CBL74,
                  version is 12.3(1574)</font></div>
              <div><font face="monospace, monospace">@START</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">*=XT7409</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">0246              
                       NUM OF B (1 SC1 SD1) ROUNDED</font></div>
              <div><font face="monospace, monospace">                   
                      ^</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">CBL218 Rounding not
                  necessary.</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">0258              
                       NUM OF B (SD1 SC1 2) ROUNDED</font></div>
              <div><font face="monospace, monospace">                   
                      ^</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">CBL218 Rounding not
                  necessary.</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">0436          
                   MOVE CORR 2L OF A(SC2 1) TO 2L OF B (2 SD0 + 2).</font></div>
              <div><font face="monospace, monospace">                ^</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">CBL105 No
                  CORRESPONDING elements.</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">0660              
                       NUM OF B (SC1 + 1 SD2 - 1 SD1) ROUNDED</font></div>
              <div><font face="monospace, monospace">                   
                      ^</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">CBL218 Rounding not
                  necessary.</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">0675              
                       NUM OF B (SD2 SC2 - 1 SD2 - 1) ROUNDED</font></div>
              <div><font face="monospace, monospace">                   
                      ^</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">CBL218 Rounding not
                  necessary.</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">WARNINGS:</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">0246  CBL502 Most
                  significant digits truncated on NUM</font></div>
              <div><font face="monospace, monospace">0247  CBL502 Most
                  significant digits truncated on NUM</font></div>
              <div><font face="monospace, monospace">0248  CBL502 Most
                  significant digits truncated on NUM</font></div>
              <div><font face="monospace, monospace">0285  CBL502 Most
                  significant digits truncated on NUM</font></div>
              <div><font face="monospace, monospace">0362  CBL502 Most
                  significant digits truncated on TALLY</font></div>
              <div><font face="monospace, monospace">0370  CBL502 Most
                  significant digits truncated on TALLY</font></div>
              <div><font face="monospace, monospace">0447  CBL502 Most
                  significant digits truncated on NUM</font></div>
              <div><font face="monospace, monospace">0459  CBL502 Most
                  significant digits truncated on NUM</font></div>
              <div><font face="monospace, monospace">0573  CBL501
                  Right-most truncation on AN</font></div>
              <div><font face="monospace, monospace">0576  CBL501
                  Right-most truncation on AN</font></div>
              <div><font face="monospace, monospace">0579  CBL501
                  Right-most truncation on AN</font></div>
              <div><font face="monospace, monospace">0617  CBL502 Most
                  significant digits truncated on NUM</font></div>
              <div><font face="monospace, monospace">0716  CBL501
                  Right-most truncation on AN</font></div>
              <div><font face="monospace, monospace">No Fatal Errors, 18
                  Warnings</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">*=XT749S</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">*^C</font></div>
              <div><font face="monospace, monospace">@LOAD
                  XT7409.REL,XT749S.REL</font></div>
              <div><font face="monospace, monospace">LINK:   Loading</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">EXIT</font></div>
              <div><font face="monospace, monospace">@SAVE CBL74T.EXE</font></div>
              <div><font face="monospace, monospace"> CBL74T.EXE.1 Saved</font></div>
              <div><font face="monospace, monospace">@RUN CBL74T.EXE</font></div>
              <div><font face="monospace, monospace">? TABLE A CANNOT BE
                  CORRECTLY INITIALIZED.</font></div>
              <div><font face="monospace, monospace">  TABLE SHOULD
                  CONTAIN:</font></div>
              <div><font face="monospace, monospace">####AA#BB01#01###CC#DD04#08###<wbr>#EE#FF09#27###GG#HH16#64#</font></div>
              <div><font face="monospace, monospace">  TABLE INSTEAD
                  CONTAINS:</font></div>
              <div><font face="monospace, monospace">####AA#BB0J#0J###CC#DD0M#0Q###<wbr>#EE#FF0R#2P###GG#HH1O#6M#</font></div>
              <div><font face="monospace, monospace">TEST TERMINATED
                  EARLY.</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">EXIT</font></div>
              <div><font face="monospace, monospace">@</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">==========</font></div>
              <div><font face="monospace, monospace">KLH10 TEST</font></div>
              <div><font face="monospace, monospace">==========</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">$CONNECT
                  <UETP.LIB></font></div>
              <div><font face="monospace, monospace">$GET SYS:CBL74</font></div>
              <div><font face="monospace, monospace">$inf ver</font></div>
              <div><font face="monospace, monospace"> Panda
                  Distribution, PANDA TOPS-20 Monitor 7.1(21733)-4</font></div>
              <div><font face="monospace, monospace"> PANDA TOPS-20
                  Command processor 7.1(4453)-4</font></div>
              <div><font face="monospace, monospace"> Program is CBL74,
                  version is 12.3(1574)</font></div>
              <div><font face="monospace, monospace">$start</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">*=XT7409</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">0246   <span class="m_2318963894019050989gmail-Apple-tab-span" style="white-space:pre-wrap">      </span>
                  <span class="m_2318963894019050989gmail-Apple-tab-span" style="white-space:pre-wrap">               </span>NUM
                  OF B (1 SC1 SD1) ROUNDED</font></div>
              <div><font face="monospace, monospace">       <span class="m_2318963894019050989gmail-Apple-tab-span" style="white-space:pre-wrap">   </span>
                                 ^</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">CBL218 Rounding not
                  necessary.</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">0258   <span class="m_2318963894019050989gmail-Apple-tab-span" style="white-space:pre-wrap">      </span>
                  <span class="m_2318963894019050989gmail-Apple-tab-span" style="white-space:pre-wrap">               </span>NUM
                  OF B (SD1 SC1 2) ROUNDED</font></div>
              <div><font face="monospace, monospace">       <span class="m_2318963894019050989gmail-Apple-tab-span" style="white-space:pre-wrap">   </span>
                                 ^</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">CBL218 Rounding not
                  necessary.</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">0436   <span class="m_2318963894019050989gmail-Apple-tab-span" style="white-space:pre-wrap">      </span>
                  <span class="m_2318963894019050989gmail-Apple-tab-span" style="white-space:pre-wrap">       </span>MOVE
                  CORR 2L OF A(SC2 1) TO 2L OF B (2 SD0 + 2).</font></div>
              <div><font face="monospace, monospace">       <span class="m_2318963894019050989gmail-Apple-tab-span" style="white-space:pre-wrap">   </span>
                         ^</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">CBL105 No
                  CORRESPONDING elements.</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">0660   <span class="m_2318963894019050989gmail-Apple-tab-span" style="white-space:pre-wrap">      </span>
                  <span class="m_2318963894019050989gmail-Apple-tab-span" style="white-space:pre-wrap">               </span>NUM
                  OF B (SC1 + 1 SD2 - 1 SD1) ROUNDED</font></div>
              <div><font face="monospace, monospace">       <span class="m_2318963894019050989gmail-Apple-tab-span" style="white-space:pre-wrap">   </span>
                                 ^</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">CBL218 Rounding not
                  necessary.</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">0675   <span class="m_2318963894019050989gmail-Apple-tab-span" style="white-space:pre-wrap">      </span>
                  <span class="m_2318963894019050989gmail-Apple-tab-span" style="white-space:pre-wrap">               </span>NUM
                  OF B (SD2 SC2 - 1 SD2 - 1) ROUNDED</font></div>
              <div><font face="monospace, monospace">       <span class="m_2318963894019050989gmail-Apple-tab-span" style="white-space:pre-wrap">   </span>
                                 ^</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">CBL218 Rounding not
                  necessary.</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">WARNINGS:</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">0246  CBL502 Most
                  significant digits truncated on NUM</font></div>
              <div><font face="monospace, monospace">0247  CBL502 Most
                  significant digits truncated on NUM</font></div>
              <div><font face="monospace, monospace">0248  CBL502 Most
                  significant digits truncated on NUM</font></div>
              <div><font face="monospace, monospace">0285  CBL502 Most
                  significant digits truncated on NUM</font></div>
              <div><font face="monospace, monospace">0362  CBL502 Most
                  significant digits truncated on TALLY</font></div>
              <div><font face="monospace, monospace">0370  CBL502 Most
                  significant digits truncated on TALLY</font></div>
              <div><font face="monospace, monospace">0447  CBL502 Most
                  significant digits truncated on NUM</font></div>
              <div><font face="monospace, monospace">0459  CBL502 Most
                  significant digits truncated on NUM</font></div>
              <div><font face="monospace, monospace">0573  CBL501
                  Right-most truncation on AN</font></div>
              <div><font face="monospace, monospace">0576  CBL501
                  Right-most truncation on AN</font></div>
              <div><font face="monospace, monospace">0579  CBL501
                  Right-most truncation on AN</font></div>
              <div><font face="monospace, monospace">0617  CBL502 Most
                  significant digits truncated on NUM</font></div>
              <div><font face="monospace, monospace">0716  CBL501
                  Right-most truncation on AN</font></div>
              <div><font face="monospace, monospace">No Fatal Errors, 18
                  Warnings</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">*=XT749S</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">*^C</font></div>
              <div><font face="monospace, monospace">$LOAD
                  XT7409.REL,XT749S.REL</font></div>
              <div><font face="monospace, monospace">LINK:<span class="m_2318963894019050989gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>Loading</font></div>
              <div><font face="monospace, monospace">$SAVE CBL74T.EXE</font></div>
              <div><font face="monospace, monospace"> CBL74T.EXE.4 Saved</font></div>
              <div><font face="monospace, monospace">$RUN CBL74T.EXE</font></div>
              <div><font face="monospace, monospace">ACCEPT TEST</font></div>
              <div><font face="monospace, monospace">TYPE X<CR>
                  TWICE</font></div>
              <div><font face="monospace, monospace">X</font></div>
              <div><font face="monospace, monospace">X</font></div>
              <div><font face="monospace, monospace">TYPE 1<CR>
                  TWICE</font></div>
              <div><font face="monospace, monospace">1</font></div>
              <div><font face="monospace, monospace">1</font></div>
              <div><font face="monospace, monospace">ADD TEST</font></div>
              <div><font face="monospace, monospace">COMPUTE TEST</font></div>
              <div><font face="monospace, monospace">DISPLAY TEST</font></div>
              <div><font face="monospace, monospace">DISPLAY FAILS IF
                  NEXT TWO LINES ARE NOT IDENTICAL</font></div>
              <div><font face="monospace, monospace">AA BB CC DD</font></div>
              <div><font face="monospace, monospace">AA BB CC DD</font></div>
              <div><font face="monospace, monospace">DIVIDE TEST</font></div>
              <div><font face="monospace, monospace">inspect TEST</font></div>
              <div><font face="monospace, monospace">GO ... DEP TEST</font></div>
              <div><font face="monospace, monospace">MOVE TEST</font></div>
              <div><font face="monospace, monospace">MULTIPLY TEST</font></div>
              <div><font face="monospace, monospace">PERFORM TEST</font></div>
              <div><font face="monospace, monospace">STARTING VARIABLE
                  PERFORM TEST 1</font></div>
              <div><font face="monospace, monospace">  PERFORM TEST 1
                  FINISHED</font></div>
              <div><font face="monospace, monospace">STARTING VARIABLE
                  PERFORM TEST 2</font></div>
              <div><font face="monospace, monospace">  PERFORM TEST 2
                  FINISHED</font></div>
              <div><font face="monospace, monospace">STARTING VARIABLE
                  PERFORM TEST 3</font></div>
              <div><font face="monospace, monospace">  PERFORM TEST 3
                  FINISHED</font></div>
              <div><font face="monospace, monospace">STARTING VARIABLE
                  PERFORM TEST 4</font></div>
              <div><font face="monospace, monospace">  PERFORM TEST 4
                  FINISHED</font></div>
              <div><font face="monospace, monospace">WRITE TEST</font></div>
              <div><font face="monospace, monospace">READ TEST</font></div>
              <div><font face="monospace, monospace">RELEASE &
                  RETURN TEST</font></div>
              <div><font face="monospace, monospace">SEARCH TEST</font></div>
              <div><font face="monospace, monospace">SET TEST</font></div>
              <div><font face="monospace, monospace">SUBTRACT TEST</font></div>
              <div><font face="monospace, monospace">END OF TESTS</font></div>
              <div><font face="monospace, monospace"><br>
                </font></div>
              <div><font face="monospace, monospace">EXIT</font></div>
              <div><font face="monospace, monospace">$</font></div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Simh mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Simh@trailing-edge.com">Simh@trailing-edge.com</a>
<a class="moz-txt-link-freetext" href="http://mailman.trailing-edge.com/mailman/listinfo/simh">http://mailman.trailing-edge.com/mailman/listinfo/simh</a></pre>
    </blockquote>
    <br>
  </body>
</html>