Digital PDFs
Documents
Guest
Register
Log In
DIGITAL-8-23-U
December 1966
10 pages
Original
0.8MB
view
download
Document:
digital-8-23-u-d
Order Number:
DIGITAL-8-23-U
Revision:
Pages:
10
Original Filename:
https://svn.so-much-stuff.com/svn/trunk/pdp8/src/dec/digital-8-23-u/digital-8-23-u-d.pdf
OCR Text
IDENTIFICATION 1.1 Digital-8-23-U-Sym 1.2 Signed Decimal Print, Single Precision 1.3 January 19, 1966 PDP-B LIBRARY Digital-8-23-U-Sym Page I 2 . ABSTRACT This subroutine permits the typeout of the contents of a computer word as a signed twos If bit 0 of the computer word is a "l ", the remaining bits represent a negative in twos integer complement form; if bit 0 equals ”0", the remaining bits represent a positive integer. complement number. If the number is negative, a minus sign is printed; if positive, a space. 3 . 3 .l REQUIREMENTS Storage This subroutine requires 5l core locations. 3 .2 Subprograrns and/or Subroutines (None) 3 .3 Equipment Basic PDP-8 with ASR-33 4 . 4.1 USAGE Loading The symbolic tape provided is in PAL III or MACRO-8 language. It may be assembled Neither origin setting nor "$" with the user's program or separately with the proper origin setting. terminating character exists on the symbolic tape provided 4.2 . Calling Sequence The subroutine is called by an effective "JMS SSPRNT" with the number to be printed The return is to the location following that of the calling JMS. The contents of neither the AC nor the link are preserved, and return is with both active registers clear. in the AC. 5. RESTRICTIONS 6. DESCRIPTION 6 .1 Discussion (None) This is a basic subroutine to obtain signed decimal output corresponding to binary words in memory stored in twos complement form. First, the number is sensed to determine if it is positive or negative. If positive, a space is printed. If negative, a minus sign is printed and the number complemented to form the absolute value in twos complement. Then, the same algorithm is followed as in the unsigned printout, (see Digital-8—22-U-Sym). 6 .2 Examples and/or Applications (None) 6.3 Scaling The numbers are interpreted and typed out as integers. 7. METHOD (See Digital-8—22-U-Sym) Digital-8-23-U-Sym Page2 8. FORMAT 8.1 Input Data (Not Applicable) 8.2 Core Data (Not Applicable) 8.3 Output Data Output is in the form of four consecutive decimal digits preceded by either a space or Spacing, tabulation, carriage return, etc., are not provided in this subroutine. See Digital-8-19- U-Sym which contains subroutines for those purposes. minus sign. 9. EXECUTION TIME 9.1 Minimum (Not Applicable) 9.2 Maximum (Not Applicable) 9.3 Average This subroutine is output limited at 10 cps by 10. PROGRAM 10.1 Core Map (None) 10.2 Dimension List(s) (None) 10.3 Macro, Parameter, and Variable Lists (None) 10.4 Program Listing lBINARY'TO DECIMAL CONVERSION-AND /SINGLE PRECISION /CALLING SEQUENCE: / JMS ‘ TYPEOUT /AC CONTAINS BINARY SSPRNT /SUBROUTINE CALL WORD I =/RETURN..AC AND L CLEAR OEOO @006 OEOI 71®6 7510 CLL 7961 CML CMA OEOA 3253 DOA SSVAL @305 3251 DCA‘sssox ISTORE NUMBER AWAY [SET DIGIT LOCATION /1NITIALIzE~OUTEUT COUNTER OEOE @293 SSPENT. the ASR-33. O SPA /IS . IAC @226 1259 TAD SSCNTR D2O7 3252 DCA SSCNT POSITIVE? IS SET xNO, VALUE LINKsFORM ABSOLUTE . ZERO TO TO "4" FIRST OEIO 1244 TAD SSADDR @211 3217 DCA ssxvz+1 @212 1246 TAD SSPLUS /GET CODE @213 @214 743% SZL 1247 TAD @215 4235 JMS SSMNS SSOUT NUMBER NEGATIVE? (YES:‘CHANGE CODE TP TYPE.A "MINUS" /TYPE-IT_OUT @215 1253 TAD SSVAL IPICK 0217 1254 TAD SSCON 1922a IsuBTRACT 7510 SPA ssxrz, /INITALIZE INSTRUCTION~TO GET ’. /IS TO TYPE A "PLUS" THE UP NUMBER_ CURRENT POWER ILS THE RESULTngGATIVE? OF 1O ‘ TO ’ Digital-8—23-U-Sym Page 3 5225 2251. JMP .+4 /YES: @222 ISZ SSBOX IND: @223 3253 DCA SSVAL xsroaa SSXYZ /CONTINUE @221 @224 5216 JMP @225 722% OLA REHAINDER 1251 TAD SSBOX /PICK UP THE 4235 JMS SSOUT /TYPE IT OUT DIGIT 3251 DCA SSBOX xsar 2217 ISZ SSXYZ+1 llNDEX @232 2252 ISZ @233 5216 @234 568%. /TYPEOUT SSOUT: IN SSVAL SUBTRACTING 5226 3236 LOCATION DIGIT THE @227 @231 FINESHED IS INDEXING INDEX DIGIT NUMBER COUNTER TO "U" TO GET SSCNT INSTRUCTION /HAVE WE TYPED "4" JMP SSXYZ /N0,_CONTINUE JMP I xyas. SSPRNT POWER OF DIGITS RETURN ROUTINE @235 @236 @228 1245 TAD @237 6646 324% 6941 TLS TSF E SSTWO @241 524$ JMP -9’1 @242 732% CLA @243 5635 JMP I @244 1254 SSADDR: TAD SSCON @245 @262 SSTWO: 26$ /BASIC @246 7762 /NUMBER USED TO GENERATE "SPACE" @015 15 lNUMBER USED TO GENERATE "MINUS" @252 7774 SSPLUS: SSMNS) SSCNTR: ‘22 @247 ‘4 /COUNT @251 @989 SSBOX: 2 /STORAGE Q @252 022% SSCNT: @253 636% SSVAL: /TABLE SSCON3. CLL SSOUT /INSTRUCTION.TO @ OF POWERS OF 16 .0254 6930 @255 7634 7634 /-1@@ @256 7766 7777 7766 /'lg /'l 0257 6238 7777 PAUSE, /-1®®@ CODE.FOR OF "4" PICK UP FIRST POWER DIGITAL OUTPUT DIGITS REGISTERS OF m D igi faI-8-23- U-S ym Page 4 L /TEST PROGRAM RETURN=JMS I PRINT=JMS I oSINGLE PREC- INPUT LINKI LINK2 SPRINT=JMS I LINKB SPACE=JMS I LINK4 ACCEPT=JMS I LINKS INIT: RETURN ACCEPT DCA TEMP SPACE TAD TEMP PRINT SPACE TAD TEMP SPRINT RETURN JMP INIT+1 LINKI: 1217 LINKZ: DECPRT LINKS: SSPRNT LINK4: 1227 LINKS, SICONV TEMP: 3 PAGE 'PAUSE Test Run - Starting at 0 3333 3331 3332 3333 3334 3635 @Eflé 3337 3338 3313 3311 3312 3313 3314 ‘EQIS fifilé 3317 3318 3319 3323 3321 3322 3323 3324 @925 @326 3327 3328 3329 3333 3331 3332 3333 3334 3337 3338 3339 3343 3342 3343 3344 @635 *3345 @936 3341 @346 3347 @648 3349 3351 3352 3353 3354 @355 @656 3357 3358 3359 3361 3362 -@@65 @966 @667\ 3368 3369 3371 3363 3373 3364 3372 3374 3375 @876 3382 3383 3384 3385 @986 3378 3388 3379 3381 @677 @387 3393 3391 3392 3393 3394 3395 @996 BE97 3398 3399 3133 3131 3132 3133 3134 3135 0106 @137 3138 3139 3113 3111 3112 3113 3114 3115 @116 @117 3118 3119 3123 3121 3122 3123 3124 3125 @127 3128 3129 3133 3131 3132 3133 3134 3135 9126 @136 8137 3138 3139 3143 3141 3142 3143 3144 3145 3146 3147 3148 '9149 3353 3363 .3373 3383 3339 3389 3153 13151 3152 3153 -3154 .6155 @156 3157 3158 3159 3163 3173 3161 3162 3163 3164 3165 @166 3167 3168 3169 3171 ;3174 3175 @176 3177* 3178 "@179 3181 3172 3182« 3173 3183 3183 3184 3185 @186 @187 3188 @189 3193 3191 3192 3193 3194 3195 @196 @197 '3199 $290 321% 3231 3211 3232, 3233 »3234 3198 3235 9296 @209 3213 3214 3215 6216 82%? ‘3217- 3238 3212 ‘9218 32L9 3.22a 3221 3222 3223 3224 3225 '9226 @227 ,9228 3229 3230 ~32311 3232 3235 @239 3242 '6245. @236 'Q246 .3237 3241 3234 3244 -B238 3243 3253 3233 ,9243 3247 19249 3251 3252 3253 3254 3255 9248 9256 3257 13253 @259 3263j 3261 3262, 3263 5264. 29265 [335? g3268; ,fiZfig Dig ifol-8-23-U-Sym Page 5 @272 3273 3274 @275 3276 3277 @278 3279— 3283 @2811 @282 3284 $285 3286 3287 @388 3289 @293 @292 @294 @295 3296 @297 @298 3299 3333 3291 @331 @283 @293 @332 @333 3334 @335 3336 @367 @368 @313 @311 @312 @313 @314 @315 3316 @317 @318 3339 @319 3323 3333 @321 @322 3323 3324 @325 3326 @327 @328 @329 3331 @332 @333 @334 @335 3336 @337 @338 3339 @343 @341 @342 @343 3344 @345 3346 @347 @348 3349 3353 3351 @352 @353 3354 3355 @356. @357 @358 3359 3363 @361 @362 3363 3364 @365 @367 3368 3369 3373 3371 @372 3373 @374 3375 @366 @376 3378 3379 3383 @381 '3382 3377 @383 @384 @385 3386 @387 3388 3389 3393 3391 @431 @392 3393 @394 @395 3396 @397 3398 3399 3433 3432 3433 3434 3435 3436 @437 3438 3439 3413 3411 3412 @414 @415 @418 @419 3421 @422 @424 @425 3416 @426 @417 @423 3413 @423 $427 3428 @429 @433 @431 .3432 3433 3434 @435 @436 3437 3438 @439 53443 3441 @442 @443 @444 @445 3446 @447 3448 3449 3453 @451 @452 @453 3454 @455 3456 3458 3459 3463 @461 9462 3463 @464 3465 3466 @457 @467 3468 @469 @473 @471 3472 3473 @474 @475 3476 @477 79478 @479 3483 @481 @482 3483 @484 @485 @486 @487 @488 3489 @493 @491 3492 @493 @494 @495 @496 @497 @498 3499 '3533 @531 3532 3533 3534 3535 3536 @5677 ESQB 3539 3513 3511 @512 @513 @514 3515 @516 @517 @518 3519 3523 @521 3522 @523 @524 3525 3526 @527 @528 @529 @533 3531 @533 3534 @535 3536 @537 @538 @539 3549 927%" @271 3543 9541 3532 @542 @543 @544 3545 3546 @547 @548 3553 @551 @552 @553 @554 3555 3556 @557 9558 3559 @563 @561 3562 9563 @564 3565 @566 @567 @568 3569 ”3573 3571 3572 @573 @574 @515 @512 9577 @582 ’3583 @584 3585 3586 @587 $578 ”@588 3579 3581 3593 3591 @592 @593 @594 @595 @596 @597 3598 @599 3633 3631 @662 @633 @634 3635 @636 @637 3638 @639 3613 3611 @612 @613 3615 @616 3617 3618 @619 3623 @621 @622 @623 3625 @626 3627 3628 @629 3583 @589 3633 3631 @632 3633‘ @614 @6244 @634 @635 @636 @637 3638 3639 73643 @641 @642 @643 @644 @645 3646 @647 @648 3649 @653 3651 3652 @653 @654 @655 @656 3657 3658 @659 @663 @661 @662 3663 3664 3665 @666 3667 @668 @669' 3676 3677 3678 '3679 @686 @687 3688 @689 3696 3697 3698 @699 3738 @739 @673 @671 @672 @673 3674 3683 3681 @683 3684 @693 @691 6682 3692’ @694 @733 3731 @732 @693 3733 3675 3685 3695 3734 3735 3736 @737 @713 3711 3712 @722, 'Q713 @714 -@715 @716 @717 @718 @719 3723 3723 @724 3725 3726 @727 3728 @729 @733 3721 @731 3743 @741 3753 3732 @733 @734 3735 3736 3737 3738 @739 @743 @744 3745 3746 3747 3748 @749 3751 @742 6752' 3753 @754 3755 @756 3757 3758 @759 3763 3761 @762 @764 3765 @766 3767 3768 $769 3773 @771 @772 3763 3773 3774, 3775 3776 @777 3778 ’Q779 3783 3781 0782 3783 @784 @785 3786 @787 3788 @789 E799 3791 B792 @793 37941 3 95 3796 @797 3798 @799 3833 @831 @811 @862 3833 @864 3 @5 '98Q6 @867 3838 @899 3813 38'6 @814 3815 @816 @817 3818 @819 3823 3821 38128822 3623 6824* @825 @827 3828 @829 383 ;@834 3826 3835 ”0836 0837} 3838 @839 3833; ;6831 _3832 , Digital-8-23-U-Sym Page 6 8842 @841 8842 8843 @844 8845 8846 8847 8848 8849 2858 @851 8852 8853 @354 8855 8856 8857 8858 8859 2868 @861 8862 8863 @864 8865 8866 8867 8868 8869 8878 @871 8872 8873 3874 8875 8876 8877 8878 88791 8883 @881 @882 8883 @884 8885 8886 8888 8889 8892 @891 @892 8893 3894 8895 8896 8887 8897 8898 8899 3988 @921 @922 8983 @924 8985 8986 8987 8988 8989 8912 @911 8912 8913 @914 8915 8916 8917 8918 8919 M922 2921 2922 8923 @924 8925 8926 @927 8928 8929 2938 M931 2932 8933 @934 8935 8936 @937 8938 8939 8948 M941 8942 8943 @944 8945 8946 8948 8949 8952 0951 2952 8953 @954 8955 8956 @947 @957 8958 8959 2968 @961 8962 8963 @964 8965 8966 @967 8968 8969 8978 2971 8972 8973 2974 8975 @976 @977 8978 8979 3988 @981 8982 8983 @984 8985 2986 @987 8988 8989 8992 2991 8992 8993 @994 8995 @996 @997 8998 8999‘ 1838 1221 1882 1883 1224 1885 1036 1337 1888 1889 1218 1611 1812 1813 1314 1815 1916 1317 1818 1219' 1828 1221 1822 1823 1824 1825 1826 1327 1828 1829 1338 1231 1332 1833 1334 1835 1336 1237 1838 1839 1842 1241 1842 1843 1244 1845 1646 1347 1848 1849 1358 1351 1852 1853 1954 1855 1656 1257 1858 1859 1268 1361 1262 1863 1364 1865 1966 1367 1868 1869 1872 1371 1872 1873 1274 1875 1676 1377 1081 1882 1883 1384 1885 1286 1987 1878 1888 1879 1888 1898 1291 1892 1893 1294 1895 1696 1297 1898 1899 1182 1121 1182 1183 1134 1185 1126 1197 1188 1189 1112 1111 1112 1113 1114 1115 1116 1117 1118 1119 1128 1121 1122 1123 1124 1125 1126 1127 1128 1129 1138 1131 1132 1133 1134 1135 1136 1137 1138 1139 1148 1141 1142 1143 1144 1145 1146 1147 1148 1149 1889 1158 1151 1152 1153 1154 1155 1156 1157 1158 1159 1168 1161 1162 1163 1164 1165 1166 1167 1168 1169 1178 1171 1172 1173 1174 1175 1176 1177 1178 1179 1182 1181 1182 1183 1184 1185 1186 1187 1188 1189 1198 1191 1192 1193 1194 1195 1196 1197 1198 1199 1203 1231 1282 1283 1284 1285 1236 1287 1288 1289 1218 1211 1212 1213 1214 1215 1216 1217 1218 1219 1222 1221 1222 1223 1224 1225 1226 1227 1228 1229 1238 1231 1232 1233 1234 1235 1236 1237 1238 1239 1248 1241 1242 1243 1244 1245 1246 1247 1248 1249 1252 1251 1252 1253 1254 1255 1256 1257 1258 1259 1262 1261 1262 1263 1264 1265 1266 1267 1268 1269 1278 1271 1272 1273 1274 1275 1276 1277 1278 1279 1288 1281 1282 1283 1284 1285 1286 1287 1288 1289 1298 1291 1292 1293 1296 1297 1298 1299 1331 1322 1383 1294 1384 1295 1333 1385 1396 1387 1388 1389 1318 1311 1312 1313 1314 1315 1316 1317 1318 1319 1328 1321 1322 1323 1324 1325 1326 1327 1328 1329 1338 1331 1332 1333 1334 1335 1336 1337 1338 1339 1348 1341 1342 1343 1344 1345 1346 1347 1348 1349 1358 1351 1352 1353 1354 1355 1356 1357 1358 1359 1362 1361 1362 1363 1364 1365 1366 1367 1368 1369 1372 1371 1372 1373 1374 1375 1376 1377 1378 1379 1382 1381 1382 1383 1384 1385 1386 1387 1388 1389 1398 1391 1392 1393 1394 1397 1398 1399 1421 1422 1483 1484 1395 1485 1396 1488 1496 1487 1488 1489 1418 1411 1412 1413 1414 1415 1416 1417 1418 1419 Digital-8-23-U-Sym Page 7 1428 1421 1422‘ 1423 1424 1425 1426 1427 1428 1429 1438 1431 1432 1433 1434 1435 1436 1437 1438 1439 1448 1441 1442 1443 1444 1445 1446 1447 1448 1458 1451 1452 1454 1455 1456 1457 1458 1459 1468 1461 1462 1453 1463 1464 1465 1466 1467 1468 1469 1478 1471 1472 1473 1474 1475 1476 1477 1478 1479 1488 1481 1482 1483 1484 1485 1486 1487 1488 1489 1498 1491 1492 1493 1494 1495 1496 1497 1498 1499 1588 1581 1582 1583 1584 1585 1586 1587 1588 1589 1518 1511 1512 1513 1514 1515 1516 1517 1518 1519 1 NUMBER/188 COUNT+8148 =2768 1449 3788 E2 3 828815 8888 8881 8882 8883 8884 8885 8886 8887 8888 8889 8818 8811 8812 8813 8814 8815 8816 8817 8818 8819 Restarting near the change between positive and negative numbers. NUMBER/AND 8824 3788 28218 1984 1985 1986 1987 1988 1989 1998 1991 1992 1993 1994 1995 1996 1997' 1998 1999 2888 2881 2882 2883 2884 2885 2886 2887 2888 2889 2818 2811 2812 2813 2814 2815 2816 2817 2818 2819 2828 2821 2822 2824 2825 2826 2827 2828 2829 2838 2831 2832 2823 2833 2834 2835 2836 2837 _2838 2839 2848 2841 2842 2843 2844 2845 2846 2847 -2848 ~2847 -2846 -2845 ~2844 -2843 -2842 ~2841 -2838 -2837 -2836 -2835 -2834 —2833 ~2831 ~2848 ~2838 —2839 ~2832 42329 +2828 -2827 -2826 ~2825 -2824 -2823 ~2822 ~2821 -2828 —2819 -2818 ~2817 ~2816 ~2815 ~2814 ~2813 -2812 ~2811 ~2818 ~2®@9 -2888 ‘2807 -2886 -2885 -2884 ~2883 —2882 -2881 -2888 ~1999 41998 -1997 ~1996 -1995 ~1994 ~1993 ~1992 -1991 ~1998 -1989 ~1988 ~1987 ~1986 -1985 ~1984 ~1983 ~1982 -1981 ‘1988 -1979 -1978 #1977 ~1976 -1975 ~1974 ~1973 Restarting near —0. NUMBER/JMS 8114 28218 =4114 7788 ~8864 ~8863 ~8862 -8861 rflfiéfl -8859 -8858 *8857 ~8856 -8855 -8854 4@@53 -8852 —8851 -8848 ~8847 ~8846 ~8845 -8844 ~8843 48842 -8841 ~8838 ~8837 +8836 —8835 48834 +8833 43924 ~8823 +8832 -8831 48849 -8848 73339 *E@3@«~@@29 ~8827 43626 -8825 -8822 ~8821 -8828 ~3319 48928 4Q018 ~8817 ~8816 ~8815 *EBYAh-fiwls 4%E12 48011148316 -8889 -8888 +8887 -8886 ~8885 48883 -8882 48881 e8884 -8858 Dig ifcl-8-23-U-Sym Page 8 I I DIAGRAMS II .1 Flow Charts L ENTRY j IS LINK SETTO I [ CLEAR LINK ? 1 [ NO MODIFY CODE TO"—] I IS THE NUMBER I NEGATIVE TYPE OUT CHARACTER] ? SET LINK TO "1." FORM NO ABSOLUTE VALUE PICK UP CURRENT POWER OF TEN I [ STORE NUMBER AWAY ] SUBTRACT CURRENT POWER OF TEN I INITIALIZE COUNTERS, POINTERS AND DIGIT STORAGE REGISTER H FROM INDEX DIGIT 1 NUMBER INDEX INSTRUCTION TO GET NEXT DID IT LOAD CODE " FOR "SPACE POWER OF TEN UNDERFLOW ? INTO AC LOAD GENERATED DIGIT INTO AC TYPE IT OUT HAVE 4 DIGITS BEEN TYPED 7 SUBROUTINE FINISHED C EXIT D
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies