Dennis

> > If you send me source code I'll run it on my simulator and let you know
>  > whether that fixes the issue.
>
> I appreciate the offer.  The formats I have are somewhat less than
> convenient, but I'll provide a variety of bits at the end of this
> message.  I should point out that I've actually been using the Prime
> assembler (PMA) in 16S mode, and that its column which shows machine
> code in octal is, um, odd.

So recast in DAP (the Honeywell assembler) I get:
                                 ABS                           PAGE    1



    0001                         ABS
    0002                    *    D16S
    0003                    *    SDM   0
    0004                         ORG   '1000
    0005 01000   34 0104    HW   SKS   '104
    0006 01001   0 01 01000      JMP   HW
    0007 01002   14 0104         OCP   '104
    0008 01003   0 35 01036 LOOP LDX   IXR
    0009 01004   1 02 01026      LDA   MSG,1
    0010 01005   141340          ICA
    0011 01006   141050          CAL
    0012                    *    JST   CHAROUT
    0013 01007   0 10 01022      JST   CHRT
    0014 01010   1 02 01026      LDA   MSG,1
    0015 01011   141050          CAL
    0016                    *    JST   CHAROUT
    0017 01012   0 10 01022      JST   CHRT
    0018 01013   0 02 01036      LDA   IXR
    0019                    *    A1A
    0020 01014   141206          AOA
    0021 01015   0 04 01036      STA   IXR
    0022 01016   0 11 01035      CAS   LEN
    0023 01017   000000          HLT
    0024 01020   000000          HLT
    0025 01021   0 01 01003      JMP   LOOP
    0026                    *
    0027                    *CHAROUT   DAC               **
    0028 01022   0 000000   CHRT DAC   **
    0029 01023   74 0004    OTL2 OTA   4
    0030 01024   0 01 01023      JMP   OTL2
    0031                    *    JMP   CHAROUT,*
    0032 01025  -0 01 01022      JMP*  CHRT
    0033                    *
    0034                    *MSG BCI   'HELLO WORLD!'
    0035 01026   144305     MSG  BCI   6,HELLO WORLD!
         01027   146314
         01030   147640
         01031   153717
         01032   151314
         01033   142241
    0036 01034   106612          OCT   '106612
    0037 01035   0 000007   LEN  DAC   *-MSG
    0038 01036   000000     IXR  OCT   0
    0039                         END   HW

    CHRT   001022A   HW     001000A   IXR    001036A   LEN    001035A
    LOOP   001003A   MSG    001026A   OTL2   001023A

    0000 WARNING OR ERROR FLAGS
    DAP-16 MOD 2    REV. C    01-26-71

Which, when run, gives the correct output and you see the trace output corresponding to the one you gave in your original message gives the correct results. (My simulator only prints the computed effective address where some actual "computation" is required, which it isn't if LDX operates as it should, so you don't actually see the address that is erroneously computed by simh.):

> h16 -t
h16 1.4.9 Fri Apr  2 07:55:49 BST 2010
Copyright (c) 1997, 1998, 1999, 2004, 2005, 2006, 2007, 2008, 2009 Adrian Wise
h16 is free software, covered by the GNU General
Public License, and you are welcome to change it and/or
distribute copies of it under certain conditions.
Type "license" or "warranty" for details

MON: A:000000 B:000000 X:000000 000000  000000    HLT
MON> g'1
PTR: Filename>h316_hw16s.ptp

MON: A:000000 B:000000 X:013400 013633  0 04 0024 STA  '000024
MON> g'1000
HELLO WORLD!

MON: A:000007 B:000000 X:000006 001021  0 01 1003 JMP  '001003
MON> t,300
<snip>
A:000314 B:000000 X:000001 C:0 001023  74 0004   OTA  '0004
A:000314 B:000000 X:000001 C:0 001024  0 01 1023 JMP  *-1
A:000314 B:000000 X:000001 C:0 001023  74 0004   OTA  '0004
A:000314 B:000000 X:000001 C:0 001025 -0 01 1022 JMP* '001022='001013
A:000001 B:000000 X:000001 C:0 001013  0 02 1036 LDA  '001036
A:000002 B:000000 X:000001 C:0 001014  141206    AOA
A:000002 B:000000 X:000001 C:0 001015  0 04 1036 STA  '001036
A:000002 B:000000 X:000001 C:0 001016  0 11 1035 CAS  '001035
A:000002 B:000000 X:000001 C:0 001021  0 01 1003 JMP  '001003
A:000002 B:000000 X:000002 C:0 001003  1 15 1036 LDX  '001036
A:147640 B:000000 X:000002 C:0 001004  1 02 1026 LDA  '001026,1='001030
<snip>

Adrian
_______________________________________________
Simh mailing list
[email protected]
http://mailman.trailing-edge.com/mailman/listinfo/simh

Reply via email to