79
NBSIR 75-924 Evaluation, Revision and Application of the NBS Stylus/ Computer System for Surface Roughness Measurement: Minicomputer Software E. Clayton Teague Institute for Basic Standards National Bureau of Standards Washington, D. C. 20234 April 1975 Final Report ** OF DISTRIBUTION STATEMENT A Approved for Public Release Distribution Unlimited Reproduced From Best Available Copy U S DEPARTMENT OF COMMERCE NATIONAL BUREAU OF STANDARDS 20000403 053

Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

NBSIR 75-924

Evaluation, Revision and Application of the NBS Stylus/ Computer System for Surface Roughness Measurement: Minicomputer Software

E. Clayton Teague

Institute for Basic Standards National Bureau of Standards Washington, D. C. 20234

April 1975

Final Report

** OF

DISTRIBUTION STATEMENT A Approved for Public Release

Distribution Unlimited

Reproduced From Best Available Copy

U S DEPARTMENT OF COMMERCE

NATIONAL BUREAU OF STANDARDS

20000403 053

Page 2: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

NBSIR 75-924

EVALUATION, REVISION AND APPLICATION OF THE NBS STYLUS/ COMPUTER SYSTEM FOR SURFACE ROUGHNESS MEASUREMENT: MINICOMPUTER SOFTWARE

E. Clayton Teague

Institute for Basic Standards National Bureau of Standards Washington, D. C. 20234

April 1975

Final Report

U.S. DEPARTMENT OF COMMERCE, Rogers C.B. Morton, Secretary James A. Baker, III, Under Secretary Dr. Betsy Ancker-Johnson. Assistant Secretary for Science arid Technology

NATIONAL BUREAU OF STANDARDS, Ernest Ambler, Acting Director

Page 3: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

Table of Contents

I, Introduction I

II. Allocation of Core Memory During Use By the Software for Surface Roughness Measurement 4

III. Flow Diagrams of Major Programs or Routines 12

IV. Operating System 21

V. Brief Description of Op-Codes and Instruction Word Formats 29

VI. Annotated Listings of Complete System Software 34

List of Figures

Figure I: Flowchart of Main Step/Roughness Program 13

Figure 2: Flowchart of Main Step/Roughness Program 14

Figure 3: Flowchart of Main Step/Roughness Program 15

Figure 4: Flowchart of Least Squares Routine 16

Figure 5: Flowchart of Routine to Calculate Step Heights |7

Figure 6: Flowchart of Routine to Calculate AA Value 18

Figure 7: Flowchart of Amplitude Density Function Calculation 19

Figure 8; Flowchart of Autocorrelation Function Calculation

Figure 9: Instruction Word Formats

20

30

Page 4: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

MINICOMPUTER SOFTWARE FOR THE NBS STYLUS/COMPUTER SYSTEM FOR SURFACE ROUGHNESS MEASUREMENTS

1. Introduction

A thorough description of all the software used at NBS for characterizing surface texture is given in this report. The description includes flow diagrams and detailed, annotated listings of machine language programs for step-calibrating the system, for acquiring digitized surface profiles and for calculating from these profiles important parameters and statistical functions. Parameters and functions included are the arithmetic average value, mean square value, average wavelength, average slope, amplitude density function and autocorrelation function.

The report was originally written as an appendix for the NBS Technical Note, "Evaluation, Revision and Application of the NBS Stylus/Computer System for Surface Roughness Measurement." However, due to its size and specialized content, the appendix was issued as this separate volume.

Page 5: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

This appendix contains the following information about the computer software used with the minicomputer/stylus instrument system:

A. Allocation of the Interdata Model 3 memory during use by the step/roughness measurement software,

B. Flow diagrams of major programs or routines,

C. A memorandum by Philip G. Stein (NBS) which describes the properties and the use of an operating system he developed for the Interdata Model 3,

D. An annotated listing of all the step/roughness measurement software and of the operating system,

and

E. An instruction set listed by Op-code, for the Interdata model 3 with an excerpt on instruction word formates taken from the Interdata Model 3 manual.

The detailed information about the computer software which is given herein is presented so that the reader will have available an actual implementation of a total software system for computerized surface roughness measurement. Listings of the software in machine language should be of use to the reader whose minicomputer memory size is limited and thus is unable to support a compiler and to the reader considering the implementation of parts of the software system on a recent generation minicomputer. For those with assemblers and/or compilers, the flow diagrams and listings should enable the efficient writing of necessary programs. The incorporation of this appendix and motivated by the desire that one or all three of these routes be encouraged in every possible way. Thus, any questions pertaining to the software's operation, design or use would be welcomed by the author.

The documentation of computer programs in machine language is Impossible without making - reference to specific equipment and instruction sets 'by brand name. However, no judgement as to the quality or suitability of the equipment discussed here has been made by the National Bureau of Standards, and no recommendation, favorable or otherwise, should be implied by this report.

The software is neither as elegant nor as efficient in many places as I would have desired. This statement is not a criticism of the work contributed by others. It is more of an encouragement to the user to take the programs as they stand and to make as many Improvements as his time allows. The software is however a system of programs which has passed every functional test conceived to check its

Page 6: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

operation. As described in the body of the report, these checks have included static and dynamic checks such as: (1) If step data goes from an ordinate (a-c) to a second ordinate (b-c), is the calculated step height constant and equal to b-a for all values of c within the data-range of the computer? (2) If the slope on the "left" side of the step increases, does the step height decrease?; and (3) Does the AA values calculated from known waveforms correlate with analytically calculated values?

I wish to acknowledge with thanks the many contributions to this software system by NBS associates. Their advice and, in many cases, their contribution of complete program listings made the writing and revising of the system software a much easier task. Contributors to the software were Dennis A. Swyt (DAS), Philip G. Stein (PGS), Chris E. Kuyatt, (CEK), Nils Swanson (NS), Carol Young (CY), and E. Clayton league (ECT). The major source of each program or routine is acknowledged in the listings with the initials just given for each contributor. Final responsibility for the correctness of the listings and documentation should however fall upon me since many relocations, renamings and minor revisions have been made on the original programs.

Throughout this appendix the following abbreviations and notations are used:

RO—RP ; general registers 0 thru P,

MMY , memory,

TTY ; teletype,

CRL ; carriage return and line feed,

SP ; space,

ADC ; analog to digital converter,

ASCII ; American Standard Code for Information Interchange,

ACP ; Autocorrelation Puction,

ADP ; Amplitude Density Function,

LSQ ; Least squares, and "

[] or () ; for use other than in mathematical equations should be read-contents of a register or a memory address, i.e., [(0560)+(RC)] should be read; contents of the memory address obtained by adding the contents of memory address 0560 to the contents of register C.

Page 7: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

Allocation of Interdata 3 Core Memory During Use By The Software For Surface Roughness Measurement.

(0000-004F)

(0050-0078)

(0080-02FE)

(0300-034C) =

General Registers 0-F, Hardware Registers and Program Status Words

"50" Loader to input paper tapes at the TTY

Main Step/Roughness Calibration Program

Input - HO, Al, A2, and Units at TTY, Data and Interrupt from ADC, Decisions indicated at TTY for

roughness or steps

Output - Step heights, KCAL, and AA values at TTY

Storage - Step Data, (1000-1400), Step heights, (0B60-0B82), Profile data, (1000-2000), AA values, (0BI4-0B5E), KCAL value, (OBAC-OBAE), HO, (0B94), Al, A2; (OB90-OB92), Units; (0BB0), Temporary storage of AA - (OBOE), Indices for taking AA - (OBOA-OBOC), Flag for Bypassing KCAL calculation -(0BB2),

Main Step Height Program

Input - Al and A2 from (OB90-OB92), Step Data at (1000-1400)

Output - Hexadecimal step heights and slopes and intercepts of least squares lines on each side of step

Storage - Hex step heights; (0B60-0B82) Slopes and intercepts; (0B96-0BA4)

Page 8: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

(0350-03FA) = Calculate Hex Step Heights Routine

Input - Al and A2 from (OB90-0B92); Slopes, a I and a2, and intercepts, bl and b2, from (0B96-0BA4)

Output - Hex step heights stored at (0B60-0B82)

(0400-043C) = Calculate KCAL Routine

Input - Decimal HO from (0B94), HM from (OB80-OB82)

Output - KCAL stored at (OBAC-OBAE)

(0440-0492) = Convert Hex Steps to Decimal Using KCAL, Roundoff and Print Results

Input - Hex step heights from (0B60-0B82), KCAL from (OBAC-OBAE)

Output - HI, H3, H5, H7, HM in decimal at TTY

(04AO-05I2) = AA Calculation

Input - Profile data from (1000-3000)

Output - AA value of data in (R5)

(0518-0552) = Convert AA in Hexadecimal to Decimal and Print Result

Input - AA value from (R5) KCAL from (OBAC-OBAE)

Output - Decimal value of AA at TTY

(0560-0634) = Least Square Fit to Data from (0590) to (0590) + (0578)

Input - Starting point of data, (0590); Number of points, (0578).

Output - Slope of line fit x 1000 -> (R45), Intercept of line fit x 1000 -> (ROD

(0640-0658) = Routine to Set Parameters for Reading Step Data from ADC Into MMY

(065A-0672) = Routine to Set Parameters for Reading Roughness Data from ADC Into MMY

Page 9: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

(0680-OA80) =

(OA80-OBOO)

(0B0A-0BB2)

(0BB4-0BFE)

(OCOO-OCBC)

(ODOO-OD )

(OEOO-OEFO) =

Storage Area For Amplitude Density Function or Auto- correlation Function Calculations

= Presently Unused

= Storage for Various Parameters of Main Step/Roughness Program

= Presently Unused

= Program to Calculate and Plot the Autocorrelation Function of Data in MMY Locations (1000-3000)

Input

Output

Storage

- Data in (1000-3000), Shift increment = (0C06)

- (RMS)2 value of data adjusted by KCAL at TTY, 8 bit precision plot of calculated data at strip chart recorder.

- Calculated data for 512 shifts stored üt (0680-OA80)

Routine to Calculate Mean and Standard Deviation of a Set of AA Values

Input - Number of AA Values" upon query at the TTY

AA values from (0BI4-0B5E)

Output - Mean AA value and Standard Deviation of Data set from Mean

Calculate Derivative and Mean Wavelength of Data in (1000-3000)

Input - - Profile Data in (1000-3000)

Output - Mean slope of Data, Mean wavelength of Data based on

KCAL and sample spacing for usual roughness speed

Both parameters are output at TTY

Storage - Data in (1000-3000) is destroyed

Page 10: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

(OEFO-OEFE)

(OFOO-OF3C)

(0F48-0F84)

(OF88-OFB4)

(0FC2-0FEE)

(1000-3000)

(1500-1670)

(2500-25B2)

Presently Unused

Routine to Store Contents of all Registers Except

Register B

Routine to Restore Contents Stored by 0F00

Register Storage For Registers 0, 1,2, 7, 8, 9, A, C, D, E, and F.

Restore Contents Stored by 0F88

Data Storaoe for Step Input and for Roughness Profiles

Program for Measuring the Height of Three Consecutive

Steps

Input

Output

Storage

- Step data from (1000-1400), Location of Step and period of steps from TTY, KCAL from (0BAC-0BAE)

- Step height values at TTY

- Usual step height storage plus (2000-2006) for index and otheV parameter storage.

Program for Taking Statistics on Step Profile Data

Input - Step location entered into (251 A) and (2522) using monitor, step profile data from (1000-1400), and interrupt

from ADC

(3010-3020)

QutDut ~ - Slope and Intercept of LSQ line fit to P each side of step, KCAL, and HM; all

in hexadecimal, to TTY. Step height in decimal relative to first

step input, is also printed at TTY

Storage - No storage beyond usual step height program requ i rements

Routine to Wait for an Interrupt, Then Read Data at the

AX

Page 11: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

(3022-306C) = Routine to Load Data From ADC

Input - Digitized data from ADC based on an .analog signal at the appropriate ADC channel number for duration of samp Iing time

Output - Data stored at 1000 to 1000 + (302E)

(306E-30B8) = Wait for an Interrupt at ADC, Mark time for I Second, Then Exit

Input - Interrupt at ADC

(30BA-30E4) = Routine to Read 4 Hex Characters at TTY into R2

Input - 4 characters just precedina a CR or SP at TTY

Output - Characters read are left in (R2)

(30E8-3I0C) = Routine to Read 2 Characters at TTY and store ASCII code at OBBO

(3110-3120) = Print Single Space Routine

(3122-3146) = Print 2N+I Spaces Routine with (3130) = N.

(3I4A-3I6A) = Print Two Characters from ASCII code in (R5).

(3170-318E) = Routine to Print "UNITS"

(3190-31 AC) = Routine to Print "AA UNITS'" + CRL

(3IB0-3ID4) = Routine to Print "H OR R?"

(3ID6-3IF4) = Routine to-Print "MORE?"

(3IF8-32I6) = Routine to Print "ENTER"

(3218-3236) = Routine to Print "DATA"

(3240-327F) = Routine to Print "HI H3 H5 H7 HM"

(3280-32CA) = Routine to Print "STEP/ROUGHNESS CALIBRATION"

(32D0-32F0) = Routine to Print Hexadecimal Form of Contents of R2 and R3

Page 12: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

(3300-33FE) = Routine to Convert Binary Number to Decimal Number

Input - (R45) of either sign, full 31 bits

Output - (RI23) and at MMY addresses from [(336A)-£(R8)] to [ 3 + C

Storage - MMY indicated in output plus (3530-354C) for hexadecimal equivalents of powers of 10

(3408-34CE) = Routine to Multiply Unsigned (R5) x (R9) -»■ (R89)

(34D4-3524) = Routine to Multiply (R34) x (R6.7) -*■ (R23.45)

Input - Both (R34) and (R6.7) must be positive

('3530-354O = Storage for Hexadecimal Equivalents of powers of 10

(3550-355C) = Storage of Binary to Decimal Conversion

(3560-358C) = Routine to Multiply (R234) by 2

(3590-35CO) = Multiply (R45) x <R6>, Put Result in (R345)

Input - (R45) either sign, (R6) assumed positive

Output - Result -► (R345); Flaa = 8000 put in (35EE) if (R45) negative.

(35C4-35F4) = Routine to take Absolute Value of (R45) and Set Flag at 35EE if contents negative.

(35F8-3620) = Routine to Change Sign of (R45) if Flag at 35EE is Set

(3622-3642) = Routine to Convert Single Precision (R3) to Double Precision in (R23)

(3644-3696) = Routine to Convert Decimal (R4) to Hexadecimal at Rl .

Input - Assumes (R4) are positive

Page 13: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

(36A0-374C) = Routine to Divide 2 Hex Halfwords by I Hex Halfword. (R45) - (R3) - (R45)

Input - (R45) may have either sign, but (R3) are assumed positive. Only the 30 most significant bits of (R45) are used.

(3750-37E2) = Program for Printing and Punching contents of MMY Locations 1000-3000

lnPu+ - 12 bit left-justified binary numbers of either sign from (1000-3000)

Output - Four digit signed decimal numbers printed (and punched) in a format of number - space with ten number per line. A space is printed for a positive sign.

(3800-3888) = Program to Calculate the Amplitude Density Function For Data Stored at (1000-3000)

Input - Data at (1000-3000)

Output - Calculated data is stored at (0680-OA80), then plotted on strip chart recorder to an 8 bit precision.

(3900-3916) = Program to Clear (1000-3000)

(3918-3946) = Program to Initialize Plot Routine for Bipolar Numbers and to Plot Data in (1000-3000) on Strip Chart Recorder

(3950-39CF) = Plot Routine to Drive Polombo's Waveform Receiver. This Routine takes Halfwords from Specified Memory

Locations Using the 8 tost Significant Bits (Including "the Sign Bit) and Biases the Data to have a Range from 4 to 255.

Input - (3978) = Starting address of data to be plotted, (397C) = Number of shifts needed to obtain 8 bit significance for input, (3984) and (398C) = Maximum value to be plotted, (3990) = Bias, and (399E) = 2X number of points to be plotted. Note that the bias and max- imum value should be adjusted so that; (bias) + (MAX) = 255.

10

Page 14: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

Output - Minimum (4) and Maximum (255) values for approximately 8 seconds, followed by data formatted according to input

'just described.

(39D4-39FE) = Routine to Print "MEAN AA'='\

(3A00-3A2A) = Routine to Print "VARIANCE ="

(3A30-3A48) = Program to Print "ERROR," then return to monitor.

(3A50-3A70) = Print "MM" and Increase Power of 10 in Units by I if for AA

(3A80-3FCE) = HEXADECIMAL MONITOR See annotation and Philip Stein's memorandum in the following pages for use and explanation.

Page 15: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

III. Flow Diagrams of Major Programs or Routines

12

Page 16: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

/ ENTRY \ ( AT 0260 )

/INIT ALIZEX /AVG. KCAL \ ( INDEX AND > ACCUMULATORS

v CLEAR

FLAG AT 0BB2

V /PRINT "STEF /ROUGHNESSy

/CALIB." AT TTY

V PRINT

/'"ENTER DAT/f AT TTY

V

SET PARAMETERS TO READ STEP DATA

V WAIT TOR / INTERRUPT

V READ DATA FROM ADC

V STORE DATA STARTING AT MMY LOCATION

1000

V

<^

V

-<r

V

CALL KCAL.

TO RI2

V ACCUMULATE

INTO OBI0-OBI2

RECALL I KCAL

CALCULATE AND STORE AVG. KCJAL AT OBAC-QBAE

V PR NT

M'AVG. KCAL/= (OBAC-OBAE/'" AT TTY

V

Q ->

LOAD AND

/PRINT "IN" AT TTY

PRINT "ENTER HO" AT TTY

A

PRINT DECIMAL

'STEP HEIGHT'S, UNITS AND CRL

A CONVERT HEX STEP HEIGHTS

TO DECIMAL

A PRINT AT TTY

/"KCAL = (OBAC-OBAE]

/and CRL

A

COMPUTE CALIBRATION CONSTANT KCAL

A CALIBRATE STEP HEIGHTS

IN HEXADECIMAL

A 'PRINT CRL

/AND HI—HM'7 AND "UNITS'/

AT TTY

ENTER 4 CHARACTERS

AT TTY

<- REPEAT PROCESS FOR "UNITS", Al

AND A2.

Figure I : Main Step/Roughness Program, Page I of Flowchart.

13

Page 17: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

ENTRY AT 01A2

V PRINT

/"AA--UNITS", AT TTY

V

E

YES

SET PARAMETERS FOR ROUGHNESS DATA INPUT

V

CLEAR LINE AND STORAGE INDICES AT OBOA and OBOCS

V

/MIT FOR AN VINTERRUPT

V READ DATA

FROM ADC

V

STORE DATA STARTING AT MMY LOCATION

1000

V CALCULATE AA VALUE IN HEXADECIMAL

V STORE HEX VALUE

TEMPORARILY AT OBOE

I NCREMENr AND RESTORE^ INE INDEX VA LUE

V

<■

A

©

^

A

A LOAD HEX AA VALUE AND STORE IN MMY

AT OB14+INDEX

A NO

READ ONE /CHARACTER

AT TTY

A

PRINT DECIMAL AA)

/VALUE AND UN ITS AT TTY

A CONVERT

AA VALUE

TO DECIMAL

■>

ANCREMENT \ /AND RESTORE \ (STORAGE > \ INDEX VALUE/

A

^ YES

RESET

LINE INDEX COUNTER

V

PRINT

SEVEN SP'Sj AT TTY

V PRINT

"MORE?"

AT TTY

V READ ONE

fCHARACTER

AT TTY

V

V NO

V

©

YES

V

Figure 2 : Main Step/Roughness Program, Page 2 of Flowchart.

14

Page 18: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

<-

PRINT "H OR R?"

AT TTY

V

READ ONE

CHARACTER,

AT TTY

A

^-

0 V

PRINT

"MORE?"

AT TTY

V

READ ONE

CHARACTER)

AT TTY

YES

PRINT

2 CRL'S AND "FINI"/ AT TTY

G V

RETURN TO MONITOR )

V

V

Figure 3. Main Step/Roughness Program, Page 3 of Flowchart.

15

Page 19: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

( ENTRY AT A / ENTRY AT \ V 0568 J ^ 0560 )

rINITIALIZE\ INDEX CNTR.

VWITH FINAL tVALUE OF 1 fcp

CALCULATE NUMBER OF DATA POINTS, STORE AT

0578

INITIALIZE

INDEX COUNTER

RC

CLEAR ACCUMULATOR

REG ISTERS ROI & R45

CALL DATA TO R3 AND CONVERT TO

DP IN R 23

ACCUMULATE

ZY

IN ROI

V.

CALCULATE

2IY,

IN R23

INITIALIZE^ INDEX CNTR.

iWITH FINAL .VALUE OF

(05.62)

<r

<-

CALCULATE 1000 a = 1000 X DIVIDED BY N(N+1)(N-1 )

CALCULATE X=[2EiYi -(N+l) STORE IN'RCD

^

A YES

INCREMENT INDEX

COUNTER RC

ACCUMULATE

2ZiY, IN R45

■»■

STORE

I'000a

IN RCD

V

CALCULATE 1000b = I000[IY!/N- (N+D/2 a]

STORE 1000 b IN ROI

C EXIT J

Figure 4: Flowchart of Least Squares Routine.

16

Page 20: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

ENTRY *\ AT 0300. J

INITIALIZE LSQ

ROUT INE

V

LSQ FIT TO

DATA FROM

A2 TO A2+I00

STORE SLOPE a2 AND INTERCEPT

b2

V

rINITIALIZE\ LSQ

ROUT INE

LSQ FIT DATA FROM AI-IOO TO Al

V

STORE SLOPE a I AND , INTERCEPT

bl

CALCULATE Z»I/2(A2-AI) STORE IN

RO

CALCULATE Y = (a2-al)

t?mes (Z-nZ/8|) STORE IN R45

■>

<■

CLEAR

(R9)

A

STORE Z in RA, CALCULATE Z/8, STORE

IN RO

A

CALCULATE W= (b2-bl) -alCZ+80) STORE IN RCD

A

CALCULATE b2-bl,

STORE IN R 78

CALCULATE a2 -a I, STORE IN

RI2

A

CALCULATE Z + 80

STORE IN RD

CALCULATE Hn=W-Yn STORE AT OB60-2 + (R9)

CALCULATE Z - nZ/8 STORE IN RA

CALCULATE HM=ZHn/8 STORE AT 0B80-2

C

\f

EXIT )

Figure 5: Flowchart of Routine to Calculate Step Heights.

17

Page 21: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

(ENTRY \ AT 04A0 )

INITIALIZE^ INDEX AND

\CCUMULATOR REGISTERS

CALL DATA

TO R3

CONVERT

SP R3 TO

DP R23

V

ACCUMULATE EX_ IN n

R67

V

INCREMENT INDEX

COUNTER RC

<

A

CALCULATE XE ZX /N

n STORE IN

ROI

ADD NEGATIVE OF X - X

n 'TO (R45)

A

ADD X - X n

TO (R45)

A

CALCULATE

X - X n

A

CONVERT SP R3 TO

DP R23

I CALL DATA

TO

R3

INITIALIZED \CCUMULATOR

^REGISTERS AN[

>

^ INCREMENT

INDEX COUNTER

V

V YES

CALCULATE AA =

<I/N)£|X -X| STORE ?N R5

V

SHIFT RESULT RIGHT I BIT TO GET CORRECT SCALE

V

C EXIT)

Figure 6 : Flowchart of Routine To Calculate AA Value.

Page 22: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

f ENTRY ^ V^ AT 3800 J

V

INITIALIZE 'STORAGE AREA\ 0680-0A80

V INITIALIZES

INDEX COUNTER

R7

V LOAD "BOX"

SIZE TO

R6

V

LOAD DATA TO R3 AND CONVERT TO DP IN R23

I CALCULATE

"BOX" NUMBER TO WHICH

DATA BELONGS

ADD -I

TO "BOX"

NUMBER

I ADD BIAS

TO BOX

NUMBER

<■

C ENTRY AT 3814

<r

)

V

■<■

A ADD I to

CONTENTS AND . RESTORE NEW VALUE TO "BOX'

YES

->

V

INCREMENT \ INDEX \

COUNTER /

INITIALIZE PLOT

ROUT INE

V

A

PLOT ADF

0680-0A80

RECALL OLD

CONTENTS

OF "BOX"

^

V

f RETURN \ V^TO MONITOR J

A

FIGURE 7: Flowchart of Amplitude Density Function Calculation.

19

Page 23: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

ENTRY AT OCOO ")

A

A

>

X 'INITIALIZE1

SHIFT COUNTER

RC

V

INITIALIZE> SUMMATI ON

.INDEX COUNTEF R6

V CALCULATE NEW UPPER LIMIT FOR SUMMATION

INDEX

CALCULATE NEW STARTING

POINT FOR SHIFTED DATA

X LOAD DATA

POINT TO R9

V

LOAD SHIFTED DATA POINT

TO Rl

V MULT PLY SHIFTED AND UNSHIFTED

DATA POINTS

V ACCUMULATE

SUM OF PRODUCTS IN

R45

^

>

I NCREMENT\ SHIFT INDEX\ COUNTER /

A STORE

SP RESULT START ING AT 0680

"5FTTF RESU

A T TO

OBTAIN MOST SIGNIFICANT SP RESULT

X DIVIDE

ACCUMULATED PRODUCT BY

N-S

A INCREMENT SUMMATI ON

INDEX COUNTER

<—

V

RECALL MEAN SQUARE VALUE

OF DATA FROM (0680)

V MULTIPLY BY KCAL AND

CONVERT TO DECIMAL

± PRINT

'MEAN SQR. VALUE AT

TTY

V CALCULATE NUMBER OF

ISHIFTS TO GET 8 BIT

ISIGNIF CANCE

V

INITIALIZE^

PLOT ROUTINE

I PLOT

ACF(S)

V

(RETURN "\ TO MONITORy

Figure 8: Flowchart of Autocorrelation Function Calculation

20

Page 24: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

IV. Operating System

21

Page 25: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

NATIONAL BUREAU OF STANDARDS Center for Computer Sciences and Technology Information Processing Technology Division

Washington, D. C.

February 4, 1969 650.1/1

TECHNICAL MEMORANDUM

From: Philip G. Stein (650.01)

Subject: A HEXADECIMAL MONITOR SYSTEM FOR THE INTERDATA COMPUTER

During 1968, a computer program was developed at the National Bureau of Standards to allow more convenient use of the INTERDATA model 3 computer. Programs may be prepared, documented, debugged, and run directly from the teletype keyboard. All data and instructions handled by the system are in absolute, hexadecimal format. No symbols are accepted or interpreted except those which are used directly as system commands.

This publication is designed to be used as an operators manual for the system, and includes sufficient documentation to allow a programmer to duplicate it, change it, or incorporate it into a larger structure applicable to special problems.

Although it is impossible to prevent referring to specific equipment by brand name when documenting a computer program designed for a given machine, no judgement as to the quality or suitability of the equipment discussed here has been made by the National Bureau of Standards, and no recommendation favorable or otherwise, should be implied by this report.

It is assumed that the reader is fully familiar with the operation of the INTERDATA model 3, and with the instructions presented in its reference manual, Interdata publication 29-004. According to the manufacturer, this program will run without modification on the model 2 and model 4 as well.

PART I - STORAGE ALLOCATION

All of the descriptions contained here refer to a system written for a computtr with I6K bytes or core memory. The system may be used with any memory of 2K bytes or more, and may be relocated by hand to fit other memory sizes. Paper tapes for an 8K system and a I6K system may be obtained on application to the author.

Memory is reserved in a I6K machine as follows:

0000-004F System Registers

22

Page 26: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

0050-007F '50' loader, as modified for use with this monitor

0080-397F User program space

3A80-3E7F Monitor system

3E80-3F6F Subroutines-Used by monitor but may be called from anywhere

3F70-3F7F Subroutines return push-down stack

3F80-3FCF Bootstrap Loader area

3FD0-3FFF Register SAVE area

In addition, the system uses all of the 16 registers when in operation. It is never necessary to clear or preset any registers when entering the system, but programs called by the system should never depend on the presence of previously stored data in the registers.

The system subroutines are generaI purpose utility programs which will be very convenient for most programmers to call from their own programs. They use some registers, and these are called out in the description of the specific routines.

A programmer wishing to write in such a manner as to be most compatible with 1he monitor should follow these register assignments:

Subroutine return register. Calls: 4IB0 Returns: 030B

Initial address register for loops

Increment for loops

Final Address register for loops

Input/Output device number

Subroutines are nested by ~placing successive returns in a stack located between 3F70 and 3F7F. Programmers wishing to place returns in other registers should put them in 6 and 7 for minimum interference with the monitor.

PART II - LOADING

The monitor system contains its own bootstrap loading program for handling paper tape inputs. The loader is read into 3F80-3FCF by the resident Interdata '50' loader. Make the following,changes in the '50' loader.

23

Page 27: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

ADDRESS WAS SHOULD BE

0052 ???? 3F80

005A ???? 3FD0

0076 ???? 3F80

Then follow the instructions for the '50' loader. After the full loader has been read, there is a blank space, followed by the program. When this area is encountered, front-panel display lights (DIS 2 bits 8:15) should begin to flash. When the read is finished, these lights will all be out If no read errors were made. Stop the tape reader after the last character

has been read.

The above procedure is used not only for loading the monitor tape itself, but also for loading program tapes produced in binary form by the monitor.

PART I I I - USERS MANUAL

After loading, manually restart the computer at location 3C80. The

computer wiI I type

as it will every time it expects an input from the operator. The operator may then begin typing data, instruction, or monitor -commands. All keys, printing or non-printing, on the teletype are active. Those that are not used for Hexadecimal numbers or for monitor commands will cause erroneous data to be entered. Accidental operation of these keys should not be ignored, but corrections should be made.

When typing data or instructions, the monitor only saves the last four characters typed. For this reason, if an error is made, simply continue typing until the last four characters typed are correct. The input data register is cleared after every monitor command, and data is brought into it right-justified. The user may therefore type without bothering with leading zeros. They will be included automatically. After four correct hexadecimal characters are typed into the data register, one of many system

commands may be given.

SYSTEM COMMANDS: POINTER

R - The data register is loaded into a pointer address register. This pointer indicates where data or instructions will be stored or

retrieved.

I - The address pointed to by the pointer is incremented by one ha Ifword.

24

Page 28: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

RUBOUT - The address pointed to by the pointer is decremented by one ha Ifword, and the character f is printed.

W - The current contents of the pointer are printed, and nothing is changed.

SYSTEM COMMANDS: INPUT

CARRIAGE RETURN - The data in the input register is stored at the location indicated by the pointer. Data previously located at that address is destroyed. The position of the pointer is incremented by one ha Ifword, and the system returns a >.

SPACE - Has the same effect as carriage return, except that .Lhe system does not return any printed characters.

Note: Using the above, instructions may.be typed exactly as they appear on the standard coding sheet, i.e.

C8F0 1234 4330 1000 033C 9BF8 41 BO 2222

and data may be typed

1234 5678 9ABC DEFO 1234 5678 9ABC DEFO 1234 5678 9ABC DEFO 1234 5678 9ABC DEFO

with no change in the system.

SYSTEM COMMANDS: OUTPUT

P - Prints the contents of memory, beginning at the pointer and ending at the halfword preceding the data register. The routine is therefore called

I000R 1020P

which will immediately begin printing in program format: i.e.:'

1000 C8F0 1234 1004 41B0 2222 1008 9EFF I00A 0309 I00C 4300 IC8A

Addresses are printed on every line. Halfword and full word Instructions

25

Page 29: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

are printed so that each occupies a single line, and the address computations are adjusted automatically. Printing may be terminated prematurely by depressing one of the console buttons 8 through 15.

L - Prints the contents of memory, beginning at the pointer and ending at the ha Ifword preceding the data register. The routine is therefore called

I000R I020L

which will immediately begin printing in data format: i.e.:

1000 1234 5678 9ABC DEFO 1234 5678 9ABC DEFO 1010 1234 5678 9ABC DEFO 1234 5678 9ABC DEFO

Addresses are printed at the beginning of every line, and the format is fixed regardless of what is being printed. Printing may be terminated prematurely by depressing one of the console buttons 8 through 15.

K - Prepares a binary bootstrap tape and a manuscript tape which may be loaded with the same '50' loader that loaded the monitor itself. It is called in the same way as the P and L routines, but may not be interrupted from the console switches. Before typing K, turn on the tape punch by striking control R (ASR 35) or punch ON (ASR 33). On the ASR 35, after striking K, rotate the MODE switch to TTR.

SYSTEM COMMANDS: CONTROL

G - Causes the computer to jump to the address in the data register. If this address is greater than 3B00, the command is ignored. If the address is accepted, the computer will ring the teletype bell and wait for a console switch (8 through 15) to be pressed before executing the j ump.

> - Causes the computer to reinitialize the monitor and restart it. When a new page or other circumstance makes it unknown whether the system is running or where it is^ typing > will return

and restart the system. It is suggested that all other routines which and call the system be written so that typing > will jump to 3C80 and restart the monitor.

PART IV - LINKING

Users who which to add their own routines to be called by monitor commands should do so as follows:

26

Page 30: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

There are four blank spaces in the command tables. Place the ASCII code for the letter command, and the address to which a jump is desired when that letter is typed, into memory as shown:

Letter Command JUMP ADDRESS in BYTE in HALFWORD

3CD0 3CF4

3CDI 3CF6

3CD2 3CF8

3CD3 3CFA

Your routine may retrieve the pointer from register 5 and the input data buffer (four characters, converted to hexadecimal) from register 4.

To return to the monitor, reinitialize, and print

Jump to 3C8A. To return without the printing, jump to 3C96. No other addresses in the monitor snould be used as entry points.

PART V - UTILITY SUBROUTINES

These programs should be useable by every program for handling input/output and data conversion chores. They are listed below, and include calls, location of input and output argument, and lists of registers destroyed by

their use.

Name

PRINT 41 BO 3E80

(reg INPUT ARGUMENT ister or other)

0 (8-151

OUTPUT ARGUMENT (register or other)

te1etype

DESTROYS register

0, 8, F

READ 41 BO 3E8A

te1etype 0 (8-15) 0, 8, F

ASCII-HEX 41 BO 3EA4

0 (8-15) 1 (12-15) 0, 1

HEX-ASCII 41 BO 3EC8

0 (12-15) 1 (8-15) 0, 1

LOOP 41 BO 3EE2

Panel Buttons 8-15 Condition Code 0

27

Page 31: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

NAME INPUT ARGUMENT OUTPUT ARGUMENT DESTROYS (register or other) (register or other) register

PRINT4 41 BO 3EFO

2 teletype 0, 1, 2, 3, 8, F

LEADER 41 BO 3F26

0 (8-15) teletype 0, C, D, E, F

CARL 41 BO 3F44

teletype 0, 8, F

PRINT: Prints the contents of register 0 (8-15, in ASCII) on the teletype.

READ: Waits for a character to be typed on the teletype, then loads it into 0 (8-15).

ASCII-HEX: Interprets the ASCII characters 0-9 and A-F and converts them to Hex. This routine does not do correct processing on any other character.

HEX-ASCII: Converts the sixteen hex characters to their ASCII equivalents, With the parity bit always set.

LOOP: Senses the front panel buttons, and sets the condition code equal to 0 if none of them are pushed.

Print4: Prints the entire halfword located in 2 on the teletype as four Hex characters.

LEADER: Punches six inches of tape containing the character located in 0 (8-15).

CARL: Causes the teletype to carriage-return, line feed.

PART IV - DOCUMENTATION

An annotated listing of the monitor program is included with the complete listing of the software in this appendix. They should be self-explanatory to a programmer familiar with the Interdata 3. Any questions concerning the monitor, its operation, design, or use would be welcomed by the author. Details of the tape punch and print formats may be found by following the process by which they are generated, as seen in the listings.

28

Page 32: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

Brief Description of Op-Codes and Instruction Word Formats

29

Page 33: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

These excerpts from the Interdata Model 3 Manual are given to make the listings independently readable. Further detaiIs about the instruction set, instruction word format and the model 3 minicomputer may be obtained from Publication Number 29-004R02, published by Interdata Inc., 2 Crescent Place, Oceanport, New Jersey 077571, phone number (201) 229-4040.

INSTRUCTION WORD FORMATS

Instructions in INTERDATA Systems have three formats:

1. Register to Register CRR]

2. Register to Indexed Memory L~RXH

3. Register to Storage [RS]

In general, each format specifies three things: The operation to be performed, the address of the first operand, and the address of the second operand. The first operand is normally a General Register which contains the result of a previous operation. The second operand is normally the contents of a General Register, the contents of a core memory location, or a data constant used as the other participating, operand.

A 16-bit ha Ifword format is used for register to register operations. A 32-bit fullword format is used for the register to indexed memory, and the register to storage formats. The specific formats are shown in Figure 9.

16-BIT HALFWORD

REGISTER-TO-REGISTER [RR]

0 7 8 II 12 15

OP Rl R2

32-BIT FULLWORD

REGISTER TO INDEXED MEMORY

0 7 8 II 12 15 [RX]

16 31

OP Rl X2 A

REGISTER TO STORAGE [RS] 0 7 8 II 12 15 16 31

OP Rl X2 A

Figure 9: Instruction Word Formats

30

Page 34: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

The 8-bit OP field in all three formats specifies the machine operation to be performed. The operation code can be written as two hexadecimal characters.

The 4-bit Rl field in the three instruction formats specifies the address of the first operand. The Rl field is normally the address of a General Register and is written as one hexadecimal character.

The 4-bit R2 field in the RR instruction format specifies the address of the second operand. The R2 field is always a register address and is written as one hexadecimal character.

The 4-bit X2 field in the RX and RS formats specifies a General Register whose content is used as an index value. The X2 field is always the address of a General Register and is written as a single hex character.

The 16-bit A field specifies a memory address in.the RX format, or contains an integer value to be used as an immediate operand in the RS format. It is written as a string of four hex characters.

The RR instructions are used for operations between two registers. The first operand is the contents of the register specified by the Rl field of the instruction word.' The second operand is the contents of the register specified by the R2 field.

The RX instructions are used for operations between a register and memory with the option of indexing. The first operand is the register specified by the Rl field of the instruction word. The second operand is the contents of the memory location specified by the A field of the instruction word, or by the sum of the A field and the contents of the General Register specified by the X2 field if indexing is specified.

In the RS instruction, the first operand is the contents of the General Register specified by the Rl field of the instruction word. The second operand is the number contained in the A field, or the number generated by adding the A field to the contents of the General Register specified by the X2'field if indexing is specified. The second operandof an RS instruction specifies the number of bit positions in shift Instructions, or forms the second operand in immediate instructions. An immediate operand is two bytes of data used as an operand and carried in the halfword address field itsel*. The value in the address field is treated as a signed integer instead of a memory location address.

For the Branch on Condition instructions the first operand is the Ml field. This field is a 4-bit mask which is to be tested against the con- dition code contained in the Program Status Word.

Page 35: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

LIST OF INSTRUCTION SET FOR INTERDATA MODEL 3

OP CODE TYP

01 RR 02 RR 03 RR 04 RR 05 RR 06 RR 07 RR 08 RR OA RR OB RR OC RR OD RR OE- RR OF RR 40 RX 41 RX 42 RX 43 RX 44 RX 45 RX 46 RX 47 RX 48 RX 4A RX 4B RX 4C RX 4D RX 4E RX 4F RX 90 RR 92 -RR 93 RR 96 RR 97 RR 9A RR 9B RR 9D RR 9E RR 9F RR CO RS

INSTRUCTI ON

Branch and Link Branch on True Condition Branch on False Condition AND Ha Ifword Compare Ha Ifword OR Ha Ifword Exclusive OR Ha Ifword Load Ha Ifword Add Ha Ifword Subtract Ha Ifword Multiply Ha Ifword Divide Halfword Add with Carry Halfword Subtract with Carry Ha Ifword Store Ha Ifword Branch and Link Branch on True Condition Branch on False Condition AND Ha Ifword Compare Logical Halfword OR Ha Ifword Exclusive OR Ha Ifword Load Ha Ifword Add Ha Ifword Subtract Ha Ifword Multiply Ha Ifword Divide Ha Ifword Add with Carry Ha Ifword Subtract with Carry Ha Ifword Unchain Store Byte Load Byte Write Block Read Block Write Data Read Data Sense Status Output Command Acknowledge Interrupt Branch on Index High

32

Page 36: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

OP CODE TYPI

Cl RS C2 RX C4 RS C5 RS C6 RS C7 RS C8 RS CA RS CB RS CC RS CD RS CE RS CF RS DO RX Dl RX D2 RX D3 RX D5 RX D6 RX D7 RX DA RX DB RX DD RX DE RX DF RX

Branch on Index Low or Equal Load Program Status Word AND Ha Ifword Immediate Compare Logical Ha Ifword Immediate OR Ha Ifword Immediate Exclusive OR Ha Ifword Immediate Load Ha Ifword Immediate Add Ha Ifword Immediate Subtract Ha Ifword Immediate Shift Right Logical Shift Left Logical Shift Right Arithmetic Shift Left Arithmetic Store Multiple Load Multiple Store Byte Load Byte Autoload Write Block Read Block Write Data Read Data Sense Status Output Command Acknowledge Interrupt

33

Page 37: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

IV. Annotated Listings of Complete System Software

34

Page 38: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

008 OR >0640P 008 0 0700 008 2 4000 008 6 41B0 008A 41 BO 008 E 41B0 009.2 41 BO 009 6 41B0 009A 41B0 009E 4ISO 00A2 4200 00A 6 C8 50 OOAA 41BO OOAE 41BO 00B2 41B0 00B6 C8 50 OOBA 41BO OOBE 41B0 00C2 41 BO 00C6 4020 00CA41B0 OOCE 41B0 00D2 41BO 00D6 41B0 OODA 41B0 OODE C8 50 00E2 41B0 00E6 41B0 OOEA 41BO OOEE 4020 00F2 4130 0ÖF6 C8 50 COFA 41 BO OOFE 41B0 0102 41B0 0106 4020 010A 41B0 010E 4200 0112 41B0 0116 41B0 OllA 41B0 011E 41B0 0122 4200 0126 4200 012A 4200 012E 41B0 0132 C850 0136 41B0 013A C8 50 013E 41B0 0142 C850 0146 41B0 014A 41BO 014E 4820 0152 41B0 0156 4820 015A 41B0 01 5E C8 00 0162 4000

(0080-02FE) LüAS &, ECT]

0BB2 32A4 3F44 3F44 31F8 3218 0640 3010 0000 C9CE 314A 3110 31F8 C8CF 314A 3110 303A 039 4 31F3 3170 30E8 3110 31F8 C131 314A 3110 303A 0B9 0 31F8 C132 3 1 4A 31 10 30BA 0B9 2 3F44 0000 3240 3170 3122 0300 oooo 0 000 0000 0400 CBC3 314A C1CC 314A OOBD 314A 31 10 OBAC 3EF0 OBAE 3EF0 0000 0BB2

MAIN PROGRAM Clear flag

Pr I nt "STEP/ROUGHNESS CALI BRATI ON" "" Two carriage returns and line feed (CRL)

Print "ENTER" Print "DATA" ' Set parameters to read step Wait for an interrupt and read sfep'"'däta~"— ~'"' continue "Load "IN" ' Print Print space (SP) Priiit "ENTER" 'Load "HO" ———— _..__

Print Pr i nt SP -- - Read 4 characters at teletype (TTY), step height Store at 0B94 " -• Print "ENTER" Print "UNITS" ™ _ ... Read 2 characters at TTY (Input units) Print SP ■ - Print "ENTER" Load Al Print Print SP -- — ' —■ "~ — ^ Read 4 characters (input Al) Store at OB90 " " - Print "ENTER" Load A2 ' " - — Print Print SP " - ' ■""■- ~ " ■ ■- Read 4 characters (Input A2) Store at 0B92 — CRL Continue" ~" " : Print "HI H3 H5 H7 HM" Print "UNITS" '-" -.——_—— .....

Print 7 spaces Calculate step heights'in hexadecimal

Cent i nue._ Continue "" '

Compute "caf ibratiori constant "(KCAL) Load KC Print : Load AL _.. Pr i nt • Load = Print Print SP

Print contents of OBAC and OBAE = (OBAC-OBAE)

Flag Load - not presently used

35

Page 39: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

ei 66 41 BO 3F44 01 6A 41B0 0440

' 01 6E 48 50 03B0 0172 41B0 3A58 017 6 41B0 3F44 017A 4300 02F4 017E C800 1111 0182 4000 0332 018 6 41B0 3130 018A 41B0 3E8A 018E C500 00D2 0192 4330 019E 019 6 41B0 3F44 019A 4300 009 2 019E 41B0 3F44 01A2 4130 3190 01A6 41B0 0 65A 01AA 07AA 01AC 40A0 OBOC

* 0120 40A0 OBOA ' ' 01S4 4130 3010

01B8 4130 04A0 01BC 4050 030E 01C0 4130 0518 01C4 4130 3110 01C8 48 50 OBBO 01CC 4130 3A50 01D0 4130 3E8A 01D4 C500 0043 01D8 4330 01F0 01DC 48 00 OBOE 01E0 4840 OBOA 01E4 4004 OB 14 01E8 CA40 0002 01 EC 4040 OBOA 01 FO 4130 3110 01 F4 4130 3110 01 F8 4840 OBOC 01 FC CA40 0001 0200 4040 OBOC

• " 0204 C540 0003 ' 0208 428 0 0134

020C 0744 02 OE 4040 OBOC 0212 4130 3122 0216 4130 31D6 021A 41B0 3E8A 02 IE C500 004E 0222 4330 0240 0226 41B0

4300 3F44 01B4 02 2 A

022E 0232 0230 4130 31D6 0234 4130 3E8A 0238 C500 0059 023 C 4330 017E

" 0240 41B0 3F44 0244 41B0 3F44

~ CRL """" 7 Convert hexadecimal steps to decimal and print

"Load units (those input previously) Print

' CRL" """" "" " Branch to flag test Load flag "'" ~ Store flag

"Print "H OR R?" ~'

Read one character at TTY Compare it with an R Branch to AA routine if equal

"CRL " ""■ " " ~ "~ Branch to_start of_step height routine

Pr i nt "AA—■—UN ITS" Set parameters for roughness data input

Clear accumulator and summation index

Wait for an interrupt and read data Calculate AA value in hexadecimal Store hex value temporarily at OBOE Convert AA to decimal and print Print SP Load units (those input previously) Print Read one character at TTY Compare with a K Branch around data storage if equal Load hex value of AA to register 0 (RO) Load storage index value to* R4 Store hex value at OB 14 + (R4) "' " Increment index register by 2 _ Save index value at OBOA Print SP Print SP Load line index number into R4 __ _ Increment line index number by I Save line index number at OBOC Compare with number per line If Less than maximum take nex"^ entry Clear R4 and

Re i n it i a Ii ze Iine index number_ Print seven spaces Print "MORE" Read one character at TTY Compare it with an N Branch to print FINI if equal CRL Return to taking next line of data Not used Print "MORE" Read one character at TTY Compare it with a Y Branch to "H OR R?" If equal CRL """■ " CRL

36

Page 40: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

0248 C850 C6C9 Load Fl " "" i_ '■ " - - - -

024C 41B0 C8 50

314A CEC9

Print 0250 " Load Nl " """'~ 0254 41E0

4300 314A 3C80

Print 0258 Return to monitor 02 5C 41B0 314A NOT USED 02 60 0700 02 62 4000 0E10 Initialize index and accumulator registers 02 66 4000 OB 12 02 6A 4000 OB 14

•■' 026E 4300 0080 Branch to start of step height routine ' 0272 48 10 OBAC Cal1 KCAL, to (RI2)

0276 4820 OBAE '' "" " "" " """ ""' 02 7 A 4A20 OB 12 Double precision accumulate into (0BI0-0BI2) 027 E 4E10 0B.10 0282 4010

4020 OB 10 OB 12 028 6

028 A 4810 0314 Recall increment, compare and save index counter 028 E CA10 0001 029 2 4010 OS 14 029 6 C510 0005 029 A 428 0 0092 If i<5 repeat process of calibrating 029 E 4840 OB 10 Recall I KCAL-, calculate average KCAL, 02A2 48 50 OB 12 i '

02 A 6 C830 0005 02AA 41B0 3 6A0 02AE 4040 OBAC Store average KCAL at OBAC-OBAE 02B2 4050 OBAE 02B6 C8A0 314A Put print subroutine address in RA 02 3 A C8 50 4156 Load AV

• 023 E 01BA Print " """" """. * 02C0 C850 4720 Load G space *"' 02C4 01BA Print

02C6 C850 CBC3 Load KC 02 C A 0 1B A Print " "" ~ 02CC C850 C1CC Load AL 02D0 01BA Print 02D2 C850 203D Load space = 02D6 01BA Print "'" " """ "~ 02 D8 48 20

41 BO OBAC 3EF0

Load (OBAC) 02 DC Pr i nt 02 E0 4820

41B0 OBAE 3EF0

,Load (OBAE) 02E4 Print 02 E8 41B0 3F44 CRL 02EC 41B0 3F44 CRL "" "~ '" ;—" — 02 FO 4300

48 00 0230 0Bij2

Branch to "MORE?" " 02F4 Recall Flag

02 F8 4230 0230 If set branch to "More?" 02 FC 4300 0272 If not set branch to AVG KCAL calculation

0300 40E0 4800

034A 0B9 2

(0300-034C) = MAIN STEP HEIGHT PROGRAM 0304 HECTH Reca11 A2 0308 4000 059 0 Store at starting address of LSQ program

«• 030C 41B0 0568 LSQ fit to data from A2 to A2 +I00x

• • 03 1 0 40C0 40D0

0E9E OBAO 0314 Store slope a2 at 0B9E-0BA0

0318 4000 4010

0BA2 0BA4 03 IC Store intercept b"2 at 0BÄ2-OBA4

0320 48 00 0B9 0 Recal1 Al

37

Page 41: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

0324 C300 0100 0328 4000 059 0 03 2C 41B0 05 68 0330 40C0 039 6 0334 40D0 0398 0338 4000 039 A 033C 4010 0B9C 0340 4130 0350 0344 C8F0 0002 0348 C8B0 0122 03 4C 030B 034E 0806 (0350-03FA) 0350 40B0 03 F8 CECT] 0354 48 00 0B9 2 0358 4B00 039 0 03 5C CCOO 0001 03 60 08 DO 0362 CADO 008 0 03 66 4810 0B9E 03 6A 48 20 OBAO 03 6E 4B20 039 8 0372 4F10 0B9 6 0376 48 70 0BA2 03 7 A 4880 0BA4 037E 4B8 0 0B9C 038 2 4F70 039 A 038 6 4840 039 6 038 A 48 50 0398 038 E 08 6D 039 0 41B0 3 59 0 039 4 OBS 5 039 6 0F74 0398 0799 039 A 08A0 039 C 08C7 039 E 08 D8 03A0 CCOO 0003 03 A4 087C 03A6 088D 03 A8 0841 03 AA 08 52 03 AC 08 6A 03AE 41B0 359 0 03B2 0B8 5 03B4 0F74 03B6 OBAO 03 B8 4079 0B60 03 BC 4089 OB 62 03C0 CA9 0 0004 03 C4 C590 0020 03 C8 428 0 03A4 03CC 0744 03CE 0755 03 DO 0766 03 D2 4A5 6 OB 62 03D6 4E4 6 OB 60 03 DA CA60 0004 03DE C560 0020

Al- I00x = New starting address of LSQ program

LSO fit to data fromAI ~-~ IOOx~to~Ar Store slope a I at 0B96-0B98

Store intercept bl at 0B9A-0B9C

Calculate step heights in hexadecimal Restore TTY device number to RF ~' Restore RB and return to main program

CALCULATE HEX STEP HEIGHTS ROUTINE

RecalI A2 to (RO)

"A2"-"Äl" + "(R0'r= 2Z (R0)/2 = Z put into RO Save in RD Z + 80x put into RD

Slope a2 + (RI2)

a2 - al ■* (RI2)

Recall intercept b2 to (R78)

b2 - bl -* (R78)

RecalI slope a I to (R45) Z + 80. (R6) al (Z + 80x) (R45)

(b2 - bl) - al(Z + 80x) -> (R78)

al(Z + 80x) in (RCD) Save Z in RA Save (b2 - bl)

Z/8 -*(R0) Recall <b2 - bl) - al(Z + 80x) to (R78)

Recall"(a2 - al) to (R45) „Z - nZ/8~-> (R6) n = 0,1, 8 (a2 - al) (Z - nZ/8)"'-*■ (R45)

"(b2 - bl) - al(Z + 80" T -Ta'2 -~ä"lTTZ~-nZ/8')""-»-""(R78)' (Z - nZ/8) -► (RA)

Store result at 0B60-2 + (R9)

Increment, compare (R9) to limit __ _ If (R9) are less than limit,Veturh to call brate new value

Initialize accumulator and index R's

JDouble precision accumulate H|'s into (R45). LH"i""*"(R45J

38

Page 42: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

(0400-043C) CDASH

0440-0492) LDAS]

04AO-05I2) [DAS]

03E2 428 0 03D2 03E6 C830 0003 03EA 41 BO 3 6A0 03EE 4040 0B8 0

' : 03F2 4050 0B82 ' ' '03F6 C8B0 0344

03FA 030B 03FC 4830 03C6 0400 4030 043A 0404 4840 0394 0408 41B0 3 648 040C 08 41 040E CF40 0000 0412 0755

" 0414 48 60 0B80 0418 48 70 038 2 041C CF60 0003 0420 C470 EOOO 0424 CC70 OOOD 0428 0A67 042A 08 3 6 042C 41B0 3 6A0 0430 4040 OBAC 0434 4050 OBAE 0438 C8B0 0132

* • 043C 0303 ; ' 043E 4830 40B0(

0442 049 0 0444 C8C0 0000 0448 C8D0 0008 044C C8E0 0020 04 50 48 60 02AC 0454 48 70 OBAE

. 0458 0722 045A 4S3C 0360 045E 484C 03 62 0462 41B0 34D4 0466 C8 60 0008 046A 0777 046C 41B0 34D4

~ 0470 0788 0472 CD40 0001

" 047 6 0E38 0478 0E28

" 047A 08 53 047C 0842

-'• 047E 41B0 3300 " 0482 4130 32D0

048 6 41B0 3110 048A CICO 0450

" 048E C8B0 016E 0492 0303 0494 40C0 0452 0498 40D0 0454

: 049C 40E0 0456 04A0 4030 0510 (

~ 04A4 4200 1000 04A8 C8C0 0002

EHj -»• (R45) continued

ZHj/8 •*• (R45)

Store HM at 0B80-0B82 Restore RB and return to main program

« CALCULATE KCAL ROUTINE

— ...

Recal1 decimal HO to (R4) Convert to hex value at (Rl)

"Put hex value of HO In CR45)

Reca11 HM to R6/

Multiple HM by 8 and put result in R3.

H0/8HM f (R45)

Store KCAL at OBAC-OBAE

•- —- -■

Return = CONVERT HEX STEPS TO DECIMAL USING KCAL, ROUNDOFF AND PRINT RESULT

Initialize index counter

Reca11 KCAL to (R67)

- - -

Recal1 Hj to (R34)

KCAL x H. -»• (R345)

Multiply result by 8 to account'T6r"3 KCAL calculation

bit shift made In

-Round off R234 to R23 then move result to R45 [ECT]

Convert hexadecima 1 Jn~R45~to decimal print result

In RI23 then

Repeat for next Hj

Return to main program

= AA CALCULATION

Initialize index counter

39

Page 43: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

- '- - - - - - - - -

(MAC C8D0 0002 Initialize increment value 04£0 C8E0 2000

0766 Initialize final value

04B4 "Initialize accumulation regTsters 04B6 0777

483C 1000 04B8 Call data (1000 + (RO) to (R3) 04BC CE30 0000 Nul1 operation 04C0 41 BO 3 624 Single precision (R3) -»►double precision (R23) 04C4 0A73

0E62 04C6 ZXn "* (R67) '"■■. 04C8 CICO 04B8

4D60 04A6 04CC X = (!Xn)/N ■*■ (R7) 04D0 0837

41B0 3624 04D2 Convert result to double precision > 04D6 08 02

0813 04D8 Save X in (ROD 04 DA 0744 Initialize accumulation registers 04DC 0755 04DE C8C0 0002

/■53C 1000 Reset index counter

04E2' Call data to (R3) 04E6 CE30 0000 04 EA 41B0 3624 Single precision (R3) V double precision(R23) 04EE 0B31

0F20 04 F0 Xn - X -► (R23) 04 F2 4210 04FE

0A53 Branch if minus

04F6 04 F8 0E42 Accumulate in (R45) 04 FA 4300 050L Branch to return ■■-- —

04 FE 0B53 0500 0F42 Add negative of Xn - X" to accumulator 0502 CICO 04E2 Return for next data entry 0506 4D40 04A6 (z|Xn - X|)/N -»• (R5) 050 A CE50 0001 Data entry is 12 bit left justified, thus 1 bit right shift 050E C8B0 01BC gives same scale as KCAL 0512 0303

08 41 Return to main program )

0514 0516 0B43 0518 40B0 0550 (0518-0552) = CONVERT AA IN HEX TO DECIMAL AND PRINT RESULT > 051C 0722 [DAS] 05 IE 0835 0520 0744 ) 0522 C8 60 OOOA Increase decimal precision of AA result by 1 position 052 6 0777 ~(05IC-052A) 0528 41B0 34D4 [Overflows if AA > 3/8 full scale] ) 052C 48 60 03AC

4870 OBAE Recal1 KCAL to (R67)

0530 0534 41B0 34D4

0788 KCAL x AA(hex) ■+ ( R234) )

0538 053A CD40 0001 053E 0E38 Round off to (R23) and put in (R45) [ECT] 0540 0E28

08 53 0542 0544 0842

41B0 3300 &

054 6 Convert AA(hex) to decimal 054A 41B0 32D0 Print result at TTY 054E C8B0 01C4 I 0552 030B Return to main program 0554 0000 0556 48B0 0506 ' D

40

_^BBB_^_

*}

Page 44: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

055A 055C

" 055E 05 60 05 64 05 68 05 6C 05 6E 0572 0576 05 7 A 057E 058 2 058 6 0588 058 A 058 C 058 E 059 2 059 6 0598 059 A 059 C 059 E 05A0 05A4 05A6 05A8 05AA 05AC 0530 05 £4 05B8 05BA 05BC 05BE 05C0 05C4 05C8 05CC 05D0 05 D4 05D8 05DC 05E0 05 E4 05 E8 05EC 05F0 05 F4 05 F8 05 FA 05 FC 05 FE 0600 0604 0608 060C

030B 0000 09 1C C8E0 4300 C8E0 08 OE CEOO 4000 4200 4030 C8D0 C8C0 0700 0711 0744 0755 48 3C 41B0 0A13 0E02 0C2C 0A53 0E42 C1C0 08 C4 08 D5 0840 08 51 48 60 CA60 4130 0BD5 0FC4 08 4C 08 5 D 4830 41B0 C8 60 41B0 4830 CA30 41B0 C8 60 41B0 4830 CB30 4130 C8 60 41B0 08 C4 08D5 0840 08 51 4830 41B0 C8 60 41B0

(0560-0634)

CECT: 006C 05 6C 0100

0001 0578 008 0 0632 0002 0002

10A0 3624

058E

0578 0001 3 59 0

0578 3 6A0 00 60 359 0 0578 0001 3 6A0 0010 3590 0578 0001 3 6A0 0010 3 59 0

0578 3 6A0 1000 3 590

LEAST SQUARE FIT TO_DATA FROM (0590) to (0590) + (0578)

0560 - Entry for any number of points*-spec if ied by (0562)

0568 - Entry for usual I00x addresses _'

Calculate number of points and store af (0578)

Initialize index counters (RE already set)

Clear accumulation registers

Recall data from [(0590) + (RC)] to (R3) Single precision R3 ■*• double precision R23

Double precision accumulate into ROI iY. -»• R23

Double precision accumulate into R45 ZYj -»- ROI 2EIYj ■* R45

Save 2Z i Y; i n RCD """".'""""""""

Save ZYj in R45

(N + I ) ZYj ■*■ R45

2liY. - (N + I) EY. = X + RCD

X/N -> R45

60X/N -> R45

60X/[N(N + 1)3 -»• R45

600X/[N(N + 1)3 -»• R45

600X/[N(N + I )(N- - I )3...+ ..R45_

6000X/ [N (N + l)(N - I )3 = 1000a ->• R45

Save in RCD

RecalI ZYj to R45

ZY./N +JR45,

lOOOZYj/N -»• R45

41

Page 45: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

»

06.10 08 04 0612 08 15 0614 48 50 0578 0618 0200 061A CA50 OOOj 061E CE50 0001 0622 08 65 0624 08 4C 062 6 08 5D 0628 41B0 359 0 062 C OB 15 062 E 0F04 0630 C8B0 0330 0634 030B 063 6 0000 0638 0000 063 A 0000

*' 063C 0000 (06 5 063 E 0000

0640 40B0 0656 0644 C8 00 02 FA 0648 4000 3038 064 C C800 0400 0650 4000 302E 0654 C830 009 E 0658 030B 06 5A 40B0 0670 065E C8 00 0004 0662 4000 3038 0666 C8 00 2000 06 6A 4000 302E 06 6E C8B0 01AA 0672 030B >

Save 1000 ZY./N in ROl l

Recall N to (R5) Continue N + 1 •> (R5) (N + l)/2 -> (R5) Move (R5)to (R6) Recall 1000a to (R45)

[(N + l)/2][1000a] -* (R45)

1000[ZYi/N -J(N + _ 1) /2laJ__3_100pb,j^R01.

Return to main program

(0640-0658) = SET PARAMETERS TO READ STEP ROUTINE [DAS]

Store return address Load time per point for taking step data

from (0646).to (3038) Load number of points to be taken in step

data from (06 4E) to (302E) Return

(06 5A-06 72) = SET PARAMETERS TO READ ROUGHNESS DATA [DAS] Load time per point for taking roughness

data from (0660) to (3038) Load number of points to be taken for roughness

data from (0668) to (302E)

Return

42

Page 46: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

0A82 4CB0 OAAC (0A82-0AAE) 0A8 6 48 60 OBAC [ECT]

■ 0A8A 4870 ÖEAE : 0A8E 41B0 34D4

»<' 0A9 2 41 BO 34D4 t' 0A9 6 C8 60 0000

0A9A C8 70 FAOO 0A9E 08 53 OAAO 08 42 0AA2 4JB0 3300 0AA6 41B0 32D0 OAAA C8B0 0CA2 OAAE 030B OABO 0000 (0AB2-0AF4) 0AB2 40B0 0AF2 [ECT] 0AB6 C8 50 202D OABA 41 BO 314A GABE D300 0EB1 0AC2 41B0 3EA4 0AC6 CFJO 0001 OACA CA10 0003 OACE 08 51 OADO 0744

• 0AD2 41B0 3300 0AD6 0823

»< 0AD8 41 BO 3EF0 »' ;OADC C8 50 5351

OAEO 41 BO 314A 0AE4 4ISO 3110 OAES C8 50 4C4D OAEC 4130 314A OAFO C8B0 OCAE 0AF4 03OB 0AF6 FFFF FFFF OAFA FFFF FFFF OAF.E FFFF OCOC (0B00-0B04) 0B02 003 6 0B04 EE8 0 FFFF (OBOA-OBOC) 0E08 FFFF OOOC OBOC 0000 OBOE 0E17 (OBOE) 0B10 0000 03.12 4120 0320 (0B14-0B5E) 0BJ6 0325 0E18 032 6

■ QB.1A 0329 r- GS1C 0330 *j CB1E 032E

0B20 032F 0E22 03J6 0B24 03 IB 0B26 03OC

1 0B28 03.11 022A 0319 0B2C 032E 0B2E 0312

*' 0B30 ODAB 0B32 0DF8

MULTIPLY (£34) BY KCAL2., CONVERT TO DECIMAL AND PRINT RESULT AT TTY _ _____ Recall KCAL to" (R67J"~ "'" ~ "~ ~ " Multiply by KCAL2

Multiply by constant in (0A98.0A9C)

Move result to (R45) '

Convert result to decimal Print result at TTY

Return MULTIPLY POWER OF 10 IN UNITS BY TWO AND add number in (OACC)" TO RESULT

Print space and - sign at TTY Recall byte of (OBBO) containing power of

ten convert ASCII to hexadecimal, result -»■ Multiple (Rl) by 2 __ (Rl) Add (OACC)' to (Rl) " Move result to (R5)

Convert result to decimal, result ->■ (R3) Move to (R2) Print result at TTY

Print "SQ" at TTY Print space at TTY

Print "MM" at TTY

Return

STORAGE FOR AVERAGE WAVELENGTH PARAMETERS

INDICES FOR TAKING AA DATA

= TEMPORARY STORAGE OF AA VALUE

= STORAGE FOR AA VALUES FOR_STATISTICAL CALCULATIONS

43

Page 47: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

t

CB34 OEOA

) (

t' '"'» «< CB3 6 ODED

"0B38 0DF9 ti

i * 0B3A 0E07 0B3C ODFC

- - - )

CB3E 0E09 QB40 0E15 ) 0B42 0E29 OB44 OE1B t

CB46 OEOB 0B48 OEOO

- - ■

)

CB4A 0DD9 GB4C ODEA i GB4E ODEC

" OB50 OAAB --—-—■ -—-—•

0B52 0A93 0B54 0009

) -

0B56 0009 0B58 0009 i 0B5A Ü009

r '

CB5C OOOA 0B5E OOOA l

i< 0B60 0756 (0B60-0B82) = STORAGE FOR DOUBLE-PRECISION HEXADECIMAL »♦ 'CB62 4840 0755 VALUES OF HI, H2, , H8 and HM.

0B66 E540 0755 ) 0B6A 8240 0755 0B6E 1F40 075/? 0B72 BC40 0754 0B76 5940 0753

s t ■

0B7A F640 0753 0B7E 9340

- , 0B8 0 0754 0B82 EDCO 010E CB8 6 0320 0B88 0116

)

0B8A 009A 0B8C 0118 ) 0B8E 0.14D . 0B90 11C2 1228 (0B9 0) = Al, (0B92) = A2 0B94 1273 FFFF 0B98 D9C0 FC3D

(0B94) (0B96-8)

= HO VALUE ;

: *i -bp = a2 ° b2

t ■ 0B9C 3000 FFFF (0B9A-C) t • OBAO C940 0375 (0B9E-0BÄ0) ) «< r0BA4 7000 FFFF (0BA2-4) c '0BA8 FFFF FFFF k OBAC 0001

CBAE 8000 2D35 (OBAC-E) (OBBO)

= KCAL ) = ASCII CODE UNITS INPUT AT TTY

0BB2 1111 FFFF 0BB6 FFFF 40B0

(0BB2) = MAIN PROGRAM FLAG )

* OBBA OBCE OBBC C8A0 314A

(0BB8-0BD0) = PRINT, "AVG." AT TTY Load print subroutine address to (RA)

- OBCO C850 4156 0BC4 01BA 0BC6 C850 472E

Load ASCII code for "AV" to (R5) Print Load ASCII code for "G." to (R5)

'

OBCA 01BA Print ) OBCC C8B0 0EA6 OBDO 030B Return

• (£02 40B0 OBEE ) :

44 i

Page 48: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

i

I I ' 0BD6

OBDA " OBDE

GBEO GBE4

' 0BE6 GBEA CJBEC

' OBFO CBF2

" GBF4 0BF6

r OBF8 OBFA

' OBFE 0C02 0C06 X08

«" oc.oc i< OCJO »! <XJ4 ' XJ8

OCJC OC1E X22

• 0C26 0C2A 0C2C 0C30 0C34 0C36 X38 0C3C X40 X42 X44 X46 X4A

' X4E ' 0C52

0C56 0C58 X5A X5C X60 0C62 X66 X6A X6E X72 OC74 X76 X7A X7E X82 0C8 6 X8A X8E

C8A0 C850 OIBA C850 OIBA C850 OIBA C8B0 030B OOOO 0000 0000 OEFF FFFF 2000 3F44 07CC C8D0 C8E0 C8 70 C8F0 C840 08 2C CE20 428 0 C840 9AF4 C88 0 C8 60 0B8C 08 2C CA20. 4020 0733 0744 0755 489 6 CE90 4816 CE10 0C09 0A51 0E40 C160 08 38 CE30 41B0 CF40 CC50 0A45 08 5C CE50 4045 C1C0 C8F0 41B0 4830 0744

314A 534C

502E

3D20

0E74

C880 41B0 0700

0004 08 00 0002 0001 OOOF

0003 0C2A 0000

2000 0002

1000 0C50

1000 0004 109C 0004

0C46

0001 3 6A0 OOOC 0004

0001 0680 0C18 0002 3A00 0680

(0BD2-0BF0] [ECT] '

= PRINT "SLP." AT TTY -

(OCOO-OCFE) " [ECT]

PROGRAM TO CALCULATE AND PLOT THE AUTOCORRELATION FUNCTION OF DATA IN MEMORY LOCATIONS 1000 -3000. THE

""5I2""SHIFT AUTOCORRELATION^ FUNCTION IS STORED IN MEMORY LOCATIONS 0680-0A80

"•'CRL " " _— Clear (RO) _ __

~Initialize the shift" register (0C06) = shift increment, here it equals twice the data point spacing.

Initialize summation index counter increment 'Load panel display device number to (RF) Load "F" to (R4)

Write (turn on last 4 lights) at display "panel "F" when (RC) are an even multiple of 4, Write "0" when (RC) are an odd multiple

'"""" "" " • * ' * " - - of 4 Intialize summation index counter final value Intialize summation index counter initial value 2(N-S) ->■ (R8) as new limit for summation index S ->(R2) •Calculate i + s for start of shifted data Store starting value of i + s at (0C50)

Initialize accumulators; R345 .

"Bring data point into R9;■' [1000~-T (R9) ] '-+'(R9) Shift (R9) right arithmetic 4 bits

""Bring shifted data point into'Rl; "(0C50) + (R6) ->(R1) _ Shift (Rl) right arithmetic 4 bits Multiply shifted and unshifted data; (Rl) x (R9) -*-(R01)

__[Overf lows if FMS__> 1/3 Fullscale] DP accumulate in R45 i=N-S „..| -y(i)y(i+s) =- (N-S)ACF(sH*~<R45>- —-

N-S -*■ (R3) ~(F7i5)"r&=Öf2f4,- [1/(N-S).] E y(i)y(i + s) = ACF(s) -

Shift (R4) left 12 bits arithmetic Shift (R5)" right 4 bits logical JR5) + (R4)_-t.(R4)_f._l/I6 ACFjsJ .__ Adjust the shift increment to obtain proper storage

increment which should be 2 7l/1610) ACF(s) -*■ [0680 + (R5)] Return to calculate next ACF(s) ..if. s < limit .. Load TTY device number to RF _Print "VARIANCE =" at TTY Recall (1/16. 10

) ACF(s) to (R3)

45

Page 49: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

p

0C9 0 0C92 0C9 6 0C9A 0C9E 0CA2 0CA6 OCAA OCAE 0CB2 0CB4 OCB8 OCBC OCCO 0CC4 0CC8 OCCC OCDO 0CD4 0CD8 OCDC OCEO 0CE4 0CE8 OCEC OCFO 0CF4 0CF8 OCFC ODOO 0D02 0D0 6 ODOA ODOE ODJO 0DJ4 ODJ6 ODlA OD1C 0D20 0D24 0D26 0D2A 0D2E 0D32 0D3 6 0D3A 0D3C 0D3E 0D40 0D44 0D48 0D4A 0D4C 0D50 0D54 0D58 0D5A

07.il 40J0 C8.10 4.010 41B0 C810 4010 41B0 48 20 0733 4030 C420 4330 CE20 CA30 4030 4300 C8 00 4000 C800 4000 C8 00 4000 4000 C8 00 4000 C8 00 4000 4300 0200 4130 C8A0 C8 50 01BA C850 0.13 A 41B0 0842 41B0 4010 08 21 CB20 4020 CFiO 40J0 4010 0711 0766 0777 4831 41B0 0A73 0E62 CAJO C510 428 0 0846 08 57

0A98 FAOO 0A9C 0A82 0003 OACC 0AB2 0680

OCDA 7F8 0 OCDO OOOJ 0001 OCDA 0CB8 0680 39 78 0003 39 7C 007B 3984 398C 0084 399 0 0400 399E 39 50

31F8 314A 204E

203D

30BA

3 648 0D5E

0001 OD9 0 0001 0D52 0D84

0B14 3 624

0002 001C 0D40

(ODOO-ODEC) [EOT]

load proper constant to KCAL routine to account for 3 bit shift.in KCAL and 4 bit shift in ACF calculation 8x8 x 16 = 1024; O.FAOOx = 1/1.024 Multiply by KCAL and contant, convert to Decimal

and print at TTY Increase power of ten in units by 3 Print at TTY; 2 x power of ten entered at units query Begin calculation of number of shifts needed in

order to obtain 8 bit plotting accuracy Clear accumulator for number of shifts Since variance always + test top 8 bits It top not zero continue shifting, otherwise branch Shift (R2) right 1 bit . _ to plot Increment (R3) by 1 Accumulate shifts at (OCDA) Continue shifting (R2) (0CD0-0CD4)= Load and storestarting address

Load and store amount data is to be shifted

..Load and store maximum value to be plotted

Load and store bias of plot

Load and store 2X number of points to be plotted

Plot the ACF and return to monitor CALCULATE MEAN AND VARIANCE OF N AA VALUES Print "ENTER" at TTY Load Print routine address to RA Load ASCII code for space and N to R5 Print Load ASCII code for space and = to R5 Print Read 4 characters before "space" at TTY -> R2 Move to (R4) _„_..„. Convert to hexadecimal; results -* (Rl) = N .Store at (0D5E) .

N-l N-l

JR2).__ (0D90)

2N -»■ (0D52) _2N ±_(0D84).

_ Clear.JLndex and__ accumulator_ registers

_Call..AA_value from [0B14 + (Rl) ] to R3 SP (R3) -> DP (R23)

DP accumulate in (R67)

Loop statements N.,_, Move AA. (R45)

i-1 _

46

Page 50: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

0D5C C830 OOOE 0D60 41BO 3 6A0 0D64 4050 ÖB8 6 0D68 0711 0D6A 0766 0D6C 0777 0D6E 48 30 0B86 0D72 4B31 0B14 0D7 6 08 53 0D78 0C43 0D7A 0A75 0D7C 0E64 0D7E CA10 0002 0D82 C510 001C 0D8 6 428 0 0D6E 0D8A 08 57 0D8C 0846 0D8E C830 OOOD 0D9 2 41B0 3 6A0 0D9 6 4200 0000 0D9A 4050 0B8A 0D9E C440 7FFF 0DA2 4230 3A30 0DA6 41B0 3F44 ODAA 41B0 39 D4 ODAE 48 50 0B86 0DB2 4130 05.18 0DB6 41B0 3110 ODBA 48 50 03B0 ODBE 41B0 3A50 0DC2 4.130 3F44 ODC6 41B0 3A00 ODCA 4830 038 A ODCE 0744 ODDO C8.10 0001 ODD4 4010 0A98 0DD8 07.11 ODDA 4010 0A9C ODDE 41 BO 0A8 2 0DE2 0711 0DE4 4010 OACC 0DE8 41B0 0AB2 ODEC 4300 3C8 0 ODFO 41B0 3A50 ODF4 C8 50 53 51 0DF8 41B0 314A ODFC 4300 3C80 OEOO 0722 0E02 C830 0002 0E0 6 C840 2000 OEOA 48 62 1000 OEOE CE60 0001 0EJ2 40 62 1000 0E)6 C120 OEOA OEjA C820 2000 OE1E C830 FFFE 0E22 C8 40 0000 0E26 48 62 1000

"NV (R3) ~~ l AA./N = ÄÄ -»• (R5) -M0B86)

Reset index and accumulator registers

Recall M. ■* (R3) AA - AAi

(OEOO-OEEO)" [Ecr]

(R3) Put in R5 also (AA - AAj.) 2_-»■_ R45

E (ÄÄ - AAi) 2 -+ R67

Loop statements

Move Z (AA - AA^ 2 to R45

N-l -»■ (R3) _

Cl/(N-1) ] E (AA - AAi) 2"I"VKR R45

Store result at 0B8A If result not positive branch to "ERROR"

CRL Print "MEAN AA =" at TTY Recall AA to (R5) Multiply by KCAL, convert to decimal and print at TTY Print space Recall units to (R5) Print units at TTY ____ ■ CRL Print "VARIANCE =" at ITY _ Recall var to (R3)

Load constant to KCAL2 routine

Multiply VAR by KCAL2 / convert" to decimal, print at TTY

"Print units and "SQ MM"_at TTY Return to monitor

"PROGRAM TO CAIJCUIATE TI^ WAVELENGTH OF PROFILE IN MEMORY LOCATIONS 1000-3000

Initialize index counter, R2

I^SfmddlHdeTiÖWTlMTrbyl

Restore result to same location Repeat for all data from 1000 thru 3000

Reinitialize R2 for a decrementing counter___

Call 1/2 y n .(R6).

47

Page 51: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

1 • ■- - ■■ • - ----- -■

0E2A 48 72 OFFE 0E2E OB 67 0E30 40 62 1000 0E34 C020 0E2 6 0E33 41B0 04A0

... ...

0E3C 4050 OBOO 0E40 0722 0E42 0835 0E44 0744 0E46 48 60 OBAC 0E4A 4870 OBAE

• 0E4E 41B0 34D4 = ' 0E52 C8 60 0003 /< '0E56 C870 0D40 fri0E5A 41B0 34D4

0E5E 4030 0B02 ■ 0E62 4040 0B04

0E66 41B0 3F44 0E6A' 0200 0E6C 41B0 0BB8 0E70 41B0 0BD2 0E74 4840 0B02 0E78 48 50 0B04 0E7C C8 3 0 03A2 0E8 0 4.1 BO 3 6A0 0E8 4 41B0 3300 0E88 4.1 SO 32D0 0E8C 41B0 3110 0E9 0 48 00 033.0 ÖE9 4 CBOO 0001 0E98 08 50 0E9A 4.1 BO 3 14A 0E9E 41B0 3 F44 0EA2 4130 0338

' ' 0EA6 4130 0EE4 ' ' OEAA 4840 0314

OEAE 0755 OEBO 4830 0300 OEB4 41B0 3 6A0 0EB8 08 34 OEBA 0845 OEBC C8 60 OB 69 OECO C8 70 AE61 0EC4 41B0 34D4 0EC8 08 42 OECA 08 53 OECC 4JB0 3300 OEDO 41B0 32D0 OED4 41B0 3110 0ED8 C8 50 2D3 6 OEDC 41B0 3A58 OEEO 4300 3C80 OEE4 40B0 OEFA (0EE4-0EFC) = 0EE8 C8A0 314A [ECTj OEEC C8 50 574C

«' OEFO OIBA C8 50 »' 0EF2 3D20

0EF6 OIBA

Call 1/2 y n-1 (R7)

Calculate 1/2 Ayn = 1/2 (yn.-„yn_i) Store 1/2 Ayn at [1000 + (R2)] Repeat for all data from 3000x down to 1002x Calculate AA of data from 1002 through 3000 Save result at OBOO

.(0E40-0E50) = KCAL x.AA of 1/2. Ayn ..-> (R345)

(0E52-0E5A) = (R34) x 2 x 10" (R234)

Save result in (0B02-0B04) ._=.. SLE.

CRL j.„. Continue Print "AVG." Print "SLP. ="

Recall SLP and divide by 930,«

Convert result to decimal

Print result at TTY Print space Recall ASCII code for power of ten = Calculate -P-5 + 6 = -P + 1

Print - P + 1 at TTY CRL Print "AVG." Print "WL. =" Recall first AA value stored

-P

(0B14)/(0B00) =2 AA/Ay

WL 2TT Ax AA/Ay = ir Ax

ir x 93010 = 2921.68116810

Move WL to (R45) "

(0B14) (OBOO)

= B69.AE61 16

Convert WL to decimal Print WL at TTY Print Space Load -6 to (R5) , __.._ Print "-6 MM" at TTY Return to monitor ROUTINE TO PRINT "WL. =" AT TTY

48

Page 52: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

0EF8 C8 30 1504 OEFC 03 OB OEFE FFFF 4000 (0F00-0F3C) 0F02 0F4A [ECT] 0F04 4010 0F4E 0F08 4020 0F52 OFOC 4030 0F56 0F.10 4040 0F5A 0F14 4050 0F5E OF 18 40 60 0F62 0F1C 4070 0F66 0F20 408 0 0F6A 0F24 409 0 0F6E 0F28 40A0 0F72 0F2C 40C0 0F7 6 0F30 40D0 0F7A 0F34 40E0 0F7F 0F38 40F0 0F82 0F3C 03OB 0F3E 0000 0F40 0000 0F42 0000 0F44 0000 0F46 0000 (0F48-0F84) 0F48 C8 00 0001 [ECT] 0F4C C8 10 0047 0F50 C8 20 FED7 0F54 C830 01 FF 0F58 C840 0000 0F5C C8 50 OOOD 0F60 C8 60 0019 0F64 C8 70 4778 0F6S C88 0 0000 0F6C C890 0400 0F7 0 CCAO 314A 0F74 C£CO OCOA 0F7S C3D0 0001 0F7C C8E0 00 IE 0F8 0 C8F0 0002 0F84 03 OB 0F8 6 0F6E 0F88 4000 0FC4 (0F88-0FB4) 0F8C 4010 0FC8 [ECT] 0F90 4020 OFCC 0F94 4070 OFDO 0F98 4 08 0 0FD4 0F9C 409 0 0FD8 OFAO 40A0 OFDC 0FA4 40C0 OFEO 0FA8 40D0 0FE4 OFAC 40E0 0FE8 OFBO 40F0 OFEC 0FB4 03OB 0FB6 0000 0F38 0000 OFBA 0000 OFBC 0000 OFBE 0000

REGISTER STORAGE FOR Ali, REGISTERS EXCEPT REGISTER B .

RESTORE CONTENTS STORED BY OFOO

REGISTER STORAGE FOR REGISTERS ~0, 1, 2, 7, 8, 9, A, C, D, E, and F

49

Page 53: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

OFCO OOOO 0FC2 C8 00 0000 (0FC2-0FEE)

* 0FC6 C8 10 0000 [EOT] OFCA C820 1098 OFCE C8 70 0002 0FD2 C88 0 1F68 0FD6 C89 0 FFFE OFDA C8A0 314A OFDE C8C0 0098 0FE2 C8D0 0004 0FE6 C8E0 08 00 OFEA C8F0 0001 OFEE 030B OFFO 0000 0FF2 0000 0FF4 0000 0FF6 0000 0FF8 0000 OFFA 0000 OFFC 0000 OFFE 0000 1000 09 58

= RESTORE CONTENTS STORED BY 0F88

50

Page 54: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

1500 0700 1502 4000 2002 1506 41B0 0640 150A 4130 3010 150E C8 50 C9CE 1512 4130 314A 1516 4130 3110 151A 4130 31F8 15 IE C850 5031 1522 4130 314A 1526 4130 3110 152A 4130 303A 152E 4020 2000 1532 41B0 31F8 1536 C850 5032 153A 41B0 314A 153E 41B0 3110 1542 41B0 30BA 1546 4020 0B9 0 154A 4130 31F8 154E C8 50 5033 1552 4130 314A 1556 4130 3110 155A 4130 303A 155E 4020 039 2 1562 4130 31F8 1566 C850 5020 156A 4130 3 14A 15 6E 4130 30SA 1572 4020 2006 1576 4820 039 0 157A 4320 2000 157E 4020 0562 1582 4820 2006 153 6 432 0 2000 158 A 4020 2004 15SE 4320 0562 1592 CE20 0001 159 6 4020 03 64 159A 4130 3F44 159 E 48 20 039 2 15A2 4020 0590 15A6 41B0 0560 15AA 40C0 039 E 15AE 40D0 03A0 1532 4000 03A2 1536 4010 03A4 15BA 4820 2000 15BE 4020 059 0 15C2 41B0 0560 15C6 40C0 039 6 15CA 40D0 0398 15CE 4000 039 A 15D2 4010 039 C 15D6 4130 0350 15DA 48 60 03AC 15DE 48 70 OBAE 15E2 0722

(1500-1670) [ECT]

PROGRAM FOR MEASURING THE HEJGHT OF 3 CONSECUTIVE STEPS Initialize loop, counter = RO

Set parameters for takinq step"data ~~ " Wait for an interrupt and then take data Load "IN" Print Print SP """ "~" (I5IA-I528) = Print "Enter PI" + SP

Read 4 characters at TTY and store at (2000)

(1532-1540) = Print "ENTER P2" + SP

Read 4 characters at TTY and store at (0B90)

(I54A-I558) = Print "ENTER P3" +SP

Read 4 characters at TTY and store at (0B92)

(I562-I56C) = Print "ENTER P"

Read and store at (2006) "" """ "

(I576-I57C) = Calculation of 2X number of data Points for LSO fit = P2 - PI

Store result at (0562) ~ "

P-PI = Period of wave'-» (2004)

Number of points -* (0364) CRL _ _._

RecaU and store starting address of LSO fit LSO fit to data from (0B92) to (0B92) + (P2 - PI)

. (I 5AA-15B8) ..= „Store ._a.2(.l..) and. b2( i)

Reca!L and store.new starting address for LSO fjt

J.SCL fit., to. data J romj:2000)_to J20001. + ( P2_J:_. PI)

(I5C6-I504) = Store al(i) and bl(i)

Calculate step height in hexadecimal

RecaI I KCAL to R67

51

Page 55: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

15E4 4830 0330 Recall HM( i) to R234 " 15ES 4340 0332 15EC 4 1 BO 34D4 '" Mu 111 p I y HM( i) by KCAL ~~ ~ 15F0 C860 0003 Multiply result by 8 account for the 3 bit shift in 15F4 0777 obtaining KCAL 15F6 41S0 34D4 Round-off result to double precision accuracy and move 15FA 0777 result in R45 15FC CA40 8000 1600 0E37 •"■ ~ "~ "" - 1602 0E27 1604 03 53 "" " — ' 1606 0842 1608 4180 3300 Convert result to decimal valueand print value 160C 41B0 32D0 1610 4130 3110 Print "sp ■-■•-■•■■-■ ■-■- - •-••- —- - •

1614 4320 20C0 1618 4A20 2004 ---■- -- --..- _.. ..

161C 4020 2000 P + KP - PI) -> (2000) 1620 4820 0390 ","""" " 1624 4A20 2004 1623 4020 0390 P2 +'t (P - Pl'>-» (OB90) " """ 162C 4320 0892 1630 4A20 2004 " " ". ""." 1634 4020 0392 P3 + j (p _ p3) -> (0B92) 1633 4320 2002 " """ ~ 163C CA20 0001

1640 4020 2002 (1638-164A) = Loop statements' 1644 C520 0003 1643 4230 159E "" " ~" 164C 4180 31D6 Print "MORE?" 1650 4150 3E3A Read one character at TTY 1654 C50C 004t Compare with a N 1658 4330 1664 Branch to exit if equal, otherwise continue 165C 41B0 3F44 CRL 1660 4300 1500 Return to start "" 16 64 03 1C 0 03 0 Reload usual no. of points for step routine to (0364) 1663 4010 03 64 1660 4300 3C80 Return to monitor 1670 4080 D370 ' "' -.-......—..-.-..

1674 D870 D3A0 1678 D3 30 D8C0 ~ " -■■-■- 167C D3B0 DSA0 __ _,_ '_ 168 0 D88 0 DS 70 ' "' ' """ • '

52

Page 56: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

r (2500-25B2)

2500 ^il&O 0 640 LECT]

C-:J4 4180 3010 2508 C8 50 C9CE 250C 4 ISO 314A 2510 C8 10 1000 2514 4010 0B9 4 2518 C8 10 11C2 25 IC 4010 0B9 0 2520 C8 10 1244 2524 4010 039 2 2528 41B0 0300 252C 41B0 0400 2530 4300 2543 2534 41B0 3010 2538 C8 50 C9CE 253C 41B0 314A 2540 41B0 3F44 2544 41B0 0300 2548 C8A0 32D0 254C 4820 0B9 6 2550 4330 0393 2554 01BA 2556 41B0 3110 25 5 A 4820 0B9A 255E 4830 039 C 2562 013A 25 64 41B0 31 10 25 63 48 20 039 E 25 60 4830 03A0' 2570 01BA 2572 4130 3110 257 6 4820 0BA2 257A 4830 03 A4 257E 013A 258 0 4180 31 10 258 4 43 20 OSAC 2588 48 30 03AE 258 C 01BA 258 E 41B0 31 10 259 2 4820 038 0 259 6 4830 0B8 2 259A 01BA 259 C 41B0 3F44 25A0 41B0 3240 25A4 41B0 3F44 25A8 41 BO 0440 25AC 41 BO 3T44 25B0 4300 2534 25B4 0000 >

= PROGRAM FOP OBTAINING STATISTICS ON STEP HEIGHT PROGRAMS

Set parameters for step height data Input Wait for an interrupt and read data

' Load' " IN" """'"""' ""'" Print Load and store 1000 as HO " : "■'"

Load (251 A) and store as AI

" " Load (2522) and store"as""A2 ™ ~™™~~

Calculate step height in hex Calculate KCAL assuming 1000 for HO Branch to printing part of program Wait for an interrupt and read data

"" Load "IN" "" ' ""'~~ Print CRL Calculate step height in hex Load print routine address to (RA)

Load slope al to (R23) " Print (R23) Print SP ~ ~'~ V

Load intercept bl to (R23) Print Print SP

Load Slope a2 to (R23) Print Print SP

Load intercept b2 to (R23)" "'" Print _ Print SP

Load KCAL to (R23) Print Print SP

Load HM (hex) to (R23) Print __ . __ Print CRL Print "HI— H3—H5~-H7---HM" Print CRL " " "' Convert hex steps to decimal and print Print CRL Repeat

53

Page 57: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

1 3010 3014 3018 301C 3020 3022 302 6 3028 302C 3030 3032 3036 303A 303E 3042 304 6 304A 304fr 3050 3054 3058 30 5 A 305E 30 62 3066 30 68 30 6C 30 6E 3072 3076 307A 307E 3082 308 6 308A 308 E 3092 309 6 3098 309 C 30 A 0 30A4 30A8 30AC 3080 30B2 30B6 30BA 30BE 30C2 30C6 30CA 30CE 30D2 30D6 30DA "30DC 30E0

40B0 41B0 41B0 C830 0303 40B0 07CC C8D0 C8E0 0766 C8 70 C88 0 C89 0 C8F0 DEFO DEFO 9AF9 DBFC DB FC C160 0766 C1C0 C8F0 4200 9F12 C8B0 03 OB 40B0 C800 4000 C300 4000 C8F0 DEFO DEFO C200 COOO 0200 DEFO C8C0 C8D0 C8E0 C1C0 C8B0 030B 1000 8000 40B0 41B0 C500 4330 C500 4330 41B0 CD20 0621 4300 C8B0

301E 306E 3022 0138

306A

0002 2000

0001 0004 0000 OOOA 30 64 3065

1000 1001 3054

304A 0002 9 08 6

301C

30AE 0000 0044 309 6 0046 OOOA 3032 3034 3 09 2 3C8 0

3036 0000 0001 2F00 30A8 3018

4000 8000 30E2 3E8A OOAO 30E0 OOSD 30E0 3EA4 0004

30BE 0106

(3010-3020) [DAS]

(3022-306C) [DAS]

= ROUTINE TO WAITFOR AN INTERRUPT~ THEN READ DATA

(306E-30B8) [DAS]

(30BA-30E4) [DAS]

ROUTINE TO LOAD DATA FROM ANALOG TO DIGITAL CONVERTER (ADC) _

Initialize index counters with_(302E) being number of data points to be loaded

Initialize delay counter with delay being determined by (3038)

ADC channel number "■*~R9 Device number ■+ RF Initial izing command~"byte_(3064)™ADC Enabling command byte (3065) ■+ ADC __ ADC channel number to be read ■*■ ADC

(RC)] (RC)]

Read one byte from ADC -*• [1000 + Read one byte from ADC -»■ [1001 + Delay before reading next point Reset delay counter Loop for all data _ Restore TTY device number to RF Storage for device commands Set condition codes (c.c.) and clear interrupt conditions Return to main program

WAIT

Load Load

Load Init Enab Load Wait Cont Send

FOR AN INTERRUPT AT ADC MARK TIME FOR I SECOND THEN EXIT

and store new program status word c.c. and store new program status word (address to jump to on interrupt) _m

ADC device number to RF ialize interrupt at ADC (30B2) -»■ ADC le interrupt at ADC (30B4) ■* ADC current program status word to RO state: Branch to monitor upon execute at console inue _^ disable interrupt command to ADC ~ '

Set up counters for I second delay (30A6) determine delay

Mark"time I second Return to main program

Storage for device commands

ROUTINE TO READ 4 HEX CHARACTERS AT_TTY_INTO R2 Read one character at TTY Compare with ASCI I code for space "Exit it equal Compare with ASCII code for CR __ Exit if equal Convert input character ASCII tohexadecimaI Shift left logical (R2) 4 bits ~ Logical OR (Rl) with (R2) Loop and read until SP or CR appears

(Last 4 characters read are left in R2)

54

Page 58: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

30E4 30E6 30 EA 30 EE

!30F2 < 30F4 30F6 30 FA 30FE 3102 3104 3108 310C 310E 3112 3116 3118 311C 3120 3122 3126 312A 312E 3132 313 6 313A 313E 3142 314 6 3148 314A 314E 3150 3154 3158 315C 315E 3162 3166 31 6A 31 6C 31 6E 3170 3174 3178 317C 317E

•3182 3184 3188 318A 318E 3190 3194 3198 319C

"31A0 31A4

030B 4220 310A 3E8A 0000 0850 CD50 41B0 4200 0A50 4050 C8B0 030B C8A0 311E 00A0 41B0 C8B0 0303 40B0 C8C0 C8D0 C8E0 C8 50 41 BO C1C0 41B0 C8B0 030S 0324 40B0 08 05 C400 CCOO 41B0 0305 C400 41B0 C830 030B 074A 075A 40B0 C8A0 C8 50 01BA C8 50 01BA C850 013A C8B0 030B 40B0 C8 50 41B0 41B0 41B0 41B0

(30E8-3I0C) 40B0 [DAS & ECT] 4130 4200

ROUTINE TO READ TWO CHARACTERS AT TTY AND STORE ASCII

CODE AT OBBO „ ___

Read one character into (RO bits 8-15)

0008 3E3A 0000

OBBO 00D6

40B0 (31 10-3120) C8 00 [DAS]

3E8 0 3142

Move to R5 Shift contents of R5 8 bits left logical Read another character into (RO_bjjhs 8~l5)

Add to contents of R5 Store at OBBO "'".

Return PRINT SINGLE SPACE ROUTINE _______

Put ASCII code for SP in (RO) Print character From bits 8-15 of (RO) Return

(3122-3146)

[DAS]

(3I4A-3I6A) [DAS]

3144 0001 0001 0003 AOAO 314A 3132 3110 0216

3168

FFOO 0003 3E3 0

OOFF 3E8 0 0258

(3170-3 318C [DASJ 314A D5CE

C9 54

D3A0

31 A4

31AA C1C1 314A 3122 3170 3F44

PRINT 2N+I SPACES ROUTINE

Initialize index counter for number of spaces (3130) = N

Put ASCII Code for 2 spaces in (R5) Print at TTY (R5) Loop for desired number of spaces. Print SP Return to main program

PRINT TWO HEX CHARACTERS ASCII CODE"IN (R5) (R5) -* (RO) Mask off 8 bits on left of (RO) Shift (RO) right 8 bits Print right byte of (RO) at TTY (R5) -* (RO) again Mask off 8 bits on right of (RO) Print Return

I8EJ = ROUTINE TO PRINT "UNITS"

(3190-31 AC) [DAS]

Address for print two hex characters ■* (RA) ASCI I code for UN -*■ (R5) Pr i nt ASCII code lor IT'+"(R5')~~' Print ASCII code for S space ""■+ CR5T Print _ __, Return

ROUTINE TO PRINT "AA ——- UNITS" + CRL ASCII code for AA -»• (R5) Print Print seven spaces ■ - "Print"" "UN ITS" "~ Print CRL

.55.

Page 59: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

31A8 31AC 31AE 31B2 31B.6 31BA 313E 31C2 31C4 31C8 31CA 31CE 31D0 31D4 3iD6 3 IDA 3iDE 31E2 31E4 31E8 31EA 31EE 31F0 31F4 31F6 31 FA 31 FE 3202 3206 320 A 320C 3210 3212 3216 3213 32 1C 3220 3224 3226 322A 322C 3230 3232 323 6 3233 323A 323E 3242 324 6 324A 324E 3252 3256 3258 325C 32 60 32 62 3266

C8B0 030B 28 50 31D2 314A C8A0 C8 50 01BA C8 50 01BA C8 50 01BA C8B0 030B 40B0 C8A0 C8 50 01BA C8 50 01BA C8 50 01BA C8B0 030B 3D62 3214 314A C5CE C8 50 01SA CS50 01BA. C8B0 030a 4050 C8A0 C8 50 01BA C850 01BA C850 01BA C8B0 030B 0C49 CD40 CD50 327C 314A C8B1 4130 C8 50 013A 41B0 C8 50 01BA 41B0 C8 50

01A6

40B0 C8A0 C850 01BA CFD2

A0D2

3FA0

018A

31F2 314A CDCF

D2C5

3FA0

021A

40B0 C8A0 C850 01BA D4C5

D2A0

00F6

3234 3 14A C4C1

D4C1

2FA0

009A

0001 40B0 C8A0 C850 013A 3122 C8B3

3122 C8B5

3122 C8B7

Return

(31 BO-31 D4) = ROUT I NE~TO" PRINT "H" OR* R?IT~~~

CDAS3 Print routine address -> (RA) . ASCII code for H space-» (R5) Print ASCI I code for OR -* (R5) Print ASCII code"for~space*R -*"(R5) Print ASCI I code for ? space -> (R5)

.... Print Return

(31 D6-3I F4) = ROUTINE TO PRINf"'"MORE?"" "™" [DAS] Print routine address -» (RA)

ASCII code for MO -» (R5) Print ASCII code for RE ^(R5)"~" Print ASCII code for ? space-*"(R5)" Print _ ; Return

(31F8-32I6) = ROUTINE TO PRINT "ENTER" [DAS]

(3218-3236) [DASJ

= ROUTINE TO PRINT "DATA"

(3240-327E) TECTJ

ROUTINE TO PRINT "HI H3 H5—H7 HM"

56

Page 60: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

32 6A 01BA 32 6C 41B0 3122

"3270 C8 50 C8CD 3274 OIBA 327 6 41B0 3122 327A C8B0 0116 327E 030B 328 0 A0D3 D4C5 (3280-32A2) 3284 DOAF D3D5 3288 D2C6 C1C3 328C C5A0 D2CF 329 0 D5C7 C8CE 329 4 C5D3 D3A0 3298 C3C1 CCC9

" 329 C C2D2 C1D4 32A0 C9CF CEAO 32A4 40B0 32C8 (32A4-32CA) 32A8 41B0 3122 [DAS]

32AC C8C0 0000 32B0 C8DG 0002 32 B4 C8E0 0022 32 B8 C8A0 314A 32BC 48 5C 3280 32C0 013A 32C2 C1C0 32BC 32C6 C8B0 008A 32 C A 030B 32CC CE40 0001 (32D0-32F0) 32D0 4030 32EE [DAS] 32D4 08 51 32D6 OS 62 32D3 08 73 32 DA 0200 32DC 4200 0000 32 E0 08 2 6 32E2 41S0 3EF0 32E6 OS 2 7 32 E8 41B0 3EF0 32EC C8B0 054E 32F0 030B

« 32 F2 0E48 ' 32F4 4300 28 58

32 F8 0000 32 FA 0000 32 FC 0000 (3300-33FE) 32 FE 0D72 [CEK]

3300 40B0 33FC 3304 41B0 0F10 33 08 0788 330 A 0200 330C 4200 0000 3310 4200 0000 3314 C8F0 8000 3318 04F4 331A 4330 332E 33 IE 0700 3320 C740 FFFF 3324 C750 FFFF

= ASCII CODE FOR "STEP/ROUGHNESS CALIBRATION"

ROUTINE TO PRINT "STEP/ROUGHNESS CALIBRATION" CENTERED ON PAGE .

Initialize index counters

Put print routine address in (RA) [3280 + (ROD ->R5 Print Loop for all characters return

ROUTINE TO PRINT HEXADECIMAL FORM OF CONTENTS OF R2 AND R3

Save (R2) and (R3) in R6 and R7

(R6) -* (R2) Print Hexadecimal form of (R2) (R7) -* (R2) Print Hexadecimal form of (R2) Return

ROUTINE TO CONVERT BINARY NUMBER IN R45 TO DECIMAL IN RI23 [USES (R8) AS INDEX TO STORE RESULT IN MMY STARTING AT ADDRESS IN (336A)]

Save registers 4 to F

Load I Into 0 b i t öf RF" Logical and 0 bit of RF and R4 for sign Branch if + Clear RO __ CompIement'CR4T arid™!RFT"

57

Page 61: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

3328 CA50 0001 332C 0E40 332E 07CC 3330 C8D0 0004 3334 C8E0 0014 3338 0700 333A 0894 333C 08A5 333E 434C 3530 3342 4210 335C 334 6 0849 3348 4B5C 3532 334C 4F4C 3530 3350 4210 335C 3354 CA00 0001 3358 4300 333A

f 33 5C 0849 * 335E 085A

3360 CCCO 0002 33 64 08 BC 33 66 0AB8 3368 D203 3550 33 6C CDCO 0002 3370 C1C0 3338 3374 C8D0 0002 3378 C8E0 001C 337C 0700 337E 08A5 3380 4B5C 3530 • 3384 4210 3390 3388 CAOO 0001 338C 4300 337E 339 0 08 5A 3392 CCCO 0001 339 6 083C 3398 0AB8 339A D20B 354A

' 339E CDCO 0001 •'■' 33A2 C1C0 337C

33A6 D318 3550 33AA CD10 0004 33AE D308 3551 33B2 0610 33B4 061 F 33B6 D328 3552 33BA CD20 OOOC 33BE D308 3553 33C2 CDOO 00U8 33C6 0 620 33C8 D308 3554 33CC CDOO 0004 33D0 0620 33D2 D308 3555 33D6 0620 33D8 D338 3556 33DC CD30 OOOC 33E0 D308 3557

__ 33E4 CDOO <

0008

CompIete 2's compI ernent " ~~ Add carry to R4 Clear RC """* " '"" ~™~"— Put increment in RD Put limit to get firsts powe rs o f 101 n RE' Clear RO Save (R4) and (R5)~ln"R9 "and RA ~

Subtract" power of 10,C3530 +""CRC)T"fröm'"(R4) Branch if result is negative Restore R4 " '" —..--_. Subtract power of_l0,[3532 + (RC)] from (R4,5)

Branch if result is negative Add I "to " (RO) """ " —■ Loop for more subtractions Restore or i g i na I contents "to "TR4~äncTR5

D t v I de (RC V by "4 Put (RC) in RB Index (RB) by (R8) "* —- —~ - Store [R0(8:I5)] at 3550 + (RB) Multiply (RC) by 4 Loop for next power of 10 Reinitialize increment and iimitfor remaining power

of 10 "Clear RO" "". """ """"'" ■——---—■-.-.--- Save R5 Subtract power of T0,[3530"+ (RC)I,~ from (R5) Branch if result is negative Add I to (RO) '-- Loop for more subtractions Restore original contents of R5 Divide (RC) by 2 Put (RC) into (RB) Index (RB) by (R8) Store [R0(8:I5)] at 354A +(RB) Multiply (RC) by 2 Loop for next power of TO"" '"""" ~~ Put 10**9 place value ([3550 + (R8)] • Shift left I digit (Rl) Put 10**8 place value ([3551 + (R8)] • "Logical OR (RO) with "(Rl )'""intcT'Rl Logical OR siqn bit with (Rl) into R Put 10**7 place va I ue ([13552 +(R8) j + Shift left (R2) 3 digits Put 10**6 place val ue ([3553 +""<R8"0~ Shift left (RO) 2 digits _ "Logical OR (RO) with" (R2) i"nto" R2 Put 10**5 place value ([3554 + (R8)] • Sh i f t I eft (RO) I d ig i t OR result into (R2) Put 10**4 place value,([3555 +"(R8)1 OR result into (R2) Put 10**3 place value, 0556 +""<R8>3 Shijf_t left 3 digits Put 10**2 place väTüe (t3557~+TRBTTp Shift left 2 digits

► [RI(8:I5)]) in Rl

►■ [R0(8H5)]) in RO'

[R2(8:I5)3) in R2

■TR0'(8:I5>3) in RO

^[R0^ekl5)]) in RO

^"[R0(8:l5)3)in RO

-* [R3(8:l5)])in R3

T^o'(srr5>3 m RO

58

Page 62: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

33 E8 0 63 0 33EA D308 3558 33EE CD00 0004 33F2 0630 33F4 0 635 33F6 4130 0F58 33FA C830 048 2 33FE 0303 3400 4030 3406 3404 4200 0710 (3408-34CE) = 3403 4030 34CC [DAS] 340C 4000 34A4 3410 4010 34A8 3414 4020 34AC 34)8 4030 34B0 341C 4040 3434 3420 4060 34BS 3424 4070 34BC 3428 40A0 34C0 342C 40C0 34C4 3430 40D0 34C8 3434 0700 343 6 08 15 3438 C410 0001 343C 07CC 343E 08D1 3440 0722

• 3442 08 39 3444 C43 0 ocoi ■ 3448 0CC3 344A 0733 344C CC9Ü 0001 3450 CC50 0001 3454 0C09 34 5 6 0C2 5 34 53 0CS5 34 5A CD3 0 0CC2 345E 08 79 3460 C470 COOO 3464 CC70 OOOE 34 68 0A8 7 346A CD9 0 0002 346E CDOO 0001 ""-"

3472 08 71 3474 C470 8000 3478 CC70 OOOF 347C 0A07 347E CD10 0001 348 2 0A9 1 348 4 0E8 0 348 6 CD20 0001 348A 08 73 348C C470 8000 3490 CC70 OOOF 3494 0A2 7 349 6 CD30 0001 349 A 0A9 3 349 C 0E8 2

OR result into (R3) ."'": : 10**1 place value + [R0(8:I5)"] Shift left (RO)ldigit ~" ~—

OR result into (R3) OR (R5) = 10**0 place value into (R3) Restore registers 4 -*■ F Return to main program

= ROUTINE TO MULTIPLY UNSIGNED (R5) x (R9) -► (R89)

Save all registers not used ar, input or output

(Rl), logical AND operation

(R3) Last

, logical AND operation bit of (R9) -► RD = PO

bit bit

1 bi 1 bi x 1

logical logical t shifted (R9) ■*■ ROI = t shifted (R5) -*■ R23 = bit shifted (R5) -> R89

eft logical -»■ R7 (product result)

PI P2 = P3

Clear RO Shift (R5) to Rl Last bit of (R5) -*■ Clear RC Shift (Rl) to RD Clear R2 Shift (R9) to R3 Last bit of (R9) •* Last bit of (R5) x Clear Shift (R9) right I Shift (R5) right I Last bit of (R5) x Last bit of (R9) x I bit shifted (R9) Shift (R8) 2 bits I Move contents of R9 Pick off two high bits of right product result, P3 Shift these two bits 14 bits to right Add then to left part of product result Shift, right product result 2 bits left Shift left product result of PI I bit Move right product result of PI to R9 Pick off hiqh bit of right product result of PI Shift this bit 15 bits to right Add to left product result of PI Shift right product result of PI, I bit left Add shifted right results of P3 and PI Add with carry left results of PI and P3_ Shift left result of P2Teft~ I bit" Move right result of P2 to R7 Pick off high bit '" ~ ;~ Shift it right 15 bits Add it shifted left, left part of P2 Shift right part of P2 I bit left Add shi f ted resu I ts" of ~P2" and" P3' " "" ~

59

P3

left

Page 63: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

349 E 34A0 34 A2 34 A 6 34AA 34AE 34B2 34B6 34BA 34BE 34C2 34C6 34CA 34CE 34D0 34D4 34D8 34DC 34DE 34E0 34E2 34E4 34E6 34E8 34EC 34 EE 34 FO 34 F2 34 F4 34 F8 34 FA 34 FC 34FE 3500 3504 3506 3508 350 A 350C 3510 3512 3514 3516 3518 351A 351C 3520 3524 3526 3528 352A 352C 352E 3530 3534 353 6 353A 353C

0A9D 0E8 2 C8 00 C8 10 C820 C830 C840 C8 60 C870 C8A0 C8C0 C8D0 C8B0 030B 4230 40B0 41B0 07CC 07DD 07EE 07FF 0894 08 57 41B0 08 F9 08 E8 0894 08 5 6 41B0 0AE9 0ED8 0893 08 57 41B0 0AE9 0ED8 0893 08 5 6 41B0 0AD9 0EC8 08 2C 083D 08 4E 085F 41B0 C8B0 030B 0003 0007 08 07 0605 09 07 3B9A 05F5 E100 9 680 OOOF

"Add result of PO to get final..result in R89

FFFF FFF4 0000 0 6E0 0000 0000 30C0 314A 0000 014F 3510

3544 (34D4-3524) 3522 [DAS] 0F18

Restore starting contents of all registers not used for output or input

Return to main program" " "" ""

R0UTi'NE''WWLTrPLY~('R34r"irfR67'F^"'(R2345)''

Store register 6-F

3408

3408

3408

3408

0F60 0538

CAOO

0098

Clear register OF to accumulate result

Move (R4) and (R7) to R9 and R5

(R4)x (R7){-+ (R89) = PO __

Move PO to (REF)

(R4) x iR6) -► (R89) = PI PO + PI = PI

+ TO CD EF

(R3) x (R7) -> (R89) = P2 P2

PO + PI + P2 = PI PO""'

C D EF (R3) x (R7) -»■ (R89) = P3

Finish accumulating into RC

Transfer" resu 11 l"b""(R2345")

Restore registers

Return

(3530-354C) = HEXADECIMAL EQUIVALENTSi 0F TOWERS OF""10" (3530-3532) = 10**9 (3534-6) = 10**8 "" (3538-A) = 10**7 (353C-E) = 10**6

60

Page 64: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

353E 4240 0001 3542 8 6A0 0000 3546 2710 03E3 354A 00 64 354C 000A 354E 0000 3550 0000 (3550-3558) = 3552. 0000 3554 0000 3556 0502 3558 0100 355A 0000 3f5C 0000 355E 0000 (3560-358C) = 3560 40B0 358A [DAS] 3564 CF20 0001 3568 0853 356A C450 8000 356E CC50 OOOF 3572 0A25 3574 CD30 0001 3578 08 54 357A C450 8000 357E CC50 OOOF 358 2 0A3 5 3584 CD40 0001 3588 C8B0 0000 358C 0303 358E CD20 4030 (3590-35C0) = 3592 35BE 0200 [ECT & DAS] 3596 4180 35C4 359A 0777 359C 0788 359E 089 6 35A0 4160 3403 35A4 07AA 35A6 0334 35AS 0CA6 35AA 0A8B 35AC 0E7A 35AE 08 3 7 3530 08 48 3582 08 59 3534 4130 35F8 3538 4130 0FC2 35BC C830 0332 35C0 0303 35C2 0002 (35C4-35F4) 35C4 4030 35F2 CECT & DAS] 35C8 4130 0F88 35CC 07AA 35CE 40A0 35EE 35D2 0844 35D4 4210 35DC 35D8 4300 35E8 35DC C8A0 8000 35E0 40A0 35EE 35E4 41B0 35F8

(3540-2) = 10**5 -" (3544-6) = 10**4 '(3548) = 10**3 """ — - — — ■-■ (354A) = 10**2 (354C) =10**1

STORAGE AREA FOR HEX TO DECIMAL CONVERSION

ROUTINE TO MULTIPLY R23.4 BY 2

Shift (R2) I bit left arithmetic Move (R3) R5" "" Pick off high bit of R3, put in (R5) Shift bit 15 bits right logical Add it to shifted result in R2 Shift (R3) I bit left logical

Pick off high bit of ~(R4) and put in R5 Shift bit 15 bits right logical Add it to shifted result in R3 Shift (R4) I bit left logical Return

ROUTINE TO MULTIPLY (R45) BY (R6)->R345 (R45) EITHER SIGN, (R6) POSITIVE |(R45)|->(R45)

Move (R6) -* R9 (R5) x (RG) -* (R89) "= PO Clear RA Move (R4) ->'RB (R4) x (B6) -> (RAB) = PI

' PI PO + PI = +P0

789 -Move result to (R345)

Change sign if original (R45) negative

Return

l(R45)j -> R45 ABSOLUTE VALUE ROUTINE SET FLAG AT 35EE IF NEGATIVE

Save register_0,1,2,/M|___ _____ Clear RA "~" "" ' ' "~"" "" ' Clear Flag Location Load (R4) to R4 to testsign Branch if negative Exit " " "' Load flag to (RA) Store Flag Change sign of (R45)

61

Page 65: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

35 E8 41B0 0FC2 35EC 4200 8000 35F0 C8B0 359C 35 F4 030B

»• 35F6 0000 (35F8-3620) i • 35F8 40B0 361E [ECT & DAS]

35 FC 48 A0 35EE 3600 4330 361C 3604 C740 FFFF 3608 C750 FFFF 360C CA50 0001 3610 428 0 3618 3614 4300 361C 3618 CA40 0001 36 IC C8B0 3 5B8 3620 030B 3622 C1C0 40B0 (3622-3642) 362 6 3 640 0823 [DAS] 362A' CE30 0000 362E C420 8000 3632 4230 3 63 A 363 6 4300 363E 363A C820 FFFF 363E C8B0 382E 3642 030B

; 3644 4030 32FE (3648-3696) 3648 4030 3 694 CNS & DAS] 364C 0700 364E 0711 3650 CB20 OOOA 3654 03 34 3656 C430 FOOO 365A 4330 3 664 365E CC30 OOOC 3662 0A13 3664 0C02 3666 08 34 3668 C430 OFOO 366C 4330 3 67 6 3670 CC30 0008 3674 0A13 367 6 0C02 3678 0834 367A C430 OOFO 367E 4330 3638 3682 CC30 0004

<: 368 6 0A13 ' 3688 0C02

368A 0834 368C C430 OOOF 369 0 0A13 369 2 C8B0 040C 369 6 030B 3698 4280 3 65 6 369 C 4300 3C8 0 (36A0-374C) 36A0 40B0

41B0 374A 0F88

CCEK] 36A4 36A8 4060 3746

Restore original contents of-R0,T,2,7-F (35EE) = Flag storage Return" "" ■-■——- — ■

ROUTINE TO CHANGE SIGN""OF(R45T"JTFL'AG, 8000, AT 35EE IS SET _

Load Flag from (35EE) Exit if no flag Take 2's complement of (R45)

If carry bit If not exit

set add I to (R4)

Return to program

ROUTINE TO CONVERT SINGLE PRECISION (R3) TO DOUBLE PRECISION IN (R23)

(3628) = Put (R3) into R2 Test sign bit of (R3) If bit present i.e. (R3) are negative, Branch otherwise

exit _ Load FFFF into (R2) " ' " Return

ROUTINE TO CONVERT DECIMAL (R4), 4 DIGITS, TO HEXADECIMAL AT Rl

12 bits

Clear (RO)and(RI ) Load A(=IO) to (R2) Shift (R4) -> R3 Pick off high 4 bits or first digit of If zero branch to test next lower digit If not zero shift (R3) Add shifted (R3) to (Rl (Rl) XA+ (ROD RecalI (R4) again Pick off next digit of If zero branch If not shift (R3) right 8 bits Add shifted (R3) to (Rl) (Rl X~A+ (ROD

(R4)

(R4)

right )

(R4)

(R4) RecalI IK4) again Pick off next digit of If zero, branch If not, shift (R3) right 4 bjts Add shifted.(R3) to (Rl) (Rl) X A-+ (ROD Load <R4) -» R3 Pick off last digit (last 4 bits) of (R4) Add to (Rl)

Return to main program

ROUTINE TO DIVIDE 2 HEX HALFWORDS BY I HEX HALFWORD; (R45) f (R3) -*• (R45)

Save a 11 reg Isters not used for input or output

62

Page 66: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

36AC 36B0

" 36B4 36B8 36BC 36C0 36C2 36C6 36CA 36CC 36D0 36D2 36D4 36D6 36D8 36DA 36DE 36E2 36E4 36E8 36EA 36EC 36EE 36F2 36F6 36FA 36FE 3700 3702 3704 37 C8 370C 3710 3714 3716 37 1A 37 IC 37 IE 3720 3724 3726 3728 372A 372C 3730 3734 3738 373C 3740 3744 3748 374C 374E 3750 37 52 3754 3756 3758

CC50 CE40 428 0 4300 CA50 0788 C890 C8A0 08 14 4310 074A 07 5A 0A59 0E48 08 2 5 CC50 CF40 0654 CE40 0D43 0805 08 52 C450 CE40 4380 C650 0D43 08 24 0840 CE40 4380 C65Ü CF20 0523 428 0 0A59 0E43 08 1 1 4310 074A 075A 0A59 0E48 CF40 CD50 4280 4300 CA40 41B0 C8 60 C8B0 030B 0000 0000 0000 0000 0000 0000

0001 0001 3 6BC 36C0 8000

000.1 FFFF

3 6D8

(R4) branch

000F 0001

OOOF

7FFF 0001 3 6FE 8000

0001 3710 8000 0001

371E

372C

0001 0001 373C 3740 0001 0FC2 0020 03EE

Shift CR5) right loqtcall bit

Shift (R4) right arithmetic I bit If a least significant bit shifted "out of If not branch around hiah bit add to (R5) Add hiqh bit to (R5) Clear R8 Load "I" to (R9)" ~" Load "FFFF" to (RA) Load high order part to Rl 'to" test sign ":

Branch if (R45) are positive Two's complement (R45) "

Save low-order part in R2 ~~~"""" ~' Shift (R5) right logical 15 bits Shift (R4) left I bit arithmetic """ OR (R4) into (R5) Hiah Order 15 bits Shift (R4) right 15 bits arithmetic (R45)/(R3) -* (R5) Remainders (R4) Save result in RO, High Order 15 bits of answer Reload low-order part of input to (R5) Pick off low 15 bits of (R5) Remainder/2 -> (R4) If no bit shifted out branch to next divide If bit shifted out OR hiah bit into (R5) Divide present (R45) by (R3), (R45) = iow order 15 2nd remainder -> (R2) 0f answer Recall high order 15 bits of answer to (R4) Shift (R4) right I bit arithmetic Branch if no bit shifted out If bit shifted out OR high bit into (R5) 2nd remainder times 2 Is 2nd remainder times 2 > or = to divisor Branch if not Add I with carry to (P45)

Was number negative Branch if number is positive ~—---

15 bits

Complement (R45)

Multiply (R45) by 2 to reverse Process at start of this routine

Restore all registers not used for input or output

Return to main program

63

Page 67: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

>37 50F. >37E4P 3750 41ß0 3754 3756 37 58 37 5C 37 60 37 64 3766 37 68 37 6C 3770 3774 3778 377C 378 C 3784 3788 378C 379 0 3794 3798 379 C 37A0 37A4 37A8 37AA 37AC 37AE 37S2 37B6 37BA 37BE 37C2 37 C 6 37 C A 37CE 37D0 37D4 37D6 37 DA 37 DE 37E2

07EE 07AA 483E CE30 41B0 08 53 0842 41B0 41£0 41£0 CAEO CAAO C5E0 4280 4300 C5A0 4280 41B0 C5E0 4280 4300 40£0 41BC 0852 08 63 08 21 C410 4330 C8C0 4300 C800 41B0 C420 4200 0825 4200 0826 41B0 41B0 C8B0 030B

(3750-37E2) = PROGRAM FOR TAKING LEFT JUSThFIED 12 BIT BINARY NOS. FROM MEMORY LOCATIONS 1000 TO 3000, CONVERTING THEM TO SIGNED FOUR DIGIT DECIMAL NOS., AND PRINTING (AND PUNCHING)"~IN"A"FORMAT OF NUMBER- SPACE WITH TEN NUMBERS PER LINE. PLUS SIGNS ARE NOT PRINTED IN ORDER TO BE COMPATIBLE WITH THE NBS 1108 CENTRAL COMPUTER FACILITY.

FOOO 37BE 002D 37C2 OOAO 3E80 OFFF 0000

0000

3EF0 0F58 3770

[ECT 4 CY] 3F2 6

1000 00C4 3624

3300 37A0 3110 0002 0001 2000 3788 3C80 OOCA 3758 3F44 2000 3756 3C80 37E0 0F10

(37A0-37E2) =

Punch ä Ieader for" tape o"u1 Clear line and word index counters

[1000 + (RE)] -» (R3) Load data to (R3) Shift (R3) right 4 bits arithmetic Single precision (R3) -» double precision

Move to R45 Convert (R45) to decimäi~rn"TRr23) Print and punch 4 digits and sian Print SP " " """ Index (RE) by 2 Index (RA) by I " •" -• Compare (RE) with If (RE) > 2000 qo Return to monitor Compare (RA) with If (RAX A go to CRL --. ' ■—"■■■- Check word limit again If (RE)< 2000 take next data entry Return to monitor PRINT AND PUNCH ROUTINE Save contents of reaisters A-F Move (R23) to R56 " """ ~~—

(R23)

word limit to 3788, otherwise continue

limit of words per line 3758, otherwise continue

Test sign of data point

If + branch, if - continue Load ASCII code for - to (RO) Branch to print and punch contents'of" RÖ'~ Load ASCII code for + to (RO) Print (RO) at TTY "

"Printirig" (Rf)~MTl'R2"rb7pässeTTltiice_r2_b"11s corresponds to only 4 digits

Load (R3) into R2 Print (R2) Restore (RA to RF)

Return to program

64

Page 68: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

(3800-3888) r

CECT]

38 00R >388&E 3800 07CC • -4

3802 07AA 3804 40AC 0 68 0 38 08 CACO 0002 380C G5C0 0400 3810 4280 38 04 3814 0777 3816 C880 0002 381A C890 2000 381E C8 60 0008 3822 4837 1000 3826 CE30 0004 382A 4130 3 624 382E 0D26 3830 0822 3832 4310 383A 3836 CA30 FFFF 38 3 A CA30 0100 333E CF30 0001 3842 48C3 0680 3846 CACO 0001 38 4A 40C3 0680 38 4E C170 3822 3852 C880 0630 3856 408 0 39 78 38 5A C880 0000 385E 40S0 39 7C 33 62 C83Ü 0002 38 66 4C8 0 39 9 A 38 6A C880 0400 38 6E 4080 399E 3872 C88 0 OOFO 3876 4080 3984 38 7A 4080 398 C 387E C880 OOOF 3882 408 0 3990 3886 4300 3950 >

PROGRAM TO CALCULATE THE AMPLITUDE OR PROBABILITY DENSITY FUNCTION FOR DATA STORED AT (1000-3000), STORES RESULT IN (0680-OA80), AND PLOTS FUNCTION AT STRIP CHART RECORDER

3800 - First entry to uiitiaNze storage area at Ö680-0A80. " '"

3814 -.Second entry.to.gener.ate„.ampLifled function

Initialize index counters (R7J1 8 -► (R6) [1000 +(R7)D -»■ (R3) Shift (R3) right 4 bits Single precision (R3) ■*■

arithmetic double precision (R23)

Calculate box data point should belong to Load remainder to test if > 0 If remainder < 0, add -I, then add bias If remainder >_ 0,.just add bias Add bias Multiply box number by 2 to obtain address no. [0680 + (R3)] + (RC) Add I to (RC) New contents of RC -> [0680 + (R3)] Increment index counter then repeat

ot storaae

(3852-3888) = Initialization of plot routine, plot (0680-OA80), then return to monitor.

65

Page 69: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

39 00 39 02

' 39 04 39 08 39 0C 39 10 39 14 3918 39 IC 3920 39 24 39 28 39 2C 3930 39 34 39 38 393C 3940 3944 3948 39 4A 39 4C 39 4E 39 50 39 54 39 58 39 5C 39 60 39 64 39 68 39 6C 39 70 39 74 3976 39 7A 39 7E 398 2 398 6 398A 398E 3992 3994 3998 399C 39A0 39 A4 39 A8 39 AC 39B0 39B2 39B4 39B6 39 BA 39BE 39C2 39C6 39 CA 39CE

07AA 07CC 40AC CACO C5C0 4280 4300 C8 00 4000 C800 4000 C800 4000 4000 C800 4000 C800 4000 4300 0000 000C 0000 0000 C8 00 41B0 4200 C800 41B0 41E0 CSOO 41 BO 41B0 0799 48 39 CE30 4320 C53 0 4280 C830 CA30 08 03 41B0 CA9 0 C590 428 0 C8 00 41B0 4300 0000 0000 0000 40B0 C8C0 C8D0 C8E0 C1C0 C8B0 030B

(3900-3916) [ECT]

1000 0002 2000 39 04 3C80 1000 (3918-3946) 39 78 CECT] 0008 39 70 007B 398 4 398C 008 4 3990 2000 399E 39 50 (3950-39CF)

CECT]

PROGRAM TO CLEAR CONTENTS OF MEMORY LOCATIONS 1000 to 3000

0003 3E8 0 0000 0004 3E8 0 39B6 OOFF 3 ESO 39B6

0 63 0 0000 39SE OOFO 398E OOFO OOOF

3E8 0 0002 0400 39 7 6 0002 3E8 0 3C80

39CC 0000 0001 FFFO 39C6 39 74

PROGRAM TO INITIALIZE PLOT ROUTINE FOR BIPOLAR NUMBERS AND TO PLOT DATA FROM MEMORY LOCATIONS 1000 TO 3000 ON STRIP CHART RECORDER

PLOT ROUTINE: THIS ROUTINE TAKES HALFWORDS FROM SPECIFIED MEMORY LOCATIONS USING THE 8 MOST SIGNIFICANT BITS (INCLUDING THE SIGN BIT) AND BIASES THE DATA TO HAVE A RANGE FROM 4 TO 255. SEE NOTES IN TEXT.

Turn on recorder

Print low value

Continue for '^ 8 sec.

Print high value " ' """ Continue for <\. 8 sec. Initialize index counter (R9) " ~ C(3978) + (R9)] ■*. (R3) Shift (R3) right arithmetic prooer number of bits If number is positive, continue: otherwise branch Compare number with maximum value If less than maximum add bias If greater than or equal max, replace no. with maximum Add bias

Plot biased value

Increment index counter, compare with limit, continue If (R9) < I imit. ' ~" "

Turn off recorder Return to monitor

(39B6-39CF) = WAIT APPROXIMATELY 8 SEC. ROUTINE.

. 66

Page 70: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

39 DO 39 D2 39 D4 39 D8 39 DC 39 EO 39 £2 39 E6 39 E8 39 EC 39 EE 39 F2 39 F4 39 F8 39 FA 39 FE 3A00 3A04 3A08 3A0C 3A0E 3A12 3A14 3A18 3A1A 3A1E 3A20 3A24 3A2 6 3A2A 3A2C 3A3 0 3A34 3A38 3/--3A 3H3E

3P.4 G 3A44 3A4 6 3A4A 3A4E 3A52 3A5 6 3A58 3A5C 3A60 3A64 3A68 3A6C 3A70 3A7 2 3A7 6 3A7A 3A7E >

0000 0Ü00 40B0 C8A0 C850 01BA C850 013A C850 01BA C850 013A C8 50 01BA C8B0 030B 40B0 C8A0 C850 013A C850 01BA C8 50 01BA C850 013A C8 50 01BA C830 0303 3A?C CciAG C850 01BA C850 OiSA Co 5 0 01BA 4300 3A4A 3A4E 3A6E 0001 4030 4130 41B0 C850 41 BO C830 030B 3A72 3A7 6 3A7A 3A7E

39 FC (39D4-39FE) 3 14A [ECT] 4D45

414E

2041

4120

3D20

1704

3A28 (3A00-3A2A) 3 1 4A [ECT] 5354

4420

4445

5620

3D20

1704

ROUTINE TO PRINT AT TTY "MEAN AA ="

ROUTINE TO PRINT AT TTY "STD. DEV.="

314A (3A30-3A48) 4 552 [EOT]

52^ F

5220

3C80 3A4C 4030 (3A50-3A70) CA50 [ECT]

3A6E 3 14A 3110 4D4D 314A 01D0

= PROGRAM TO PRINT "ERROR" THEN RETURN TO MONITOR

ROUTINE TO PRINT POWER OF TEN ENTERED AT UNITS OUERY FOR STEPS AND SAME + (-l)_FOR ROUGHNESS AND ALSO TO PRINT "MM".

3A74 3A78 3A7C 4000

67

Page 71: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

3A40 3A44

" 3A4 6 3A4A 3A4E 3A52 3A5 6

; 3A58 ' 3A5C 3A60 3A64 3 A 68 3A6C 3A70 3A72 3A7 6 3A7A 3A7E 3A82 3A8 6 3A8A 3ASE 3A9 2 3A9 6 3A9A

• 3A9E 3AA0 3AA4 3AA8 3AAC 3A3 0 3 Aß 4 3A38 3 ABC 3ACC 3AC4 3AC8 3ACC 3AD0 3AD4 3AD8 3ADA 3ADE 3AE2 3AE6 3AEA 3AEC 3AEE 3AF0 3AF2 3AF4 3AF6 3AFA 3AFC 3AFE 3B00 3B04 3B08

C8 50 013A 4300 3A4A 3A4E 3A6E 0001 4080 41B0 41B0 C850 41B0 C8B0 0303 3A72 3A7 6 3A7A 3A7E 3AB6 3A3A 3A3E 3AC2 3AC6 3ACA 3ACE 0002 C800 4130 41B0 4820 4120 C8 00 C8 10 C820 CS30 C83Ü CS.iO C8F0 C200 8000 0700 4000 C8 00 4000 4300 0000 0000 0000 0004 0630 0635 4300 0000 0000 0000 C800 4000 4300

5220

3C80 3A4C 4030 CA50

3A6E 314A 3110 4D4D 314A 01D0

3A74 3A78 3A7C 4000 4010 4020 4030 408 0 40B0 40F0 C8F0

003F 3E3 0 3F44 0032 3EF0 003A 0043 EOOO 000 6 0003 •S Foo 0002 3AD4 3C80

0034 3A8 0 0036 3C80

28 5A

41B0 3DA8 3C8A

Load R space "'" ; Print Return to monitor """ * ~"'~

(3A50-3A70) = PRINT MM AND INCREASE POWER OF 10"BY I IF FOR AA .. (REPEAT OF PREVIOUS ITEM)

Pri nt power of 10 ~ Print SP Load MM "" ~" Print Return to main program

REMAINDFR OF PROGRAMS ANn ROUTINES WRITTFN

(3A80-3AD7) = ^ILESXL'^NSlRBEI \8N HANDLER" ~■ :~

(3AD8-3AE9)

Srve 0 Save I Save 2 Save 3 Save 8 Save B Save F "2" to F Load ? Print CR-LF Load old PSW address Print 4 Restore Restore Restore Restore Restore Restore B Restore F Load PSW PSW - Wait State - INITIALIZE ILLEGAL

, (&)

0 I 2 3 8

to monitor INSTRUCTI ON INTERRUPT WITH COMMAND

(3B00-3B4B) = ANNOTATION PROGRAM THIS PROGRAM WILL ACCEPT A MONITOR PRINT COMMAND IN THE NORMAL FORMAT. IT WILL PRINT ONE LINE, THEN TAB OVER TO THE COMMENTS FIELD. AFTER TYPING COMMENTS, A RUBOUT WILL GET THE NEXT LINE OF TEXT. A CARRIAGE RETURN WILL GET A LINE FEED AND ROOM FOR MORE COMMENTS.

TO ACTIVATE ANNOTATOR COMMAND "I S (T) " TO STOP ANNOTATOR COMMAND IS (U) MONITOR CONTENTS DURING ANNOTATION AT 3DA8 ARE CHANGED. .To mess: Jjp._pr i.nt_ ro.utjne Store " To monitor

68

Page 72: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

3B0C 3B0E 3B10 3314 3318 33 IC 33 IE 3320 3324 3328 3B2C 3B30 3334 3338 333 C 3340 3344 3348 334C 334E 3350 3354 3358 33 5 A 335E 33 60 33 64 33 68 33 6C 3370 3B74 33 78 337C 337 E 338 0 3SS4 3_3 6 3ulJA 338 E 339 2 339 6 3398 339 C 33 A 0 33A4 33A6 3BA8 3BAC 3B30 3332 3B34 3B38 3BBA 3BBE 33C0 33C2 33C4 3BC8

0000 0000 C300 4000 4300 0000 0000 C800 4130 4130 C500 4330 C500 4330 4300 C800 4130 4300 0000 0000 40B0 4030 07CC D30C 0800 4330 4130 CACO C5C0 428 0 41B0 C330 030B . 0000 C8A0 0 7 00 4 130 CBCO C8E0 D30C 013A C1C0 C8C0 C8E0 0700 013A C1C0 C800 01BA 08 15 41C0 08 14 41C0 0799 08C5 08 E4 D30C 0790

(3BI0-3BIA) = STOP ANNOTATOR

4200 3DA8 3C3A

(3B20-3B4A) =

0089 3E8 0 3E8A 008 D 3340 OOFF 3DAC 3328 OOOA 3E8 0 3320

337A 335C

003E

3374 3E8 0 0001 0020 335A 3F44

No-op to fix print routine Store To monitor ANNOTATOR

Load Tab Print '-—•■••-— Ask for input Compare with CR " If equal, new I ine Compare with rubout

3E8 0

3F2 6 3FS Ü 3FCF 0000

339 2 0001 0010

3BA6 OOFF

3BDE

33DE

0000

If equal, back to print routine Otherwise, loop for'another'character Load LF Print """'" "" "" Jump to tab

(3B50-3B7D) = PRINT 32 CHARACTERS FROM MMY STORED IN ASCI I STARTING AT ADDRESS IN (R3)

Save return Store First address in load instruction Clear index Load character Test ■■ " - If zero (BLANK) exit Print "' Increment index Compare with I im it Loop if less than Iimit CR-LF Restore return

(3B80-3BDD) = ROUTINE FOR PUNCHING AT TTY HEXADECIMAL FORM OF MMY CONTENTS FROM ADDRESS IN (R5) TO (R4) Address for punch subroutine Clear 0 Punch blank leader Start address of loader Final address of loader Fetch byte of loader Punch "" '" Loop for next byte Prepare to punch blank spaces

Punch Loop Rubout Punch Start Address_ to_l Punch Final Punch Clear Start Final

address to

9 for Hashsum address to C address to E

Fetch byte of text" Update Hashsum

69

Page 73: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

3BCA 3BCC 3BD0 33D2 3BD4 3BD6 3BDA 33DE 3BE0 3BE4 3BE6 3BE8 3BEA 3BEC 3BEE 3BF0 3BF2 3BF4 3BF6 3BF8' 3BFA 33 FC 33 FE 3C00 3C04 3C08 3C0C 3C0E 3C12 3C16 3C1A 3C1E 3C22 3C2 6

OlßA C1CO 08 09 01BA 0700 4130 4300 08 01 CCOO 013A 9210 013A 030C 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 40S0 4030 C8C0 07DD 40DC CBCO 43 IC

3BC4

3F2 6 3C8A (3BDE-3BEB)

0008

3C2A 3C2E 3G3 2 3C36 3C3A 3C3E 3C40 3C42 3C44 3C4 6 3C4A 3C4C 3C50 3C54 3C58 3C5C 3C60 3C64 3C68 3C6C 3C6E 3C72 3C74 3C78

4C30 41E0 C500 4330 D20D CADO C5D0 423 0 C8B0 03 OB 0000 OOCO 0000 41B0 08 2 5 41£0 C8 00 41B0 C8EC C8 00 41B0 4825 41B0 0A5F C1C0 0554 4380 41B0

3C3C 3C10 001E

008E 0GC2 3C0E 3C2C 3 E3 A 003D 3C3A 008 E 00C1 0C2G 3C1E 2B72

3F44

3EF0 OOAO 3E3 0 0007 OOAO 3E8 0 0000 3EF0

3C5C

3C8A 3EE0

Purich ~ _ Loop for next byte All text punched. Hashsum to 0 Punch Clear 0 "" " Punch blank leader

ROUTINE TO PUNCH ADDRESS FROM (Rf) Address into 0 Shift 0 right 8 " --— Punch top half Bottom half to 0 Punch Exit "~

(3C00-3C3F) =

(3C46-3C7F)

ROUTINE TO READ 32 CHARACTERS AT TTY AND STORE IN ASCII FORM IN MMY STARTING AT THE ADDRESS IN (R3)

Save return Store first address in store instruction Index Clear D ""*.'" " """" - Clear data space Subtract 2 " " BR. if positive or zero Store First address in store instruction Read one character CR? ■"" ■ ~" ■•- '■ If so, return Store Character Increment Index Compare with limit Loop if less than I imit Restore Return Exit ROUTINE FOR PRINTING AT TTY"HEXADECIMAL FORM CONTENTS OF^MMY FROM ADDRESS IN (R5) TO ADDRESS IN (R4)

into 2

CR-LF Address pointer from 5 CaI I Print 4 __ Load SP "~ " " "" ;: Print. Gives-double space after address (7) + C into E. Contents of C are not used Load SP Print ' " ~ —~~- Fetch Byte From Address In 5 Print 4 """ Increment 5 Loop for next Byte .Check for print limit If limit, go to dispatcher If not, check panel button 15

70

Page 74: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

3C7C 4330 3C46 3C80 C800 0C20 (SEE 3Ö04) 3C84 C8.F0 0002 3C88 9EF0 3C8A 41B0 3F44 3C8E C800 00BE 3C92 41B0 3E30 3C96 41E0 3E8A 3C9A 07CC 3C9C C8D0 0001 3CA0 C8E0 00IE 3CA4 D31C 3DE0 3CA8 0510 3CAA 4330 3CE6 3CAE COCO 3CC0 3CB2 4300 3CA4 3CB6 CDCO 0001 3CEA 48BC 3E10 3CBE 030E 3CC0 41B0 3EA4 3CC4 CD40 0004 3CC8 0641 3CCA 43 00 3C9 6 3CCE 0000 (3CD0-3D03) = 3CD0 40B0 3D00 3CD4 4030 3CDC 3CD8 07CC 3CDA 48 2C 38 68. 3CDE C8F0 0002 3CE2 4130 3ZFC 3CE6 CSOO OCAO 3CEA 4130 3E80 3CEE CACO 0002 3CF2 C5C0 0006 3CF6 42SC 3CDA 3CFi> 4 ISO 3ESO 3CFE C330 3S50 3D02 030B 3D04 OOCO (3C80-3CCD) = 3D06 0000 AND BUFFERS 3D03 0000 APPROPRIATE 1

3D0A 0000 -

3D0C 0000 (3DI0-3DD5) 3D0E 0000 3D 10 08 54 *R SERVICE* 3D12 0744 3D14 4300 3C8A 3D18 0B5F *RUB0UT SERV 3D1A C800 OODE 3D IE 4 1 BO 3E8 0 3D22 4300 3D12 3D2 6 0A5F *l SERVICE* 3D28 4300 3D12 3D2C 4045 0000 *CR SERVICE* 3D30 0A5F 3D32 4300 3D12 3D36 4045 0000 *SP SERVICE* 3D3A 0A5F

If button not pushed, print -another line; otherwise continue to this statement which is entrance to

TTY device number " —-•-- monitor Output command _ CR-LF " : ~~"" " Load > Print Get character from TTY ,_.„„„,._ Clear C - start index -——-■-~~-~ Increment Last index Fetch byte from command table Compare with input byte BR. if equal BR. if end of table reached"" Loop for next character Command found! Shift C left I to"get index Fetch address from jump table into B Jump indirect through B No command found, was data, go ASCI I-Hex Shift 4 left 4 Or new data in Go back for next character

= PRINT N/2 HALFWORDS STARTING WITH ADDR. IN (R3) Save return Store AX2 in Load instruction Clear C Load AX2(C) in 2 "2M to F Print 4 Load SP Print Increment index Compare with Limit, (3CF4) = N Loop i f less than I imit Print 2nd SP Restore return Exit

= COMMAND INTERPRETER. ACCEPTS DATA INPUT FROM THE TTY IT IN R4. ACCEPTS COMMANDS FROM TTY AND CALLS ROUTINE TO SERVICE THEM.

= SERVICE ROUTINES FOR R, RO, I, CR, SP, G, P AND W COMMANDS FROM TTY

Load 4 into 5, thereby setting address pointer Clear 4 (Suppress leading zeroes on type in) Jump to dispatcher

ICE* Decrement pointer by 2 Load Arrow Print _ ,_„„.„___ ,....■— - Jump to clear 4 and return Increment pointer by 2 __ Jump to clear 4 and return Store 4 at location in 5 __.__ Increment pointer by 2 Jump to clear 4 and return .____„_ Store 4 at location in 5 Increment pointer by 2 _ _ „

71

Page 75: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

1 I

3D3C 3D3E 3D42 3D4 6 3D4A 3D4E 3D52 3D56 3D 5 A 3D5E 3D 62 3D66 3D68 3D6C 3D6E 3D72 3D7 6 3D7A 3D7E 3D8 0 3D84 3D88 3D8C 3D9 0 3D94 3D9 6 3D9A 3D9E 3DA2 3DA6 3DA8 3DAC 3DAE 3DB2 3D36 3DBA 3D3E 3DC0 3DC4 3DC6 3DCA 3DCE 3DD2 3DD6 3DD8 3DDA 3DDC 3DDE 3DE0 3DE4 3DE8 3DEC 3DF0 3DF4 3DF8 3DFC 3E00 3E02

0744 4300 C540 4280 C540 428 0 41B0 C8 00 41B0 41B0 4330 0304 41B0 08 25 41B0 C800 41B0 4825 0812 C410 4330 C510 4330 41B0 0A5F C800 41B0 4825 4130 0A5F 4200 0554 438 0 41B0 4330 4300 0200 41B0 0825 41B0 C800 41B0 4300 0000 0000 0000 0000 0000 8DFF D247 BED4 4BD7 48CA D1D8 28 59 CF21 0000 0000

*G SERVICE* 3C9 6 3B8 0 3D52 3000 3C9 6 3F44 008 7 3E8 0 3EE0 3D5E

3F44 *P SERVICES*

3EF0 00A0 3E8 0 0000

FOOO 3D9E 9000 3D9E 3EF0

OOAO 3E8 0 0000 3EF0

3B20

3DB6 3EE0 3D68 3C8A

3F44

3EF0 OOAO 3E8 0 3C9 6

*W SERVICE*

Clear 4 : Return to dispatcher without > Is address > monitor start? ~ ~"~~ If !t is, jump Address > monitor end? If so, jump to dispatcher without > If not, call CR-LF Load bei I Pr i nt ' — Check Panel Button 15 _ Loop waiting for button Jump to address in 4 Call CR-LF " Address pointer into R2 to be printed Print 4 """ * " """""" — Load SP Print " " Fetch ha Ifword at pointer into R2 AI so i nto RI " Strip top 4 bits for apcode check Jump if 0. was ha Ifword instruction Compare to 9 Jump if 9. was halfword'instruction Print 4 Increment pointer Load SP Print ; ""'"""" .'" ""'"'" '"• Fetch ha Ifword at pointer into R2 Print 4 Increment pointer To annotator (no-operation normally) Have we reached print limit? If not continue, otherwise branch to print last line If not, is panel button 15 pushed If not, get next line of print If button pushed or at print limit, return to dispatcner

CR-LF <R5) -* R2 "' "'""' " " Print 4 (current address pointer) Load SP " Print- Return to dispatcher without >

A050 C9 0A 5355 ccoo 4D56 A6A9 5A4E A300

(3DE0-3E0F) = STORAGE FOR MONITOR C0MMAND_TABLE CR, RO, SP, P

_ R, G, I, LF^ >, T,"S,'U K, W, L, BLANK H, J, M, V Q, X, &, ) <» Y, Z, N 0, l, #

72

Page 76: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

3E04 0000 3E0 6 0000 3E08 0000 3E0A 0000 3E0.C 0000 3E0E 0000 (3EI0-3E6F 3E10 3D2C 3D18 3E14 3D36 3D 68 3E18 3D10 3D42 3E1C 3D26 3C8A 3E20 3C80 3B00 3E24 02 60 3E2 6 3B10 3B8 0 3E2A 3DC0 3C46 3E2E 3C9 6 017E 3E32 3800 ODOO 3E3 6 OCOO 3E38 019E 3E3A 3900 3AD8 3E3E 3C8A 3C8A 3E42 OEOO 3E44 39 18 3C8A 3E48 3C8A 3C3A 3E4C 3C8A 3C8A 3E50 3C8A 3C8A 3E54 3C8A 3C8A 3E58 3C8A 3C8A 3E5C 3C8A 3C8A 3E60 3C8A 3C3A 3E64 3C8A 3C8A 3£fc3 3CSA 3C2P. 3E6C 3C8A 3C8A 3E70 0000 3E72 4200 0000 Oi / U 4200 0000 3E7A OCOO 3E7C 0Ü00 3E7E 0000 3E8 0 4300 3F60 3E8 4 0000 3E8 6 0000 (3E8A-3E9A) 3E88 0000 3E8A C880 00A4 3E8E 9EF8 3E9 0 9DF8 3E9 2 0888 3E94 4230 3E9 0 3E98 9BF0 3E9A 030B 3E9C 0000 3E9E 0000 3EA0 0000 (3EA4-3EC5) 3EA2 0000 3EA4 08 10 3EA6 C410 0070 3EAA C510 0040 3EAE 4330 3EBA 3EB2 0810

(Modified by ECT for use by surface measurement programs)

JUMP TABLE FOR COMMANDS (SEE 3CA4-3CBE) . . CR, RO SP, P R, G ' - """■"J" - Amp 1Ttude density function 1, LF V - Autocorrelation function >, T H - Steps S 0 - Roughness U, K s - Cali bration W, L Y - Wavelenath BLANK, H -■ ■ M - Mean and Standard Deviation J, M X - Clear (1000-3000) V Z - Plot C1000-3000) Q X, &

),( Y Z, N 0, !

#

PRINT ONE CHARACTER MOVED TO 3F60, JUMP THERE

READ ONE CHARACTER, WAITS FOR DATA AT TTY, PUTS INPUT IN RO _

Waits for data from TTY, puts it in RO Unblock, Read, Di sable Sense Status Check, Status, If zero, data is ready Loop if not..zero Read data _ Exit

CONVERT ASCI I BYTE IN RO TO HEX IN Rl

Input byte to Rl Pick off bits 9, 10, II ■'" Are they 1,0,0? If so, Letter between A and 0, BR If not, its a number. Bring in byte again.

73

Page 77: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

3EB4 3E38 3EBA 3E3C 3EC0 3EC4 3EC6 3EC8 3ECA 3ECE 3ED2 3ED6 3ED8 3EDA 3EDE 3EE0 3EE4 3EE6 3EEA 3EEE 3EF0 3EF2 3EF6 3EF8 3EFC 3F00 3F04 3F06 3F0A 3F0C 3F10 3F14 3F16 3FJA 3Fi£ 3F22 3F24 3F2 6 3F2A 3F2C 3F3 0 3F34 3F38 3F3C 3F40 3F42 3F44 3F48 3F4C 3F50 3F54 3F58 3F5C 3F5E 3F60 3F64 3F66 3F68

C410 030B 08 10 CA10 C410 0303 0000 08 10 C310 4220 C600 08 10 0303 C610 030B C8F0 93F0 C8F0 C400 0303 0733 4030 08 02 C400 CCOO 4130 08 01 4130 08 03 C300 4310 0A3F CD20 4300 C830 03 03 OCOO 4030 07CC C8D0 C8E0 4.130 C1C0 C830 0303 0000 40B0 C8 00 41B0 C8 00 41B0 C8B0 0303 0000 C880 9EF8 9DF8 4280

OOOF

0009 OOOF

0009 3 EDA 0030

OOCO

0001

0002 0001

3F20

FOOO OOOC 3EC8

3E8 0

0006 3F1E

0004 3EF6 3D9 4

3F3E

0001 0048 3E8 0 3F34 33DA

3F5A 008 D 3E8 0 008A 3E8 0 3D6C

00 AS

3F60

(3EC8-3EDF) =

Bits 12 thru 15 in I. This 1s the answer. Exit Letter. Bring in byte again Add 9 (Since a comes in as "41") Bits 12 thru 15 in I. This is the answer. Exit CONVERT HEX CHAR, IN RO TO ASCI l" BYTE Pick up char, put in I, subtract 9 If neg, number between 0 and 9 Append 'BO' to make ASCI I

IN Rl

was between A 'CO' and exit

and F. Take subtracted value

Put in I as output. Exit Number Append 'I1 to F (Panel Dev.No.} Read panel '2' to F Check for last bit zero (Button 15) sets condition code Exit

'PRINT HEX HALFWORD* Clear 3 Save return Pick up input argument from 2 Strip off bits 0, I, 2, 3 Shift right 12 Hex-ASCII Result in 0 Print Get 3 into 0 Subtract 6 (Count Limit) If exceeded, exit Otherwise, increment 3 by 2 Shift left 4 to get second character Loop back to print more Restore Return Exit

(3F26-3F4I) = LEADER GENERATOR FOR TAPE PUNCH ING Store return Clear C Put 'I' in Put '48'in Pr i nt Loop and count Restore return Exit ~" """ ~~

(3F44-3F5D) = CARRIAGE RETURN-LINE_ FEED SERVICE. Save return. Load CR

D E

Print Load LF __ _ Print " "•—' - Restore Exit Exit """

(3F60-3FCF) = PRINT I CHARACTER FROM (RO) Unblock, write, disable Output command Sense status Loop on TTY busy

74

Page 78: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

3F6C 3F6E 3F70 3F72 3F74 3F7 6 3F78 3F7A 3F7C 3F7E 3F8 0 3F84 3F8 6 3F8A 3F8E 3F92 3F94 3F98 3F9A 3F9C 3F9E 3FA0 3FA4 3FA8 3FAA 3FAC 3FAE 3FB2 3FB6 3FB8 3F£A 3FBS 3FC0 3FC2 3FC4 2?C6 3FCA 3FCC 3FCE 3FD0 3FD4 3FD8 3FDC 3FE0 3FE4 3FE8 3FEC 3FF0 3FF4 3FF8 3FFC 4000 >

9AF0 0303 0000 0000 0000 0000 0000 0000 0000 0000 C850 01B5 C500 4230 41C0 08 24 41C0 0799 01B5 0790 9A39 D202 C120 01B5 0790 9A39 4300 DEAO 9 DAS 0888 4230 9BA0 030B 01B5 08 40 CD4Ü 01£5 9204 030C 3FD0 3FD4 3FD8 3FDC 3FE0 3FE4 3FE8 3FEC 3FF0 3FF4 3FF8 3FFC 0000

Write Exit

data

(3F80-3FBI) = BOOTSTRAP LOADER ~ READS STARTING AND FINAL BYTE ADDRESSES FROM TAPE. DOES NOT LOAD HASHSUM OR FOLLOWING BLANKS. RETURNS TO MONITOR. NOTE THAT '50' LOADER LEAVES''I' IN 3, T2' IN A, AND '94' IN 0079

3FB2

OOFF 3F84 3FC2

3FC2

CO US

3FD2 3FD6 3 FDA 3FDE 3FE2 3FE6 3FEA 3 FEE 3FF2 3FF6 3FFA FFFF

Address for fetch byte Get A byte Is it a rubout? " No. Keep looking Rubout found. Address to 4 • "—™ 4 to 2. Starting byte address _ Final byte address to 4 Clear 9 for hashsum Get next byte Include in hashsum Hashsum to Panel Lights Store byte where 2 points Br. on index < or = Get hashsum Update hashsum Hashsum to panel lights To monitor

TTY* Output command. Block, read, disable Sense status Test Loop until data ready Read the data Exit

*FETCH ADDRESS INTO R4* Get next byte Put it in 4 Shift 4 left 8. TOD ha

0000 3F9A

3C80 0079 *GET BYTE FROM

3FB6

Get Next byte. Put it in 4 Exit

f of Bottom ha If

address of address

USCOMM-NBS-DC 75

Page 79: Evaluation, Revision and Application of the NBS Stylus/ … · 2018-02-09 · üt (0680-OA80) Routine to Calculate Mean and Standard Deviation of a Set of AA Values Input - Number

NBS-114A (REV. 7-73)

U.S. DEPT. OF COMM.

BIBLIOGRAPHIC DATA SHEET

1. PUBLICATION OK REPORT NO.

NBSIR 75-924 4. TITLE AND SUBTITLE

2. Gov't Accession No.

Evaluation, Revision and Application of the NBS Stylus/ Comouter Svstem for Surface Roughness Measurement' Mi ni computer Software

7. AUTHOR(S)

E. Clayton Teague 9. PERFORMING ORGANIZATION NAME AND ADDRI-SS

NATIONAL BUREAU OF STANDARDS DEPARTMENT OF COMMERCE WASHINGTON, D.C. 20234

12. Sponsoring Organization Name and Complete Address (Street, City, State, ZIP)

same

15. SUPPLEMENTARY NOTES

3. Recipient's Accession No.

5. Publication Date

April 1975 6. Performing Organization Code

8. Performing Organ. Report No.

10. Project/Taslc/Work Unit No.

2131114 11. Contract/Grant No.

13. Type of Report & Period Covered

Final 14. Sponsoring Agency Code

16. ABSTRACT (A 200-word or less (actual summary of most significant information. If document includes a significant bibliography or literature survey, mention it here.)

A thorough description of all the software used at NBS for characterizing surface texture is given in this report. The description includes flow diagrams and detailed, annotated listings of machine language programs for step-calibrating the system, for acquiring digitized surface profiles and for calculating from these profiles important parameters and statistical functions. Parameters and functions included are the arithmetic average value, mean square value, average wavelength, average slope, amplitude density function and autocorrelation function.

17. KEY WORDS (six to twelve entries; alphabetical order; capitalize only the first letter of the first key word unless a prope name; separated by semicolons)

Minicomputer software; Machine language; Linear least-squares fit; Arithmetic average; Amplitude density function; Autocorrelation function; Surface texture measurement.

18. AVAILABILITY fcg Unlimited

r 1 For Official Distribution. Do Not Release to NTIS

L J Order From Sup. of Doc, U.S. Government Printing Office Washington, D.C. 20102, SD Cat. No. (1 ^

JCX Order From National Technical Information Service (NTIS) Springfield, Virginia 22151

19. SECURITY CLASS (THIS REPORT)

UNCLASSIFIED

20. SECURITY CLASS (THIS PAGE)

UNCLASSIFIED

21. NO. OF PAGES

78 22. Pr

$5.00 USCOMM.DC 29042-P74