RealControl.bcd, version "65124ead2ac1" (31-Oct-59 3:42:37, 145#22#) source 27-Aug-82 13:16:56 creator "6363000c0007" (11-Feb-37 5:54:20, 143#143#) Global frame size: 4 -- PilotRealControl.mesa -- Last Modified, Stewart, August 27, 1982 1:15 pm -- Microcode to Mesa floating point translater DIRECTORY Frame USING [MyLocalFrame], Ieee USING [InitIeee], MiscAlpha, PrincOps USING [StateVector, UnboundLink], Real, RealOps, SDDefs USING [SD, sFADD, sFSUB, sFMUL, sFDIV, sFCOMP, sFIX, sFLOAT], TrapSupport USING [BumpPC, opTrapTable]; Entry point: 0, Frame size: 7 RealControl: PROGRAM IMPORTS Frame, Ieee, RealOps, TrapSupport EXPORTS Real, RealOps = BEGIN microSticky: CARDINAL ← 0; 116: LI0 117: SG0 InitReals[]; END. L. Stewart, December 11, 1980 11:37 AM, modify for Pilot from RealControl.mesa L. Stewart, 4-Feb-81 18:31:04, change to new trap handling L. Stewart, 6-Feb-81 10:40:32, update trap procedure style R. Atkinson, 23-Mar-81 16:10:36, replaced Frame.MyLocalFrame[] with [frame[Frame.MyLocalFrame[]]] L. Stewart, June 3, 1982 11:11 am, added FScale and SqRt, removed SETS L. Stewart, August 27, 1982 1:15 pm, SAFE 120: LFC2 121: RET Instructions: 4, Bytes: 4 InitReals: PUBLIC SAFE PROC = TRUSTED { OPEN SDDefs, TrapSupport; Entry point: 2, Frame size: 7 SD[sFADD] ← SD[sFSUB] ← SD[sFMUL] ← SD[sFDIV] ← SD[sFCOMP] ← SD[sFIX] ← SD[sFLOAT] ← PrincOps.UnboundLink; 122: LI1 123: LIW 1100 126: NILCK 127: WB 136 131: PUSH 132: LIW 1100 135: NILCK 136: WB 135 140: PUSH 141: LIW 1100 144: NILCK 145: WB 134 147: PUSH 150: LIW 1100 153: NILCK 154: WB 133 156: PUSH 157: LIW 1100 162: NILCK 163: WB 132 165: PUSH 166: LIW 1100 171: NILCK 172: WB 131 174: PUSH 175: LIW 1100 200: NILCK 201: WB 130 opTrapTable.misc[MiscAlpha.aFADD] ← LOOPHOLE[TFAdd]; 203: DESCB 6 205: LIW 1237 210: R0 211: NILCK 212: LIW 420 215: ADD 216: W0 opTrapTable.misc[MiscAlpha.aFSUB] ← LOOPHOLE[TFSub]; 217: DESCB 10 221: LIW 1237 224: R0 225: NILCK 226: LIW 421 231: ADD 232: W0 opTrapTable.misc[MiscAlpha.aFMUL] ← LOOPHOLE[TFMul]; 233: DESCB 12 235: LIW 1237 240: R0 241: NILCK 242: LIW 422 245: ADD 246: W0 opTrapTable.misc[MiscAlpha.aFDIV] ← LOOPHOLE[TFDiv]; 247: DESCB 14 251: LIW 1237 254: R0 255: NILCK 256: LIW 423 261: ADD 262: W0 opTrapTable.misc[MiscAlpha.aFCOMP] ← LOOPHOLE[TFComp]; 263: DESCB 16 265: LIW 1237 270: R0 271: NILCK 272: LIW 424 275: ADD 276: W0 opTrapTable.misc[MiscAlpha.aFIX] ← LOOPHOLE[TFix]; 277: DESCB 20 301: LIW 1237 304: R0 305: NILCK 306: LIW 425 311: ADD 312: W0 opTrapTable.misc[MiscAlpha.aFLOAT] ← LOOPHOLE[TFloat]; 313: DESCB 22 315: LIW 1237 320: R0 321: NILCK 322: LIW 426 325: ADD 326: W0 opTrapTable.misc[MiscAlpha.aFIXI] ← LOOPHOLE[TFixI]; 327: DESCB 2 331: LIW 1237 334: R0 335: NILCK 336: LIW 427 341: ADD 342: W0 opTrapTable.misc[MiscAlpha.aFIXC] ← LOOPHOLE[TFixC]; 343: DESCB 26 345: LIW 1237 350: R0 351: NILCK 352: LIW 430 355: ADD 356: W0 opTrapTable.misc[MiscAlpha.aFSTICKY] ← LOOPHOLE[TFSticky]; 357: DESCB 30 361: LIW 1237 364: R0 365: NILCK 366: LIW 431 371: ADD 372: W0 opTrapTable.misc[MiscAlpha.aFREM] ← LOOPHOLE[TFRem]; 373: DESCB 32 375: LIW 1237 400: R0 401: NILCK 402: LIW 432 405: ADD 406: W0 opTrapTable.misc[MiscAlpha.aROUND] ← LOOPHOLE[TRound]; 407: DESCB 24 411: LIW 1237 414: R0 415: NILCK 416: LIW 433 421: ADD 422: W0 opTrapTable.misc[MiscAlpha.aROUNDI] ← LOOPHOLE[TRoundI]; 423: DESCB 36 425: LIW 1237 430: R0 431: NILCK 432: LIW 434 435: ADD 436: W0 opTrapTable.misc[MiscAlpha.aROUNDC] ← LOOPHOLE[TRoundC]; 437: DESCB 40 441: LIW 1237 444: R0 445: NILCK 446: LIW 435 451: ADD 452: W0 opTrapTable.misc[MiscAlpha.aFSQRT] ← LOOPHOLE[TSqRt]; 453: DESCB 42 455: LIW 1237 460: R0 461: NILCK 462: LIW 436 465: ADD 466: W0 opTrapTable.misc[MiscAlpha.aFSC] ← LOOPHOLE[TFSc]; 467: DESCB 34 471: LIW 1237 474: R0 475: NILCK 476: LIW 437 501: ADD 502: W0 Ieee.InitIeee[]; }; 503: EFC3 504: RET Instructions: 142, Bytes: 244 TFAdd: PROC [a, b: REAL] RETURNS [c: REAL] = { state: PrincOps.StateVector; Entry point: 3, Frame size: 31 506: SLDB 10 510: SLDB 4 state ← STATE; 512: DST 12 c ← RealOps.FAdd[a, b]; 514: LLDB 4 516: LLDB 10 520: LIB 56 522: EFC12 523: SLDB 6 TrapSupport.BumpPC[2]; 525: LLB 2 527: SLB 34 531: PUSH 532: R1 533: LI2 534: ADD 535: LLB 34 537: W1 state.dest ← [frame[Frame.MyLocalFrame[]]]; 540: LADRB 0 542: SLB 31 TRANSFER WITH state; }; 544: LST 12 546: LLDB 6 550: RET Instructions: 21, Bytes: 36 TFSub: PROC [a, b: REAL] RETURNS [c: REAL] = { state: PrincOps.StateVector; Entry point: 4, Frame size: 31 552: SLDB 10 554: SLDB 4 state ← STATE; 556: DST 12 c ← RealOps.FSub[a, b]; 560: LLDB 4 562: LLDB 10 564: LIB 56 566: EFC11 567: SLDB 6 TrapSupport.BumpPC[2]; 571: LLB 2 573: SLB 34 575: PUSH 576: R1 577: LI2 600: ADD 601: LLB 34 603: W1 state.dest ← [frame[Frame.MyLocalFrame[]]]; 604: LADRB 0 606: SLB 31 TRANSFER WITH state; }; 610: LST 12 612: LLDB 6 614: RET Instructions: 21, Bytes: 36 TFMul: PROC [a, b: REAL] RETURNS [c: REAL] = { state: PrincOps.StateVector; Entry point: 5, Frame size: 31 616: SLDB 10 620: SLDB 4 state ← STATE; 622: DST 12 c ← RealOps.FMul[a, b]; 624: LLDB 4 626: LLDB 10 630: LIB 56 632: EFC10 633: SLDB 6 TrapSupport.BumpPC[2]; 635: LLB 2 637: SLB 34 641: PUSH 642: R1 643: LI2 644: ADD 645: LLB 34 647: W1 state.dest ← [frame[Frame.MyLocalFrame[]]]; 650: LADRB 0 652: SLB 31 TRANSFER WITH state; }; 654: LST 12 656: LLDB 6 660: RET Instructions: 21, Bytes: 36 TFDiv: PROC [a, b: REAL] RETURNS [c: REAL] = { state: PrincOps.StateVector; Entry point: 6, Frame size: 31 662: SLDB 10 664: SLDB 4 state ← STATE; 666: DST 12 c ← RealOps.FDiv[a, b]; 670: LLDB 4 672: LLDB 10 674: LIB 56 676: EFC9 677: SLDB 6 TrapSupport.BumpPC[2]; 701: LLB 2 703: SLB 34 705: PUSH 706: R1 707: LI2 710: ADD 711: LLB 34 713: W1 state.dest ← [frame[Frame.MyLocalFrame[]]]; 714: LADRB 0 716: SLB 31 TRANSFER WITH state; }; 720: LST 12 722: LLDB 6 724: RET Instructions: 21, Bytes: 36 TFComp: PROC [a, b: REAL] RETURNS [i: INTEGER] = { state: PrincOps.StateVector; Entry point: 7, Frame size: 31 726: SLDB 7 730: SLDB 4 state ← STATE; 732: DST 11 i ← RealOps.FComp[a, b]; 734: LLDB 4 736: LLDB 7 740: LIB 56 742: EFC8 743: SL2 TrapSupport.BumpPC[2]; 744: LLB 2 746: SLB 33 750: PUSH 751: R1 752: LI2 753: ADD 754: LLB 33 756: W1 state.dest ← [frame[Frame.MyLocalFrame[]]]; 757: LADRB 0 761: SLB 30 TRANSFER WITH state; }; 763: LST 11 765: LL2 766: RET Instructions: 21, Bytes: 34 TFix: PROC [a: REAL] RETURNS [li: LONG INTEGER] = { state: PrincOps.StateVector; Entry point: 8, Frame size: 27 770: SLDB 4 state ← STATE; 772: DST 10 li ← RealOps.RoundLI[a, RealOps.FixMode]; 774: LLDB 4 776: LIB 156 1000: EFC0 1001: SLDB 6 TrapSupport.BumpPC[2]; 1003: LLB 2 1005: SLB 32 1007: PUSH 1010: R1 1011: LI2 1012: ADD 1013: LLB 32 1015: W1 state.dest ← [frame[Frame.MyLocalFrame[]]]; 1016: LADRB 0 1020: SLB 27 TRANSFER WITH state; }; 1022: LST 10 1024: LLDB 6 1026: RET Instructions: 19, Bytes: 32 TFloat: PROC [a: LONG INTEGER] RETURNS [c: REAL] = { state: PrincOps.StateVector; Entry point: 9, Frame size: 27 1030: SLDB 4 state ← STATE; 1032: DST 10 c ← RealOps.Float[a]; 1034: LLDB 4 1036: LIB 56 1040: EFC6 1041: SLDB 6 TrapSupport.BumpPC[2]; 1043: LLB 2 1045: SLB 32 1047: PUSH 1050: R1 1051: LI2 1052: ADD 1053: LLB 32 1055: W1 state.dest ← [frame[Frame.MyLocalFrame[]]]; 1056: LADRB 0 1060: SLB 27 TRANSFER WITH state; }; 1062: LST 10 1064: LLDB 6 1066: RET Instructions: 19, Bytes: 32 TFixI: PROC [a: REAL] RETURNS [i: INTEGER] = { state: PrincOps.StateVector; Entry point: 1, Frame size: 27 1070: SLDB 4 state← STATE; 1072: DST 7 i ← RealOps.RoundI[a, RealOps.FixMode]; 1074: LLDB 4 1076: LIB 156 1100: EFC1 1101: SL2 TrapSupport.BumpPC[2]; 1102: LLB 2 1104: SLB 31 1106: PUSH 1107: R1 1110: LI2 1111: ADD 1112: LLB 31 1114: W1 state.dest ← [frame[Frame.MyLocalFrame[]]]; 1115: LADRB 0 1117: SLB 26 TRANSFER WITH state; }; 1121: LST 7 1123: LL2 1124: RET Instructions: 19, Bytes: 30 TFixC: PROC [a: REAL] RETURNS [c: CARDINAL] = { state: PrincOps.StateVector; Entry point: 11, Frame size: 27 1126: SLDB 4 state ← STATE; 1130: DST 7 c ← RealOps.RoundC[a, RealOps.FixMode]; 1132: LLDB 4 1134: LIB 156 1136: EFC2 1137: SL2 TrapSupport.BumpPC[2]; 1140: LLB 2 1142: SLB 31 1144: PUSH 1145: R1 1146: LI2 1147: ADD 1150: LLB 31 1152: W1 state.dest ← [frame[Frame.MyLocalFrame[]]]; 1153: LADRB 0 1155: SLB 26 TRANSFER WITH state; }; 1157: LST 7 1161: LL2 1162: RET Instructions: 19, Bytes: 30 TFSticky: PROC [c: CARDINAL] RETURNS [cr: CARDINAL] = { state: PrincOps.StateVector; Entry point: 12, Frame size: 27 1164: SL0 state ← STATE; 1165: DST 6 cr ← microSticky; 1167: LG0 1170: SL1 microSticky ← c; 1171: LL0 1172: SG0 TrapSupport.BumpPC[2]; 1173: LLB 2 1175: SLB 30 1177: PUSH 1200: R1 1201: LI2 1202: ADD 1203: LLB 30 1205: W1 state.dest ← [frame[Frame.MyLocalFrame[]]]; 1206: LADRB 0 1210: SLB 25 TRANSFER WITH state; }; 1212: LST 6 1214: LL1 1215: RET Instructions: 19, Bytes: 26 TFRem: PROC [a, b: REAL] RETURNS [c: REAL] = { state: PrincOps.StateVector; Entry point: 13, Frame size: 31 1216: SLDB 10 1220: SLDB 4 state ← STATE; 1222: DST 12 c ← RealOps.FRem[a, b]; 1224: LLDB 4 1226: LLDB 10 1230: LIB 56 1232: EFC4 1233: SLDB 6 TrapSupport.BumpPC[2]; 1235: LLB 2 1237: SLB 34 1241: PUSH 1242: R1 1243: LI2 1244: ADD 1245: LLB 34 1247: W1 state.dest ← [frame[Frame.MyLocalFrame[]]]; 1250: LADRB 0 1252: SLB 31 TRANSFER WITH state; }; 1254: LST 12 1256: LLDB 6 1260: RET Instructions: 21, Bytes: 36 TRound: PROC [a: REAL] RETURNS [li: LONG INTEGER] = { state: PrincOps.StateVector; Entry point: 10, Frame size: 27 1262: SLDB 4 state ← STATE; 1264: DST 10 li ← RealOps.RoundLI[a]; 1266: LLDB 4 1270: LIB 56 1272: EFC0 1273: SLDB 6 TrapSupport.BumpPC[2]; 1275: LLB 2 1277: SLB 32 1301: PUSH 1302: R1 1303: LI2 1304: ADD 1305: LLB 32 1307: W1 state.dest ← [frame[Frame.MyLocalFrame[]]]; 1310: LADRB 0 1312: SLB 27 TRANSFER WITH state; }; 1314: LST 10 1316: LLDB 6 1320: RET Instructions: 19, Bytes: 32 TRoundI: PROC [a: REAL] RETURNS [i: INTEGER] = { state: PrincOps.StateVector; Entry point: 15, Frame size: 27 1322: SLDB 4 state ← STATE; 1324: DST 7 i ← RealOps.RoundI[a]; 1326: LLDB 4 1330: LIB 56 1332: EFC1 1333: SL2 TrapSupport.BumpPC[2]; 1334: LLB 2 1336: SLB 31 1340: PUSH 1341: R1 1342: LI2 1343: ADD 1344: LLB 31 1346: W1 state.dest ← [frame[Frame.MyLocalFrame[]]]; 1347: LADRB 0 1351: SLB 26 TRANSFER WITH state; }; 1353: LST 7 1355: LL2 1356: RET Instructions: 19, Bytes: 30 TRoundC: PROC [a: REAL] RETURNS [c: CARDINAL] = { state: PrincOps.StateVector; Entry point: 16, Frame size: 27 1360: SLDB 4 state ← STATE; 1362: DST 7 c ← RealOps.RoundC[a]; 1364: LLDB 4 1366: LIB 56 1370: EFC2 1371: SL2 TrapSupport.BumpPC[2]; 1372: LLB 2 1374: SLB 31 1376: PUSH 1377: R1 1400: LI2 1401: ADD 1402: LLB 31 1404: W1 state.dest ← [frame[Frame.MyLocalFrame[]]]; 1405: LADRB 0 1407: SLB 26 TRANSFER WITH state; }; 1411: LST 7 1413: LL2 1414: RET Instructions: 19, Bytes: 30 TSqRt: PROC [a: REAL] RETURNS [b: REAL] = { state: PrincOps.StateVector; Entry point: 17, Frame size: 27 1416: SLDB 4 state ← STATE; 1420: DST 10 b ← RealOps.SqRt[a]; 1422: LLDB 4 1424: LIB 56 1426: EFC5 1427: SLDB 6 TrapSupport.BumpPC[2]; 1431: LLB 2 1433: SLB 32 1435: PUSH 1436: R1 1437: LI2 1440: ADD 1441: LLB 32 1443: W1 state.dest ← [frame[Frame.MyLocalFrame[]]]; 1444: LADRB 0 1446: SLB 27 TRANSFER WITH state; }; 1450: LST 10 1452: LLDB 6 1454: RET Instructions: 19, Bytes: 32 TFSc: PROC [a: REAL, scale: INTEGER] RETURNS [b: REAL] = { state: PrincOps.StateVector; Entry point: 14, Frame size: 31 1456: SL4 1457: SLDB 4 state ← STATE; 1461: DST 11 b ← RealOps.FScale[a, scale]; 1463: LLDB 4 1465: LL4 1466: LIB 56 1470: EFC7 1471: SLDB 6 TrapSupport.BumpPC[2]; 1473: LLB 2 1475: SLB 33 1477: PUSH 1500: R1 1501: LI2 1502: ADD 1503: LLB 33 1505: W1 state.dest ← [frame[Frame.MyLocalFrame[]]]; 1506: LADRB 0 1510: SLB 30 TRANSFER WITH state; }; -- Mainline code 1512: LST 11 1514: LLDB 6 1516: RET Instructions: 21, Bytes: 34 Total instructions: 464, Bytes: 770