[Simh] TOPS-20 4.1 Cobol 12c Sample test failure

Timothe Litt litt at ieee.org
Sat Nov 5 09:18:57 EDT 2016


On 04-Nov-16 23:52, Pascal Parent wrote:
> The problem is with this machine intruction:
>
> EXTEND 11(13b8) = CVTBDT convert binary to decimal translated
>
> The processor reference manual states:
>
> /If the instruction is CVTBDT, for the digit substitute a byte from the/
> /right half of location E1+D in the translation table, where D is the/
> /value of the digit, unless this is the last digit in the conversion,
> in which/
> /case make the substitution from the right half of the location if M
> is 0,/
> /but from the left half if M is 1./
>
> However, for the last digit the emulator checks the L bit instead of
> the M.
>
> The fix in pdp10_xtnd.c is:
>
> 308c308
> <                 if ((i == 1) && (AC(p3) & XT_LFLG))
> ---
> >                 if ((i == 1) && (AC(p3) & XT_MFLG))
>
> I hope this is correct. The CBL74T test completes successfully with
> this change.
>
> Pascal.
>
Sorry about the slow response, I've been off-line.

Good diagnosis.  This appears to be a day 0 typo in the SimH
implementation.  COBOL is the prime
consumer of the EXTEND instructions, so it's not surprising that it
turned up the issue.

The goal is to set the value of the last digit according to the sign,
e.g. zoned BCD.
The negative representation of each digit is in the left half of the
table, the positive in the right.
If you want separate (or no) sign, the table is setup with identical
values in both halves, and
software can test the M (and  perhaps N) bit to decide what to append
using the byte pointer
in AC+4/5. (The pointer is setup for IDPB.)

M (Minus, bit 2 = 1000000,,0) reflects the sign bit.  L (400000,,0)
controls leading fill.

The KS microcode agrees:

; 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)

(Lowercase comments) are new.

The patch should be accepted.

Thanks.

> On Thu, Oct 27, 2016 at 10:55 PM, Pascal Parent <pascguyz at gmail.com
> <mailto:pascguyz at gmail.com>> wrote:
>
>     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.
>
>     I also installed Cobol 12C from the same tape on the Panda
>     Distribution using the KLH10 emulator. There the test is successful.
>
>     See the from both systems below.
>
>     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:
>
>     "PDP-10 simulator V4.0-0 Beta        git commit id: cf1e7b9c"
>
>     Let me know if there is any other information I can provide that
>     would be useful.
>
>     Thank you,
>     Pascal.
>
>     =========
>     SIMH Test
>     =========
>
>     @CONNECT <UETP.LIB>
>      PS:<OPERATOR> Over working storage allocation by 509 page(s).
>     @GET SYS:CBL74
>     @INF VER
>      PGP TOPS-20 V4.1, TOPS-20 Monitor 4.1(5471)
>      TOPS-20 Command processor 5.1(1354)
>      Program is CBL74, version is 12.3(1574)
>     @START
>
>     *=XT7409
>
>     0246                    NUM OF B (1 SC1 SD1) ROUNDED
>                             ^
>
>     CBL218 Rounding not necessary.
>
>     0258                    NUM OF B (SD1 SC1 2) ROUNDED
>                             ^
>
>     CBL218 Rounding not necessary.
>
>     0436            MOVE CORR 2L OF A(SC2 1) TO 2L OF B (2 SD0 + 2).
>                     ^
>
>     CBL105 No CORRESPONDING elements.
>
>     0660                    NUM OF B (SC1 + 1 SD2 - 1 SD1) ROUNDED
>                             ^
>
>     CBL218 Rounding not necessary.
>
>     0675                    NUM OF B (SD2 SC2 - 1 SD2 - 1) ROUNDED
>                             ^
>
>     CBL218 Rounding not necessary.
>
>
>     WARNINGS:
>
>     0246  CBL502 Most significant digits truncated on NUM
>     0247  CBL502 Most significant digits truncated on NUM
>     0248  CBL502 Most significant digits truncated on NUM
>     0285  CBL502 Most significant digits truncated on NUM
>     0362  CBL502 Most significant digits truncated on TALLY
>     0370  CBL502 Most significant digits truncated on TALLY
>     0447  CBL502 Most significant digits truncated on NUM
>     0459  CBL502 Most significant digits truncated on NUM
>     0573  CBL501 Right-most truncation on AN
>     0576  CBL501 Right-most truncation on AN
>     0579  CBL501 Right-most truncation on AN
>     0617  CBL502 Most significant digits truncated on NUM
>     0716  CBL501 Right-most truncation on AN
>     No Fatal Errors, 18 Warnings
>
>     *=XT749S
>
>
>     *^C
>     @LOAD XT7409.REL,XT749S.REL
>     LINK:   Loading
>
>     EXIT
>     @SAVE CBL74T.EXE
>      CBL74T.EXE.1 Saved
>     @RUN CBL74T.EXE
>     ? TABLE A CANNOT BE CORRECTLY INITIALIZED.
>       TABLE SHOULD CONTAIN:
>     ####AA#BB01#01###CC#DD04#08####EE#FF09#27###GG#HH16#64#
>       TABLE INSTEAD CONTAINS:
>     ####AA#BB0J#0J###CC#DD0M#0Q####EE#FF0R#2P###GG#HH1O#6M#
>     TEST TERMINATED EARLY.
>
>     EXIT
>     @
>
>     ==========
>     KLH10 TEST
>     ==========
>
>     $CONNECT <UETP.LIB>
>     $GET SYS:CBL74
>     $inf ver
>      Panda Distribution, PANDA TOPS-20 Monitor 7.1(21733)-4
>      PANDA TOPS-20 Command processor 7.1(4453)-4
>      Program is CBL74, version is 12.3(1574)
>     $start
>
>     *=XT7409
>
>     0246   NUM OF B (1 SC1 SD1) ROUNDED
>                           ^
>
>     CBL218 Rounding not necessary.
>
>     0258   NUM OF B (SD1 SC1 2) ROUNDED
>                           ^
>
>     CBL218 Rounding not necessary.
>
>     0436   MOVE CORR 2L OF A(SC2 1) TO 2L OF B (2 SD0 + 2).
>                   ^
>
>     CBL105 No CORRESPONDING elements.
>
>     0660   NUM OF B (SC1 + 1 SD2 - 1 SD1) ROUNDED
>                           ^
>
>     CBL218 Rounding not necessary.
>
>     0675   NUM OF B (SD2 SC2 - 1 SD2 - 1) ROUNDED
>                           ^
>
>     CBL218 Rounding not necessary.
>
>
>     WARNINGS:
>
>     0246  CBL502 Most significant digits truncated on NUM
>     0247  CBL502 Most significant digits truncated on NUM
>     0248  CBL502 Most significant digits truncated on NUM
>     0285  CBL502 Most significant digits truncated on NUM
>     0362  CBL502 Most significant digits truncated on TALLY
>     0370  CBL502 Most significant digits truncated on TALLY
>     0447  CBL502 Most significant digits truncated on NUM
>     0459  CBL502 Most significant digits truncated on NUM
>     0573  CBL501 Right-most truncation on AN
>     0576  CBL501 Right-most truncation on AN
>     0579  CBL501 Right-most truncation on AN
>     0617  CBL502 Most significant digits truncated on NUM
>     0716  CBL501 Right-most truncation on AN
>     No Fatal Errors, 18 Warnings
>
>     *=XT749S
>
>
>     *^C
>     $LOAD XT7409.REL,XT749S.REL
>     LINK:Loading
>     $SAVE CBL74T.EXE
>      CBL74T.EXE.4 Saved
>     $RUN CBL74T.EXE
>     ACCEPT TEST
>     TYPE X<CR> TWICE
>     X
>     X
>     TYPE 1<CR> TWICE
>     1
>     1
>     ADD TEST
>     COMPUTE TEST
>     DISPLAY TEST
>     DISPLAY FAILS IF NEXT TWO LINES ARE NOT IDENTICAL
>     AA BB CC DD
>     AA BB CC DD
>     DIVIDE TEST
>     inspect TEST
>     GO ... DEP TEST
>     MOVE TEST
>     MULTIPLY TEST
>     PERFORM TEST
>     STARTING VARIABLE PERFORM TEST 1
>       PERFORM TEST 1 FINISHED
>     STARTING VARIABLE PERFORM TEST 2
>       PERFORM TEST 2 FINISHED
>     STARTING VARIABLE PERFORM TEST 3
>       PERFORM TEST 3 FINISHED
>     STARTING VARIABLE PERFORM TEST 4
>       PERFORM TEST 4 FINISHED
>     WRITE TEST
>     READ TEST
>     RELEASE & RETURN TEST
>     SEARCH TEST
>     SET TEST
>     SUBTRACT TEST
>     END OF TESTS
>
>     EXIT
>     $
>
>
>
>
> _______________________________________________
> Simh mailing list
> Simh at trailing-edge.com
> http://mailman.trailing-edge.com/mailman/listinfo/simh

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20161105/0e1223af/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4577 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20161105/0e1223af/attachment-0001.bin>


More information about the Simh mailing list