User Tools

Site Tools


ibm:ibm1130-lib:dmsr2v12:t1xsqr_lst

T1XSQR

Table Of Contents
  • [00022] CALL XSQR -V1.
t1xsqr.lst
ASM1130 CROSS ASSEMBLER V1.22 -- V2M12 -- Sun Nov  1 19:25:08 2020
 
Source File: \t1xsqr.asm 
                             1 | *************************************************** T1C00010
                             2 | *                                                 * T1C00020
                             3 | *   SUBROUTINE NAME-                              * T1C00030
                             4 | *      FULL NAME- FIXED-POINT (FRACTIONAL) SQUARE * T1C00040
                             5 | *         ROOT FUNCTION                           * T1C00050
                             6 | *      CODE NAME- XSQR                            * T1C00060
                             7 | *   PURPOSE- THIS SUBPROGRAM COMPUTES THE SQUARE  * T1C00070
                             8 | *      ROOT OF A FIXED POINT ONE-WORD FRACTIONAL  * T1C00080
                             9 | *      NUMBER.                                    * T1C00090
                            10 | *   METHOD-SEE IBM 1130 SUBROUTINE LIBRARY MANUAL.* T1C00100
                            11 | *   CAPABILITIES AND LIMITATIONS- SEE IBM 1130    * T1C00110
                            12 | *      SUBROUTINE LIBRARY MANUAL.                 * T1C00120
                            13 | *   SPECIAL FEATURES- N/A                         * T1C00130
                            14 | *   ADDITIONAL INFORMATION-                       * T1C00140
                            15 | *      ESTIMATED EXECUTION TIME- SEE IBM 1130     * T1C00150
                            16 | *         SUBROUTINE LIBRARY MANUAL               * T1C00160
                            17 | *                                                 * T1C00170
                            18 | *************************************************** T1C00180
CALL XSQR  -V1.
 
                            20 |       ENT     XSQR                                  T1C00200
0000 0000                   21 | XSQR  DC      *-*       ENTRY/RETURN ADDRESS        T1C00210
0001 D022                   22 |       STO     A         SAVE ARGUMENT (BINARY POINT T1C00220
0002 4C10 0008R             23 |       BSC  L  OK,-      BETWEEN SIGN AND ONE BIT)   T1C00230
0004 1010                   24 |       SLA     16        IF ARGUMENT IS NEGATIVE,    T1C00240
0005 901E                   25 |       S       A         USE MAGNITUDE AND TURN ON   T1C00250
0006 D01D                   26 |       STO     A         OVERFLOW INDICATOR.         T1C00260
0007 2003                   27 |       LDS     3                                     T1C00270
0008 4C08 001FR             28 | OK    BSC  L  XSQX,+    SHORT CUT FOR 0.0 AND -1.0  T1C00280
000A 6912                   29 |       STX   1 EXIT+1    SAVE XR1                    T1C00290
000B 610F                   30 |       LDX   1 15        SET CTR FOR TABLE REF.      T1C00300
000C C017                   31 |       LD      A         INITIAL APPROXIMATION       T1C00310
000D 1140                   32 |       SLCA  1           IS A FUNCTION OF            T1C00320
000E C500 0025R             33 |       LD   L1 TABLE     LEADING ZERO BITS.          T1C00330
0010 D012                   34 | LOOP  STO     FN        SAVE APPROXIMATION          T1C00340
0011 A011                   35 |       M       FN        CALC AN EXPRESSION CALLED   T1C00350
0012 1081                   36 |       SLT     1         ERROR.                      T1C00360
0013 9010                   37 |       S       A         ERROR=FN*FN-A               T1C00370
0014 1882                   38 |       SRT     2         DIV BY 2,ADJUST BINARY PT.  T1C00380
0015 A80D                   39 |       D       FN        DELTA=0.5*ERROR/FN          T1C00390
0016 4C08 001CR             40 |       BSC  L  EXIT,+    EXIT WHEN DELTA=0.0         T1C00400
0018 D009                   41 |       STO     DELTA     OTHERWISE SAVE DELTA        T1C00410
0019 C009                   42 |       LD      FN        MODIFY THE APPROXIMATION    T1C00420
001A 9007                   43 |       S       DELTA     BY DELTA.FN=FN-DELTA.       T1C00430
001B 70F4                   44 |       MDX     LOOP      REPEAT LOOP                 T1C00440
001C 6500 0000              45 | EXIT  LDX  L1 *-*       RESTORE XR1                 T1C00450
001E C004                   46 |       LD      FN        PUT RESULT IN ACC           T1C00460
001F 4C80 0000R             47 | XSQX  BSC  I  XSQR      RETURN TO MAIN PROG         T1C00470
                            48 | *                                                   T1C00480
                            49 | *CONSTANTS AREA                                     T1C00490
                            50 | *                                                   T1C00500
0022                        51 |       BSS  E  0                                     T1C00510
0022 0000                   52 | DELTA DC      0         MODIFICATION BUFFER         T1C00520
0023 0000                   53 | FN    DC      0         APPROXIMATION BUFFER        T1C00530
0024 0000                   54 | A     DC      0         SAVE INPUT MAGNITUDE        T1C00540
0025 00B6                   55 | TABLE DC      /00B6     0   TABLE OF INITIAL APPROX T1C00550
0026 013A                   56 |       DC      /013A     1   IMATIONS BASED ON THE   T1C00560
0027 01DF                   57 |       DC      /01DF     2   NUMBER OF INITIAL ZEROS T1C00570
0028 02BE                   58 |       DC      /02BE     3   IN THE INPUT ARGUMENT.  T1C00580
0029 03F0                   59 |       DC      /03F0     4                           T1C00590
002A 059D                   60 |       DC      /059D     5                           T1C00600
002B 07F8                   61 |       DC      /07F8     6                           T1C00610
002C 0B4B                   62 |       DC      /0B4B     7                           T1C00620
002D 0FFC                   63 |       DC      /0FFC     8                           T1C00630
002E 169E                   64 |       DC      /169E     9                           T1C00640
002F 1FFE                   65 |       DC      /1FFE     10                          T1C00650
0030 2D40                   66 |       DC      /2D40     11                          T1C00660
0031 3FFF                   67 |       DC      /3FFF     12                          T1C00670
0032 5A82                   68 |       DC      /5A82     13                          T1C00680
0033 7FFF                   69 |       DC      /7FFF     14                          T1C00690
0034                        70 |       END                                           T1C00700
 
There were no errors in this assembly
 
=== CROSS REFERENCES ==========================================================
Name  Val   Defd  Referenced
A     0024R   54   22   25   26   31   37
DELTA 0022R   52   41   43
EXIT  001CR   45   29   40
FN    0023R   53   34   35   39   42   46
LOOP  0010R   34   44
OK    0008R   28   23
TABLE 0025R   55   33
XSQR  0000R   21   47
XSQX  001FR   47   28
ibm/ibm1130-lib/dmsr2v12/t1xsqr_lst.txt ยท Last modified: 2023/08/06 13:34 by Site Administrator