Digital PDFs
Documents
Guest
Register
Log In
DIGITAL-8-22-U
December 1965
4 pages
Original
0.2MB
view
download
Document:
digital-8-22-u-d
Order Number:
DIGITAL-8-22-U
Revision:
Pages:
4
Original Filename:
https://svn.so-much-stuff.com/svn/trunk/pdp8/src/dec/digital-8-22-u/digital-8-22-u-d.pdf
OCR Text
IDENTIFICATION I .I Digi’rGI-8-22-U-Sym I. Unsigned Decimal Print I .3 June 7, I965 PUP-B LIBRARY Digital-8-22-U-Sym Page 2 2 AB? TRACT . This subroutine permits the typeout of the contents of a computer word as a 4—digit, positive, decimal integer. 3. 3: . REQUIREMENTS I Storage This subroutine requires 38 core locations. 3.3 Equipment Basic PDP—8 with ASR 33. 4. USAGE 4.I Loading The subroutine may be placed in core by use of the Digital-8-2-U-Rim for full details. user 4.2 Binary Loader. See The symbolic tape provided is either assembled with the program or separately with the proper origin setting. Cialling Sequence The subroutine is called by the usual JMS instructionwith the number to be printed in the AC. Return to the location following that of the calling JMS. 5. RESTRICTIONS (Not Applicable) 6. DESCRIPTION 6.I Discussion This is a basic subroutine used to obtain decimal output corresponding to binary words in memory. The program operates in a straightforward manner. First the binary equivalent negative result is obtained. A count is kept of the number at subtractions necessary to accomplish this, thus yielding the most significant decimal digit. This process is repeated—-using the proper power often, to give the three re— maining decimal digits. of IOOO is subtracted from the original number until 7. METHOD 7.I Discussion a This method of binary to binary coded decimal conversion is compact and easily The latter consideration is of little consequence since the understood if it is not sophisticated. subroutine is output limited. Digital-8—22-U-Sym Page 3 8. FORMAT 8.3 Output Data Output is in the form of four 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 the latter purposes. 9. EXECUTION TIME 9.3 Average This subroutine is output limited. 10. PROGRAM 10.4 Program Listing /PDP-8 UNSIGNED DECIMAL PRINT /CALL WITH NUMBER TO BE TYPED IN AC /RETURN TO LOCATION FOLLOWING CALLING JMS 0200 0000 0201 3243 DCA VALUE 0202 3244 DCA DIGIT 0203 1235 TAD CNTRZA DECPRT, 0 0204 3245 DCA CNTRZB 0205 1234 TAD ADDRZA 0206 3213 DCA ARROW 0207 7410 SKP 0210 3243 DCA VALUE 0211 7100 CLL 0212 1243 TAD VALUE 0213 1235 0214 7430 0215 2244 ISZ DIGIT 0216 7430 SZL 0217 5210 JMP ARROW-3 0220 7500 CLA 0221 1244 TAD DIGIT 0222 1242 TAD K250 0223 5041 TSF 0224 5223 JMP .—1 0225 5045 ms ARROW, TAD TENPWR /SAVE INPUT /CLEAR /SET COUNTER To FOUR /SET TABLE POINTER /SAVE /SUBTRACT POWER OF TEN SZL /DEVELOP BCD DIGIT /LOOP /HAVE BCD DIGIT /GET DIGIT /MAKE IT ASCII /OR TAD DIGIT /JMP TDIG: SEE 8—19-U—SYM /TYPE DIGIT = Digifa 1 -8-22-U-Sym Page 4 0226 7600 0227 3244 DCA DIGIT 0230 2213 ISZ ARROW CLA 0231 2245 ISZ CNTRZB 0232 5212 JMP ARROW-1 0233 5600 JMP l DECPRT 0234 1236 TAD TENPWR 0235 7774 0236 6030 ADDRZA, CNTRZA, TEN PWR, —4 4750 0237 7634 -0144 0240 7766 —0012 0241 7777 -0001 0242 0260 0243 0000 0244 0000 0245 0000 11. DIAGRAMS (N01L Applicable) 12. REFERENCES K260, VALUE, DIGIT, CNTRZB, $ /CLEAR /UPDATE POINTER /DONE ALL FOUR? /NO:CONHNUE /YES: EXIT /ONE THOUSAND /ONE HUNDRED /TEN /ONE 260 o o o Digital-8-19-U—Sym. Teletype Output Subroutines
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies