CAC 2015-09-26

cds padb1 error

cds tty_buf
CDS - PL/1 33e
create_data_segment_: A level 2 element, padb1, is not word aligned and cannot be turned into an entrypoint.

New theory.

That error check is only in the MR12.5 version of create_data_segment_.pl1.

It it the case that the MR12.5 MST tty_buf segment was generated by MR12.3 create_data_segment?

Looking at MR12.5 hardcore.list.1, header ' Generation of System MR12.5 on Tape MR12.5-118-6_MST,den=1600 at 92-10-29_2334.00_Thu_mst'

It contains:

          NAME                     DATE CHANGED         AUTHOR              LANG          PATHNAME
tty_buf                           11/11/89  1004.6  Hirneisen.SysMaint.a    cds         >ldd>hard>execution

Looking at MR12.3 hardcore.list, header 'Generation of System MR12.3mu on Tape m3745_mastmult,den=1600 at 11/14/89 0931.4 mst Tue'

tty_buf                           11/11/89  1004.6  Hirneisen.SysMaint.a    cds         >ldd>hard>execution

tty_buf was not recompiled for the MR12.5 release; is it possible that it is not compatible with the 12.5 cds?

Dates:
MR12.3 MST created 11/14/89
MR12.5 MST created 92-10-2

The only segments on the MR12.5 MST created ater 11/11/89 are

sed < ./library_dir_dir/system_library_1/info/hardcore.list.*i -e 's?/? ?g' | sort -n -k 2 | sort -k 3 -n | sort -k 4 -n

  any_to_any_                     10 01 90  1526.2  Fudge.SysMaint.a        alm
bound_dir_control                 08 21 90  1412.7  Fudge.SysMaint.a        binder      >ldd>hard>execution
bound_file_system                 08 22 90  0744.8  Fudge.SysMaint.a        binder      >ldd>hard>execution
bound_hc_initlzr_auxl_            08 16 90  1129.2  Fudge.SysMaint.a        binder      >ldd>hard>execution
bound_library_wired_              10 04 90  1421.0  Fudge.SysMaint.a        binder      >ldd>hard>execution
bound_page_control                10 01 90  1530.2  Fudge.SysMaint.a        binder      >ldd>hard>execution
bound_system_security             10 14 90  0945.6  Fudge.SysMaint.a        binder      >ldd>hard>execution
bound_tty_active                  08 16 90  1126.2  Fudge.SysMaint.a        binder      >ldd>hard>execution                         
  dc_find                         10 14 90  0942.1  Fudge.SysMaint.a        PL I        
  disk_control                    10 01 90  1526.8  Fudge.SysMaint.a        PL I        
  disk_error_data                 10 01 90  1527.8  Fudge.SysMaint.a        cds         
  fs_get                          08 21 90  1349.2  Fudge.SysMaint.a        PL I        
  lv_request_                     08 16 90  1123.2  Fudge.SysMaint.a        PL I        
  ref_name_                       08 21 90  1349.0  Fudge.SysMaint.a        PL I        
  reload_volume_                  10 14 90  0943.1  Fudge.SysMaint.a        PL I        
  rldr_input_                     10 17 90  1036.5  Fudge.SysMaint.a        PL I        
  sc_init_                        10 17 90  1037.5  Fudge.SysMaint.a        PL I        
  tty_write                       08 16 90  1122.6  Fudge.SysMaint.a        PL I        
bound_hc_tuning                   10 23 92  0927.8  WAAnderson.SysMaint.a   binder      >ldd>hard>execution                         
bound_rcprm_                      10 27 92  1455.9  WAAnderson.SysMaint.a   binder      >ldd>hard>execution                         
bound_segment_control             10 23 92  0928.1  WAAnderson.SysMaint.a   binder      >ldd>hard>execution                         
bound_system_control_             03 03 92  1551.9  Schroth.SysMaint.a      binder      >ldd>hard>execution                         
bound_volume_reloader_            10 21 92  1525.0  WAAnderson.SysMaint.a   binder      >ldd>hard>execution                         
  force_write                     10 23 92  0926.2  WAAnderson.SysMaint.a   PL I        
  rcprm_journalize_               10 27 92  1453.8  WAAnderson.SysMaint.a   PL I        
  rldr_arg_reader_                10 21 92  1523.5  WAAnderson.SysMaint.a   PL I        
  rldr_label_                     10 21 92  1523.8  WAAnderson.SysMaint.a   PL I        
  rldr_volume_map_                04 27 92  1229.6  Schroth.SysMaint.a      PL I        
  rldr_vtoc_header_               04 27 92  1229.3  Schroth.SysMaint.a      PL I        
  sc_admin_command_               03 03 92  1548.5  Schroth.SysMaint.a      PL I        
  segment_mover                   10 23 92  0925.0  WAAnderson.SysMaint.a   PL I

Reworked script to use 12.3 build tools to build 12.3 era segments.

bootload_info

Expected differences

bce_data

>user_dir_dir>SysEng>Anthony>fromSource>work>tmp>bce_data:  (segment 1)
11/11/89  1036.6 pdt Sat    cds

>user_dir_dir>SysEng>Anthony>fromSource>work>bce_data:  (segment 2)
09/26/93  1341.6 pdt Sun    cds

Lengths of the symb section of the 2 segments do not agree.
>user_dir_dir>SysEng>Anthony>fromSource>work>tmp>bce_data : 107
>user_dir_dir>SysEng>Anthony>fromSource>work>bce_data : 106
The discrepancy is trivial

**Internal Static Discrepancies

Location              Segment 1           Segment 2

10                  001645400043        000376400043
11                  000000000046        000000000040
13                  411776001700        315537712230
17                  076163160145        076165163145
33                  041746000000        015666000000
54                  400000000000        000000000000

double_sine

>user_dir_dir>SysEng>Anthony>fromSource>work>tmp>double_sine_:  (segment 1)
11/11/89  0945.4 pdt Sat    alm

>user_dir_dir>SysEng>Anthony>fromSource>work>double_sine_:  (segment 2)
09/26/93  1345.4 pdt Sun    alm

Lengths of the symb section of the 2 segments do not agree.
>user_dir_dir>SysEng>Anthony>fromSource>work>tmp>double_sine_ : 115
>user_dir_dir>SysEng>Anthony>fromSource>work>double_sine_ : 123
The discrepancy is trivial

**Text discrepancies between the 2 segments have been found.

>user_dir_dir>SysEng>Anthony>fromSource>work>tmp>double_sine_:
000176  aa     002400000000
Changed to:
>user_dir_dir>SysEng>Anthony>fromSource>work>double_sine_:
000176  aa     001000000000
The original has 002400000000, my build has 002400000000.

The listing file:

    000176  aa   001000 000000     224  p0:       dec        9.9999999999999999998d-1     " this rounds to 1.0d0
    000177  aa   000000 000000

According to the comment my build is right....

According to the checker, it was built in `90, before the 12.5 release; trying the 12.3 build tools...

No joy; sill different.

Looking at the MIT listing...

    000176  aa   002400 000000     224  p0:       dec        9.9999999999999999998d-1     " this rounds to 1.0d0

00240000000

000 000 010 1000 000 000 ....

8 bits exp.

00000001 0 1000000000 ....

exp, is 1, sign is +, mantissa is 0.5.  0.5*2^1 is 1.0, so my code is wrong.

p0:       dec        9.9999999999999999998d-1
          end

    000000  aa   001000 000000       1  p0:       dec        9.9999999999999999998d-1

Simple example has the same behavior.

But I can't run alm on the console :(

  asl = 9.9999999999999999998e-1;

000013  aa   777767 4330 04   dfld      -9,ic               000002 = 00100000000

Cool; I can make pl1 do it.
DBG(124302610)> CPU TRACE:     005273  aa  1 00000 4571 00   4689     dfst      target|0                      " store away
DBG(124302610)> CPU TRACE: 00314:052645 4 100000457100 (DFST PR1|0) 100000 457(0) 1 0 0 00
DBG(124302610)> CPU APPENDING: Write(Actual) Write: iefpFinalAddress=66663140 writeData=001000000000
DBG(124302610)> CPU APPENDING: Write(Actual) Write: iefpFinalAddress=66663141 writeData=000000000000
DBG(124302610)> CPU REGDUMPAQI: A=400000000000 Q=000000000117 IR:~BAR OMASK
DBG(124302610)> CPU REGDUMPFLT: E=000 A=400000000000 Q=000000000117 -1

    005271                        4686  put_flt_bin_2:                          " target store double precision
    005271  aa   000077 2220 03   4687            ldx2      63,du                         " round precision
    005272  0a   005333 7010 00   4688            tsx1      load_rounded_flt_bin
    005273  aa  1 00000 4571 00   4689            dfst      target|0                      " store away
    005274  aa  1 00002 3515 00   4690            epp       target,target|2               " update target pointer
    005275  aa  7 00000 7101 00   4691            tra       pr7|0                         " return

working backwards...

    005333                        4742  load_rounded_flt_bin:
    005333  aa  5 00012 2351 00   4743            lda       work|flt_bin_generic_exp

DBG(124302572)> CPU TRACE:     005333  aa  5 00012 2351 00   4743     lda       work|flt_bin_generic_exp
DBG(124302572)> CPU TRACE: 00314:052705 4 500012235100 (LDA PR5|12) 500012 235(0) 1 0 0 00
DBG(124302572)> CPU APPENDING: Read (Actual) Read:  iefpFinalAddress=66660202  readData=000000000000

    005334  aa   000034 7350 00   4744            als       36-8                          " make short exponent
    005335  0a   006233 6030 00   4745            trc       flt_range_error               " won't fit
    005336  aa  5 00012 7551 00   4746            sta       work|flt_bin_generic_exp

DBG(124302578)> CPU TRACE:     005336  aa  5 00012 7551 00   4746     sta       work|flt_bin_generic_exp
DBG(124302578)> CPU TRACE: 00314:052710 4 500012755100 (STA PR5|12) 500012 755(0) 1 0 0 00
DBG(124302578)> CPU APPENDING: Write(Actual) Write: iefpFinalAddress=66660202 writeData=000000000000

    005337  aa  5 00006 2371 00   4747            ldaq      work|flt_bin_generic          " get mantissa

DBG(124302580)> CPU TRACE:     005337  aa  5 00006 2371 00   4747     ldaq      work|flt_bin_generic          " get mantissa
DBG(124302580)> CPU TRACE: 00314:052711 4 500006237100 (LDAQ PR5|6) 500006 237(0) 1 0 0 00
DBG(124302580)> CPU APPENDING: Read (Actual) Read:  iefpFinalAddress=66660176  readData=377777777777
DBG(124302580)> CPU APPENDING: Read (Actual) Read:  iefpFinalAddress=66660177  readData=777777777720

    005340  aa  5 00012 4111 00   4748            lde       work|flt_bin_generic_exp      " get exponent

DBG(124302582)> CPU TRACE:     005340  aa  5 00012 4111 00   4748     lde       work|flt_bin_generic_exp      " get exponent
DBG(124302582)> CPU TRACE: 00314:052712 4 500012411100 (LDE PR5|12) 500012 411(0) 1 0 0 00
DBG(124302582)> CPU APPENDING: Read (Actual) Read:  iefpFinalAddress=66660202  readData=000000000000
DBG(124302582)> CPU REGDUMPAQI: A=377777777777 Q=777777777720 IR:~BAR OMASK
DBG(124302582)> CPU REGDUMPFLT: E=000 A=377777777777 Q=777777777720 1

1; that's what we wanted... (actually very, very close to 1)

    005341  aa   000000 5730 00   4749            fno                                     " find 0.0

DBG(124302584)> CPU TRACE:     005341  aa   000000 5730 00   4749     fno                                     " find 0.0
DBG(124302584)> CPU TRACE: 00314:052713 4 000000573000 (FNO 000000) 000000 573(0) 0 0 0 00
DBG(124302584)> CPU REGDUMPAQI: A=377777777777 Q=777777777720 IR:~BAR OMASK
DBG(124302584)> CPU REGDUMPFLT: E=000 A=377777777777 Q=777777777720 1

still good

    005342  aa   000000 6000 11   4750            tze       0,x1                          " cannot round
    005343  aa   000000 1050 03   4751            cmpx5     0,du
    005344  aa   000000 6000 11   4752            tze       0,x1                          " no round
                                  4753
    005345  aa  5 00012 7421 00   4754            stx2      work|flt_bin_generic_exp      " two word mask entries

DBG(124302592)> CPU TRACE:     005345  aa  5 00012 7421 00   4754     stx2      work|flt_bin_generic_exp      " two word mask entries
DBG(124302592)> CPU TRACE: 00314:052717 4 500012742100 (STX2 PR5|12) 500012 742(0) 1 0 0 00
DBG(124302592)> CPU APPENDING: Write(Actual) Write: iefpFinalAddress=66660202 writeData=000077000000

 "         x2 = precision to round to.
X2 = 077 (63)
Correct (63 bit mantissa + sign + 8 bit exp. = 72 bits)

    005346  aa   000000 6230 12   4755            eax3      0,x2

X3 = 77

    005347  aa  5 00012 0631 00   4756            adx3      work|flt_bin_generic_exp

DBG(124302596)> CPU TRACE:     005347  aa  5 00012 0631 00   4756     adx3      work|flt_bin_generic_exp
DBG(124302596)> CPU TRACE: 00314:052721 4 500012063100 (ADX3 PR5|12) 500012 063(0) 1 0 0 00
DBG(124302596)> CPU APPENDING: Read (Actual) Read:  iefpFinalAddress=66660202  readData=000077000000

X3 = 176 (126) precision * 2

    005350  aa   000000 1150 03   4757            cmpa      0,du
    005351  0a   005356 6040 00   4758            tmi       load_rounded_flt_bin.negative
    005352  0a   010410 0770 13   4759            adaq      mask_table+2,x3               " round

DBG(124302600)> CPU REGDUMPAQI: A=377777777777 Q=777777777720 IR:~BAR OMASK Carry

DBG(124302602)> CPU TRACE:     005352  0a   010410 0770 13   4759     adaq      mask_table+2,x3               " round
DBG(124302602)> CPU TRACE: 00314:052724 4 055762077013 (ADAQ 055762,3) 055762 077(0) 0 0 0 13
DBG(124302602)> CPU APPENDING: Read (Actual) Read:  iefpFinalAddress=77414160  readData=000000000000
DBG(124302602)> CPU APPENDING: Read (Actual) Read:  iefpFinalAddress=77414161  readData=000000000177
DBG(124302602)> CPU REGDUMPAQI: A=400000000000 Q=000000000117 IR:~BAR OMASK Ovr Neg
DBG(124302602)> CPU REGDUMPFLT: E=000 A=400000000000 Q=000000000117 -1

Oops...

I would think that to round at 63 bits of precision, one would add 1. Ah; the number is in EAQ, so 63 of the 71 bits leaves
8 bits; so it is adding 1/2; that makes sense. It is setting overflow

                                  4760
                                  4761  "     Normalize to recover any possible overflow situation.
                                  4762
    005353  aa   000000 5730 00   4763            fno

So the overflow detector in fno should save us...
DBG(124302604)> CPU TRACE: 00314:052725 bound_library_wired_:any_to_any_+05353
DBG(124302604)> CPU TRACE:     005353  aa   000000 5730 00   4763     fno
DBG(124302604)> CPU TRACE: 00314:052725 4 000000573000 (FNO 000000) 000000 573(0) 0 0 0 00
DBG(124302604)> CPU REGDUMPAQI: A=400000000000 Q=000000000117 IR:~BAR OMASK
DBG(124302604)> CPU REGDUMPFLT: E=000 A=400000000000 Q=000000000117 -1

It did save us, but the fix is wrong... it should have fixed is to 1.

    005354  aa   004000 6340 07   4764            ldi       mask_faults,dl                " clear possible overflow
    005355  aa   000000 7100 11   4765            tra       0,x1

Hmmm. fno doesn't actually change AQ on overflow. fix.

hello$world
-0.5

Not there yet; closer tho.

Get that sign bit right.

hello$world
1.

config_deck_data

>user_dir_dir>SysEng>Anthony>fromSource>work>tmp>config_deck_data_:  (segment 1)
11/11/89  1029.6 pdt Sat    cds

>user_dir_dir>SysEng>Anthony>fromSource>work>config_deck_data_:  (segment 2)
09/26/93  1354.8 pdt Sun    cds

Lengths of the symb section of the 2 segments do not agree.
>user_dir_dir>SysEng>Anthony>fromSource>work>tmp>config_deck_data_ : 217
>user_dir_dir>SysEng>Anthony>fromSource>work>config_deck_data_ : 220
The discrepancy is trivial

**Text discrepancies between the 2 segments have been found.

>user_dir_dir>SysEng>Anthony>fromSource>work>tmp>config_deck_data_:
002614  aa     000003400043
Changed to:
>user_dir_dir>SysEng>Anthony>fromSource>work>config_deck_data_:
002614  aa     000002400043
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License