NBSIR 75-924

Evaluation, Revision and

Application of the NBS Stylus/

Computer System for Surface

Roughness Measurement:

Minicomputer Software

E. Clayton league

Institute for Basic Standards

National Bureau of Standards

Washington, D. C. 20234

April 1975

Final Report

U S DEPARTMENT OF COMMERCE

NATIONAL BUREAU OF STANDARDS
I
NBSIR 75-924

EVALUATION, REVISION AND

APPLICATION OF THE NBS STYLUS/

COMPUTER SYSTEM FOR SURFACE

ROUGHNESS MEASUREMENT:

MINICOMPUTER SOFTWARE

E. Clayton league

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, Urtder Secretary

Dr. Betsy Ancker-Johnson, Assistant Secretary for Science and Technology

NATIONAL BUREAU OF STANDARDS, Ernest Ambler. Acting Director

Table of Contents

I . I ntroduct ion

II. Allocation of Core Memory During Use By the Software

for Surface Roughness Measurement

Ml. Flow Diagrams of Major Programs or Routines

IV. Operating System

V. Brief Description of Op-Codes and Instruction Word

Formats

VI. Annotated Listings of Complete System Software

List of Figures

Figure 1 : FI owchart of Main Step/Roughness Program

Figure 2: Flowchart of Main Step/Roughness Program

Fi gure 3: F 1 owchart of Main Step/Roughness Program

Figure 4: F 1 owchart of Least Squares Routine

Figure 5: F 1 owchart of Routine to Calculate Step Heights

Fi gure 6: FI owchart of Routine to Calculate AA Value

Figure 7: F 1 owchart of Amplitude Density Function Calculation

Figure 8: FI owchart of Autocorrelation Function Calculation

Fi gure 9: 1 nstruct ion Word Formats

MINICOMPUTER SOFTVJARE FOR THE MBS STYLUS/COMPUTER SYSTEM

FOR SURFACE ROUGHNESS MEASUREMENTS

1 . Introduction

A thorough description of all the software ujed at NBS for

characterizing surface texture is given in this report. The

description includes flow diagrams and detailed, arjiotated listings of

machine language programs for step-calibrating the system, for

acquiring digitized surface profiles and for calculating from, these

profiles inportant parameters and statistical functions . Parameters

and functions included are the arithm.etic average value, miean square

value, average waveler^gth, average slope, amplitude density function

and autocorrelation function.

The report was originally written as an appendix for the NES

Technical Note, "Evaluation, Revision and Application of the NBS

Stylus/Computer System for Surface Roughness Measurem^ent . " However,

due to its size and specialized content, the appendix v;as issued as this separate volume.

1
This appendix contains the following information about the

computer softv;are used v/ith the mlrJ.conputer/stylus instrument system:

A. Allocation of the Interdata Model 3 memory during use by the

step/roughness m.easurement software,

B. Flow diagramis of major programs or routines,

C. A mer.orandum. by Philip G. Stein (I^JBS) v;hich 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 measurem.ent

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 ivord '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 conputerized

surface roughness measurem.ent . Listings of the softxv^are in machine

language should be of use to the reader whose minicomputer memory size

is limited and rhus is unable to support a compiler and to the reader

considering the implementation of parts of the softi-rar-e system, on a

recent generation minicomputer. For those with assemblers and/or

compilers, the flow diagrams and listings should enable the efficient

Trvriting of necessary program.s. The incorporation of this appendix and

motivated by rhe desire that one or all three of these routes be

encouraged in every possible v/ay. Thus, any questions pertaining to

the software's operation, design or use would be welcomed by the

author

.

The docum.entation of computer program.s in machine language is

impossible vri-thout making - reference to specific equipment and

instruction sets 'by brand name. However, no judgem.ent as to the

quality or suitability of the equipment discussed here has been made

by the Natiorxal Bureau of Standaixis, 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 encouragemient to the

user to take the programs as they stand and to make as many

improvem.ents as his time allows. The software is however a system of

programs which has passed everv' functional test conceived to check its

2
operation. As described in the body of the report, these checks have

included static and dynarrdc 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 vd.thin 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 knom v/aveforms correlate with analytically

calculated values?

I wish to acknov7ledge with thanJ<s the many contributions to this

software system by IJES associates. Their advice and, in many cases,

their contribution of complete program listings made the vnr'iting and

revising of the system software a much easier task. Contributors to

the software were Dennis A. Siiyt (DAS), Philip G. Stein (PGS), Chj^is

E. Kuyatt, (CEK) , Nils Swanson (NS), Carol Young (CY), and E. Clayi;on

Teague (ECT) . The major source of each pro.gr'-am. 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 mie since many relocations,

renamings and manor revisions have been made on the original programs.

Throughout this appendix the following abbreviations and notations

are used:

RO—RF

MMY

TTY

CRL

SP

ADC

ASCII

ACP

ADF

LSQ

[] or 0

; general registers 0 thru F,

; m.emory,

; teletype,

carriage retuiTi and line feed,

space,

analog to digital converter,

American Standard Code for Information Interchange,

Autocorrelation Fuction,

Airplitude Density Function,

Least squares, and

for use other than in mathematical equations should be

read-contents of a register or a m.em.ory address.

I.e., [(0560)+(RC)] should be read; contents of the

memory address obtained by adding the contents of

memjory address O56O to the contents of register C.

3
Allocation of Interdata 3 Core Memory During Use By The Software For

Surface Roughness ! 'easurement.

(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/Kougtiness 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, (OB60-OB82),

Prof i le data, ( IOOQ-2000)

,

• • AA values, (0BI4-085E),

KCAL value, (OBAC-OBAE),

HO, (0894),

Al , A2; (OB90-OB92)

,

Units; (OBBO),

Temporary storage of AA - (OBOE),

Indices for taking AA - (OBOA-OBOC),

Flag for Bypassing KCAL calculation -(0BB2),

Main Step Height Program

I nput - Al and A2 from (OB90-OB92),

Step Data at ( 1000-1400)

Output - Hexadecimal step heiahts and slopes and

intercepts of least squares lines on each side of step

Storage - Hex step heights; (OB60-OE62)

Slopes and intercepts; (0B96-0BA4)

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

(0400-043C)

(0440-0492)

(04AO-05I2)

(0518-0552)

(0560-0634)

I nput - A I and A2 from (OB90-OB92);

Slopes, al and a2, and intercepts,

bl and b2, from (0B96-0BA4)

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

Calculate KCAL Routine

nput

Output

- Decimal HO from (0B94),

HM from (OB80-OB82)

- KCAL stored at (OBAC-OBAE)

Convert Hex Steps to Decimal Using KCAL, Roundoff and

Print Results

I nput - Hex step heights from (OB60-OB82),

KCAL from (OBAC-OBAE)

Output - hi, H3, H5, H7, HM in decimal at ^ty

AA Calculation

Input - Profile data from (1000-3000)

Output - AA value of data in (R5)

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

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 I i ne f i t x 1 000 -> ( RO I

)

(0640-0658)

(065A-0672) =

Routine to Set Parameters for Reading Step Data from

ADC Into MMY

Routine to Set Parameters for Reading Roughness Data

from ADC Into MMY

5
(0680-0A80) Storage Area For Amplitude Density Function or Autocorrelation Function Calculations

(OA80-OBOO) = Presently Unused

(0B0A-0BB2) = Storage for Various Parameters of Main Step/Pouqhness

Program

(0BB4-0BFE) = Preser.tly Unused

(OCOO-OCBC) = Program to Calculate and Plot the Autocorrelation

Function of Data in MMY Locations (1000-3000)

I nput

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

at (0680-OA80)

(ODOO-OD ) = Routine to Calculate Mean and Standard Deviation of a Set of AA Values

I nput

Output

- Number of AA Values upon query at the

TTY

AA values from (0BI4-0B5E)

- Mean AA value and Standard Deviation

of Data set from Mean

(OEOO-OEFO) = Calculate Derivative and Mean Wavelength of Data in

(1000-3000)

lni)ut ~ - 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

6
(OEFO-OEFE) - Presently Unused

(0F00-0F3C) = Routine to Store Contents of all Registers Except

Register B

(0F48-0F84) = Routine to Restore Contents ^Stored by OFOO

(0F88-0FB4) = Register Storage For Registers

0, 1,2, 7, 8,^9, A, C, D, E, and F.

(0FC2-0FEE) = Restore Contents Stored by 0F88

(1000-3000) = Data Storage for Step Input and for Roughness Profiles

(1500-1670) = Program for Measuring the Height of Three Consecutive

Steps

I nput

Output

Storage

- Step data from (1000-1400),

Location of Step and period of steps

from TTY, KCAL from (OBAC-OBAE)

- Step height values at TTY

- Usual step height storage

plus (2000-2006) for

index and other parameter

storage.

(2500-25B2) = Program for Taking Statistics on Steo Profile Data

Input - Step location entered into (25IA) and

(2522) using monitor, step profile

data from (1000-1400), and interrupt

from ADC

(iutput ~ - Slope and Intercept of ISO line fit to

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

(3010-3020) = Routine to Wait for an Interrupt, Then Read Data at the

AX

7
(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 I i nq t i me

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

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

Then Exit

(30BA-30E4)

Input - Interrupt at ADC

Routine to Read 4 Hex Characters at TTY into R2

nput - 4 characters just precedina a CR or

SP at TTY'

Output - Characters read are left in (R2)

(30E8- 3I0C) := Rout i ne codeto Read 2

at OBBO

Characters at TTY and store

(3110- 5120) == Print S ng 1 e Space Routine

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

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

(31 70- 3I8E) = Routine to Print "UNITS"

(3190- 3 1 AC )

== Routine to Print "AA UNITS" + CRL

(3IB0- 3 1 D4 )

:= Routine to Print "H OR R?"

(3ID6- 3IF4) := Rout i ne to -Print "MORE?" .

(3IF8- 3216) := Routine to Print "ENTER"

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

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

(3280- 32CA) == Rout i ne to Print "STEP/ROUGHNESS CALIBRATION"

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

R3

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

(3408-34CE)

(34D4-3524)

(3530-354C)

(3550-355C)

(3560-358C)

(3590-35C0)

(35C4-35F4)

(35F8-3620)

(3622-3642)

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

Output - (RI23) and at MMY addresses from

C(336A)-^(R8)] to [ ] + C

Storage - MMY indicated in output plus

(3530-354C) for hexadecimal

equivalents of powers of 10

Routine to Multiply Unsigned (R5) x (R9) (R89)

Routine to Multiply (R34) x (R6.7) (R23.45)

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

Storage for Hexadecimal Equivalents of powers of 10

Storage of Binary to Decimal Conversion

Routine to Multiply (R234) by 2

Multiply (R45) X (R6), Put Result in (R345)

I nput

Output

(R45) either sign, (R6) assumed

pos i t i ve

- Result (P345); Flaq = 8000 put

in (35EE) if (R45) neaative.

= Routine to take Absolute Value of (R45) and Set Flag

at 35EE if contents negative.

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

= 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

9
(36A0-374C) = Routine to Divide 2 Hex Half words by I Hex Ha If word.

(R45) V (R3) ^ (R45)

(3750-37E2)

Input - (R45) may have either siqn, but (R3) are assumed positive. Only the

30 most siqnificant bits of (R45) are used.

Program for Printinq and Punching contents of MMY

Locations 1000-3000

(3800-3888) =

Input - 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.

Program to Calculate the Amplitude Density Function

For Data Stored at (1000-3000)

I nput

Output

- Data at ( 1000-3000)

- Calculated data is stored at (0680-0A50),

then piotted on strip chart recorder

to an 8 bit precision.

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

(5918-5946) = Program to Initialize Plot Routine for Bipolar fJumibers

and to Plot Data in (1000-3000) on Strip Chart Recorder

(3950-39CF) = Plot Routine to Drive Polombo's Waveform Receiver.

This Routine takes Half words from Specified Memory

Locations Using the 8 Most Siqnificant Bits (Including

'the Sign Bit) and Biases the Data to have a Range from

4 to 255.

nput - (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. fJote that the bias and maximum value should be adjusted so that;

(bias) + (MAX) = 255.

10
Output - Minimum (4) and Maximum (255) values for

approximately 8 seconds, followed

by data formatted according to input

just described.

Routine to Print "MEAN AA ='\

Routine to Print "VARIANCE ="

Program to Print "ERROR," then return to monitor.

Print "MM" and Increase Power of 10 in Units by I if ^or AA

HEXADECIMAL MONITOR

See annotation and Philip Stein's memorandum in

the following pages for use- and explanation.
Flow Diagrams of Major

Programs or Routines

12
ENTRY

AT 0260

INITIALIZE

AVG. KCAL

NDEX AND

\CCUMULATOPi

CLEAR

FLAG AT

0BB2

'PRINT "STEf

/ROUGHNESS^

fCALIB." AT

TTY

PRINT

/"ENTER DAI

AT TTY

N /

SET

PARAMETERS

TO READ

STEP DATA

N

NTERRUPT

READ

DATA

FROM

ADC

v

STORE DATA

STARTING AT

MMY LOCATION

I 000

B

NO

CALL KCAL.

1 TO Rl 2

ACCUMULATE

INTO

08 10-08 1 2

RECALL Z KCAL.

CALCULATE AND

STORE AVG. KCAL

AT OBAC- QBAE

N/

PRINT

"AVG. KCAL/=

(08AC-08Ae/"

AT TTY

LOAD AND

'PRINT "IN"

AT TTY

PRINT

"ENTER HO"

AT TTY

YES

is'

FLAG SET7

PRINT

DECIMAL

STEP HEIGHl/S,

UNITS AND CRL

CONVERT HEX

STEP HEIGHTS

TO

DECIMAL

PRINT AT tYy

rKCAL = /

(08AC-0BAe/

/and CRL /

COMPUTE

CALIBRATION

CONSTANT

KCAL

CALIBRATE

STEP HEIGHTS

IN HEXADECIMAL

/ print crl ' /and hi—hmW

and "units'/

AT TTY

ENTER 4

CHARACTERS

AT TTY

<

REPEAT PROCESS FOR "UNITS", A! AND A2.

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

13
ENTRY

AT 0IA2

PRINT

'"AA— UNITS",

AT TTY

YES

/

1 SET PARAMETER?

FOR ROUGHNESS

DATA INPUT

\ /

CLEAR LINE

AND STORAGE

INDICES AT

OBOA and OBOQ;

\ /

^WAIT FOR AN

. INTERRUPT

READ DATA

FROM

ADC

STORE DATA

STARTING AT

MMY LOCATION

1000

CALCULATE

AA VALUE IN HEXADECIMAL

STORE HEX

VALUE

TEMPORARI LY

AT OBOE

NCFE^ENT

AND RESTORE

INE INDEX

VALUE

/Tncrement

/and restore

(storage

\ index value

LOAD HEX AA

VALUE AND

STORE IN MMY

AT OBI 4+INDEX

/\ NO

READ ONE

^CHARACTER

AT TTY

PR I NT

DECIMAL AA,

'VALUE AND

UNITS AT T7Y

CONVERT

AA VALUE

TO DECIMAL

YES

RESET

LINE INDEX

COUNTER

PRINT

SEVEN SP'S,

AT TTY

PRINT

"MORE?"

AT TTY

READ ONE

'CHARACTER

AT TTY

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

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

15
(ENTRY AT ^

Q568 J

/in7tialize^

/ index cntr.

\with final

\VALUE OF

\ IQC

CALCULATE

NUMBER OF

DATA POINTS,

STORE AT

0578

ITIALIZE

I NDEX

COUNTER

RC

CLEAR

ACCUMULATOR

REGISTERS

ROI I R45

CALL DATA

TO R3 AND

CONVERT TO

DP IN R 23

ACCUMULATE

IN ROI

CALCULATE

2iYj

IN R23

ENTRY AT

0560

/initialize^

/index cntr.

(with FINAL

\VALUE OF

\ (0562)

CALCULATE

1000 a = 1000 X

DIVIDED BY

.N(N+I ) _(N-! )

_CALCULATE

X=L2EiYi

- ( N+ I ) Y

J

]

STORE IN RCD

/\ YES

INCREMENT

INDEX

COUNTER

RC

ACCUMULATE

2ZiYi

IN R45

CALCULATE

lOOOb = IOOO[ZYi/N-

(N+i )/2 a]

STORE

1000 b IN ROI

C

EXIT 3

Figure 4; Flowchart of Least Squares Routine.

16
f ENTRY ^

V AT 0500 y

NITIALIZE

LSQ

ROUT I NE

N /

LSQ FIT TO

DATA FROM

A2 TO A2+I00

\ /

STORE SLOPE

a2 AND

INTERCEPT

b2

N /

INITIAL IZE> LSQ

ROUT I NE

LSQ FIT

DATA FROM

Al-lOO TO A!

STORE SLOPE

a I AND

INTERCEPT

bl

CALCULATE

Z=I/2(A2-AI

)

STORE IN RO

CALCULATE

Y = (a2-al

)

t?mes (Z-nZ/^)

STORE IN R45

CLEAR

(R9)

STORE Z in

RA, CALCULATE

Z/8, STORE

IN RO

/\

CALCULATE

W= (b2-bl

)

-a I (Z+80)

STORE IN PCD

CALCULATE

b2-bl

,

STORE IN R 78

CALCULATE

a2 -al

,

STORE IN RI2

CALCULATE

Z + 80

STORE IN RD

CALCULATE

Hn=W-Yn

STORE AT

OB60-2 + (R9)

CALCULATE

Z - nZ/8

STORE IN RA

C

EXIT

N /YES

CALCULATE

HM=EHn/8

STORE AT

0B80-2

N

)

Figure 5: Flowchart of Routine to Calculate Step Heights.

17
A ENTRY \

V AT 04A0 J

NITIALIZE^

NDEX AND

\CCUMULATOR

^REGISTERS

CALL DATA

TO R3

CONVERT

SP R3 TO

DP R25

ACCUMULATE

LX^ IN

R67

I NCREN'ENT

INDEX

COUNTER

RC

\/ YES

CALCULATE

XE ZX /N

n STORE IN ROI

ADD NEGATIVE

OF X - X

n TO (R45)

ADD X - X

n

TO (R45)

CONVERT

SP R3 TO

DP R23

NITIALIZE^

\CCUMULATOR

^REGISTERS AN[

INCREMENT

INDEX

COUNTER

CALL DATA

TO

R3

N / YES

CALCULATE

AA ^

( I/N)E|X -x|

STORE ?N R5

N /

SHIFT RESULT

RIGHT t BIT

TO GET

CORRECT SCALE

• N

( EXIT )

Figure 6 : Flowchart of Routine To Calculate AA Value.

18
ENTRY

AT 3800

/iNITIALIZ^

/storage are

a

\ 068G-0A80 /

INITiALIZE>

INDEX

COUNTER

R7

LOAD "'BOX"

SIZE TO

R6

1

LOAD DATA

TO R3 AfjD

CONVERT TO

DP IN R23

1

CALCULATE

"BOX" NUr:BEP

TO WHICH

DATA BELONGS

ADD -I TO "BOX"

NUMBER

ENTRY

AT 3814

INCREMENT

I NDEX

COUNTER

X

ADD BIAS

TO BOX

NUMBER

ADD I to

CONTENTS AND

RESTORE NEW

VALUE TO "BOX'

YES

INITIALIZE

PLOT

ROUT I NE

PLOT

ADF

0680-0A80

RECALL OLD

CONTENTS

OF "BOX"

RETURN

TO MONITOR

FIGURE 7: Flowchart of Amplitude Density Function Calculation.

19
ENTRY

AT OCOO

NITIALIZE

SHIFT

COUNTER

RC

INIT IALIZEX

SUMMATION \

NDEX COUNTER

R6 /

1

CALCULATE

NEW UPPER

LIMIT FOR

SUMMATION

INDEX

CALCULATE

NEW STARTING

POINT FOR

SHIFTED DATA

LOAD DATA

POINT TO R9

LOAD SHIFTED

DATA POINT

TO Rl

MULTIPLY

SHIFTED AND

UNSHIFTED

DATA POINTS

ACCUMULATE

SUM OF

PRODUCTS IN R45

NCREMENr

SHIFT INDEX^

COUNTER

STORE

SP RESULT

START, NO

AT 0680

^HTFTA

DP

RESULT TO

OBTAIN MOST

SIGNIFICANT

SP RESULT

J.

DIVIDE

ACCUMULATED

PRODUCT BY

N-S

INCREMENT

SUMMAT I ON

INDEX

COUNTER

RECALL MEAN

[SQUARE VALUE

OF DATA

FROM (0680)

MULTIPLY BY

KCAL AND

CONVERT TO

DECI MAL

PRINT

'MEAN SOR.

VALUE AT

TTY

CALCULATE

NUMBER OF

[SHIFTS TO GET

a BIT

SIGNIFICANCE

INITIALIZE^

PLOT

ROUTINE

PLOT

ACF(S)

RETURN

TO MONITOR

F i gure Flowchart of Autocorrelation Function Calculation

20
operating System

21
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 btructure

applicable to soecial 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 witfcKJut 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 computer with I6K bytes or core memory. The system may be used with any

memory of IK 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
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 wnen 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 general 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 the monitor should fellow these register assignments:

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

C: Initial address register for loops

D: Increment for loops

E: Final Address register for loops

F: Input/Cutput 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

mon i tor.

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' loacer. Make the following changes in the '50' loader.

PART I I- - LOADING

23
ADDRESS WAS SHOULD BE

0052 7777 3F80

G05A 777? 3FD0

0076 7777 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. V^hen 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.

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

computer wi I 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-just i f led 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 If word.

PART I I I - USERS MANUAL

>

24
RUBOUT - The address pointed to by the pointer is decremented by one

halfword, and the character t 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 If word, and the system returns a >.

SPACE - Has the same effect as carriage return, except that the 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

4180 2222

and data may be typed

1234 5678 9ABC DEFO 1234 5678 9ABC DEFO

1234 5678 9ABC C£FO 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 ha If word preceding the jdata register. The routine is therefore

called

lOOOR

I020P

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

1000 C8F0 1234

1004 4IE0 2222

1008 9EFF

lOOA 0309

lOOC 4300 ICSA

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

25
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 If word preceding the data register. The routine is therefore

ca I I ed

lOOOR

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 > wi I I return

and restart the system. It is suggested that all other routines which

and call the system be written so that typing > wi I I 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
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

3CD2

3CD3

5CF6

3CF8

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 should 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

4 1 BO 3E80

READ

4 1 BO 3E8A

ASCI I -HEX

4 1 BO 3EA4

INPUT ARGUMENT

(register cr other)

0 (8-151

te letype

0 (8-15)

OUTPUT ARGUMENT

(register or other)

te I etype

0 (8-15)

1 (12-15)

DESTROYS

reg i ster

0, 8, F

0, 8, F

0, I

HEX-ASCI I 0 (12-15) I (8-15) 0,

4 1 BO 3EC8

LOOP Panel Buttons 8-15 Condition Code 0

4 1 BO 3EE2

27
NAME INPUT ARGUMENT OUTPUT ARGUMENT DESTROYS

(register or other) (register or other) register

PRINT4 2 teletype 0, 1,2,

4IB0 3EF0 3, 8, F

LEADER 0 (8-15) teletype 0, C, D,

4 1 BO 3F26 E, F

CARL teletype 0, 8, F 4180 3F44

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 coce eqjal

to 0 i f 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 forrats may be found by following the

process by which they are generated, as seen in the listings.

28
V. Brief Description of Op-Codes

and Instruction Word Formats

29
These excerpts from the Interdata Model 3 Manual are given to make the

listings independently readable. Further details 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 CRXJ

3. Register to Storage ERSH • i- -r

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 halfword format' is used for register to register operations.

A 32-bit fuilword forr.at is used for the register to indexed memory, and

the register to £tor2::e formats. The specific formats are shown in Figure

9.

16-BIT HALFWCRD

REGISTER-TO-REGISTER [RR]

0 7 8 1 1 12 15

OP Rl R2

32-BIT FULLWORD

REGISTER TO INDEXED MEMORY

[RX]

0 7 8 1 1 12 15 16 31

OP Rl X2 A

REGISTEF

0 7

^ TO STORAC

8 1 1

;e

12 15

[RS]

16 31

OP Rl X2 A

Figure 9: Instruction Word Formats

30
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 usee 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 oper^jtions 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 vyord, 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 operand of

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 h?lfword address field itself. 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 condition code contained in the Program Status Word.

31
LIST OF INSTRUCTION SET FOR

INTERDATA MODEL 3

OP CODE TYPE INSTRUCTION

01 RR Branch and Link

02 RR Branch on True Condition

03 RR Branch on False Condition

04 RR AND Ha If word

05 RR Compare Ha If word

06 RR OR Ha If word

07 RR Exclusive OR Ha !f word

08 RR Load Ha 1 f word

OA RR Add Ha 1 f word

OB RR Subtract Ha If word

OC RR Mu 1 1 i p 1 y Ha 1 f word

OD RR Di V i de Ha 1 f word

OE RR Add with Carry Ha If word

OF RR Subtract with Carry Ha If word

40 RX . Store Ha 1 f word

41 RX Branch and Link

42 RX Branch on True Condition

43 RX Branch on False Condition

44 RX AND Hal fword

45 RX Compare Logical Hal fword

46 RX OR Hal fword

47 RX Exclusive OR Hal fword

48 RX Load Ha 1 fword

4A RX Add Ha 1 fword

4B RX Subtract Ha 1 fword

4C RX Mu 1 1 i p 1 y Ha 1 fword

4D RX Divide Hal fword

4E RX Add with Carry Hal fword

4F RX Subtract with Carry Hal fword

90 RR Unchain

92 -RR Store Byte

93 RR Load Byte

96 RR Write Block

97 RR Read Block

9A RR Write Data

98 RR Read Data

90 RR Sense Status

9E RR Output Command

9F RR Acknowledge Interrupt

CO RS Branch on Index High

32
OP CODE TYPE INSTRUCTION

CI RS Branch on Index Low or Equal

C2 RX Load Program Status Word

C4 RS AND Ha If word Immediate

C5 RS Compare Logical Ha If word Immediate

C6 RS OR Ha If word lmi:iediate

C7 RS Exclusive OR Ha If word Immediate

C8 RS Load Ha If word Immediate

CA RS Add Ha If word Immediate

CB RS Subtract Ha If word Immediate

CC RS Shift Right Logical

CD RS Shift Left Logical

CE RS Shift Right Arithmetic

CF RS Shift Left Arithmetic

DO RX Store Multiple

Dl RX Load Multiple

D2 RX Store Byte

D3 KX Load Byte

D5 RX Autoload

D6 RX Write Block

D7 RX Read Block

DA RX Write Data

TB RX Read Data

DD RX Sense Status

DE RX Output Commanci

DF RX Acknowledge Interrupt

33
IV. Annotated Listings of

Complete System Software

34
008 OR

>0640P (0080- 02FE) = MAIN PROGRAM

006 0 0700 L-'AS & ECTJ Clear flag

008 2 4000 0332

008 6 41B0 32A4 Print "STEP/ROUGHNESS CALIBRATION"

" 008 A 41B0 3F44 Two carriage returns and line feed (CRD

008 E /llBO 3F44

009 2 41B0 31F3 Print "ENTER"

009 6 AlBO 32 18 Print "DATA"

009 A 41B0 0b4 0 Set parameters to read step

009 E 41B0 3010 Wait for an interrupt and read step data

00A2 4200 0000 conti nue 00A6 C850 C9CE Load "IN"

OOAA 41B0 3 14A Print

OOAE 41B0 3110 Print space (SP)

0C32 41B0 3 1 F8 Print "ENTER"

00S6 0850 C8CF Load "HO" ^ -—

00 BA 41B0 3 14A Print

OOBE 4130 3110 Print SP

00C2 41B0 3 03A Read 4 characters at teletype (TTY), step heiaht

00C6 4020 039 4 Store at 0B94

OOCA 41B0 3 1 F3 Print "ENTER"

OOCE 4130 3 1 70 Print "UNITS"

00D2 4130 3 0E3 . Read 2 characters at TTY (Input units)

00D6 4130 3110 Print SP

OODA 4130 3 1F8 Print "ENTER"

OODE 0850 C 131 Load Al ' " 00E2 4130 314A Print

00E6 4130 3 110 Print SP

00 EA 4130 303A Read 4 characters (input Al)

OOEE 4020 059 0 Store at 0890 "

00 F2 4130 3 1 F3 Print "ENTER"

OOF 6 CS 50 C 132 Load A2

CO FA 41£0 3 14A Fr i pt

OOFE 4130 3 110 Print SP

- 0102 4130 303A Read 4 characters (Input A2)

0106 4020 039 2 Store at 0892

01 OA 4130 3F4 4 CRL

OlOE 4200 0000 Cont i nue

01 12 4130 3240 Print "HI H3 H5 H7 HM"

01 16 41B0 3 170 Print "UNITS" _ 01 lA 4130 3 122 Print 7 spaces

01 IE 4130 0300 Calculate step heights in hexadecimal

0122 4200 0 000 Continue

0126 4200 0 000 (Continue

012A 4200 0000

012E 4130 0400 Compute calibration constant ——

0132 C850 C3C3 Load KC

0136 4130 3 14A Print

013A C850 C ICC Load AL

013E 4130 314A Print

0142 C850 003D Load = 01A6 4130 314A Print ~" "

"

01/lA 41 BO 3110 Print SP

OlAE 4820 03AC

0152 41B0 3EF0

0156 48 2 0 03AE Print contents of OBAC and OBAE = (OBAC-OBAE)

01 5A 4130 3EF0

015E C800 0000

01 62 4000 03B2 Flag Load - not presently used

35
©1 66 41B0 3F44 CRL

4 1 no 0440 Converl" hsx^^dSP i rrir^ 1 <^i"pnc; +o rippim;^! ;^nrl nrin + 01 6E 43 50 OBBO

" ~' Load units (those input previously)

ni 7? 4 1 riD 3 i> S8 Pri nt

017 6 4 1 BO 3 F44 CRL

ni 7 A 4 3 00 0? F4 Branch to flag test

01 7E C8 00 1111 Load f 1 ag

Zifinn ^ U vJ U n ^p iDfip Store f i an 018 6 4 1 BO 3 130 Print "H OR R?"

/i I fin 3 F8 A Re?^fi nnp ph?irr^^^+pr TTY

018 E 0500 00D2

" Compare it with an R n 1 Q p 4*i O3 w3 0^ 0 1 Q F Rranrh tn AA miitirip if pnusl

019 6 41B0 3F44 CRL

019 A 4300 009 2 Branch to start of step height routine

019 E 4 1 BO 3F44

^ CRL

01A2 4130 3 190 Print "AA UNITS"

01 A 6 4 1 BO 0 65A OCI jJOIonl^iC^ro TvJi iUUCJIIi'L;bb Uolo inpui

01 AA 0 7AA

01 A.C 40AO OBOG Plpp^r* ^^pr*! imi 1 1 ^ "tri p ^nH c i jmm;^+ pin i nH^v

0130 4 0AO 030A

4 1 BO 3010 1^ "fop n i n+PPPirni" ;=tnH r~o;^H ri^'f'^ 01 rtS 4 1 30 04 AO Cr^ 1 pu 1 r^i*p AA 1 UP i n hpyr^dpp i m?^ 1 01 i5C 40 50 OBOE

"~

S"horp hpy Vr* 1 UP "fpmnopr^pi 1 v OROF

4 1 HO 0518 Ppinvyppi" AA i'Pi H^p im^^l ^nH r»r"in + 01 OA 4 IBO 3 110 Print SP

01 C8 /t^^ 5 0 0330 Ip^^H iinl+c (+hpcp innM+ nppv/ipiicl\/^

0 1 c c 4 130 3A50 Pp i n + 01 no 4 130 3E8 A Rpr^ H nnp ph?^p?^p+pp ^i" TTY

01 C500 W s-^ V W 004B ~

nomn wWI NL'QIW ?^ pp wl+h niiii cj Ki\ 01 OR i^3- O 3w 0w 0 1 FO LJiailVvl) OlVJUIIU UOIO lIDl^^lOUw II w^UOl

01 DC 43 00 OBOE

~

i'^^^H C3 U hc^v llt,A \/Atii£i Value (^-f \J t r\r\ AA "t*!^ ItJvJIOiCI ronlc't'or" 0^ fPH^

01 £0 48 4 0 OBCA i p^^H ct"pp?^nP i nrlPY v/;=i ! iip 'i'P R4

01 EA 4004 0314 store hex value at OB 1 4 + (R4)

01 E8 CA40 0002 1iiiktfiwiiiciii npppmpn"t* iMivjcA nrlpv pph iwL^i^iwi i c+pp h\y ^ 01 rr. 40/iO 0 ^OA

" Oavt? 1 ilUcA Va 1 Ufc; a t WOUr\

01 FC 4 130 3 110 Print '^P

/1 1

1=1 n T 1 1 0 Pr- I n+ C;p r r 1 n 1 jr

01V./ A F8i C 48 4 0 0300 1 oaH 1 i ne I dHpv niimhpr i nto R4

01 FC CA40 000 1 Inrrpment 1 i ne i nHpv number h\j 1 OP 00 4040 *n W 030C \J 4-J \J w Savp 1 i np i ndpv niimhpr at OROC

no n '1 P /I n oU f,U nU TvJ L>OiTiD ale Willi numucr per iiric

OP ns 4P8 0 0 1 34 If Le«^<^ than maximum take next entrv

no nr \j 1 Ml Plpar R4 anH

OP OF 4040 OBOC Re i n i t i a 1 I ze 1 i ne index number

no 1 o 1 D U 1 p p rr 1 ni seven spaces

OP 1 ft 4 130 3 1 D6 Print r 1 1 1 1 1 "MORE" 1 1 w1 N L- no 1 A /i 1 v5 n O Ho H ^ ^ Hi ^ ^ *^ ^ ^ r" 1 i V rsGaO OriG cnaiaCiGr ai 1 1 i 02N^C A1 i—F

>

C 500 004E Pnmnr^pp \^\_/ 1 1 1^ u 1 w itII with n 1 1 1 1 rin u II N*

*^ o o u npzi n

' Rr^ DiOllV«.M nr*h +p\ \J npin+ Ul Mil FIMI r ll^l if11 Pnu^l ^i^UOl

/1 1 p n T FZlZl np p A 4M O300\-/ W W A ^* ixciuiii Dp+iipn +n +?^klnn iar\iiivj npi^t iiwAi 1 ! np ofwi data Njaiu

OPPF n*^ 3 p Wp'f 1 1 cpH

OP 7 n zi 1 p n Prr ri

I n+ni '*MORF" I^Ur\C

02 3 /J 4 13 0 3 Fo A Rpari l\CUwVw')lwWllUlCJVvlwl nnp rhf\ rr^ct^r atQl TTY III np IP; L/ ^ U U \j \j ^vJlllUa 10 II Willi 0 1 OP 3 r /1 3 3 0 0 1 7 E Rp;=^nph LJiCjIIVmi>II tni \J M OR R*?" i\« i11f enual wV^UUl

HP A n zi 1 fi n Vhli ^ ' PRI 0244 41B0 3F44 CRL

36
no A a CO? 1 narl F 1 - 02AC 4 IBO 3 1 4A Print

' 0250 C8 50 CEC9 Load Nl ~" 0254 4 lEO 3 1 4A Pri nt no io u u oT PRuo nu KeTurn to moniTor

025C 4 ISO 3 1 4A NOT USED

U / U u 02 62 4000 OE 1 0 Initialize Index and accumulator registers

02 66 4000 OB 1 2

02 6A 4000 03 1 4

02 6E 4300 008 0 Branch to start of step height routine

0272 48 1 0 OBAC Gal 1 KCAL. to (Rl 2)

027 6 48 20 OSAE

02 7

A

4A20 OB 1 2 Double precision accumulate Into (OBI0-OBI2)

L)<: / L

028 2 401 0 OB 1 0

. /i n o n n — 1 o 028 A 48 1 0 0B14 Recall Increment, compare and save index counter

028 E CAl 0 0001

029 2 40 1 0 03 1 4

029 6 05 10 0005

029 A 4280 009 2 If I<5 repeat process of calibrating

U15 i U Keca M L isL/ALj, ca 1 cu 1 axe average islal,

02A2 48 50 05 i 1 2

02A 6 0830 0005

02AA 4 1 BO 3 6 AO

02 A E 4040 OBAC Store average KCAL at OBAC-OBAE

0252 4050 CBAE

02i5 6 08 AO 3 14A Put print subroutine address in RA

02 £ A CS 5 0 4 15 6 Load AV

02i£ 0 1£A Pr i nt

02C0 0850 4 72 0 Load G space

02C4 0 13A Print

02C 6 03 50 CBC3 Load KC

0 1 :d H rr 1 nT

02GC 0350 CICC Load AL

no pi n U<iuU U 1 JA rr 1 nx 02D2 0850 203D Load space = 02 D 6 0 IriA rr 1 nt

02 D8 4820 OBAC Load (OBAC)

02DC 4130 3EF0 rr 1 nt

02E0 48 2 0 03AE ,Load (OBA"E)

AO IT /i Dp- t ------

rr 1 nx 02 E8 41B0 3F44 CRL

4 1^0 3 r 44 OKL

02 FO 4300 0230 Branch to "MORE?"

02 48 00 0332 Reca 1 1 F 1 ag

02 F8 4230 0230 If set branch to "More?"

/i ^ r\ r\ 43 00 02 72 It nOT S6T DrSncn TO nVb iSUML CalCUIaTlon

0300 40£0 034A (0300-034C3 = MAIN STEP HEIGHT PROGRAM

0304 48 00 0B92 LtiCTj Reca 1 1 A2

03 08 4000 0590 Store at starting address of LSQ program

030C 41B0 0 5 63 LSQ fit to data from A2 to A2 *"'00^

03 1 0 4000 039 E

03 1

4

40D0 OBAO biorG s 1 ope a* UDyL-ubnu

03 18 4000 0BA2

03 I

C

40 1 0 03A4 Store intercept b2 ax utiAz-UDAA

0320 48 00 039 0 Reca 1 1 A

1

37
(Jo d4 A A A 1 A A - 0 100 Al - 1 OOj^ = New starting address of LSQ program

Uo do /i A A A A C A ^"i 0 b9 0

0o2C 1 A 4 1 iBU 0:3 oo LbQ fit to data from Al - 1 00^

033 0 40C 0 0o9 6 btore slope al at (jDyo-UDyo

Uo o ^

/i A T^. A A ^ A a 039 8

0338 4000 039 A oTore 1 DTercepT di at ubyA-ubyL

033C 40 10 039 C

03^0 4 130 03 50 Calculate step heights in hexadecimal

0344 A o tr A 08 r 0

A A A 0002 r\ebrore i i i uev i ce numDer to txr 0348 CSfiO 0 122 Restore RB and return to main program

0340 0303

034E 08 0 6 /ATRn A7CA^ —- AAIAIIIATC UCV CTCD UCIA UT C DAI IT 1 M C LALUULAIt HtA b 1 tr HLIbnlb KUU i INL

03 5 0

ii A A 40B0 AOtra i ECT1 03 F8 Lt-'-' 1 J Oo 5 A

yi O A A 48 00 A ~ A A 0x39 2 RoAa 1 1 A? +A ( RO ^ AO C C? OJ OO Vi A A 4BU0 A A A 039 0

AO A 1 ^ / AA \ — O "7 A2 - Al (RO) 2Z

AO tz r* 03 50 A A A A 0000 A A A t 00 0 1 (R0)/2 = Z put into RO

03 60 08 DO Save in RD

AO ^ A 03 62 CADO 008 0 Z + 80^ put 1 nto RD

Uo o o 48 1 0 0iD9 L

rN T /I A Uo 6A Vi O A A 48 <£0 OBAO Slope a2 (PI 2)

Uo DC. /i O O A 4B<i U Uoy o

/i TT 1 A 4r 1 0 Uizi9 6 a2 - a 1 * (Rl 2)

Uo / D -40 / U

A Q A A

rf^ O ^7 A Oo 7A /•OCA 488 0 03A4 Recall intercept b2 to (R78)

Oo 7 L 438 0

A O A A 039 0

Uoo £: 4 f / U

A JDA A UBV A b2 - bl -> (R78)

Uoo c 4o 4 U Ucy b

038 A 48 50 0^39 8 Recall slope al to (R45)

038 E

AO ^ 08 6D "7 1 OA ^ f n^i \ Z + 80 -* (R6)

A T A A 039 0 4 130 n C A A

o c * 0 al (Z + (R45)

039 4 03S 5

AO / 039 6 0F74 (b2 - bl) - al(Z + 80j^) (R78)

AO A O A ^A A 0 79 9

. A O A A uo9 A

A O y\ A Oo AO Save Z 1 n RA

A*"* A A 0o9 0A C A O 08 0 7 Save (bz - bl) - alvZ + oJ^ ) i n v hlu ) 039 E Oo lS

03 AO CCOO 0003 "7 / O V / AA \ Z/8 -•(RO)

03A4 08 7 0

A—.—— II /UO Ul\ —.l/"7 1 OA \ . /A'70\ Recall (b2 - bl) - al(Z + 80^^) to (R78)

03A6 088 D

AO A O 03 A8 08 4 1 03 AA A C7 C A 08 52

,. Recall (a2 - al) to (R45)

A O A A 03AC AO A 08 6A ~7 —."7/0-^/A^\ -k.AI O ,Z - nZ/8 (Rd) n = 0, 1 , 8

03AE 4 IBO 3 59 0 (a2 - al) (Z - nZ/8) (R45)

AO "T) A 03B2 038 5

A O •'I 0oB4 A tr o 0 r 7 4

.. - — - — —.. (d2 - bl) - al(Z + oO^; - kaZ - aM iZ -nz/o; iK/o;

AO O ^ 03B6 A A A OBAO /"7 -i.'7/Q\ k /AA\ (Z - nZ/8) •* (RA)

0oB8 /# A T A 4079 A T!) ^ A OE oO

AO to A 03BC yi A O A 408 9

A O £ A 03 62 Store result at UddU-/ + (Hy)

A O O r\ 030 0 CA9 0A r> o /i 0 0 04

AO /i 03 04 C 59 0 0020 1

• • a. Increment, compare (R9) to 1 imit

AO A O 03 08 4<£8 0

A O A yi 0oA4 It \r\y J are less inan iimii, reiurn to cai loraTo new vaiuc

03 CO 0744 ..... 03 CE 07 55

.

03 DO 07 66 Initialize accumulator and index R s 03D2 4A5 6

- 03 62

03 D 6 4E4 6 03 60 Double precision accumulate Hj s into (R45).

nnn4

~ IHi (R45)

03 DE 0560 0020

38
03E2 428 0 03D2

03 E 6 08 30 0008

~ 03 EA 4130 3 6A0

03EE 4040 OSS 0

03WW F2A 4050 038 2

' 03WW F4 6W 08 30 0344

03WW FA* *^ 0303

03WW FCi w 48 SO 03C 6

w*^ w w 4030 043A

0404 4S40 039 4

0408 4130 3 648

040C 08 4 1 04 OE CF40 0000

04 1

2

W^ A ^ 07W 1 55W w 04 1

4

48 60 038 0

04 18 48 7 0 038 2

041C CF60 0003

0420 C470 EOOO

0424 CC70 GOOD

0428 OA 67

04 2

A

08 3 6

042C 4130 3 6A0

0430 4040 03AC

0434 4050 03AE

0438 C8 SO 0 1 32

043 C 030B

043 E 48 30 4030

0442 049 0

0444 C8 CO 0000

0448 C8 DO 0008

044C 08 £0 0020

04 5 0 48 60 03.-.C

0454 48 70 03AE

0458 0722

04 5

A

48 3C

04 5 E 4o 4C Oaf?

04 62 4130 34D4

04 6 6 08 60 0008

04 6A 0777

04 6C 4130 34D4

0470 0788

0472 CD40 0001

047 6 0E38

0478 0E28

04 7

A

08 53

047C 0842

047E 4 130 3300

048 2 4 130 32D0

048 6 4130 3 110

048 A Cw 1* COw w 045 \J -tj 0\J 048 E C8B0 0 1 6F

049 2 0303

049 4 40C0 04 52

0498 40D0 0454

049 C 40E0 (Ml w M »JS At> 04AO n 5 1 n 04A4 ^ C \J \J 11 nnrs V u u 04A8 C8C0 0002

ZH, (R45) continued

ZHj/B (R45)

Store HM at OB80-OB82

Restore RB and return to main program

( 0400-04 3C) = CALCULATE KCAL ROUTINE

[DAS]

Recal I decimal HO to (R4)

Convert to hex value at (Rl

)

Put hex value of HO in (R45)

Reca II HM to R67

Multiple HM by 8 and put result in R3,

H0/8HM H. (R45)

Store KCAL at OBAC-OBAE

Return

(0440-0492) = CONVERT HEX STEPS TO DECIMAL

LDAS] USING KCAL, ROUNDOFF AND PRINT RESULT

Initialize index counter

Recal I KCAL to (R67)

Recal I H. to (R34)

KCAL X H. (R345)

I Multiply result by 8 to account for 3 bit shift made in

KCAL ca I cu I at ion

-^ound off R234 to R23 then move result to R45 [EOT]

Convert hexadecimal in R45 to decimal in RI23 then

print result

Repeat for next H[

Return to main program

[DAS]

Initialize Index counter

59
04AC C8 DO 0002 Ini"^!;^! I7P inp r*Pm^=> n't* v/?^ 1 1 10

r\ /i ^ r\ A 0 C A 0 A A A ciOOO

_ ,

1 n i t i a 1 i ze final va 1 ue 07 DO Initialize accumulation registers

" U4o 0 A 0 ^ ^7 4o 0 U

1 A A A 1 uu u

- - - A-*ll >j-,.^-. /lAAA 1 /r)A\\ -4.-* yA"7\ La II data UOUO + (Ku)) to (K3)

A TT T A L EJ U

A A A A U U u u Nu 1 1 operat ion

04C0 4 1 BO 3 624

U4L4 A A ^7 0 0A7o

040 6 OE 52 ZXn (Ro/)

0408 C 1 CO 04B8

04 CO 4D 60 04A 6 A = ( ZXn )/N -*• (R7

)

04 DO Oo 0 7

04D2 4 1 BO 3 624 \C\ \^\J nwOfi llvd 1 ^OCiil^ icoUl 1 \c\ IvJ f\r\\\Y\\ UUUUIt:<^ n^o^icii^n picL-lolUri

AC A 0 Uo <Jd Uo 1 0 Save 7 in (ROD

04 DA A ^7 /i yi 0744

\ Initialize accumulation registers

Pi yi pi U4D0 A C C 0 / bb

U4Db A Q A A Oo 0 0

A A A A 0 U 0 <i Reset index counter

U4bd yi 0 0 A 4o oO 1 A A A 1 U U U Ca 1 1 data to ( R3 )

^ ACTA 0 E 0 U

A A A A U U U U

04 EA /i 1 ^ A 4 1 BO ^ ^ r\ ii 3 d24 Single precision (R3) -> double precision (R23)

r\ i\ v A 0 1 0B3 1 w*^ r \j Yn - Y -+• f R73 1

C\ It 04 F2 >i 0 f A 42 10 04FE Branch if minus ;'

'

04 F 6 0A53

04 F8 0E42 Accumulate in kvAd)

04 FA 4300 f'y 4\ r\ 0502 Branch to return

04 FE A i1 C 0 0B53

0500 0F42 Add negative of Xn - X to accumulator

0502 C 1 C 0 04E2 Return for next data entry

OdO 6 4D4 0 04A6 1 Xn - X 1 ;/N - ( KD ; C /"l A. 05 OA GEoO f\ r\ f\ \ 000 1 Uata entry is 12 bit left justified, thus I bit rignT

UOUE AC ""A A t 0 A U 1 dU

, .. gives same scale as KCAL

0512 03 Oo Return to main program

Ot; 1 4 Oo 4 1

.- . Ob 1 6

A ~ yi 0 0d43

05 18 40i^0 0550 (0518-0552) - rriMVFRT AA 1 KJ HFX TO riFPIMAI AMR PR 1 MT RF^rillT

A C 1 A Ob 1 0r\ 0 0 [DASJ . . - ' - .,. . A C 1 T7 Ob 1 £ Oo 0 0

A C 0 A Ubci UA T yi yi U /44

US c. c. t/O C

U

OOOA inCicaSQ UCC 1 iTia 1 precision OT nn rcbu i i uy i pub i i luii

\j 1 1 I 1 05

1

L-OjzA ;

'I/I i

1 13r5 nu 34D4 LUveriiows ii AA > j/o lull scale J A C A A 0520 yi 0 /L r\ 48 60 OBAC Recall KCAL to (Rd/;

Ubo U ^0 / U OBAE

0534 4 1 BO 34D4 KCAL X AA(hex) ( R234)

0538 0788

05 3 A C L14 0 0001

UILOO Kouna OTT TO \x\^ji ana pui in vkhj; |_ii,CiJ

0540 A T"" 0 0E28 — —\

'.—— . .— Ub4c: AQ T Uo bo

0544 08 42

054 6 4 1 BO 3300 Convert AA(nex) to decimal

054A 4 1 BO 32D0 Pri nt resu 1 t at 11

Y

uo C u 0104

0552 03 OB Return to main program

0556 48B0 0506

40
05 5

A

0303

055C 0000 (0560-0634) = LEAST SQUARE F 1 T TO DATA FROM (0590) to (0590) + (0578)

05 5E 09 10 [tCT] • 05 60 08 EO 0060 0560 - Entry for any number of points specified by (0562)

0564 4300 056G

05 63 C8E0 0100 0568 - Entry for usual 100^ addresses

05 60 08 OE

05 6E CEOO 0001

0572 4000 OS 78 Calculate number of points and store at (0578)

057 6 4200 0080

057A 4030 0632

057E C8D0 0002 Initialize index counters (RE already set)

058 2 C8C0 0002

05c5 6 0700

0588 071 1 Clear accumulation registers TM~

058 A 0744

058 0 0755

. . . _ 058 E 48 30 lOAO Recall data from |( 0590) + (RC)] to (R3)

059 2 4130 3624 Single precision R3 ^ double precision R23

059 6 OA 13

059 8 0E02 Double precision accumulate into ROI

059 A 0C2C iY. R23

j _ _ _ _ . _ ^ . 059 G OAS 3

059 E 0E42 Double precision accumulate into R45

05A0 CICO 0 58E ZYj ROI 2EiY| ^ R45

05A4 08 04

05A6 OSDS Save 2ZiYj in ROD

05A8 0840

05AA 08 51 Save ZYj in R45

OSAC 48 60 0578

0530 CA60 000 1 Q5B^ 4130 3 59 0 (N + 1 ) ZYj R45

0538 03DS

053A 0FC4 2ZiY. - (N + 1 ) ZYj = X RCD

0530 03 40

C53E 08 5D

05C0 48 3 0 0573 X/N R45 "

05CA 4130 3 6A0

05C8 08 60 0060

05CC 4130 3 59 0 60X/N -> R45

05D0 48 3 0 0573

05D4 CA3 0 0001 60X/[;N(N + I )] -> R45

05D8 4130 3 6A0

05DC 08 60 0010 600X/CN(N + I )] -» R45

05E0 4130 3 59 0

05 E4 48 3 0 0573

05 E8 0330 0001

05EC • 4130 3 6A0 600X/LN(N + 1 ) (N - 1 )] R45

05F0 C8 60 0010

05 F4 4130 3 59 0 6000X/CN(N + l)(N - 1 )] = lOQQa R45

05F8 0804

05 FA 08D5 Save in RCD

05 FC 0840

05FE 08 51 Recal 1 EY; to R45

0600 4830 0S78

0604 4130 3 6A0 ZY./N R45

0608 08 60 100 0

0600 4180 3 59 0 lOOOZYj/N R45
06 1

0

0612

06 1

4

0618

06iA

061E

0622

0624

062 6

0628

062 C

062 E

0630

0634

063 6

0638

063A

063C

063 E

0640

0644

0648

064C

0650

0654

0658

06 5A

065E

0662

0666

06 6A

06 6E

0672

>

0804

08 15

48 50

0200

CA50

CE50

08 65

08 4C

08 5D

41B0

OB 15

0F04

C8B0

030B

0000

0000

0000

0000

0000

40B0

08 00

4000

08 00

4000

C8B0

030B

40B0

C800

4000

0800

4000

C8B0

0303

Save 1000 ZY./N in ROl

1

0578

OOOi

0001

3 59 0

0330

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)

1 0 0 0 [ Z Y^/N - j(N + l)/2}a] = 1000b -y ROl

Return to main program

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

[ DAS ] 0656 Store return address

02 FA

3038

0400

302E

009 E

Load time per point^ for taking step data

from (0646) to (3038)

Load number of points to be taken in step

data from (064E) to (302E) . „ „ r.^ Return

0 670 (06 5A-0672) = SET PARAMETERS TO READ ROUGHNESS DATA

0004 [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)

3038

2000

302E

OlAA

Return

42
OA\J ACii UriO C ML/ w

" (VsC A W ^ A* !>' UHO ITC< Jl o u O M L.- *n h \ PA

P?^ uo f-Vi ^ w 0\J 0\J 0\J 0\J PRu o 70/ u FA 0 0

A3uo

UKi-iU A<? uo ZiP<—

h.*i .11 PAD U o o 0u Au

UHi-i D Zi^ i

1 o^ Au o1 p^ nou HA A A PRuo oPAu OPU Urd^ AP

HA A V u o u o

Uf-iD U Au Au Au Au

rtA PO A4 AuoP AU A A FP

Ut-iD O Pf? s;A Uo 3 U PAPA i:^ U ^ iJ riAR A i'l ^ 1

1 Po Au O7 X1 Zl^fiA

Vi'\w AOu u APR uoo 1X OAT i> A'-I i

1 OPAU o o<^^

Pu Fr .i1 0u 0U 0U 0U 1X AA r A PUi-iA I

1 AU 000 u u u oT ARuo 3R 1X riA nn

'-i 1i POO U O w U U

AA D ^> ARuo P^ o DA\Jr\UO Zi 4

1 OPAU PFO

PRUO =^ Au 3^ O

^5 3^ . AA pn Zi 1 A 1 Zl A OA V h. Zi 1

1 oPAu OT X

1 X1 0u PRUQ w

=^ AU Z: i^Zi n

Pit:: ~ r Zl 1 - 0 '3 1 Z; PRUO ouPA OP F

AA P.^ A*^ u o APuo

AA P A rFFFF r r i FFFF r r sr r FTT 17 F FFF F

Ai TTP FFFF r r r r Au ru APu u AP AP Au A"^ u o u FFR ooo Au rFFFF r r r AP Af? FFFF r r r r Au Au Pu Pu AR AP Au Au Au Au

Av3 AF AFU O X

1 7f AP 1 A AOuu Au Au

ZiH X1 P^ Au OTPO u o ^ u AP 1 A A?P =1 U O ^ 3

A- 1 a A'^P u o ^ o AP 1 A A'^ PO

AP 1 P A'^ u o o Au

A*^ PF

APP UO C Au A'^P F

APUC P^ Pc. ATU O 1 A J O

APPZi UO ^ 4 A*^ U O X1 Ro

ARP UO^ AU ATOP u o u u APuo PRc. O AU O 1 1 X X AP P A AU O X

1 Q7 APPP uo ^ u AU O

"5 P FO

AP O F AUOT 1 OX Uoo U UUAd

QB32 ODFB

(0a82-0aae) = multiply (r34) by kcal^ /convert to decimal

[ect] and print result at tty

Recall KCAL to (R67)

Multiply by KCAL^

Multiply by constant in (0A98.0A9C)

Move result to (R45)

Convert result to decimal

Print result at TTY

(0AB2-0AF4

[ECT]

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 hexadecima] , 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

OBOO-0304) = STORAGE FOR AVERAGE WAVELENGTH PARAMETERS

OBOA-OBOC) = INDICES FOR TAKING AA DATA

(OBOE) = TEMPORARY STORAGE OF AA VALUE

14-0B5E) = STORAGE FOR AA VALUES FOR^~STATISTICAL

CALCULATIONS

43
0B34 OEOA

QB3 6 OEED - - — ————•

-- CB38 0DF9

0B3A 0E07 - - — - 0B3C ODFC

CB3E 0E09 .. ' • - - - - „ . CB40 0E15

0B^2 0E29 — • — ' -

• ———- - ^——

OEIB

CE46 OEOB * - -" - :

-.—: 0B48 OEOO

0B4A 0DD9 •- —-

CP/iC ODEA

(B4E ODEC .. — T QB50 OAAB

- • " - 0B52 0A9 3 — ~ — 0B54 0009

- V 0B56 0009 - - — ' -• ,—

1

—

CB58 0009

. - —

0B5A 0C09 —-- - •- -«». (BSC OOOA

0B5E OOOA

0B60 0756 (0B60- 0B82) _ STORAGE FOR DOUBLE-PRECISION HEXADECIMAL

OB 62 48 /lO 0755 VALUES OF HI, H2 , , H8 and HM.

OB 6 6 E540 0755

03 6A 8 24 0 0755 *.>r^^ Q66E 1 F40 07 54

• •• ' C872 BC40 0754

037 6 5940 0753 — — • ' — • 037A F640 0753 — , _ .•• _-- 037 E 9 340 —

0B8 0 0754 —

038 2 EDCO 0 1 OE — • CB8 6 0320

0388 0116

- — — ——— - -. _

038 A 009 A

0B8C Oi 18

- - - .-_ . - -. 0B8E 01 4D

0B9 0 1102 1 228 ( 0B90

)

Al ( 0B92 ) = A2

" 0B9A 1273 FFFF (0B94) _ HO VALUE

0B98 D9 CO FC3D ( 0B96- 8) _ a. 0B9G 3000 FFFF ( 0B9A-C) — OBAO 09 40 037 5 ( 0B9E- OB-AO) — a«

0BA4J 7000 FFFF (0BA2- 4) —

iFFFF r r y FFFF

onn \j \j \j *1 ( OBAC- E) _ KCAL

(TRAP \> W V V LJ ( OBBO) _ ASCII CODE UNITS INPUT AT TTY

CBB2 1111 A 4 A A FFFF 1 1 i 1 (0BB2) _ MAIN PROGRAM FLAG

0BB6 FFFF 40BQ

( OBBB- OBDO) _ PRINT, "AVG." AT TTY

O Jl Load print subroutine address to (RA)

QBCO 415 6 Load ASCII code for "AV" to (R5)

n 1 p A — Print

OBC 6 C8 50 472E Load ASCII code for "G." to (R5)

OBCA 0 1 BA

- - - Print

OBCC C8B0 0EA6

CBDO 030B

- —-__ Return

QBD2 40B0 OBEE

44
0BD6

03DA

CBDE

CBEO

CtBE4

0BE6

OBEA

03EC

CBFO

CBF2

CBF4

CBF6

C3F8

OB FA

OBFE

0C02

X06

X08

OCOC

OCJO

GCU

0C18

XJC

OCIE

0C22

0C26

0C2A

0C2C

X30

X34

0C36

0C38

0C3C

0C40

0C42

0CA6

0C4A

0C4E

0C52

0C56

0C58

X5A

0C5C

0C60

X62

a66

0C6A

0C6E

0C72

0C74

0C76

0C7A

0C7E

0C8 2

0C8 6

0C8A

0C8E

C8A0

C8 50

013A

C850

OIBA

C8 50

OIBA

C8B0

030B

0000

0000

0000

OEFF

FFFF

2000

3F44

07CC

C8D0

C8E0

C870

C8F0

C840

08 20

CE20

428 0

C840

9AF4

C88 0

C8 60

0S8C

032C

CA2 0

4020

0733

0744

0755

489 6

CE9 0

431 6

CEIO

0009

0A51

0E40

CI 60

08 38

CE30

41B0

CF40

CC50

0A45

08 50

CE50

4045

CICO

08 FO

41B0

4830

0744

314A (0BD2-0BF0)

534C [ECT]

502E

3D20

0E74

(OCOO-OCFE)

[ECT]

0880

4130

0700

0004

08 00

0002

0001

OOOF

0003

0C2A

0000

2000

0002

= PRINT "SLP." AT TTY

1 000

0050

1000

0004

1 09 0

0004

0046

0001

3 6A0

OOOC

0004

0001

0 63 0

00 18

0002

3A00

0 68 0

PROGRAM TO CALCULATE AND PLOT

THE AUTOCORRELATION FUNCTION OF DATA

IN MEMORY LOCATIONS 10 0 0^-3000,,. THE

512 SHIFT AUTOCORRELATION FUNC^'ION 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 suimiation 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 + (R9) ] ^(R9)

Shift (R9) right arithmetic 4 bits

Bring shifted data point into Rl; (0C50)+(R6) ^(Rl)

Shift (Rl) right arithmetic 4 bits

Multiply shifted and unshifted data;

[Overflows if RMS > 1/3 FullscaleJ

DP accumulate in R45

i=N-S

J,-^

y(i)y(i+s) = (N-S)ACF(s) (R45)

N-S ^ (R3)

[1/(N-S)] Z y(i)y(i + s) = "acf(s)

Shift (R4) left 12 bits arithmetic

Shift (R5) right 4 bits logical

(R5) + (R4) (R4) = 1/16, Q ACF(s)

Adjust the shift increment to obtain proper storage

increment which should be 2

(1/16^q) ACF(s) -y [0680 + (R5) ] Return to calculate next ACF(s) if s < limit

Load TTY device number to RF

Print "V7\RIANCE =" at TTY

Recall (1/16.

(Rl) X (R9)->(R01)

(R45); S=0,2,4,-

10 ) ACF(s) to (R3)
0C9 0

0C9 2

0C9 6

0C9A

0C9E

0CA2

0CA6

OCAA

OCAE

0CB2

XB4

0CB8

XBC

XCO

0CC4

0CC8

OCCC

OCDO

0CD4

0CD8

OCDC

OCEO

OCE^

0CE8

XEC

OCFO

OCF^

0CF8

XFC

ODOO

0D02

0D0 6

ODOA

ODOE

ODiO

OD l A

OD l 6

ODIA

ODIC

0D20

0D2A

0D2 6

0D2A

0D2E

0D32

0D3 6

0D3A

0D3C

0D3E

OD^O

0D44

0D48

ODAA

ODAC

0D50

0D5/1

0D58

0D5A

071 1 /lOlO

C8 10

4010

41B0

C8 10

4010

41B0

4820

0733

4030

C420

4330

CE20

CA30

4030

4300

08 00

4000

0800

4000

0800

4000

4000

08 00

4000

08 00

4000

4300

0200

413G

C8A0

08 50

OlSA

C550

OIBA

41B0

0842

41B0

4010

08 21

0320

4020

CFIO

401 0

4010

071 1 0766

0777

48 31

41B0

0A73

0E62

CAIO

0510

4280

08 4 6

08 57

0A98

FAOO

0A9C

OAS 2

0003

OACC

0AS2

0 68 0

OCDA

7F8 0

n r" p o 0001

0001

OCDA

0C38

0 68 0

39 78

0003

3970

007B

3984

398C

0084

399 0

0400

399E

39 50

3 1 F3

3 14A

204E

203D

3 03A

3 648

0D5E

0001

0D9 0

0001

0D52

0D8 4

0B14

3 624

0002

00 10

0D40

Load proper constant to KCAL routine

to account for 3 bit shift in KCAL and

4 bit shift in ACF calculation 8 x 8 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 quer^"

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 store starting address

Load and store amount data is to be shifted

Load and store maximum value to be plotted

;ODOO-ODEC)

"ECTj

Load and store bias of plot

Load and _.tore 2X number of points to be plotted

Plot the ACF and return to monitor

CALCULATE MEAN AND VARIANCE OF N AA \^UES

Print "ENTER" af- 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-1 ^ (R2)

N-1 (0D90)

2N ^ (0D52)

2N ^ (0D84)

Clear index and accumulator registers

.Call AA value from [0814 __+__CRl) ] to R3

SP (R3) ^ DP (R23)

DP accumulate in (R67)

Loop statements

N

MDve Z AA^ -y (R45)

i-1

46
0D5C

0D60

0D64

0D68

0D6A

0D6C

0D6E

0D72

0D7 6

0D78

0D7A

0D7C

0D7E

0D8 2

0D8 6

0D8A

0D8C

0D8E

0D9 2

0D9 6

0D9A

0D9E

0DA2

0DA6

ODAA

ODAE

0DB2

0DB6

ODBA

ODBE

0DC2

0DC6

ODCA

ODCE

ODDG

0DD4

ODDS

ODDA

ODDE

0DE2

0DE4

ODES

ODEC

ODFO

ODF^

0DF8

ODFC

OEOO

0E02

0E0 6

OEOA

OEOE

0Ei2

OEl 6

OElA

OEIE

0E22

0E2 6

C830

41B0

4050

071 1 0766

0777

48 30

4B31

08 53

0C43

0A75

0E64

CAIO

0510

428 0

08 57

08 4 6

0830

^IBO

4200

4050

C440

4230

4JB0

41B0

48 50

4iB0

4130

48 50

41S0

4i£0

4130

4830

0744

OS.10

4010

07.1

1

4010

4130

071 1 4010

41B0

4300

41B0

CS50

41B0

4300

0722

08 3 0

0840

48 62

CE60

4062

C120

C820

C830

C840

48 62

OOOE

3 6A0

0B8 6

038 6

OB 14

N (R3)

I AA^/N = M (R5) (0B86)

0002

OOlC

0D6E

OOOD

3 6A0

0000

033A

7FFF

3A30

3F44

39 D4

0B8 6

05.1 C 3110

0330

3A50

3F44

3 AGO

0B8A

000 1 0A9 8

0A9C

OAS 2

OACC

0AB2

3080

3A5D

5351

3 14A

3030

0002

2000

1000

0001

1000

OEOA

2000

FFFE

0000

1000

Reset index and accumulator registers

^call M (R3)

AA - AA-L (R3)

Put in R5 also

(AA -- AAi)2 -> R45

Z (M - AAj_) 2 ^ R67

Loop statements

MDve Z (M - AA^) 2 to R45

N-1 -> (R3)

[l/(N-l)] Z (AA - AA-i_)2 = VAR -> R45

Store result at 0B8A

If result not positive branch to "ERROR"

CRL

Print "f^AN 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 "VZ^RIANCE =" at TTY

Recall ^-ar to (R3)

Load constant to KCAL" routine

Multiply VAR by KCAL^ , convert to decimal , print at

TTY

(OEOO-OEEO)

[ECT]

Trint units and "SQ MM" at TTY_

Return to monitor

PROGRAM TO CALCULATE THE AVERAGE SLOPE AND

WAVELENGTH OF PROFILE IN MEMORY LOCATIONS 1000-3000

Initialize index counter, R2

Recall and divide' [ 1000 ~+'"'('R2 j'T' by

2~"

Restore result to same location

Repeat for all data frcm 1000 thru 3000

Reinitialize R2 for^a^decronenty^

Call 1/2 y^ -> (R6)

47
0E2A

0E2E

0E3 0

0E3-^i

0E38

0E3C

OE-ao

0EA2

0E44

0E4 6

OEAA

0E4E

CE52

• 0E56

0E5A

0E5E

0E62

0E66

0E6A

0E6C

0E70

0E74

0E78

0E7C

0E8 0

0E8 4

0E88

0E8C

0E9 0

0E9 4

0E9S

0E9A

CE9E

0EA2

CEA6

OEAA

OEAE

OEBO

0EB4

0EB8

OEBA

OEBC

OECO

0EC4

0EC8

OECA

OECC

OEDO

0ED4

0ED8

OEDC

OEEO

OEE/i

0EE8

OEEC

OEFO

0EF2

0EF6

48 72

0B67

4062

C020

41B0

4050

0722

08 3 5

0744

48 60

4370

41B0

C8 60

C870

41B0

4030

4040

41B0

0200

41B0

41B0

4840

48 50

C8 3 0

4iB0

41B0

4.1 BO

41B0

48 00

CSOO

03 50

4 130

41B0

41B0

41B0

48 4 0

0755

48 3 0

41B0

08 34

0845

C8 60

C870

41B0

0842

08 53

4JB0

41B0

41B0

C850

41B0

4300

40B0

C8A0

C850

OIBA

C8 50

OIBA

OFFE

1000

0E2 6

04A0

0300

OBAC

OBAE

34D4

0003

0D40

34D4

0B02

0B04

3F44

0S38

03D2

0302

0304

03A2

3 6A0

3300

32D0

3110

0330

0001

3 14A

3F44

0338

CEE4

0B14

OBOO

3 6A0

03 69

AE61

34D4

33 00

32D0

3110

' 2D36

3A58

3C80

OEFA (0EE4-0EFC)

3 14A [ECT]

574C

Call 1/2 Yn-1

(R7)

Calculate 1/2 AYn = 1/2 (y^^ - y^-i)

Store 1/2 Ayn at [1000 + (R2) J Repeat for all data from 3000x dovvn to 1002

Calculate AA of data fron 1002 through 3000

Save result at OBOO

(0E40-0E50) = KCAL x AA of 1/2 Ay^ (R345)

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

Save result in (0B02-0B04) = SLP

CRL

Continue

Print "AVG." ..^^ Print "SLP. ="

Recall SLP and divide by 930

10

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 "\<!L. =" Recall first AA value stored

= -P

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

WL E 2TT Ax AA/Ay = tt Ax

TT x 930,^ = 2921.681168^ _ = B69.AE61,^

10 10 16

mve WL to (R45)

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

3D20

48
0EF8 C830 1 504

OEFC 0303

OEFE FFFF 4000

0F02 OF^A

OFOA 4010 0F4E

0F08 4020 0F52

OFOC 4030 0F5 6

OF.IO 4040 0F5A

OFU 4050 0F5E

on 8 4060 0F62

OFIC 4070 0F66

0F20 408 0 0F6A

0F24 4090 0F6E

0F28 40A0 0F72

0F2C 40C0 0F7 6

0F3 0 40D0 0F7A

0F34 40E0 0F7F

0F38 40F0 0F82

0F3C 0303

0F3E 0000

0F40 0000

0FA2 0000

0F44 0000

0F4 6 0000

0F48 C8 00 0001

0F4C C8 1 0 0047

0F50 C820 FED7

0F5^ C8 3 0 0 1 FF

OF 58 C840 0000

0F5C 0850 OOOD

OFcO C8 60 0C19

GFc4 C8 70 4773

OF 68 C830 0000

0F6C 0890 0400

CF7 0 Go AO 3 14A

0F74 CoCO OCOA

CF78 C3D0 0001

0F7C C8E0 OOIE

0F8 0 08 FO 0002

0F8^ 030B

0F8 6 0F6E

0F88 4000 0FC4

0F8C 4010 0FC8

0F9 0 4020 OFCC

0F9 4 4070 OFDO

0F9 8 4 03 0 0FD4

0F9C 4090 0FD8

OFAO 40A0 OFJC

0FA4 4000 OFEO

0FA8 40D0 0FE4

OFAC 40E0 0FE3

OFBO 40F0 OFEC

0F84 0303

0FB6 0000

0Fa8 0000

OFBA 0000

0F3C 0000

OFBE 0000

;0F00-0F3C)

[ECTj

REGISTER STORAGE FOR AH. REGISTERS

EXCEPT REGISTER B

(GF48-0F84)

L.ECTJ

RESTORE CONTENTS STORED BY OFOO

[Ecr]

REGISTER STORAGE FOR REGISTERS

^0, 1, 2, 1, 8, 9, A, C, D, E, and F

49
OFCO 0000

0FC2 C800 0000

0FC6 C8 10 0000

OFCA C820 1 098

OFCE C870 0002

0FD2 C880 1 F68

0FD6 0890 FFFE

OFDA C8A0 3 MA

OFDE 08 GO 0093

0FE2 CSDO 0004

0FE6 08 EO 0300

OFEA 08 FO 0001

OFEE 030B

OFFO 0000

0FF2 0000

OFF^ 0000

0FF6 0000

0FF8 0000

OFFA 0000

OFFC cooc

OFFE 0000

1000 09 58

>

;0FC2-0FEE) = RESTORE CONTENTS STORED BY 0F88

[ECT] "

50
1500 0700

1502 4000 2002

1506 4130 0640

150A 4 130 3010

150E C850 C9C£

1512 4130 3 14A

1516 4 130 3 110

151A 4130 3 1 FS

151E CS50 503 1 1522 4130 3 14A

1526 4130 3110

152A 4130 303A

152E 4020 2000

1532 4130 3 1 F3

1536 C850 5032

153A 4130 3 14A

153E 4130 3110

1542 4130 303A

1546 4020 039 0

154A 4130 3 1 E3

154E C8 50 5033

1552 4130 3 14A

1556 4130 3 110

155A 4130 3 03A

155E 4020 039 2

1562 4130 31F3

1566 0850 502 0

15 6A 4130 3 14A

156E Al^O 3 03A

1572 4020 200 6

1576 43 20 039 0

157A 432 C 2000

157E 4020 0 5 62

158 2 4320 200 6

15S 6 43 20 2000

153 A 4020 20C4

15SE 4320 0 5c2

1592 CE20 0001

159 6 4020 03 64

159A 4 130 3F44

159E 4820 039 2

15A2 4020 0 59 0

15A6 4130 0560

15AA 4000 039 E

15AE 40D0 03A0

1532 4000 03A2

1536 4010 03A4

15BA 4820 2000

153E 4020 0 59 0

15C2 4130 0560

15C6 4000 039 6

15CA 40D0 0398

15CE 4000 039 A

15D2 4010 039 0

15D6 4 130 0350

15DA 48 60 03AC

15DE 48 70 03AE

15E2 0722

(1500-1670)

LECT]

PROGRAM FOR MEASURING THE HEIGHT OF 3 CONSECUTIVE STEPS

Initialize loop, counter = RO

Set parameters for takinn steo data

Wait for an interrupt and then take data

Load "IN"

Pri nt

Print SP

(!5IA-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)

(I 562- 1 560) = Print "ENTER P"

Read and store at (2006)

(I576-I57C) = Calculation of 2X number of data

Points for LSO f it = PZ - PI Store result at (0562)

P-PI = Period of wave (2004)

Number of points -» (0364)

CRL

RecalJ and store start i no address of LSO fit

LSO fit to data from (0B92) to (0892) + (P2 - PI)

(I5AA-I5E8) = Store a2( i ) and b2( i ) _

Recall and store new starting address for LSO fit

LSQ fit to aata from (2000).^to,J_2000) + (P2 - PI)

(1 506- 1 504) = Store al(i) and bl(i)

Calculate step heiaht in hexadecimal

Recall KCAL to R67

^^"^

51
15E4 43 30 033 0

15E3 4340 033 2

15EC 4 1 BO 34D4

15F0 OS eo 0003

15F4 0777

15F6 4 lao 3404

15 FA 077 7 15FC GA4 0 8 000

1600 0E37

1602 0E27

1604 03 53

160 6 0342

1608 4 1 30 3300

160C 4130 32D0

1610 4130 3 110

1614 48 20 2CC0

1613 4A20 2004

161 C 4020 2000

1620 43 20 039 0

1624 4A20 2 00 4

1623 4 02 0 039 0

1 62C 43 20 039 2

163 0 4A20 2004

1634 4020 039 2

1633 43 2 0 2 0 02

163C CA20 000 1 1640 4020 2002

1644 C520 0 0 03

1643 423 0 1 59 £

1640 4 130 3 1 D6

1650 4 130

1654 C50C 0G4E

1658 4330 1 664

165C 4 1 30 3 F4 4

16 6 0 4 3 C 0 1 500

1 6 c4 03 1 0 003 0

16 63 40 10 03 64

166C 4300 3C8 0

1670 4030 D3 70

1674 D3 7 0 D3 AO

1673 D3B0 Do CO

167C D3B0 D3A0

1 DO U DO o u DO 1 U

>

Recal I HM( i ) to P234

Multiply HM( i ) by KCAL

' Multiply result bv 8 account for the 3 bit shift in

obtainina KCAL

Round-off result to double precision accuracy and move

result in R45

Convert result to decimal value and print value

Print SP

— -------

P + i (P - PI ) (2000)

P2 + i (P - PI ) (0E90)

P3 + i (P - P3) (0P92)

(I638-I64A) = loop statements

Print "MQRF?"

' Read one character at TTY

Compare with a N Branch to exit if equal, otherwise continue

CRL

Return to start

Reload usual no. of points for step routine to (0364)

Return to monitor

52
2500

2504

2508

2500

2510

2514

2518

2510

2520

2524

2528

2520

2530

2534

2538

2530

2540

2544

2548

2540

2550

2554

2556

255A

255E

2562

25 64

25 63

25 60

2570

257 2

257 6

257A

2S7E

253 0

258 4

2588

258 0

258 E

259 2

259 6

259 A

259 0

25A0

25A4

25A8

25AC

25B0

25B4

>

4130

4 1 80

0850

41j30

08 10

4010

08 10

4010

08 10

4010

41B0

4180

4300

41B0

08 50

41S0

4180

41B0

C8A0

4820

43 30

OIBA

41B0

48 2 0

4830

013A

4130

48 20

48 3 0

OIBA

4130

43 2 0

4830

0 1£A

4 1 JO

43 20

48 3 0

OIBA

41B0

48 2 0

48 3 0

OIBA

41B0

41S0

4130

41B0

41 BO

4300

0000

0 640

30 10

09CE

3 14A

1000

0E9 4

1 102

039 0

1244

039 2

0300

0400

2543

3010

09 CE

3 14A

3F44

0300

32D0

0E9 6

0398

3 110

0B9A

0B9C

3110

039 E

03AO

3 110

03A2

03A4

3 110

OLp.C

O^AE

3 110

033 0

0B3 2

3F44

3240

3F44

0440

3F44

2534

(2500-25B2)

LECTJ

= PROGF^AM FOR 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 (25 1 A) and store as A

I

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 a I to (R23)

Print (R23)

Print SP

'

Load intercept bl to (R23)

Print

Print SP

Load Slope a2 to (R23)

Print

Print SP

Load intercept b2 to (R23)

Pr i nt

Print SP

Load KCAL to (R23)

Print

' Print SP

Load HM (hex) to (R23)

Prirrt

Print CRL

Print "HI—H3—-H5—H7—HM"_

Print CRL

Convert hex steps to decimal and print

Print CRL . Repeat •

53
30 1 0 4030 30 1 E

30 1 ^ 4 1 BO 30 6E

30 1

8

4 1 ijO *^ r\ r\ 3 022

30 1

C

C830 0 1 38

3020 030B

3022 4030 3 0 6A

302 6 07CG

3028 08 DO 000 2

302C 08 EO rs r\ r\ /\ 2000

303 0 07 66

30 J2 C] 'n r\ Co 70 r\ r\ r\ \ 000 1 303 6

r* a o r\ 088 0f\ r\ t\ f% 0004

303A 089 0

r\ r\ r\ r\ 0000

303 E 08 FO OOOA

30A2 DEFO 3 0 64

304 6 DEFO 30 65

30AA 9 AF9

304jC DBFC 1000

30o0 DBFC 1001

3054 C 1 60 3 0 54

3053 0766

305A C 1 CO 3 04A

305E C8 FO 0002

30 62 4200 9 OS 6

30 66 9 Fl 2

30 68 0830 3 0 1 C

30 6C 03 03

30 6E 4030 3 0AE

3072 08 00 0000

307 6 4000 0044

307A 08 00 3 09 6

307b 4000 004 6

oOo 2 C8 FO OOOA

308 6 DEFO 3 032

308 A DEFO 3 034

308 E

^ r\ r\ C200 3 09 2

309 2 0000 3C8 0

309 6 0200

3098 DEFO 3036

309 C C8 C 0 0000

30A0 C8D0 0001

30A4 C8 EO 2F0 0

30A8 C 1 CO 3 OAS

30AC 0830 3018

3030 030B

30B2 1 000 4000

306 6 8 000 8 000

30BA 4030 3 0E2

30BE 4130 3 ES A

30C2 0 500 OOAO

300 6 4330 3 OEO

30CA 0500 r\ r\ '~i r\ 003 D

30uE 4330 3 Ot.0

30D2 4 130 3EA4

30D6 CD20 0004

30DA 0 62 1 30DC 4300 30BE

30E0 0830 0106

(3010-3020)

LUAS]

(3022-306C)

[DAS]

(306E-3GB8)

[DAS]

ROUTINE TO WAIT FOR AN INTERRUPT, THEN READ DATA

= ROUTINE TO LOAD DATA FROM ANALOG TO DIGITAL CONVERTER

(ADC)

Initialize index counters with (302E) being number of

data points to be loaded

(30BA-30E4)

[DAS]

Initialize delay counter with delay beina determined by

(3038)

ADC channel number R9

Device number ->• RF

Initializing command byte (3064) -¥ ADC

Enabling command byte (3065) ADC

ADC channel number to be read ADC

Read one byte from ADC -> [1 000 + (RC)]

Read one byte from ADC [100 1 + (RC)]

Delay before reading next point

Reset delay counter

i Loop for a I I 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 FOR AN INTERRUPT AT ADC MARK TIME FOR I SECOND

THEN EXIT

Load and store new program status word c.c.

Load and store new program status word

(address to jump to on interrupt)

Load ADC device number to RF

__ Initialize interrupt at ADC (30B2) -* ADC

Enable interrupt at ADC (3084) ADC

Load current program status word to RO

Wait state: Branch to monitor upon execute at console

Cont i nue Send 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 if egual

ODmpare with ASCII code for CR

Exit if egual

Convert input character ASCII to hexadecimal

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
30EA 030B (30E8-3I0C) =: ROUTINE TO READ TWO CHARACTERS AT TTY AND STORE ASCI

30E6 4220 4030 [DAS & ECTj CODE AT OBBO

30 EA 31 OA 41B0

30EE 3E3A 4200 Read one character into (RO bits 8-15)

30F2 0000

30F4 0350 Move to R5

30F6 CD50 0003 Shift contents of R5 8 bits left logical

30 FA 4130 3E3A Read another character into (RO bits 8-15)

30FE 4200 0000

3102 0A50 Add to contents of R5

3104 4050 0B30 Store at OEBO

3108 G8£0 00D6

31CC 0303 Return ' ' ' " 310E C8A0 4030 ( 3110-3120) == PRINT SINGLE SPACE ROUTINE

31 12 31 IE CSOO [DAS]

31 16 OOAO Put ASCII code for SP in (RO)

31 18 4130 3E30 Print character From bits 8-15 of (RO)

31 IC C8B0 3 142 Return

3120 0303

3122 4030 3 144 (3122-3146) =: PRINT 2N+I SPACES ROUTINE

3126 GSCO 0001 [DAS J

312A G8D0 0001 Initialize index counter -^or number of spaces (3130)

312E C8E0 0003

3132 08 50 AOAO Put ASCII Code for 2 spaces in (R5)

3136 4130 3 14A Print at TTY (R5)

313A CIGO 3132 Loop for desired number of spaces.

313E 4130 3 110 Print SP

3142 G830 021 6 . Return to main program

3146 0303

3143 0324

5 1 4A -4030 3 1 63 (314A-3I6A) == PRINT TWO HEX CHARACTERS ASCII CODE' IN (R5)

314E 03 05 LDAS: (R5) (RO)

3150 G400 FFOO Mask off 8 bits on left of (RO)

3154 GCOO CCC3 Shift (RO) right 8 bits

3 1 5-3 4130 3ES 0 Print riaht byte of (RO) at TTY

315C C3G5 (R5) -> (RO) again

315£ C400 OOFF Mask off 8 bits on right of (RO)

31 62 4130 3ES0 Pri nt

31 66 G830 0258 Return

31 6A 0303

31 6C 074A

31 6E 075A (3i70-3l8L) == ROUTINE TO PRINT "UNITS"

3170 4030 3 18G [DAS]

3174 C8A0 314A Address for print two hex characters -> (RA)

3178 GS50 D5GE ASCI 1 code for UN (R5)

3170 013A Pr i nt

317E C8 50 Gv 54 ASCI 1 code for IT (R5)

3182 013A Print

3184 C850 D3A0 ASCI 1 code for S space (R5)

3188 OIBA Print

318A 0830 3 IA4 Return

318E 0303

3190 4030 3 lAA (3I90-3IAC) == ROUTINE TO PRINT "AA UNITS" + CRL

3194 G850 G IC 1 [DAS] ASCI 1 code for AA (R5)

3198 41B0 3 14A Print

3190 4130 3 1 22 Print seven spaces

31A0 4 130 3170 Print "UNITS" — ' 31A4 4130 3F44 Print CRL

55
3 1 A8 C8B0 0 1 A6 — - - Return

* 31 AC 030B

31AE 28 50 4030 (3IB0-3ID4) = ROUTINE TO PRINT "H OR R?"

3 I 62 3 1D2 08 AO PrII i1 nl" 1 1 1 roul" 1 \^ vJ 1 i1 ne addrG<^^ —» (RA)

3186 3 14A 08 50 ASC 1 1 code f or H soace ( R5

)

3 IBA C8 AO 0 IBA Pr i nt

313E 08 50 C FD2 ASC 1 1 rode for OR ( R5 ) 31C2 0 1 BA Pr i nt

3

1

03 50 A0D2 ASC 1 1 code for 5nace R —> ( R5

)

31C8 0 1 BA Pr i nt

3 1 CA 08 50 3 FAO AST 1 1 rnrip for ^narp —> ( R5 ^ 31 CE 0 1 BA Pr i nt ...

31 DO C8B0 0 IS A

- Rp+ 1 1 r n 31D^ 030B

31D6 40BO 3 1 F2 (3ID6-3IF4) = ROUTINE TO PRINT "MORE?"

31 DA C8A0 3 1 4A rnAQ~l Pr 1 nt rout 1 ne address ~* (RA)

31 DE 08 50 CDC F ASCI 1 code for MO (R5)

31 E2 0 IBA Pri nt

31 E4 08 50 D2C5

- ASC 1 1 code for RE (R5)

31E8 0 1 3A Pr i nt

31 EA 08 50 3 FAO ASCI 1 code for ? space —> (R5)

31EE 0 IBA Print

31 FO C8B0 02 1

A

Return

o * r ^4 31 F6 3D 62 40B0 (3IF8-32I6) = ROUTINE TO PRINT "ENTER"

31 FA 32 1 A C3A0 [DAS] • - —

31 FE 3 14A C8 50

3202 C5CE 0 IBA " - - .. . V-.. ~. 3206 08 50 D4C5

32 OA 0 13A

r ? = n 32 1 0 0 1 BA

32 1 2 C8B0 00F6

• -• •'—

3? 1 6 03 OB

Oili. '^C; i

1 o^ *^ 0 w 0 t— 0 M ROI iT 1 MF TO PRIMT "DATA"

32 1 C 08 AO 3 14A [UASj

3220 \J C0 C \J C4C 1 322A OlEA

yJC. C. 0 u 0 0 u

, —..... . 322A 0 IBA

«L r i-i U

- - ^ . 3230 0 IBA

0^ 0 ^ U U 7 rl —^

*' 323 6 0303

\j \j *^ y —^ ———. .^^

' 321A CDi^O 0001

p n n ^

/ noUD nu RDI IT 1 MF TO PRINT rrii'ii "HIIII H311-^ H5iiv H711/ HM" 1.11 3242 3270 C3 AO [ECTl

PROD 0 nU

32AA C8B 1 0 IBA

32 AE 4 1 oO 3 122

~ 3252 08 50 0833

o2 5 6 0 1 isA

32 58 4130 3 122

-id. ou PR n \jO 0 u PR i3

- - - — —

32 60 0 1 BA

10 AO

. _ 3266 08 50 C8B7 — - - - - -

56
32 6A OIBA

32 6C 4iao 3 122

3270 0850 C8CD

3274 013A

327 6 4160 3 122

327A 0830 0116

327E 0303

328 0 A0D3 D4C5

3284 DOAF D3D5

3288 D20 6 0 103

328 C C5A0 D2CF

329 0 D5C7 CSCE

39.94 C5D3 D3A0

3298 0301 0009

329 C C2D2 0 ID4

32A0 C9CF OEAO

32A4 4030 3203

32A8 4130 3 122

32AC 0800 0000

32B0 C8D0 0002

32B4 C8E0 0022

3288 C8A0 3 14A

3230 48 50 3280

3200 013A

3202 CICO 3230

320 6 0830 003 A

320A 0303

3200 0E40 0001

32D0 4030 32EE

32D4 03 51

32D& OS 62

32D8 03 73

32 DA 0200

32DC 4200 0000

32E0 08 2 6

32E2 4130 3EF0

32E6 0827

32 E8 4130 3EF0

32E0 0830 054E

32F0 0303

32 F2 0E48

32 F4 4300 28 58

32 F8 0000

32 FA 0000

32 FO 0000

32FE 0D72

3300 4030 33FC

3304 4130 OFl 0

33 08 0788

33 OA 0200

33 00 4200 0000

33 10 4200 0000

3314 08 FO 8000

3318 04F4

331

A

4330 332E

33 IE 0700

3320 0740 FFFF

3324 C750 FFFF

(3280-32A2) = ASCII CODE FOR "STEP/ROUGHNESS CALIBRATION"

(32A4-32CA)

Ldasj

(32DC-32F0)

LDASj

(3300-33FE)

LCEKJ

ROUTINE TO PRINT "STEP/ROUGHNESS CALIBRATION" CENTERED

ON PAGE

Initialize index counters

Put print routine address in (RA)

[3280 + (RC)] -» 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 reaisters 4 to F

Load I into 0 bit of RF

Logical and 0 bit of RF and R4 for sign

Branch if + Clear RO

Complement (R4) and (RF)

57
3328 CA50 0001

332C 0E40

332E 07CC

3330 C8D0 0004

3334 C8E0 0014

3338 0700

333A 0894

333C 08A5

333E 4340 3530

3342 4210 3350

3346 08 49

3348 4B5C 3532

334C 4F4G 3530

3350 4210 335C

3354 CAOO 0001

3358 4300 333A

335C 08 49

33 5E 08 5A

33 60 COCO 0002

33 64 C33C

3366 0AB8

33 68 D203 3550

33 6C CDCO 0002

3370 CICO 3338

3374 C8D0 0002

33 78 C8E0 OOlC

337C 0700

337E 03A5

338 0 4B5G 3530

338 4 4210 3390

33S8 CAOO 000 1 338C 4300 337E

339 0 08 5A

339 2 COCO 0001

339 6 0830

339 8 0AB8

339A D203 3 54

A

339E CDCO 0001

33A2 CICO 3370

33A6 D318 3550

33 AA GDI 0 0004

33AE D308 3551

33B2 0610

33B4 061 F

33B6 D328 3552

33BA CD20 OOCC

33BE D308 3553

33C2 CDOO 0008

33C6 0 620

3308 D308 3554

33CC CDOO 0004

33D0 0620

33D2 D308 3555

33D6 0620

33 DS D338 3556

33DC CD30 OOOC

33E0 D308 3557

33E4 CDOO 0008

Complete 2's complement y

Add carry to R4

Clear RC '"^ ' Put increment In RD

Put limit to get first 6 powers of 10 in RE"

Clear RO

Save (R4) and (R5) in R9 and RA

Subtract power of 10, [3530 + (ROU from (R4)

Branch if result is negative

Restore R4

Subtract power of I0,C3532 + (RC)] from (R4,5)

Branch if result is negative

Add I to (RO)

Loop for more subtractions

Restore original contents to R4 and R5

10

and limit for remaining power

Divide (RC) by 4

Put (RC) in RB

Index (RB) by (R8)

Store CR0(8:I5)] at 3550 + (RB)

Multiply (RC) by 4

Loop for next power of

Re i n i t i a I i ze i ncrement

of 10

Clear RO r"" " "

Save R5

Subtract power of 10, [3530 + (RC)], from (R5)

Branch If result is neaative

Add I to (RO)

Loop for more subtractions

Restore original contents of R5

Divide (RC) by 2

Put (RC) into (RB)

Index (RB) by (RB)

Store [R0(8:I5)] at 354A + (RB)

Multiply (RC) by 2

Loop for next power of 10

Put 10**9 place value ([3550

Shift left I digit (Rl

)

Put 10**8 place value ([355

1

Logical OR (RO) with (Rl) into Rl Logical OR sign bit with (Rl ) into

Put 10**7 place value (!l3552 +(R8)]

Shift left (R2) 3 diaits

Put 10**6 place value ([3553

2 d i q i ts

with' (R2) into R2

va I ue ([3554 + (R8)]

I d i a i t

'

(R2)

+ (R8)]

+ (R8)]

[Rl (8

[R0(8

5)]) in Rl

5)]) in RO"

Rl

Shift left (RO)

Logical OR (RO)

Put 10**5 place

Shift left (RO)

OR result into

Put 10**4 place value, ([3555 + OR result Into (R2)

Put 10**3 place value, ([3556 + Shift left 3 diaits

Put 10**2 place'value([3557

Shift left 2 digits

[R2(8: 15)]) in R2

+ (R8)] [R0(8: 15)]) in RO

[R0(8: 15)]) in RO

(R8)] - [R0(8: 15)]) in RO

(R8)] -> [R3(8: 15)]) in R3

(R8)l -> [R0(8: 15)]) in RO

58
JO _3 u \j yj \j 0 0 w ^

r nn n \J \-/ \J ^

OO r <i OO r *4 W vj 0 0

OO r D zi 1 n nU P^Rw 0

OO rPAi-i 0 0 u P/1<^ u ^0 pd

OO PPr n. u

0

*4 j3 U 01 zi*4 nU A0

0^ u 1 zi p nu nu nu 7/ 1

1 pu

0*4 uo zi^ nu 0M nu 0 zj^ ru ru 0^ U V Al U U U

"< Zl A/l

0^ 1 U zi^4 nU 11 nU Zl A !^ 0 *-si-iO 0*4

1

zi*4 npU £- nU 0 zi*4i-lU A r

0*1 .1 0 *4 U 0 U 0 Zl^ IDrt PU

0*4 1 u Zi'4 nzi U ^4 nU

'\ Zi P Zi

'3/1 0 n 0^ d u

/i 0 A A T /I

Q

0 '4XjO

0^ c ^ Zi n 7n 0

'5 ZiM ID^ PU

0*4 ciO. Zi»4 0U i-i A 0L' 09 Zi Pu Pu

0^4 C U U 0 L 0^ zi r zi L. O': 0 U Zi*4 nU P nU 0''Zip ^ u 0s 0 - 0 - n 7 f) f1 0*4 0 Q

0*i 0 0 rzi 1 n pU pU pU 1I

o*-i 0 ^ n 7r r

iZl T ^ 0*4 0 A-^ n^^ uo Un 11 0*^ '^ZiZi 0u

0*^ ^ ^ vO 0 ^

0*-i "^ZjZiZi *4 *4 r zj u ^

'2 0 pU fU pU 11 n r r 'J

TZiZ' Pi 7 ""i

PiU (U T' 1 I- 1 0^ w U P P ~ U U w PiL' pU p p 1 vj U 1 ^Zi =^ Zi U U L' ^

'</! ^ A C' r P = op^ =; U u — 0

Ui_ o L L L L <i 0^ 0

0*4 CU p /I 7 p P Ti P P U U U U

r r 7n Pu Pu Pu HP

^Zj 0*4 A5f CO Pw K0Q 7( r0 PQ Pi 1- 7 u n p, p 0 u U U <i 0*4 '^Zl ^^P D£rf r nn p pu pu pu 11

'^Zj 7P PRuo 7 1

/ i

'^Zi 7 A r ill C\ S0 fu; Pu Pu

ru cu 1 C\ / u r,u flu pu Pr P A P7

0*4 f rU J.P i

1 pu Pu pu PU 11 PaQ \ 0*40 "K/iR Zi*4 APR uco Pu rU PP^ pu PU PU PU 11 '^ZiR A uo / 0

0*40 k.< r 111 r\ 0 pu pu pu

pU pU 71 pu u u u r 0*47 ^ZiQ Zi*4 P A P 7

0*4^ D pu Lm0 pu pu Pu pu 11 UAV 0

349 C 0E8 2

OR result Into (R3) ' ^ 10**1 place valuer. [R0(8:I5)]

Shift left (RO) Idlgit

OR result into (R3)

OR (R5) = 10**0 place value into (R3)

Restore registers 4 -»- F Return to main program

(5408-34CE) = ROUTINE TO MULTIPLY UNSIGNED (R5) x (R9) ^ (R89)

LDASj

Save all registers not used as input or output

Clear RO

Shift (R5) to Rl Last bit of (R5) -> (Rl), logical AND operation

Clear RC

Shift (Rl ) to RD

Clear R2

Shift (R9) to R3

Last bit of (R9) -> (R3), loalcal AND operation

Last bit of (R5) x Last oit^'of (R9) RD = PO

Clear

Shift (R9) right I bit loalcal

Shift (R5) rignt 1 bit logical

Last bit of (R5) x I bit shifted (R9) ^ ROI = p|

Last bit of (R9) x I bit shifted (P5) -> =23 = P2

I bit shifted (R9) x I oit shifted (P5) > R89 = P3

Shift (R8) 2 bits left logical

Move contents of R9 R7 (product result)

Pick off two high bits of right oroduct result, P3

Shift these two bits 14 bits to right

Add then to left part of product result P3

Shift, right product result 2 bits left

Shift left product result of PI I bit left

Move right product result of PI to R9

Pick off hiah bit of right product result of PI Shift this bit 15 bits to right

Add to left product result of PI Shift rl ghf 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 P2 left I bit

Move right result of P2 to R7

_ _

Pick of f h igh b i

t

Shift it right 15 bits

Add it shifted left, left part of P2

Shift right part of P2 I bit left

Add shifted results of P2 and P3

59
3/lQ F OAQ T) 3ZlA0 0F8 2

no FFFF

3^A 6 C8 10 FFF4

3ZlAA CPS PO nnno \J U \J 3^AE C8 3 0 0VJ ftjFO Vj u VJ 3ilB2 C840 0000 w VJ vJ VJ 3AB 6 C8 ftO 0000 VJ vJ O VJ 3^j3A C8 7 0 O3 00VJ w 0VJ 3/lBE C8 AO 3 1 4A

3^C2 08 0 0 0000 VJ VJ O VJ OS no 0 1 4F

OS nn 3 5 1 n 03\J \J OR\J LJ

*-« <— O w ? 544

4 0Rn o3 o52?d

*4 1 VJ n F 1

8

3^nr

nVJ 7/ unnu

n 7 F P n 7 FF

\j 1-^ *~t 3^F ft na S7

*^ 1 i—) VJ 34 08

3^EC OR»j tj *FQ~ 3iiFF 08\J vJ 1_F8VJ 3Zj FD OSQ VJ <J ^ 4*-i 34 F<^ 08VJ (J ^5 ftVJ 34 F4 4^ 130 4 U VJ 3408 w - VJVJ 34 F8 0AF9

34 FA 0VJ ^1^<J F HR

34 FC 089 VJVJ 7 \J3

34FE 08VJ <J «J57/ w Osonw w 4 1 O Zi HRVJQ Oi=iri4 O w *-i O ^ w w w w 08VJO 97 sj3

- 350A 08 5 ft

\J3snr\J 4 1 RD 3 4 08

oci no

n FPR

3'=i 1 4 fis 2 r 08V QJ \J L/n 35 18 08VJ <J 4F

3S 1 A OR S F

*^ i i-J VJ 0 F ftO 3520 \J ij C W OSV»/ KJ LJROVJ 0 5 ''S 3524 03w O ORVJ iJ 352 6 000 VJ VJ VJ o3

3528 W C 0007 VJ VJ VJ # 352A 08VJW 07VJ f 3 5 pp. VJ VJ Vj >J 35PF W O & i-« W 7 VJ / 3530 ^ *J sj \J O3ri9 IJ 7 inA 0 AOO

3534 n 5 F5

353 ft Finn nU noU 7 Ro

OOoi-i Q n y DO u 353C GOOF

Add result of PO to get f inal_ result in R89

[DAS]

Restore starting contents of all registers not used

for output or input

Return to main program

ROUTINE TO MULTIPLY (R34) "x (R67)

Store register 5-F

(R2345)

Clear register C-F to accumulate result

Move (R4) and (P7) to R9 and R5 __ ^

(R4) X (R7) -> (R89) = PO

Move PO to (REF)

(R4) X (R6) ^ (R89) = PI PO + PI = PI + PO

CD EF

(R3) X (R7) ^ (R89) = P2

P2

PO + PI + P2 = PI PO

C D EF

(R3) X (R7) H- (R89) = P3

Finish accumulating into RC

Transfer result to (R2345r"

Restore registers

Return

(3530-354C) = HEXADECIMAL EQUIVALENTS OF POWERS OF 10

(3530-3532) = 10**9

(3534-6) = 10**8

(3538-A) = 10**7

(353C-E) = 10**6'

60
353£ 4240 000 1 (3540-2) = 10**5

w -*/ ^ ^ 8 6A0 0000 (3544-6) = 10**4

354 6 27 1 0 0 3E3 " (3548) = 10**3

354A 0064 (354A) = 10**2

354C OOOA (354C) =10**1

354E 0000

3550 0000 (3550-3558) = STORAGE AREA FOR HEX TO DECIMAL CONVERSION

3552 0000

3554 0000

3556 0502

3558 0100

355A 0000

355C 0000

355E 0000 (3560-358C) = ROUTINE TO MULTIPLY R23.4 BY 2

3560 40B0 353A LOAS]

3564 CF2 0 000 1 Shift (R2) 1 bit left arithmetic

35 63 0853 Move (R3) R5

35 6A C450 8000 Pick off high bit of R3, put in (R5)

35 5E CC50 OOOF Shift bit 15 bits right logical

3572 0A25 Ada it to shifted result in R2

3574 CD30 000 1 Shift (R3) 1 bit left logical

3578 08 54

357A C450 3000 Pick off high bit of (R4) and put in R5

357E CC50 OOOF Shift bit 15 bits right logical

358 2 0A35 Add it to shifted result in R3

358 4 CD40 000 1 Shift (R4) 1 bit left logical

3588 C8B0 0000 Return

358C 030B

358 E CD20 4030 (3590-35CO) = ROUTINE TO MULTIPLY (R45) BY (R6)^R345

3592 353E 0200 [ECT & DASJ (R45) EITHER SIGN, (R6) POSITIVE

359 6 4 150 3 5C4 UR45) 1^ (P/t5)

359A 0777

359 C 0788

359 E 039 6 Move (R6) R9

35*-i0 4 1 £i0 3403 (R5) X (R6) ^ (R&9) = PO

35A4 07AA Clear RA

35A6 0334 Move ( R4 ) ^ f^B 35A8 0CA6 (R4) X (B6) (RAB) = PI 35AA 0A8B PI 35AC 0E7 A PO + PI = +P0

35AE 0837 789

35B0 08 48 -Move result to (R345)

3562 08 59

3584 41B0 3 5FS Change sign if original (R45) negative

3538 4 1 BO 0FC2

353C ^ LJ \m/ \^ \J \J 03B2 Return " 35C0 030B

l(R45)| R45 ABSOLUTE VALUE ROUTINE SET FLAG n\J n\J\Jn pc (35C4-35F4) = 35C4 4030 35F2 lECT ^. DAS] 35EE IF NEGATIVE

oooo 0F88 Save register 0,1,2,7-F

35CC 07AA Clear RA

35CE 40A0 35EE Clear Flag Location

35D2 08 44 Load (R4)"to R4 to test sinn

yj U *•* ^ P 1 fi \J >J u \^ Branch if negative

35D8 4300 3 5E8 Exit

35DC C8 AO 8000 Load flag to (F^,A) 35E0 40A0 35EE Store Flag

35E4 41B0 35F8 Change sign of (R45) _

AT

61
zi*« 1

1 Dp nU n FP p R^iC't'PiP^i /^r*ioin;=il ^/^n't'f^n't'Q RP 1 7 7 — F

zi .ip nu nu R0 nu n n u u (35EE) = Flan 5torane

00 r U L/O d U 0 L»

. r\c 1 u 1 II 0 C TT /I 03 OB

00T c: IT A f 0 n n n n u u u u (35F8-3620) = ROLJT INF TO PHANf^F ^ 1 OF ( R4 5 ^ IF FI AH RDOn AT

00 r 0 zi n s n 0T AD 1

1 HF 1 ECT & D/^S1 35EE IS SET

^R Af) 0T *JSFFi-tf ^ I- (J ou riau Tivjiii v^^Cu/

W VJ *-i 0 0 VJ 1 A 1 P cx 11 IT no T 1 dy

P 7 Zl fl rFFFF r r r laKe z s compiemeDT ot ^K^^;

0 DUO r 7 R n TTFFF r r r r 0 V u 0 r A n n n n 1 »J U U 1

• - -

0 0 I u /i Q s n T A 1 h! 0 D 1 0 1 T carry D

i

t seT aoo I to ^ Kh ;

*-* 0 w W 1 r- 1 P

-

1 T IIO 1 OA 1 1 "^ft 1 R nnW nvj 11 0 D i u 00 D U 0 OJzSO

• —

Return to program

0 0^ nu u 0

r 1 r n Zl*4 nvj 0A nU ( TA99 9 1 — DPI IT 1 Mr TP PPM\/CDT C 1 MP 1 C" DDCP 1 C 1 PM t D"^ 1 TP PPI IDI F 0 D*4 VJ UO P 0 LUAo J DDCrPICIPM IM 1 OT^\

rL/ HiF'^W nW \J \j \J \j f'^APR^ VPDZOJ -

— Dii+ rUT f\r\j 0"^ 1 i D9 1 1 nTO KZ

0 \j ^ ij k-/ ^ c u 0 V> w I6ST Sign DIT OT ^ K_) J 0 00 c> Zl*H pc. 0T n\J 0 D 0 M If bit pres6nt i.e. (R3) are negative. Branch otherwise

Zl^4 0? nU nU T A '5 F ex i t

0 Do i-1 PR0 0 pci nU r r r r Loaa rrrr I nTO \r<£i

0 DO Xt< Pa? an 0 0 XL Return _ 0 D*l C nu 0 nU Ds

0 D^ M /I n n T Q FF t "^A/l 7AQA > — DPI KUUIT

1 IMC 1 N t TP1 U

PPM\/rDT UUiN V t K 1 nrPIMAI UtU 1 MM L (OA^ \ ) A PIPITC: TP , '+ UlUlio, lU

/I n a n 0 AQ Zl LiNo & UAbJ UCYfinCPIMAI AT Dl n 7 n n L 1 e^ r I KU; ana v^k i ; - • 0 c 0 U pfi Li 0 p<i nU n n n A LOaO nK-\UJ O \ KZ ; 0 AC 0^ ^J*! r"i -A T Zl 'J O \J '-1 C K ! -f + ( DA 1 -k D J; bn 1 T T V ) ^ n j

0 D D U ^4 0 U FHr u pu nu ..... . riCK OTT n 1 gn ^ dits or t i rsx aigiT ot \rM i ODA OHA Zl 0 0 nu A AZi 0 D C*4 IT zero Drancn to tbst nexT lower uiqix

T A c; 0 D 0 n 0 u 0 Uci n p u u 0 0 IT noT zero smitt kwji rianx iz dits

A AO Ui-i 1 0 Ada sn 1 TTed vk.^; to u<m

0 AD AZl D ^4 flP U V OPU <i

( D 1 > Y A -4. ( DP 1 1 V K 1 ; A n ^ ^ nU 1 J 0 AU AD AD fli^ '^Zi *JO 0 *-i - —

Keca 11 ^ ; again

0 D DO p Zl*4 0 nu nu rFPu nu rICK OTT nexT uiqiT OT v K4

;

0 D DU Zl 0 0 nU 0 A7D / AU 1 f zero b ranch

1 A7 n p.p 0 w 07 nU U U VJO '-— IT noT sn 1 TT \r\ji rianT o dits

0 D » nOQ sn 1 T Ted \r(y} TO \r<\ ) w w 1 0 HP\j 0 npu ^ _ . I D \ Y~ A ^ ( DP 1 \ V K 1 A n V KU 1 / 0 D / 0 DP! uo 0"XAM Keca 1 1 ^ K4 ; aga i

n

0^ A7D » riA p0 ZlM 0 nU n n Ffi

. rICK OTT neXT u 1 Q 1 T OT V Kh ; 0 A ^7 tr 0 D / b

/I 0 f-i ^ J J 0 0 COO 1 f zero, branch

0 DO ^ pu pu 0T nu nu nu nu ^Zl IT noT, sn 1 TT \T\j I riqnT h di ib

0T Af? 00 AD nUHA 1

1 T

0

nuQ sn 1 TTea kj i to v k m

1 AQ Ct 0 DO 0nUOr* n 0 U<i ^ D M Y A f DP 1 ^ V K 1 J A n -> \ KU 1 ) 000 A Co OA LoaO I K4 ; ^ K

J

0 Af? DO r\j P Zt T A 0 A 0 U

nu nu nu Fr rICK OTT laST Uigil \labl *+ Ulis/ UT \rvM/

369 0 OA 1 3

. Add to (RI

)

0T AOD? P<i Pi^ ,50 nzi pp • ODy T AO AD

0 "J <~i 0 U 0 UiD

- - KeTurn to main program

1 AO Q odV 0Zl 0 Cf n A C A 0 DO D

oo9 C 43 00 3C8 0 (3dAO-574C; = DPI IT 1 MC TP n 1 \/ 1 ntr o ucy uai r\)/PDnc Dv 1 HPY MAI PWORD • KOU 1 1 Nt lU U 1 V 1 Ut Z HtA nALrWUKUb bT 1 nLA nnLrrvuKU,

odAU 1 A A r> zi UhsU 0 ^7 /i A 0 / Zl A fpp k""! 36A4 4 IBO 0FS8

36A8 4060 3746 Save all registers not used for Input or output

62
3t^.Z CC50 000 1 36£»0 CE40 000 1 36B4 423 0 3 c£C

3668 4300 3 600

363C CA50 3 000

36C0 0733

36C 2 039 0 000 1 36C 6 C8A0 FFFF

36CA 03 14

36CC 43 1 0 3 6DS

36D0 07 4A

36D2 0 7 5A

36D4 0A59

5cD6 0E48

36D8 03 2 5

36DA CC50 OOOF

36DE GF4 0 0001

36£2 0654

36E4 CE40 OOOF

36E8 0D43

36£A 08 0 5

36EC 03 52

3eEE 0450 7FFF

36F2 CE40 0001

36F6 433 0 36FE

3 6 FA C 650 3 000

36FE 0D43

3700 0824

37 02 08 4 0

3704 CE40 000 1 37 C8 433 0 3710

370C C ccG 3 0 0 0

37 1 0 CF20 00 01

37 1 A 0523

37 1 6 4 23 0 37 1 £

37 I A

37 1 C 0E43

37 1 E 03 1 1 3720 43 1 0 3720

3724 074A

372 6 075A

3723 0A59

372A 0E48

372C CF40 0001

3730 CD50 000 1 3734 428 0 3730

3738 4300 3740

373C CA40 000 1 3740 4 ISO 0FG2

3744 08 60 0020

3748 0830 03EE

374C 030B

374E 0000

37 50 0000

37 52 0000

37 54 0000

37 5 6 0000

37 58 0000

Shift (P5) rinht lonical I bit

Shift (R4) riaht arithmetic I bit

If a least sianificant bit shifted out of (R4) branch

If not branch around hiah bit add to (R5)

Add hiah bit to (R5)

Clear R8

Load "

I " to (R9)

Load "FFFF" to (RA)

Load hiah order part to PI to test sian

Branch if (P45) are Dositive

Two's complenent (R45)

Save low-order part i n R2

Shift (R5) riaht loaical 15 bits

Shift (R4) left I bit arithmetic

OR (R4) into (R5) Hiah Order 15 bits

Shift i^A) riaht 15 bits arithmetic

to

(R45)/(R3) -> (R5) Remainder (P4)

Save result in RO, Hiah Order 15 bits of

Reload low-order part of input to (P5)

Pick off low 15 b i ts of (P5)

Remainder/2 (P4)

If no bit shifted out branch to next divide

If bit shifted out OR hiah bit into (P5)

Divide present (R45) by (R3), (R45)

2nd rema i nder (92)

Recall hiah order 15 bits of answer

Shift (R4) riaht I bit arithmetic

Bra'^ch If no bit sni-'^'^ec out

If bit shifted out CP hiah bit into

2nd remainder times 2

Is 2nd remainder times 2 > or Branch if not

Add I with carrv to (^45)

V/as number neaative

Branch if number is oositive

answer

ow or Jer I 5 of answer

(P4)

b !

(P5)

= to d 1 v i scr

Comolement (P45)

Multiply (R45) by 2 to reverse

Process at start of this routine

Restore all reaisters not used for input or output

Return to main program

63
(3750-37E2) = PROGRAM FOR TAKING LEFT JUST If I ED 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 NUMBERSPACE WITH TEN NUMBERS PER LINE. PLUS SIGNS ARE fJOT PRINTED IN ORDER

TO BE COMPATIBLE WITH THE NES 1108 CENTRAL COMPUTER FACILITY.

>3750F.

>37£4P

37 50 4 IfiO 3F2 6

3754 07EE

37 56 07AA

37 58 48 3 E 10 00

37 50 CE30 0004

37 60 4 ISO 3624

37 64 08 53

3766 0842

37 63 4 IBO 3 3 00

37 6C 41£0 37AC

3770 4lfiO 3 110

3774 CAEO 0CC2

3773 CAPO 000 I 3770 C5E0 200 0

378 0 4230 3733

3784 4300 3030

3788 C5A0 OOCA

3780 4280 3 7 58

379 0 4 IBO 3F44

3794 C5E0 2000

3798 4230 3756

3790 4300 3CS0

37i-.G 40£0 37£C

37A4 41BC OFl 0

37A8 0852

37AA 08 63

37AC 03 2 1 37AE 0410 FOOD

3752 4330 37BE

3736 0800 0C2D

378A 4300 3702

37BE 0800 0 0 AO

3702 4 IBO 3E8 0

3706 C420 OFFF

37CA 4200 0000

37CE 0825

37DC 4200 0000

37D4 08 2 6

37D6 4160 3EF0

37 DA 4 ISO 0F58

37DE C8B0 3770

37E2 030B

[ECT & CY]

(37A0-37E2) =

I imit of words per I i ne 3758, otherwise continue

Punch a leader for tape cutout

' Clear line and word index counters

[1000 + (RE)] (R3) Load data to (R3)

Shift (R3) riaht 4 bits arithnetic

Single precision (R3) ^ double precision (R23)

Move to R45

Convert (R45) to decimal In (RI23)

Print and punch 4 dialts and sian

Print SP

Index (RE) bv 2

Index (RA) by 1 Compare (RE) with word I Imit

If (RE) > 2000 no to 3788, otherwise continue

Return to monitor

Compare (RA) with

If (RA) < A ao to

CRL

Check word limit aqain

If (RE)< 2000 take next data entry

Return to monitor

PRINT AND PUNCH ROUTINE

Save contents of realsters A-F

Move (R23) to R56

Test sian of data point

If + branch, If - continue

Load ASCII code for - to (RO)

Branch to print and punch contents of RO

Load ASCII code for + to (RO)

Print (RO) at TTY

Printing (Rl) and (R2) bypassed since 12 bits

corresponds to only 4 dialts

Load (R3) into R2

Print (R2)

Restore (RA to RF)

Return to program

64
(3800-3888) = PROGRAM TO CALCULATE THF AMPLITUDE OR PROBABILITY

[EOT J DENSITY FUNCTION FOR DATA STORED AT (1000-3000),

STORES RESULT IN (0680-OA80), AND PLOTS FUNCTION

38 COR AT STRIP CHART RECORDER

3300 07CC • -> 3800 - First entry to initialize storage area at

3802 07AA 0680-0A80.

'

38 0^ 40AG 0 68 0

38 08 CAGO 0002

380C G5G0 0400

38 10 A230 33 04

38 U 0777 3814 - Second entry to generate amplified function

28 1 6 G380 0002

38 lA G890 2000 Initialize index counter (R7) _ 38 IE G8 60 0 0 03 8 -> (R6)

38 2 2 43 3 7 1 000 [1000 +(R7)] (R3)

38 2 6 GE30 0 004 Shifr (R3) right 4 bits arithmetic

33 2A 4130 3 624 Single precision (R3) -> double precision (R23)

33 2E 0D26 Calculate box data point should beionn to

38 3 0 0322 Load remainder to test it > 0

38 3 2 43 10 383A If remainder < 0, add -i, Then add bias

38 3 6 CA30 FFFF If remainder > 0, just add bias

38 3 A CA30 0100 Add bias

33 3E GF30 000 1 Multiply box number by 2 to obtain address no. of

33 42 43C3 0 68 0 [0680 + (R3)] (RC) storace

38 4 6 CAGO OCOl • Add 1 to (RC)

33 4 A 40G3 0630 New contents of PC [0680 + (R3)]

3o4E G 1 70 3822 Increment index counter then repeat

33 52 CooO 0 63 0

• 33 5 6 4030 39 73

38 5A G330 0000 (3852-3888) = Initialization of plot routine, olot

3S5E 403 C 39 70 (0680-OA80), then return to monitor.

33 62 C3 3 0 CC02

38 6 1 4:.5 0 399 A

33 6A Go80 0^00

38 6E 4080 399E

38 7 2 GS80 OOFO

38 7 6 4080 3934

38 7A 4080 39SG

38 7E G880 OOOF

38 8 2 4080 3990

388 6 4300 39 50

>

65
39 00 0 7AA ( 3900-391 G) = PROGRAM TO CLEAR CONTENTS OF MEMORY LOCATIONS 1000 to

39 02 0700

1 000

Lect], 3000

39 04 40AC i 39 03 OACO 0002

39 00 C5C0 2000

39 10 4280 39 04

39 1 4 4300 308 0

39 18 08 00 1000 (3918-3946) = PROGRAM TO INITIALIZE PLOT ROUTINE FOR BIPOLAR NU^•1BERS

39 10 4000 39 73 LECT] .-: AND TO PLOT DATA FROM MEMORY LOCATIONS 1000 TO 3000

39 2 0 0800 0008 ON STRIP CHART RECORDER

39 24 4000 39 70

39 28 0800 007B

39 20 4000 3984

39 3 0 4000 3980

39 34 08 00 0084

39 38 4000 3990 . . 39 30 0800 2000

39 40 4000 399 E

39 44 43 00 39 50 (3950-39CF) = PLOT ROUTINE: THIS ROUTINE TAKES HALFWORDS FROM

39 43 0000 [ECT] SPECIFIED MEMORY LOCATIONS USING THE 8 MOST SIGNIFICANT

39 4A 0000 BITS (INCLUDING THE SIGN BIT) AND BIASES THE DATA TO

39 40 0000 HAVE A RANGE FROM 4 TO 255. SEE NOTES IN TEXT.

39 4 E 0000

39 50 C800 0 0 03 Turn on recorder

39 54 4130 3E3 0

39 53 4200 0000

39 50 0800 0004 Print low value

39 60 4130 3E8 0

39 64 4130 3936 Continue for 'v, 8 sec.

39 68 0300 OOFF

39 60 4 130 3 Eo C Print hiah value

39 70 4 130 39 i;. 6 Continue for a- 8 sec.

39 74 0799 Initialize index counter (R9)

39 7 6 43 39 0 63 0 [(3978) + (R9)] -y (R3)

39 7-^ CE30 0000 Shift (R3) rinht arithmetic Drooer number of bits

39 7£ 4 3 2 0 39 o E If number is oositive, continue: otherwise branch

39 £2 0 53 0 COFO Comoare numDpr with maximum value

39 8 6 4280 39SE If less than maximum add bias

398 P. OS 3 0 OOFO If Greater than or equal max, replace no. with maximum

398 E CA30 OOOF Add bias

399 2 0803

399 4 4130 3E8 0 Plot b lased va 1 ue

39 9 8 CA9 0 0002 — 3990 0590 0400 Increment index counter, comoare with limit, continue

39 AO 428 0 39 76 i f (R9) < 1 imit.

39 A4 C800 0002

39 A3 4 130 3E3 0 Turn off recorder

39 AC 4300 3030 Return to monitor

3930 0000

3932 0000

39 B4 0000

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

39 3A 0800 0000

393E 08D0 000 1 39 0 2 03 EO FFFO

39 0 6 0100 3906

39 0A 0330 39 74

39 OE 0303

66
39 DO

39 D2

39D^

39 CS

39 DC

39 EO

39 £2

39 E 6

39 ES

39 EC

39 EE

39 F2

39 F4

39 F8

39 FA

39 FE

3A00

3A04

3r 08

3A0C

3h0£

3a 12

3A1^

3A18

3A1A

3A1E

3a20

3a2^4 OA 2 6

3a £ A

:a2.C

3A3 0

3a3-a

3a 3 3

JA. ' i 0

3A4 6

3A4A

3A4E

3A52

3A5 6

3A58

3a5C

3AeO

3A6A

3A63

3A6C

3A7 0

3A7 2

3A7 6

aA7A

3A7E

>

0000

COOO

4030

C3A0

C8 50

0 IBA

CS50

OIBA

C850

OIBA

C350

0 13A

C850

OIBA

C3B0

030B

4030

C3A0

C850

C 13A

C8 5C

OIBA

CS 50

OIBA

CS5C

0 1 BA

C8 50

OIBA

C330

0303

3^?C

C5..0

C35C

0 IBA

CS50

0 i BA

C5 50

OIBA

4300

3A4A

3A4E

3A6E

0001

4030

4 IBC

4130

C850

4130

C830

030B

3A72

3A7 6

3 A 7 A

3A7E

39 FC

3 14A

4D45

4 14E

2041

4 120

3D20

1704

3A23

3 14A

5354

4420

4445

5620

3D20

1 704

O I 4.H

4 5 52

5£4F

3C3C

3A4C

4030

CA50

3A6E

3 14A

3 110

4n4D

3 1 4A

0 IDO

3A74

3 A 78

3A7C

4000

(39D4-39FE)

lECTJ

= ROUTINE TO PRINT AT TTY "MEAN AA ="

(3A00-3A2A)

LECTJ

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

(3A30-3A48)

lECT]

= PROGRAM TO PRINT "FRKOR" THE^'J RETURN TO MONITOR

(3A50-3A70)

LECT]

ROUTINE.TO PRINT POWER OF TEN ENTERED AT UNITS OUERY

FOR STEPS AND SAME + (-1) FOR ROUGHNESS AND ALSO TO

PRINT "MM".

67
3A4 0 C8 50 5220

0 IBA

3A4 6 4300 308 0

3A4A 3A4A 3A4C

3A^E 3A4E 4030

3A52 3A6E CA50

3A5 6 0001

3A58 40B0 3A 6E

3A5C 4 1 BO 3 1 4A

3A60 4 1 BO 3 110

3A64 C8 50 4D4D

3A68 4 1 BO 3 1 4A

3A6C C8fi0 0 1 DO

3A70 030B

3A7 2 3A72 3 A 74

3A7 6 3A7 6 3 A 78

3A7A 3A7 A 3A7C

3A7E 3A7E 4000 •"1 W w w 3A8 2 3AB 6 40 10

3A8 6 3 ABA 4020

3A3 A 3ABE 403 0

3A8 E 3AC2 4 08 0

3A9 2 3AG 6 4 0£ 0

3A9 6 3ACA 40F0

3A9 A 3ACE 08 FO

3A9E 0002

3AA0 08 00 003 F

3AA. 4 4 1 BO 3E3 0

3AA-8 4 1 BO 3 F44

3AAC 48 20 005 2

3i-iZj 0 4 1 BO O iZ- i" 0

3i-xiD i4 08 00 0 03 A

3AB8 08 1 0 004B

3ASC 08 20 EOOO

3AGO 03 3 0 OOC 6

3A C 4 CoS 0 0003

3i-i C 3 C3.'- 0

3ACC ca FO 0002

3ADO 0200 3 A D 4

3AD4 8 000 303 0

3AD8 0700

3ADA 4000 0034

3ADE 08 00 3A8 0

3AE2 4000 003 6

3AE6 4300 308 0

3AEA 0000

3AEC 0000

3AEE 0000

3AF0 0004

3AF2 0630

3AF4 0 63 5

3AF6 43 00 28 5A

3a fa 0000

3AFC 0000

3AFE 0000

3B00 08 00 4 1 BO

4nnn

3B08 43 00 3C8A

Load R space

Pri nt

Return to monitor

(3A50-3A70) = PRINT MM AND INCREASE POWER OF 1 0 BY I I F FOR AA

(REPEAT OF PREVIOUS ITEM)

Print power of 10

Print SP

Load MM

Pri nt

Return to main program

REMAINDER OF PROGRAMS AND ROUTINES WRITTEN

(3A80-3AD7) = Y PHI I IP ^^JF'N

LLEGAL INSlRUCi TON HANDLER

Save 0 V Save 1 Save 2

- - Save 3

Save 8

Save B

Save F ~

"2" to F Load ? " "7"' Print

CR-LF ' ^ ;". ' "

Load old PSW address __ ^_

Print 4 ~ Restore 0

Restore I Restore 2

Restore 3 ^ "

Restore 8

Restore B - . —

Restore F Load PSW

" " "

' PSW - Wait State - to monitor

(3AD8-3AE9) = INITIALIZE ILLEGAL INSTRUCTION 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 IS (T)

TO STOP ANNOTATOR COMMAND IS (U)

MONITOR CONTENTS DURING ANNOTATION AT 3DA8 ARE CHANGED

To mess up print routine

Store

To mo n i to r

68
3E0C COCO

350E 0000

3310 C300 4200

3614 4000 3 DAS

3318 4300 3C3A

3B1C 0000

35 IE 0000

3320 C800 0089

3324 4130 3E3 0

3328 4130 3E3A

332C C500 OOSD

3330 4330 3340

3334 C500 OOFF

3133 4330 3 DAG

333 C 4300 3328

3340 0800 0 0 OA

3344 4130 3E8 0

3348 4300 3320

334C 0000

334E 0000

3350 4030 337A

3354 4030 335C

3358 07CC

33 5

A

D30C 003E

3B5E 0800

3B60 4330 3374

33 64 4130 3E8 0

3B 68 CACO 0001

3B6C C5C0 0020

337 0 423 0 335A

3374 4130 3F44

3£73 03 JC

337C 0303

3B7E 0000

338 0 C8A0 3ES0

5 33 4 0700

538 6 4 1^0 2 F 2 6

3£ J A 03 GO 3 F3 0

538 E C3E0 3FGF

339 2 D30G 0000

3B9 6 013A

3fl98 C 100 339 2

339 0 C8C0 0001

3BA0 C8E0 0010

33A4 0700

33A 6 0 ISA

3BA8 C 100 33A6

3BAG C800 OOFF

333

0

OIBA

3332 08 1 5

3B34 4100 3BDE

3B38 08 14

3B3A 4100 33DE

333

E

0799

330 0 08C5

3BC2 08 E4

3BG4 D30G 0000

3BC8 0790

(5EI0-3BIA) = STOP ANIJOTATOR

(3B20-3E4A) =

No-op to fix orint routine

Store

To monitor

ANNOTATOR

Load Tab

Print

Ask for input

Compare with CR

I f equa I , new I i ne Compare with rubout

If equal, back to print routine

Otherwise, loop for another character

Load LF

Print ^

Jump to tab

(3B50-3B7D) = PRINT 32 CHARACTERS STARTING

(3Ba0-3BCD) =

FROM MMY STORED IN ASCI

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 wi th limit

Loop i f less than limit

CR-LF

Restore return

ROUTINE FOR PUNCHING AT TTY HEXADECIMAL FORM OF MMY

CONTENTS FROM ADDRESS IN (R5) TO (R4)

Address for punch subroutine

Clear C °'jnch 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 address to I Punch

Clear 9 for Hashsum

Start address to C

Final address to E Fetch byte of text

Update Hashsum

69
pi 1 PA Punch

pw Xt pw nU OT -PZi U ^4 ! opipi "for npvi" h\7i"p

O U 7 Al 1 "fpy+ nunphpH Hr^^h^nnn +n 0

U 1 OH Pi 1 or* h

t\ n Zi n 7 n n — - - - P 1 par 0

Zl 1 ^Pl FP A Punrh hlr^nk Ipr^dpr

3BDA A3 00 3CSA (3BDE--3BEB) ^ LJ L_ / = ROUTINF TO PUNCH Anr)RF«^<^ FROM (RM

.5 n P uo U 1

.. ., r\uui AHHr"PCQ C-D-D IiiiikJ rrt*!^ 0w

Ox:) c. u

PuPuPiu nu nyj nU OPUO ^hiff n rlnht R

'

U 1 CH

3BE6 9 210 — Bottom ha I f to 0

Pl 1 A A Pi 1 HP h 33 EA 030C Exit

PIunnu

n

nu

n

Piu

Pi — w w w

, .... n\j n\j n<j nyj AF9 nU nU nU PIw

-•- —

"^K FZi n\jn nn\j nnyj

Pi

nKj —• — ' — \j \j yj w

\j ^ \j \j '^H FA n\J n\J p,\J 0KJ V ^UwU jujr J = RPllTIIMF TP) RFAn "^7 PHARAPTFRc; AT TTY AMD ^TPlPF IM

ozp r u 0VJ 0U onw U Ac;PI 1 FPlRM 1 Ki MMY c:TART 1 MP AT TWF APlDPFCIC; |M ( P"^ ^ FF U U w U w?rw noW w /I Pi Pi T p T r o u u ^^\ic^ r"0't"iir*n ocj vc 1 t; I u r 1

1

zi^ pU O nw O'^PU 1 fl X u OlUlt; Tlibl aUUicbb 111 blUit; IllbllUUI lUII PRwC Pw Pw PIU nU X

1 F£1. 1 ndsx

3nW W OfV^'

• - p 1 par n '

" w 1 c;a 1 U

and F *-i \J LJ \J noR U O J F U 1 cd r u d 1 a b pdUc ...

C, -i P f1 0V-.' P 0VJ ? w) U U 1 1 dU 1 ^ 3C 1 6 Zi 1 f' \J3 OOF \J \J RR 1 ^ r^^c 1 "f" 1 \/o r> r* 7or~A

Zi f'w o 0w O3PPP U £- u Q*^'^f~£i Pif"c~"^ "a^(^f"^c^c" in c'^^fo ir^c"T*r"ii/^'T"i ^ n w W 1 Ij w ^ 'J A KCaG one CndPa^Tcr

Ow p. R Pi n U UO JJ PR? UK

:

•-i vJ \J vJ 3P 3 A . . ... . ..

I T SO, reTurn ,

• ' ^

3C2A D20D 0 C'^ F oTore unaracTsr

oC 2£ 0 0 C 1

1 ^ F~ '~i ^ "T" 1 /~\ sj" 30 32 C 5 D C 0C2G oO i 1 i U c> t tr iV 1 III 1 1 n 1 1 ! w V w W O3Pw X1 XLF

- - - LOO p IT (ebb MldD lirull

W O A-/ u P H 7 P KeSTOfG rOTurn

W"^rW W3 X-j F n\J Oh\J Lj PwtX i +1 T WW *-* w Kj Kj \j yj

- - ROIITIMP FPR PRIMTINP; AT TTY HFXAnFriN'AI FORM PDNTFNTS

wW ^ nopn yu \j yj yu OF MMY FROM AnnRFc;^: im ( R5 ^ TO ADHRF'^'^ IN ( P4

)

Ur Plr 1 I r r\Ul*l AUUinCOw \\^ KWJ l \yj mUL-TnCOO iin vrv*t/ wW ^ ^ w l-* U w

3nzi WW *T w Zl 1 P Pi *-i X X-/ U FZiZi PR-I UiA L Fr WW Hr\ OP. UO PC w —-~ nUUicbb puiillci TiUiTI J ItilU ^ WO '^l Zl 1 P P o

'5 F FPl X- r u -- P=> Ua 1

1 11 Prr r

!

1 n+11 1 AH WW O KJ ppWW Pin U U 0yj 0u x-t 00u

.

1 AsH ^P

Ow Zi*4 X

1 oAHU O^ VPXIO Ou Prln+ riiril. Pi\/oc olVcb rlrMiKlo vJUUUIt; cn^^^o bpdUc P^'t'f^r' dilci ^HHr~P'^Q ouuicoo

TP Pf? UO XLU FP pu pu nu 7/ \ 1 1 T u imo c. UO riiciiib ut u die iiui ubcu

TP f^P OV.^ w w CP. UO OOu u HPU U A Pi i-i U 1 A?»H c;P LUd U or oU dU /I 1 Q A o Lo U

- rP 1 nT

'^P AZl *40 IlPOC. O^ oooo u u u u rercii Dyic rroni nuurtJbb in -> '^P AP! CO Zl 1 Pi oT X-F FPr (. Pr- 1 n+ A r r 1 n 1 H

3P, f^C OA F ... . 1 ilU 1 cillt; 111 J OO vJ XI. oIPu o^Pu Loop Tor riuxi oy i c 3C72 V »^ "w* "-t _.. PKo^U UilcUrS ^TUir\r Pif-io't' pi MM 1

1 imi^ inii 1 3C7A i^38 0 3C8 A If 1 imi+ no to disDatcher

3C73 A1£0 3EE0 If not, check panel button 15

70
3C7C 4330 3C46 If button not pushed, print another line; otherwise

3C8 0 C80C 0C20 (SEE 3D04) continue to this statement which is entrance to

3C8A C8F0 0002 TTY device number monitor

3C88 9EF0 Output command

3CSA 4130 3F44 CR-LF

3C8E C8CC OOBE Load > 3C9 2 41B0 3E8 0 Print

3C9 6 41£0 3ESA Get character from TTY

3C9A 07CC Clear C - start index

3C9C C8D0 0001 1 ncrement

3CA0 C8E0 OOIE Last i ndex

3CA4 D3 1C 3DE0 Fetch byte from command table

3CA8 0510 Compare with input byte

3CAA 433 0 3CB6 BR. if equal

3CAE COCO 3CC0 BR. If end of table reached

3CB2 4300 3CA4 Loop for next character

3CB6 CDCO OCO 1 Command found! Shift C left 1 to get index

3C£A 48BC 3E10 Fetch address from jump table into B

3CBE 03 OP. Jump indirect through B

3CC0 41B0 3EA4 No command found, was data, c.o ASCII -Hex

3CC4 CD40 0004 Shift 4 left 4

3CC8 0 64 1 Or new data in

3CCA 43 00 309 6 Go back for next character

3CCE 0000 (3CD0-3D03) = PRINT N/2 HALFWORDS STARTING WITH ADDR. IN (R3)

3CD0 40B0 3D00 Save return

3CD4 4030 3CDC Store AX2 in Load instruction

3CD8 07CC Clear C

3CDA 48 2 C 33 68 Load AX2(C) in 2

3CDE C8F0 0002 "2" to F 3CE2 4 IBG 5 ZFC Print 4 3C£ 6 Co CO OC-.O Load SP

3CEA 4130 3ED0 Print

3CEE CACO 0002 Increment index

3CF2 C5CC 0006 Compare with Limit, (3CF4) = N 3c: e 4 2.J 0 3 C E'i-i Loop if 1 &5s Than limit

4 130 EG 0 Print 2^d SP

3CFE C330 3b 50 Restore return

3D02 0303 Exit

3D04 OOCO (3C80-3CCD) = COMMAND INTERPRETER. ACCEPTS DATA INPUT FROM THE TTY

3D0 6 0000 AND BUFFERS IT IN R4. ACCEPTS COMMANDS FROM TTY AND CALLS

3D08 0000 APPROPRIATE ROUTINE TO SERVICE THEM.

3D0A 0000

3D0C OOCO (3DI0-3DD5) = SERVICE ROUTINES FOR R, RO, 1, CR, SP, G, P AND W

3D0E 0000 COMMANDS FROM TTY

3D 10 03 54 *R SERVICE* Load 4 into 5, thereby setting address pointer

3D 12 0744 Clear 4 (Suppress leading zeroes on typein)

3D 14 4300 3 03 A Jump to dispatcher

3D18 035F *^UBOUT SERVICE* Decrement pointer by 2

3D1A C8 00 CODE Load Arrow

3D IE 4 IBO 3ES0 Pri nt _ ____ 3D22 4300 3D12 Jump to clear 4 and return

3D2 6 0A5F *l SERVICE* Increment pointer by 2 3D28 4300 3D12 Jump to clear 4 and return

3D2C 4045 0000 *CR SERVICE* Store 4 at location in 5 3D30 0A5F Increment pointer by 2

3D32 4300 3D12 Jump to clear 4 and return

3D3 6 4045 0000 *SP SERVICE* Store 4 at location in 5 3D3A 0A5F Increment pointer by 2
3D3C 074A Clear 4 3D3E 4300 309 6 Return to dispatcher without > 30^2 C540 3B8 0 SERVICE* Is address > monitor start?

3DA6 A2S0 3D52 If it is, jump

3D4A C5/10 3000 Address > monitor end?

3DAE A23 0 309 6 If so, jump to dispatcher without > 3D52 AlBO 3F44 If not, cal 1 CR-LF

3D 5 6 C800 0037 Load bel

1

3D5A 41B0 3E3 0 Print

3D5E 41B0 3EE0 Check Panel Button 15

3D62 4330 3D5E Loop waiting for button

3D66 0304 Jump to address in 4

3D 68 4 IBO 3F44 *P SERVICES* Cat 1 CR-LF

3D6C 0825 Address pointer into R2 to be printed

3D6E 41B0 3EF0 Print 4 . 3D72 0800 0 0 AO Load SP

3D7 6 41B0 3E80 Print

3D7A 48 2 5 0000 Fetch ha If word at pointer into R2

3D7E OS 12 Also into Rl

3DS0 C410 FOOO Strip top 4 bits for apcode check

3D8 4 4330 3D9E Jump if 0. was halfword instruction

3D88 0510 9000 Compare to 9

3D3C 4330 3D9E Jump if 9. was halfword instruction

3D9 0 4130 3EF0 Print 4

3D9 4 0A5F Increment pointer

3D9 6 0800 OOAO Load SP

3D9A 4130 3E8 0 Print

3D9E 48 2 5 0000 Fetch halfv/ord at pointer into R2

3DA2 41B0 3EF0 • P.r i nt 4

3DA6 0A5F Increment pointer

3DA3 4200 3B20 To annotatcr (no-operation normally)

3DAC 0554 Have we reached prinr limit?*

3DAE 4330 3D36 If not continue, otherwise branch to print last line

3D£2 41B0 3EE0 If not, is panel button 15 pushed

3D3 6 4330 5D68 If not, cat next line of print

3DoA 4300 3 03 A If button Dushed or at print limit, return to dissatcno

3D3Z 0200 SERV ICE*

3DC0 4 IBO 3F44 CR-LF

3DC4 03 2 5 (R5) ^ R2

3DC6 41B0 3EF0 Print 4 (current address pointer)

3DCA 0800 OOAO Load SP3DCE 41B0 3ES0 Pri nt- 3DD2 4300 309 6 Return to dispatcher without > 3DD6 0000 _ „ „ _ TM „

3DC8 000 0

' " '' " ^

' "' 3DDA 0000 _ 3DDC 0000

3DDE 0000 (3DEO-3EOF) = STORAGE FOR MONITOR COMMAND TABLE

3DE0 8DFF A050 CR, RO, SP, P

3DE4 D247 09 OA R, G, 1, LF

3DE8 BED4 53 5 5 >

»

T, S, U

3DEC 4BD7 0000 K, W, L, BLANK

3DF0 48 OA 4D56 H, J, M. V 3DF4 D1D3 A6A9 0, X, &, ) 3DF8 28 59 5A4E (, Y, Z, N

3DFC CF21 A300 0, !, #

3E00 0000

3E02 0000

72
3E0A 0000

3E0 6 0000

3E0S 0000

3E0A 0000 (Modified by ECT for use by surface neasurement

3E0C 0000

3E0E 0000 (3EIC-3E6F) = JUkF table for COr"-'ANDS (SEE 3CA4-3CBE)

3E10 3D2C 3D1S CR, RO

3EU 3D36 3063 SP, P

3E15 3D10 3D42 R, G J - Amplitude density function

3E1C 3D26 3 03 A 1 , LF V - Autocorrelation function

3E20 3080 3E00 >, T H - Steps

3E24 0260 S 0 - Roughness

3112 6 3B1 0 333 0 U, K 5 - Ca I i brat ion

3E2A 3DC0 3046 W, L Y - Wavelenath

3E2E 309 6 01 7E BLANK, H M - Mean and Standard Deviation

3E32 3800 ODOO j , M X - Clear (1 000-3000)

3E3 6 OCOO V Z - Plot ( I000-30CG)

3E38 019E 0

3E3A 3900 3 ADS A , & 3E3E 3CSA 3 08 A ),(

3E^2 CEOO Y

3E44 39 18 3C8A Z, N 3E43 3C8A 3C3A 0, ! ^ . 3E4C 3C8A 3 OS A

3E50 3C3A 3C8A -

- 3E54 3 OS A 3C3A

3E58 3 08 A 3 08 A

3E5C 3CS A 3 03 A

3E60 3 08 A 3 Co A

3E64 3 08 A 303 A

3Ec5 3 C 3 A L o P. 3E6C 3C8A 3CSA

3E7 0 0000

3E72 4200 0000

5E7 6 -'12 0 0 G C C 0

cE7a OCOO

oE7C 0000

3E7E ooco

3E8 0 4300 3r60 PRINT ONE CHARACTER MOVED TO 3F60, JUMP THERE

3E8 4 0000

3E8 6 0000 (3E8A-3E9A) = READ ONE CHARACTER, WAITS FOR DATA AT TTY, PUTS

3E88 0000 IN RO

3E8A C830 00A4 Waits for data from TTY, puts it in RO

3E8E 9EF8 Unblock, Read, Disable

3E9 0 9DF8 Sense States

3E9 2 0888 Check, Status, If zero, data is ready

3E9 4 4230 3E9 0 Loop if not :^ero

3E93 9BF0 Read data

3E9A 030B Exit

3E9C 0000

3E9E 0000

3EA0 0000 (3EA4-3EC5) = CONVERT ASCII BYTE IN RO TO HEX IN Rl

3EA2 0000

3EAA 08 1 0 Input byte to Rl 3EA6 04 1 0 0070 Pick off bits 9, 10, II 3EAA 0510 0040 Are they 1,0,0?

3EAE 4330 3EBA If so. Letter between A and 0, BR

3EB2 08 10 If not, its a number. Erina in byte aaain.
3E3^ C410 OOOF

3EB8 030B

3EBA 08 10

3EBC CAl 0 0009

3EC0 C410 OOOF

3EC4 0303

3EC6 0000

3ECS 03 10

3ECA CBl 0 0009

3ECE 4220 3EDA

3ED2 C600 0030

3ED6 08 10

3EJ8 030B

3EDA C610 OOCO

3EDE 0303

3EE0 C8F0 0001

3EE4 9SF0

3EE6 C8F0 0002

3EEA C400 0001

3EEE 030B

3EF0 0733

3EF2 4030 3F20

3EF6 0802

3EF8 C400 FOOO

3EFC CCOO OOOC

3F00 4130 3ECS

3F04 08 01

3F06 4 130 3E3 0

3F0A 03 03

3F0C C3C0 0006

3F1 0 43 1 0 3r 1 Z

3F14 0A3F

3F1 6 CD20 0004

3F1A 4300 3EF6

3F1 E C330 3D9 4

372 2 0303

3f 24 0000

3F2 6 4030 3F3E

3F2A 07CC

3F2C C8D0 000 1 3F3 0 C8E0 0043

3F34 4130 3E8 0

3F38 CICO 3F3 4

3F3C C830 33DA

3F40 0303

3F42 0000

3F44 40B0 3F5A

3F/i8 0800 003 D

3F4C 41B0 3ES0

3F50 0800 008A

3F54 4 130 3E80

3F58 C8B0 3D6C

3F5C 0303

3F5E 0000

3F60 C880 00A8

3F64 9EF8

3F66 9DF8

3F68 4280 3F60

(5EC8-3EDF) =

Bits 12 thru 15 in I. This Is the answer.

Exit

Letter. Bring in byte again

Add 9 (Since a comes in as "4 1")

Bits 12 thru 15 in I. This is the answer.

Exit

CONVERT HEX CHAR, IN RO TO ASCII BYTE IN Rl

Pick up char, put in I, subtract 9

If neg, number between 0 and 9

Append 'BO' to make ASCII

was between A 'CO' and exit

F (Panel Dev.

and F. Take subtracted value

No. )

ast bit zero (Button 15^ sets condition code

Put in I as output.

Exit

Number

Append

. _ r 'I' to

Read panel

'2' to F Check for

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-ASCI I _

Result in 0

""'

'

Print

Ge+ 3 into 0

"""^

Subtract 6 (Count Limit)

It exceeded, exit

Otherwise, increment 3 by 2

Shift left 4 to get second character

Loop back to orint more Restore Return

Ex i t

(5F26-3F4I) = LEADER GENERATOR FOR TAPE PUNCHING

Store return

(3F44-3F5D)

CI ear C

Put '

I ' Put '48'

Print

Loop and

Restore

Exit

CARRIAGE RETURN-LINE

Save return

Load CR

count

return

FEED SERVICE

(3F60-3FCF)

Print

Load LF

Print

Restore Exit

Exit

PRINT I CHARACTER FROM (RO)

Unblock, write, disable

Output command ^ Sense status

Loop on TTY busy

74
3F6C

3F6E

3F7 0

3F72

3F74

3F7 6

3F78

3F7A

3F7C

3F7E

3F8 0

3F8 4

3F8 6

3F8A

3FSE

3F92

3F9'^i

3F98

3F9A

3F9C

3F9E

3FA0

3FA4

3 FAB

3 FAA

3FAC

3FAE

3FB2

3Fis6

3FiB3

3F£A

%^ £^ Z-i 3FC0

3FC2

3FC4

;

• o c

3FCC

3FCE

3FD0

3FDA

3FD8

3FDC

3FEC

3FE4

3FE8

3FEC

3FF0

3FF4

3FF8

3FFC

^000

>

3FB2

OOFF

3F84

3FC2

3FC2

9AF0

0303

0000

0000

0000

0000

0000

0000

0000

0000

C8 5 0

0135

0500

4230

4100

08 24

4100

0799

01B5

0':'90

9A39

D202

C120

0135

0790

9A39

4300

DEAO

9 DAS

OS 8 8

4250

9^A0

0303

0135

08 40

CDi.O COOS

0 135

9204

030C

3FD0

3FD4

3FD8

3FDC

3FE0

3FE4

3 FEo

3FEC

3FF0

3FF4

3FF8

3FFC

0000

Write data

Exit

(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, '2' IN A, AND '94' IN 0079

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 I ights

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 i n 4

0000

3F9A

3CS0

00 79 *GET BYTE FROM

Shift 4

Get r.exl Put it i Exit

I e 1

1- byte,

n 4

OD 13 I f cf address

Bottom ha I f of

3FD2

3FD6

3 FDA

3FDE

3FE2

3FE6

3FEA

3FEE

3FF2

3FF6

3FFA

FFFF

USCOMM-NBS-DC 75

NBS-lUA (REV. 7-73)

U.S. DEPT. OF COMM.

BIBLIOGRAPHIC DATA

SHEET

1. I'MM.K A 1 ll A OK Kl- I'OK 1 NO.

NBSIR 75-924

2. Ciov 't Access ion No.

3. Recipient's Accession No.

4. Ti 1 l.l' .-KNn .si H 11 VIA-.

Evaluation, Revision and Application of the NBS Stylus/

ComDUter Svstem for Surface Roupiiness Measurement*

Mi nicomnuter Softv;are

5. Publication n.ue April 1975

Ua I eilUlIlLllIt^ lILIIMI v-OQC

7. ALTllORiS'i E. Clayton league

8. Performing Org.in. Report No.

9. PERFOR.MI.NG ORGANIZATION NAMh AND ADDRI-:SS NATIONAL BUREAU OF STANDARDS

DEPARTMENT OF COMMERCE

WASHINGTON, D.C. 20234

10. Project/Task/Work Unit No. 2131114

11. Contract/ Grant No.

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

same

13. Type of Report & Period

Covered

Final

14. Sponsoring Agency Code

15. SUPPLE.MENTARY NOTES

16. ABSTR.ACT (A 200-word or less factual summary of most si^ificant 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 fi'st letter of the first key word unless a proper name; separated by semicolons)

Minicomputer softv;are; Machine lan^age; Linear least-squares fit; Arithmetic average;

/i-Tplltude density function; Autocorrelation function; Surface texture measurement.

18. AVAILABILITY

^UnlimiieJ 19. SllCURllY CLASS

( Fills REPORT)

21. NO. Ol- PAt,i;S

[^~} For Official Distribution. Do Not Release to NTIS

UNCL ASSII IED

J Order From Sup. of Doc, U..^. Government

Vlashincton. D.C. 20402. SD ( .it. No. ( 1 ^ Printing Office 20. ,sl ( LKl 1 ^ ( LA.s.s (1 HIS PAGE)

22. Price

XX^^f'^i'"'' From N.ition.il rcchnical Int orni.it ion Springfield, Virijini.i 221*^1 Service (N I IS) UNr LASSIITED