RECOMP II USERS' FROGRAM NO. 1079
PROGRAM .. TITm: DECIMAL
INPUT
ROUTINE PROGRAM CLASSIFICATlOO: Utili t;yAUTHOR:
PURPOSE:
DATE:
w.
t-lellmanServomechanisms, Inc.
Research Division
Goleta, Calltornia
This routine is
used
to permit a program tocall for the manual entr,r of a decimal number
. during the course of the program.
12 June 1961
Published b;y REOOMP Users' Library
at
AUTONErICS INDUSTRIAL PROllJCTS
A DIVISION OF NORTH AMERICAN AVIATION, INC.
3400 E. 70th Street, long Beach
5,
CaliforniaPage I
RESEARCH 0 I V IS ION -. SERVOMECHAN I SMS I INC. ---~----.
. DECIMAL INPUT ROUTINE
PURPOSE:
This routine is used to permit a program to calI" for the manual entry- - of a decimal ~uinber during the course of the program.
USE:
A. Calling Sequence
1._ This routine is normally called by the ule of the trapping mode paeudocommand "IND" followed by the address in which the' number i8 to be stored. Thul ItIND 1234. 0" signifies, "input a decimal number and stor~ it in location 1234. "
The half-word bit of the address signifies "fixed point" if a "0"
or "floating point" if a It 1". (If the "b" of a number is made minua zero, the number will be entered as floating point, regardle8s of the half-word bit. )
2. For use without the trapping mode t the following is the calling sequence:
TRA ,(location of thi8 routine) CLA w w w w. x
Here w w w w is the address in which the number is to be stored; x is the half-word-bit code, as above; the TRA in8truction must be in a right half-word and immediately followed by the code word.
B. Entry and Exit
Enter routine with b (if a f~ed point number is to be inpUt) in the R-register, @39.
Exit from routine with number -in accumulator, and b-- or exponent
@39 iriR-regieter. Fixed point number. will-also be .tored in their - specified location; floating point- n~mber. will be stored in that locatio-n,
with the exponent in the following word. in proper format.
f C. 200 4 A. R Ell. 2 I 60
l04R.
Page Z RESEARCH DIVISION. SERVOMECHANISMS, I N C . - - - -
C. Address Display (Incidental Feature) .1. TRA (location of this routine
+
26. 0)2. The bits "in the right half addre •• pOlition (but for the half-word bit. which is ignored) of the accumulator will be interpreted as four.
octal digits, converted into BCD, stored in 7770, and displayed.
D. Entering Number
1. When this routine is ready to accept a number. the "alpha" pilot will light. Enter the number at the console keyboard, u.ing the decimal point if it is required. The decimal may be entered aa often ae desired, but only the first decimal point is recognized.
z.
The sign may be entered at any time (befc:>re. after, or in the middle of a 8tring of digits), and aa many times a8 whim ox: fumbling demand ••The last sign entered is displayed and u8ed to let the sign of the number.
If no sign i. entered, the number will be a •• urned to be po.itive and
displayed a. positive.
3. The individual digits of the number (including the decimal) are.
displayed as they are entered. Digits 8hould not be entered much fa.ter than 5 digits per second .
. 4.
To- terminate the string. push the "enterlt key; return ia made to tbe main program with the number in normalized floating. point in th'e A and R registers.5. If an error i8 detected while the numeric d~git. are being ent ered (before pushing tbe enter key). it may be corrected by pUlhingthe
"clear" button, which clear. the dilplay and allow. the number to be re .. entered correctly.
6.
In no case should any of the .tart or di8play button. be prelsed whil.a number is being entered.
E. . Error Indication '
There i. no error return in the calling .equence. For fixed point
I C 2004 ARE". 2' 60
Page 3
RESEARCH DIV.ISION . SERVOMECHANISMS, I N C . - - - -
numbers; if the apecified b will not hold the number. the b ia diaplayed in command format and the computer halts. PUlhing start will allow a new entry to be made. Return to the program will not occur until a number that can be .held at thil b ia entered. No error indication is given for floating point numbers.
RESTRICTIONS:
A. Accuracy
1 . . At least 38 significant numeric bits of the number are retained c~r.rectly ata11 times; numbers, therefore, have a relative ¢rror
- . . . -11 38
less than 1 x 10 • Integers less than Z are converted exactly.
as are all" numbers which are entered in le'l than twelve digit. and whQse exact bi~ry equivalent is expre~8able in less than 38 significant bit.
(11/8
+
1/1024=
1.3259765625. for example).Fixed point numbers. are not rounded before they are shifted (de-normalized) to the specified b and may thus be in error in the least significant bit. .
, B. Range:' .More digit. than will be entered in usual practice
11 lOll
(10.1
0.
<
number ( 10 ),however, only the .1a.t 15 digits entered will be displayed.
e.
Digits should not be entered at a,rate much falter than 5 pel;' lecond.Faate'rentry will make the di.play and perhaps the nUmber incorrect.
U the display is correct, the number will be correct.
r c: 2004 ARE \I. 2! 60
l04R Page 4
RESEARCH DIVISION. SERVOMECHANISMS,
I N C . - - - .
D. Storage: 120 octal sector •• including:
1. SMI~Z8R (Lo + 40 through Lo + 117) Floating point ~on801e input
·2. SMt (L + 2S through L .+ 37) Addre •• Display
o 0
UNITER·MS:
Data, Number I Binarization, Input. Address Display
r C 200 4. REV. 2 I 60
.~c.+
.... tu .. ",.
~"-
pi c. Itt ..".'0
J~...
~••
r 1~ ~
Tt--- '--__ ~.~-'-oc.-' "' __ -,
J V
•
\, ,
t
,
t,
, ,
l
• •
.. •
.
,
,
- - -
~&+'
Rot"6, ~ '"R:: If>r:'/
i .. ,4~ei:"Ml
d« '"
0" ...1,
f:C tt.t.,'ft ... '1
Itt'l
g - e~p) p/tlcc:s \---~ ... :-"-..
...-.-,--
... -,---~-.-...,",~.t
.. - . •...S·lOl
w)----? ~~
~.---...----...
-
FS"'(~) ...
~;-..,.,
~>
SM/ I,'. Research Divisi.on~ Digital Computing Facility . Page
-L
of..LIProgramNo .. /OJ..! ..
R
Title __ .CoNSoLeIN
pu)- -6.A
D08f5$P'Sp"Ay . . .
Programmed by:
We W .ot....a4'Q.
Date __ .JIS=r:..-...---l2.~-4 ....-+-I _____ 11
II---·--·---A~
_______
~_
_IILoc'n Cm 'd .Addr. Contents ACCl1n"11nl ;ltor b Remarks
IST-A
.00·7·'
~~~---~---+---+---~
,~
__
~~!~~·~~,~~2.~7~·&~O~O;+_---_----~---_+--~---~.~ l-r.~A· 02·"·0
CL·A .o-O~7~
..
D~.---~---+---~---~1~~-·
_ _~b~~£.~;X~:~~:l:DS~.O+_--~ __ ----~~--~----_+--_+---~
IT.re .
f> , ·0·1 ~ 1'I~n·'·0
..
~.
.I> • • .Iet.
.. · · ·7
. I2Q .i.e
lo • • . ,
.
~.
• ' .2.
.3
8
I-r.P·L -l). 1 :~·O
I
rr.-i:-E ·().l·b·' ~-y
rr·p·l . /). \.·h·
r
_-.;,."..--'i§~J-_I_---_+_-_+_---__t ID·\·S ·0 2.-~!.O e ... t-o...I '-,
J;~_I •• b. A,. O·D " ·0 'l.,
4·0
f.+.l.X) Cf) .0.0·0
·-.00 00-&·2·0
Program No .. IOIf..:..B.Title _ _ · ... _....;... _ _ _ _ _ · _ _ _ _ _ _ _ _ _ _ _ _
Programmed by: . Date
---11
Loc'n . C~· i .Addr. Contents . A tla.tor b Remarks·
• .. I t ' U .~ I
... " I(~ '.- iI.·nt,. """
.,
fi·T·A. 1"7 .• ? ., , . ,,
•. ' .2., .''''
.
:.:~,
...
, , , If
:
.
. ·S Ie. J.'- . '7· ', . ., ()
J I
., ' .. '.717.7·
'J.'I.'
I+D~bOOD·()·,P~)=h'·
:::::;.=====1:======1===4=========-1
,
...
' .. ~..
,. -{ ,·
~. ;.
.1·
·
(-
"
...
,---+--+---....~---+---_I_-_+_---_1J/.
~,., -1--1-"':-:-1-"';".' ~-~-I-~---I---+---+---_I