Digital PDFs
Documents
Guest
Register
Log In
DIGITAL-8-24-U
December 1966
12 pages
Original
0.5MB
view
download
Document:
digital-8-24-u-d
Order Number:
DIGITAL-8-24-U
Revision:
Pages:
12
Original Filename:
https://svn.so-much-stuff.com/svn/trunk/pdp8/src/dec/digital-8-24-u/digital-8-24-u-d.pdf
OCR Text
IDENTIFICATION 1.1 Digital-8-24-U-Sym 1.2 Unsigned Decimal Prin’r, Double Precision 1.3 January I9, I966 PDP 8 LIBRARY Digita I -8—24-U-Sym Page I ABS TRACT This subroutine permits the typeout of a double-precision integer stored in the usual conven(see Digital—8—I3-F-Sym) The one exception is that all 24 bits are the bit "0” of the high-order word is not a sign bit). The typeout is in bits .e. as (i magnitude interpreted tion for double-precision numbers, the form of a seven—digit, . positive, decimal integer. 3. REQ UIRE ME NTS 3.1 Storage This subroutine requires (73) locations. 3.2 Subprograms and/or Subroutines (none) 3.3 Equipment Basic PDP—8 with ASR-33 4. USAGE 4.1 Loading The symbolic tape provided is assembled with either PAL III or MACRO-8. It may be assemNeither origin setting nor "$” bled with the user program or separately with the proper origin setting . terminating character exists on the tape, but the tape does have a PAUSE on the end. 4.2 Calling Sequence This subroutine is called by an effective JMS UDPRNT. The location immediately following the calling JMS contains the address of the high-order portion of the double-precision integer stored in the usual double-precision format. 5. RESTRICTIONS 6. DESCRIPTION 6.1 Discussion (none) This is basic double-precision subroutine used to obtain decimal output corresponding to double-precision, binary words. First, the binary equivalent of I0,000,000 is subtracted from the original number until under-flow occurs. A count is kept of the number of subtractions necessary to accom— plish this, thus yielding the most significant decimal digit. Then this digit is added to 2608 and printed on the ASR-33 through the AC This process is repeated using the proper power of ten to give the seven remaining digits. . 6.2 Examples and/or Applications (none) 6.3 Scaling The numbers are interpreted and typed out as integers. METHOD (See Digital-8-22-U-Sym) Digital-8-24- U-Sym Page 2 8. FORMAT 8.1 Input Data (Not Applicable) 8.2 Core Data The double-precision integers are stored in the usual double-precision format, (see Digital8—13-F—Sym), with the exception that bit "0” of the high-order word is interpreted as part of the number not a sign bit. 8.3 Output Data Output is in the form of eight consecutive decimal digits. No sign is printed. Spacing, tabulation, carriage return, etc., are not provided for in this subroutine. See Digital-8-19-U-Sym which contains short subroutines for those purposes. 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 the ASR-33 PROGRAM 10.1 Core Map (none) 10.2 Dimension List(s) (none) 10.3 Macro, Parameter, and Variable Lists (none) 10.4 Program Listing ICHECK DUTB PROGRAM FOR UNSIGNED . DOUBLE~PRECISION PRINT *EDD RETURN=JMS TYCR PRINT=JMS UDPRNT SPACE=JMS TYSP DEFINE DBLADD A B <CLA CLL: TAD A+13 DEFINE DSHFT c D <CLA CLL: DEFINE <CLA3 6230 4777 INITL, TAD DMOVE TAD E3 cs E TAD 3+1: RAL; DCA DCA A+13 c :TAD D: RAL: RAL; r DCA F5 RETURN 9201 73am CLA CLL @262 33D5 DCA TEMP 0203 3306 DCA 0264 1374 TAD @205 3313 TEMP+1 (-5) BOA COUNT! $266 1373 TAD (-2) TAD E+13 DCA r+1> TAD DCA A D> 3TAD B:_DCAA Digital -8-24-U-Sym Page I ABSTRACT This subroutine permits the typeout of a double-precision integer stored in the usual conven(see Digital-8—l3-F-Sym) The one exception is that all 24 bits are tion for double-precision numbers, interpreted as . magnitude bits (i .e. the bit ”0” of the high-order word is not a sign bit). The typeout is in the form of a seven—digit, positive, decimal integer. 3. REQ UIRE ME NTS 3.1 Storage This subroutine requires (73) locations. 3.2 Subprograms and/or Subroutines (none) 3.3 Equipment Basic PDP—8 with ASR-33 4. USAGE 4.1 Loading The symbolic tape provided is assembled with either PAL III or MACRO-8. It may be assemNeither origin setting nor "$" terminating character exists on the tape, but the tape does have a PAUSE on the end. bled with the user program or separately with the proper origin setting. 4.2 Calling Sequence This subroutine is called by an effective JMS UDPRNT. The location immediately following the calling JMS contains the address of the high-order portion of the double-precision integer stored in the usual double-precision format. 5. RESTRICTIONS 6. DESCRIPTION 6.1 Discussion (none) This is basic double-precision subroutine used to obtain decimal output corresponding to double-precision, binary words. First, the binary equivalent of I0,000,000 is subtracted from the orig— inal number until under-flow occurs. A count is kept of the number of subtractions necessary to accomplish this, thus yielding the most significant decimal digit. Then this digit is added to 2608 and printed on the ASR-33 through the AC This process is repeated using the proper power of ten to give the seven . remaining digits. 6.2 Examples and/or Applications (none) 6.3 Scaling The numbers are interpreted and typed out as integers. METHOD (See Digital-8-22-U—Sym) Digital -8-24- U-Sym Page 2 8. FORMAT 8.1 Input Data (Not Applicable) 8.2 Core Data The double—precision integers are stored in the usual double-precision format, (see Digital8—13-F-Sym), with the exception that bit "0" of the high-order word is interpreted as part of the number not a sign bit. 8.3 Output Data Output is in the form of eight consecutive decimal digits. No sign is printed. Spacing, tabulation, carriage return, etc., are not provided for in this subroutine. See Digital-8-19—U-Sym which contains short subroutines for those purposes. 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 the ASR-33 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 /CHECK DUTB PROGRAM FOR UNSIGNED . DOUBLE’PRECI SION PRINT *EDD RETURN=JMS TYCR PRINT=JMS UDPRNT SPACE=JMS DEFINE <CLA CLL: DEFINE <CLA <CLA3 4777 INITL. TAD DSHFT CLL: DEFINE 6233 TYSP DBLADD A c TAD DMOVE TAD E3 B A+13 c: E TAD 8+1: DCA EAL; A+13 TAD A D RAL; DCA c :TAD D; RAL3 F DCA F3 RETURN 3231 730a D292 3395 CLA CLL DCA TEMP ‘D203 3306 DCA 6264 1374 TAD @225 3313 TEMP+1 (-5) DCA COUNT! Bees 1373 TAD (-2) TAD E+13 DCA F+l> DCA D> zTAD B:.DCAA Digi faI-8-24—U-Sym Page 3 COUNT2 @237 3314 DCA @21@ 4777 RETURN @211 4776 @212 @3@7 TOP, PRINT; DNUMB @213 4775 SPACE @214 73@@ DBLADD @215 131@ @216 1312 @217 331@ @22@ 7@@4 @221 13@7 @222 1311 @223 33@7 DNUMB:VARCON @224 2313 ISZ CDUNTI ‘@225 5211 JMP TOP @226 4777 FIVE: RETURN @227 1374 TAD (-51 @232 3313 BOA COUNTI @231 2314 ISZ COUNT2 @232 5211 JMP TOP @233 1373 TAD (-2) @234 3314 DCA COUNT2 DMOVE VARCON, DSHFT VARCON+1,VARCON DSHFT VARCON+1:VARCON @235 72@@ @236 1311 @237 33@5 @24@ 1312 @241 33@6 @242 73@@ @243 1312 @244 7@@4 @245 3312 @246 1311 @247 7934. @25@ 3311 @251 7369 @252 1312 @253 7@@4 @254 3312 @255 1311 @256 7@@4 @257 3311 @26@ 7360 @261 1312 @262 13%6 @263 3312 @264 7@@4 @265 1311 @266 1395 @267 3311, @27@ 73@@' @271 1312 @272 7@@4 @273 3312 @274 1311 @275 7684 @276 3311 3277 7238 Q3@@ 1311 DBLADD TEMP VARCON:TEMP DSHFT VARCON+1:VARCON DMOVE VARCONLDNUMB Digital-8-24— U-Sym Page 4 @321 3307 @322 1312 2303 3310 @334 5211 $385 @200 @326 OOOO @327 @983 2310 @092 @311 @620 @312 @281 2313 $262 @314 @222 @373 ‘7776 @374 7773 2375 @627 B376 @402 @377 @617 JMP TEMP:.DUBL DNUMB: TOP O DUBL VARCON: DUBL COUNTI) COUNTZ: O O 1 9 PAGE ‘PAUSE /UNSIGNED DECIHAL ICALLING SEQUENCE: PRINT: DOUBLE PRECISION JMS UDPRNT /SUBROUTINE CALLED /ADDRESS OF HIGH /RETURN WITH AC AND OF HIGH-ORDER / HI / RETURN OBOE @099 @221 732% CLA CLL @202 160% TAD I @223 3267 DCA UDGET UDPRNT: ADDR UDPRNT 1667 TAD I @225 3261 DCA UDHIGH UDGET UDGET @296 2267 ISZ @227 1667 TAD I 8212 3262 DCA @211 1255 TAD UDLOW UDLOOP @212 3266 DOA UDCNT @213 1256 TAD' UDADDR @214 3276 DCA UDPTR @215 2229 @216 1679 @217 @222 /PICK UP ADDRESS /PICK UP BOTH DIGIT /INITIALIZE TO UDPRNT /INDEX LINKAGE I /PICK 2279 ISZ UDPTR 3263 DCA UDHSUB @221 167$ TAD I 2222 2272 ISZ UDPTR 3264 710% @225 1264 DCA UDDO: WORDS IINITIALIZE ISZ @224 CLEAR FOR USE IN WORD SUBROUTIE UDGET TAD @223 L O @224 UDARND: WORD ORDER UDPTR /USE UP IN COUNTER FOR."8" TABLE OF POWERS OF TEN FOR CORRECT RETURN CURRENT POWER OF TEN FOR SUBTRACTION UDPTR UDLSUB CLL TAD UDLSUB (DOUBLE PRECISION @226 1262 TAD UDLOW @227 3266 DCA UDTEML 223% 7294 RAL @231 1263 TAD UDHSUB @232 1261 TAD UDHIGH @233 7422 SNL /DID IT @234 5242 JMP UDOUT lNO: COUNT @235 2265 ISZ UDBOX /YES: @236 3261 DCA UDHIGH -6237 1266 TAD .UDTEML @242 3262 DCA UDLOW SUBTRACTION UNDERFLow? IS DONE COUNT NOT DONE YET. INDEX 0161? /DEPOSIT REMAINING PORTIONS 0F WORD Digital-8-24-U-Sym Page5 TAD UDBOX /PICK UP TAD UDTWO lfiDD "263" /TYPE IT 7279 @243 1265 @244 1257 @245 6946 TLS @246 6941 TSF AGAIN SUBTRACT AND /GO 5224 3242 UDOUT: BACK UDDO JMP @241 CLA DIGIT RESULTING TO IT OUT @247 5246 JMP 0’1 OBSO 73m% CLA @251 3265 DCA 9252 826% isz GEL UDBOX UDCNT 3253 5216 JMP UDARND 1N0: @254 5638 JMP I /YES: @255 777% UDLOOP: ~16 DETERMINE SUBROUTINE DONE. /COUNT OF "8" DIGITS @256 @271 llNITIAL $266 UDADDR: UDTWO: UDCO NI @257 266 /ICODE @263 @OOO UDCNT: @261 mafia UDHIGH: @262 waaa UDLOW: @263 @979 UDHSUB: @264 @633 UDLSUB: @265 @699 UDBOK: @266 wama @267 OOOQ UDTEML: UDGET: 327% @033 UDPTR: @271 3166 UDCONI: @272 46@@ @273 @274 ®®®C§&@ UDPRNT /INITIALIZE iHAVE WE DIGIT TYPED ADDRESS OF TEN /POWERS 4633 /*I@:@@@:®@$ 7413 7413 /-l:@@®:@@@ 6733 67OO @275 7747 7747 @276 454a 454% @277 7775 7775 4366 4363 /’l@@:@@@ /'l@:@@@ @391 7777 ‘7777 /‘1:@@@ @302 6339 6933 EBOB 7777 7777 /’1@@ @364 @335 7634 7634 7777 7777 @396 7766 7766 @337 7777 7777 @319 7777 7777 PAUSE OF FOR DIGITS' /STORAGE LOCATIONS 3166 @338 TO /‘l@ /~l "Q" "8" DIGITS NEXT DIGIT RETURN POWERS OF TEN Digital-8—24-U-Sym Page 6 UDADDR 6256 UDARND 6216 UDBOX 6265 UDCNT 6266 UDCONI UDDO 6224 6271 UDGET 6267 UDHIGH UDHSUB UDLOOP UDLOW UDLSUB 6261 UDOUT 6242 UDPRNT 6266 6263 6255 6262 6264 UDPTR 6276 UDTEML 6266 UDTWO 6257 66666666 00000001 66666665 00000006 00000002 00000007 66666616 00000020 00000030 00000003 00000004 00000008 00000009 00000040 00000050 66666666 00000070 00000080 00000090 66666166 00000200 00000300 00000400 00000500 66666666 00000700 00000800 00000900 00001000 66661666 00002000 00005000 00007000 00009000 00010000 66616666 66666666 66166666 66666666 61666666 00020000 00003000 00008000 00030000 00004000 66666666 00070000 00080000 00090000 00100000‘ 00200000 00300000 00800000 03000000 08000000 00400000 00500000 00900000 01000000 04000000 05000000 10000000 00700000 02000000 66666666 07000000 16666666 03222784 00000100 00040000 00050000 09000000 13222784 06445568 1 D’igiIaI-8-24-U-Sym Page 7 I I DIAGRAMS II .1 Flow Charts C Q PICK UP ADDRESS OF HIGH ORDER WORD FROM CALLING SEQUENCE PICK UP DOUBLE PRECISION NUMBER FOR USE IN SUBROUTINE INITIALIZE COUNTERS. POINTERS AND STORAGE REGISTERS PICK UP CURRENT POWER OF TEN FOR USE IN SUBTRACTION PERFORM DOUBLE INDEX DIGIT PRECISION SUBTRACT FROM NUMBER YES DID IT UNDERFLOW ? STORE REMAINING PORTION OF DOUBLE PRECISION NUMBER PICK UP GENERATED DIGIT TYPE IT OUT HAVE 8 DIGITS BEEN TYPED OUT ? SUBROUTINE FINISHED I EXIT INDEX TO PICK UP NEXT POWER OF TEN. PUT DIGIT COUNT TO ZERO
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies