Interview 7000 Series Technical Manual II Issue 4 Nov89

Interview_7000_Series_Technical_Manual_II_Issue_4_Nov89 Interview_7000_Series_Technical_Manual_II_Issue_4_Nov89

User Manual: manual pdf -FilePursuit

Open the PDF directly: View PDF PDF.
Page Count: 724

DownloadInterview 7000 Series Technical Manual II Issue 4 Nov89
Open PDF In BrowserView PDF
51

Data Flow

51 Data Flow

51-1

I

MPM

I

II
I

I

•

I'

L ____ _

I XI

II

nMlIlJ!

I( I

I

~~
Ml'M eU$

ClOeAlW$

r----------------•

I
I
I•
I
•

I

•

I L.J

I

FigUl'c 51-1 Block diagram of INTERVIEW

7000 Series hardware architecture.

51 Data Flow

51 Data Flow
Figure 51-1 is a block diagram showing the. components on each of the six types of logic
board in the INTERVIEW 7000 Series. The components on the TIM (Test Interface Module)
also are shown. Figure 51-2 indicates the flow of data among the various functional
components of the unit.

51.1

Two Types of CPU
The brain of the INTERVIEW is the Motorola 68010 processor on the CPM (Central
Processing Module). See Figure 51-1. The 68010 processor controls operations in
the unit not directly under control of the user program. 68010 operations include
fetching power-up software and initialization routines from the EPROM. controlling
disk I/O, and maintaining setup and statistics screens. The operating system in the
68010 is pSOS.
An Intel 80286 processor controls the operation of the MPM (Main Processor
Module), The MPM does
higher level processing of receive data. The board
also generates the transmit data to be sent out in emulate mode. The 80286 uses a
basic, multitasking real-time executive operating system.

an

An INTERVIEW 7000 and 7200 TURBO may have from one to three MPMs, each
with its own 80286 CPU. The INTERVIEW 7500 and 7700 TURBO always have
three MPMs.

51-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-10B

DTE/DCE

r---li

$->------,

TIM
' •••• ••V .

·'v.v.,........

w

••• ·w.wow .......

I LEDs&."",""!III~~--- ~:Ja

control
leads

z.WX,"X·.ZXI.W..

...
Bit-image
data playback

J
W......

RAM

'--

~

~

FEB
·.w.· ·.·.·.·w.w.w..•.•·

w ••

Record
bit-image
L.'===r=_=~ data. control
leads (if
if
Transfer
buffered) ,
and time
"
licks (if
enabled)_

m

~
.,.... ,~~

Transmitted
data anti
control
leads

Data. control
leads (if
buffered),
and time ticks
(if enabled)

DISK;';

~=

IPla,:.ok

Character-data

TRIGGER LOGIC
Program
and

"-"W~l _W~"._-.J

J

Character
data,
control
eads, and
time

OPERATOR
INTERFACE
68010 processor

CPM board

ticks:

record or
transfer

l.....+-

Display Keyboard Printer
. '.

. "''''..

.V,""

Remote 1~
§

..." .... .•. ' .. " . .'

~

FIgure 51-2 INTERVIEW 7000 Series functional diagram.

51-4

.•...., .

~~~

51 Data Flow

The 80286 operates on software located in the DRAM on the MPM. See
Figure 51-1. This software is the user program-setups. trigger menus. protocol
spreadsheet, and protocol state machines (layer packages)-translated and compiled
by the C:PM and loaded into the MPM. The program will tell the MPM how to
process the data, what trigger conditions to look for in the data stream, etc.
The CPM polls the MPM continuously to see if data is available to be output to the
printer or the plasma display. This data includes character data. trace data. prompts,
and values to be posted to the statistics screens.
While the CPM accesses the MPM on a regular basis. there is no access in the
reverse direction. That is, the user program running on the MPM has no direct
access to the CPM. The user cannot write to one of the menu screens, for example.

51.2 Front-End Buffer
Note in Figure 51-2 that the front-end buffer (FEB) lies squarely between the line
interface and (1) the recording medium and (2) the program logic on the MPM.
This means that control leads mayor may not be recorded and mayor may not be
seen by the trigger-menu and spreadsheet conditions-depending on the FEB setup
(see Section 7).
Once control leads and time ticks (that is, the original timing values) are recorded
alongside character data, they are locked in. Since the FEB is not on the playback
path for character data, FEB selections do not apply.
Bit-image data, however, does pass through the FEB during playback. Except for
the Idle Suppress field, FEB selections apply. This means that control leads and time
ticks. if recorded with the data. must be enabled in order for the program logic to
detect them.
Not only characters but also leads and time ticks. if enabled in the FEB setup, are
captured automatically in the display buffer (that is, the screen buffer or character
RAM).
Data, time ticks, and control leads are encoded in a special storage format by a
data-encoder chip on the FEB board. See Figure 51-1. The encoded data is
buffered to be sent to the PCM (Peripheral Control Module) for recording and to the
MPM for processing.

The encoding process is driven by clock pulses on the line interface. This means that
in the absence of external clock (or. if the INTERVIEW is emulating DCE. in the
absence' of internal clock). neither line data, time ticks nor EIA leads will be
recorded or presented to the receivers and to the program logic.

51-5

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

51-6

52 Program Main

52 Pro,gram Main
Sankey-selectable programming "tokens" entered by the user on the Protocol Spreadsheet are
translated automatically into C during the initial compiler phases after ~ is pressed. Trigger
Menu setups also' are translated into C. When the translation is complete, the compiler takes
over and converts the C code into object code. The C variables and routines used by the
translator are documented throughout this volume.
Briefly. the translator makes the fonewing conversions: it turns TESTs into tasks; STATE names
into labels; STATEs intO' waitlor clauses; CONDITiONS into wait/or expressions that include
event variables; and ACTIONS into statements and routines, also inside of wait/or clauses.
Then the translator creates a program main function that calls every task in the program.

52.1

Translating a Simple Test into C
Suppose that the following simple program, intended to sound the INIERVIEW's
alarm at 1 P.M .• has been entered on the Protocel Spreadsheet.
STATE:

sample1
CONDITIONS: TIME 1300
ACTIONS: ALARM

When the user presses E!]. roughly the foHowing C coding (with some extraneous
code removed for clarity) is generated and then compiled:
extern last_even1leliar_time_ol_day;
extern IIDlatile unsigned short crnt_time_ol_day;
task

{
main ()

{
state_sample]:

waitlor
{

}
}
}

} diest_O,
main ()
{
dtesl_O ();

}

52-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Note that the translator has assigned state_sample1 to a default TEST named dtest_O.
It converted the TEST into a task and placed state_sample] inside of the task. Then
it created a program main function and used the program main to can every test/task
in the program. The tasks appear in the task list in the same order in which they
appear in the spreadsheet program. In this instance there was only one task to call.
H you try to enter the program above on the spreadsheet entirely in ·C, in the first
place you will have to surround it with a pair of curly braces. Then it will not
compile. The translator does not look inside of curly braces (except to expand
constants). It simply lifts up the braced C regions and places them intact into its
translation of the softkey portion of the program. before adding a program
main-even when, as in this instance, a program main already is included in a C
region. The two main functions conflict here, and the compiler issues the error
message, "Error 109: Function main redefined."
If we were to remove the main function from our C version, the program would
compile but it still would not work. Here's why. When the translator looks at a
program made up entirely of C code, it doesn't see anything. So it creates a
program main with a task-list that is empty. The task that is declared in the program

above (dlest_O) is never called.

.c

The rule, then, is that a Protocol Spreadsheet program containing tasks written in
must always have at least onesoftkey STATE (with its implied task) that calls all the
tasks.

52.2 A Minimum of One Softkey State
Here is a Protocol Spreadsheet test that works and yet has the minimum number of
softkey tokens-one. Note that we have given the task dtest_O a new name, since
the translator will declare the task-name dtest_O as the default test for our new
softkey state, task_list.
extern fast_event /evar_time_oj_day;
extern volatile unsigned short crnt_time_o/_day;
task
{

main ()
{

state sample}:
wait/or
{

Jevor_time_oJ_day && (crnt_time_oLday =: 1300):
{

}

}
} c_test;
STATE: task list

{

-

c_test ();

52-2

52 Program Main

And here is th~Lprogram as it is actually compiled. Note that the translator has
added a program main that calls du~st_O (which in tum calls c_test).
extern fast_nellt Jevar_time_oLday;
exte", volatile unsigned snort crnt_time_oLday;
task
{
main ()
{

state_samplel:
waitfor
{

}
}

} c_test;
task
{

main 0
{

state task list:

-

{

-

c_test ();
wait/or
{

,. This empty waitfor is automatically generated in any state
that does not contain a wal1for. .. I

}
}

} dlest 0;
main IT
{

52.3 Writing the Test Entirely In C
The INTERVIEW is equipped with tools-namely. the #pragma hook 0 preprocessor
directive and linkable-object (LOBJ) files-that make it possible to write a version of
the test completely in C.

NOTE: For more information on #pragma hook directives, see
Section 56.4. Refer also to Section 13.3(P) on linkable-object

files.

Write the following C code to an ASCII file (hook..;.ctest.s) using the Protocol
SpreadSheet editor's WRITE/U command. Then delete the code from the spreadsheet.
00 to the File Maintenance screen and and create a linkable-object file
(hook 'ctest.o) using the Compile command.

52-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

#pragma hook 0 "c_test();"
extern jast_eyent jevar_time_oj_day;
extern volatile unsigned short crnt_lime_o/_day;
task
{

main()
{

state_samplel:
wait/or
{

Jevar_time_oLday && (crnt_time_oLday

== 1300):

{

sound_alarm();
}
}

} c_test_task;
c_ust()
{

Notice that the "hook" is a call to the routine c_test. This routine's only purpose is
to start the task, c_test_task. A task name is always local to a linkable-object file
and never directly copied from it. If you try to call the task directly in the #pragma
hook 0 directive, therefore, the spreadsheet program (shown below) win not compile.
Since the task name is local to the file. the following error message will be displayed:
"Error 140: Unresolved reference c_test_task." The rule for including tasks in a
linkable-object file. then, is to let the #pragma hook 0 directive call a routine which
starts the task(s).
NOTE: Since task names are local to a file. the definition of
c_test_task also cannot be located in a referenced LOB] file
different from the one in which it is called.

The Protocol Spreadsheet program required to execute the test consists of a single
line:
OBJECT: "hook_ctest.o·

When translated. the program looks like this:
#pragmn object "hook_ctest.o"
mainO
{

Notice that the routine c test is located within the top-level program main.. The
hook text from a #pragm~ hook 0 directive is always put at the end of main's task
list. At this point, since c_test has not been previously declared, it is assumed to be
an extern function (not a task) that returns an into The linkable-object file(s)
referenced in the spreadsheet program will be searched for the routine's definition.

52-4

53 Regions in Spreag§f'if!et

C language can be embedded in a Protocol Spreadsheet program at several access points. A
C region can be opened at the top o~.the program. or in an OBJECT, CONSTANTS, LAYER,
TeST, STATE, CONDITIONS, or ACTIONS block.
At these points, simply begin the C region with an opening curly brace. Make your entry and
terminate it with a closing curly brace.
The remainder of this section describes C code blocks related to the spreadsheet components,
from largest to smallest.

53.1

Layer and Test
The main function of a task is the highest level function that may be programmed by
the user of the INTERVIEW 7000 Series. The keyword task in a C region
corresponds to the TEST: softkey token on the Protocol Spreadsheet. Typing TEST:
keyboatd_alarm on the spreadsheet is the equivalent of the following C coding:
task
{
#pragma layer J
main()
{
1*

declarations, state",iapels,and statements go here

*/

}
}
layerj _t£5t_keyboard_a.larm;

The 1l'.i'1'ERVIEW is multitasking, so more than onetaskltest may be defined. All
tasks/tests run concurrently if they are included in the task list created by the
translator when it generates the program main function. See Section 52, Program
Main, for an explanation of how this automatic program main is created.
Layers have no existence in C independent of the tasks that they contain. When a
user enters the LAYER: token on the spreadsheet followed by a layer number, the C
translator prefixes that number to the name of each task that follows. Note in the
example above that the test name keyboard_alarm was given a layer_I_test prefix.
Th,e C jtranslator also issued the preprocessor directive #pragma layer 1. The compiler
usesth~s layer declaration to distribute
pragm~ is an optimizing feature and is

tasks efficiently among 80286 processors. This
not strictly required in the body of the task.

The C 'translator does nothing else 'with the layer number other than convert it into a
prefix to the task name aM construet the#pragma directive.

53-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

The layer number does, of course, determine many of the branching softkey
selections that will be available to the user who is not programming in C. The C
programmer will find that none of the variables or routines mentioned in this manual
is specific to a particular layer. A variable or routine that is supplied, for example, by
the X.25 Layer 3 personality package (at the time that the package is loaded in via
the Layer Setup screen) will still be available inside of a task that nominany belongs
to Layer 1 or Layer 2.

Test

----......,...... task
{
main ()
{
static label current_state;
States declared here - - +

}
} layer_n_test_

name

Figure 53-1 C equivalent of a spreadsheet test.

53.2 State, Enter State, and Next State
A STATE on the Protocol Spreadsheet is a label in C, used as a target of a gO(O
statement. Typing STATE: alarm_on on the spreadsheet is the equivalent of this C
coding, placed inside of the braces that follow the task main:
static label current_state;
state alarm on:
current_state::: staU_olarm_on_loop;
{

,+

statements go here
goto (current_state);
state alarm on loop:
wait/or
-{

*,

/. condition clauses go here, each comprised of expression, colon (:), and statements ./

}

goto (current_state);

Note that the C translator has taken STATE: alarm_on on the Protocol Spreadsheet
and produced two state labels. state_alarm_on and state_alarm_on_loop. The first
state label is followed by statements that will be executed tinm.ediately upon entering
the state, The "loop"-state label always introduces a waitfor construction. Both states
end in a statem.ent to goto (current_state).

53-2

53 Regions in Spreadsheet

The translator's version of a state includes overhead to cover all cases, including
special cases. The loop state is not strictly required, and a streamlined version of the
basic state coding that eliminates the extra state will work in most instances:
static label current state;
state alarm on: -

-

{-

declarations and statements go here
waitlor
fi

"I

{

t* condition clauses go here, each comprised of expression, cOlon(;j, and statement(s) *1
}
goto (current_state):

Note these points about states created entirely by the programmer:
A goto statement cannot be used inside of a waitlor construction,
You must use a break statement to exit the waitfor construction.
You may dispense with the currentJtate variable and 80to a state label. in which
case. the opening and closing parens may be omitted.

(A) Declaring States
The state name followed by the colon (:) is itself a label declaration and does
not require an additional declaration.

(8) Enter State
The C translator puts a wait/or construction into every "loop'" state. If you want
a statement to be executed immediately without waiting for an event, you may
place that statement in the nonloop state, outside of the wait/or statement. The
following is an example of a state in which the sound_alarm routine is executed
immediately.
static label current_,Hate;
state alarm on:
current_staie:: stau._alarm_ol'l_loop;
{

sound_alarm();
goto (current_state);
state_alarm_on_loop:
wait/or
{
}

goto (current_state);
}

The example above is the eqUIvalent of this spreadsheet entry:
, STATE: alarm on
CONDITIONS: ENTER STATE
ACTIONS: ALARM
-

A hybrid version also may be created:

-

: STATE: alarm on

{

sound_alarm():
}

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

The sound,"",alarm function is executed immediately, since the translator places it
above the waitfor. When you enter a CONDITIONS: block on the spreadsheet, you
move inside a waitfor-unless you place your C region immediately following an
ENTER_STATE.

An ENTER_STATE condition may cause the translator to generate an if statement
in the nonloop state (above the waitfor state). Here is a spreadsheet example:
ST ATE: alarm on
CONDITIONS; ENTER STATE
COUNTER anyname EQ 3
ACTIONS: ALARM

This is the eversion:
static label current state;
state alarm on: current_state" state_Qlarm_on_loop;
{
if (counter_onyname.current == 3) saund_alarm();
gato (current_state);
state_alarm_on_loop:
waitfor
{
}

goro (current_state);

And here is a hybrid version:
STATE: alarm on

-

{

if (counter_anyname.current

== 3) sound_alarm ();

(C) Next State
The C translator supplies the statement "goto (current_state)" at the bottom of
every state that it codes. If current_state has been redefined and if the program
reaches the bottom of the state, the gOlo statement will redirect the program
toward a new state label. That is how the program is redirected into
state_alarm_on_loop in this translator's version of STATE: alarm_on:
static label current_state;
state alarm on:
current stai; = state alarm on loop;
{-

-

--

goto (current_state);
state_alarm _on_loop:
waitfor
{
}

goto (current_state);

53-4

53 Reqions in

State a

-

S'm~adsheet

.... state_a:
current_state = state_a_loop;

nonloop
state a

{
Declare variables
& functions here-..
Enter-State
Condition
and Action

..

if (expression) statement;
goto (current_state) :

state_aJoop:
waitfor
Event-related
Condition
--....

loop
state a

{

{

..

Action

expression:
statement;
current state
break; -

Next State

= state .z;
-

}
}

}

goto (current_state) :

Figure 53-2 Basic C structure of a spreadsheet state.

If the user wants to redefine current_state, he may do so in the nonloop state,
in ,:"hich case the loop (wait/or) state will .be bypassed:

static label current state;
state alarm on: current_state:: state_alarm_ofl_loop;
{

current_state = state...alarm..pJf;
goto (currentjttue);
stattl_alarm_oTi_loop:
waitfor
{
}

goto (current_state);
}

state_alarm_off:
etc. */

·1*

53-5

iNTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

The example above is the equivalent of this spreadsheet entry:
8T A TE: alarm on
CONDITIONS: ENTER STATE
NEXT STATE: alarm
STATE: alarm_off
-

off

The following hybrid code also will produce the same result. No break is
necessary. since the translator will place the C region above the wait/or.
STATE: alarm on

-

{

}
STATE: alarm_off

Or the user may redefine current3tate in the wait/or statement itself. inside the
loop state. The only way out of a waN/or statement is a break. so the translator
must furnish a break whenever it converts a NEXT_STATE action into C (unless,
as in the example above, the condition that triggered the NEXT_ ST ATE action was
ENTER_STATE, and consequently the program never entered the wait/or loop).
The following example uses NEXT_STATE:
STATE: alarm on
CONDITIONS: KEYBOARD • •
ACTIONS; ALARM
PROMPT ·press space bar--alarm now disabled"
NEXT 8T A TE: alarm off
8TATE: alarm off
CONDITIONS: KEYBOARD· •
ACTIONS: PROMPT 'press space bar--alarm is activated"
NEXT_STATE: alarm_on

Here is the eversion:
static label current_stare;
state alarm on;
current state .. state alarm on loop;
{-

-

--

goto (current_state);

state_alarm_on _loop;
waitfor
{

keyboard_new_anyj:.ey &:&: (keyboard_anY_Key":: • '):
{

sound alarm ();
displaYJrompt ("press space bar--alarm now disabled",;
current_state::: state_alarm_off;
break;
}
gore (currentjtate);
}

53-6

.state_alarm_off"
:current_state '" state_alarm...ofl_'oop;
{

gOto (current state):
state_alarmJ;/Lloop:
wait/or
{

- - -

keyboard
new any key && (k""ooard
any key
{
~,,--

== ' '):

displaYJTompt ("pres$space oar--alarm is actlvatl/d"};
-= state alann on;
break.; --

curreflt sf4;i.e

}

go to (curren tjtate) ;
}

Various hybrid versions flre pOS$~ble" Here is f,me:
5T ATIE: alarm on

CONDITIONS:
{
}

- - -'.

k.eyboard new any Icey .&& (keyboard any Icey ,.:; • ')
. .

.

-,":,

ACTIONS:
{
SDuna_alarm ();

displaYJTDmpt ("prIl.SS space .bar--aZarm noW disabled");
current_state,. sttt,te.;..(llarm_of!;
break;
'.

aisplaYJrompt ("press space bar--a/arm is.actiWlted");
current stafe .,.. Slate ·ttlarm on;
break; --

53.3 Conditions and Actions
When a condition is translated into C code by the INTERVIEW, the resulting
expression is enclosed in braces at the top of a waitfor statement. The only exception
to this ~e is the ENTER_STATE condition-see Section 53.2(B). above.
The conditional expression is fonowed by a colon and then by the statement that
constitutes the action to be taken when the condition is true. If more than one action
is coded. braces must be used tofarIn a Statement block. See Figure 53-3.
Typing ~ONOITIONS: KEYSOARD •• on the spreadsheet is the equivalent of this C
coding. placed inside of the brece.s that foliowthereserved word wait/or:

}

53-7

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

CONDITIONS:

...

expression:
{

ACTIONS;

...

statement a;
statement b;

condition
clause

}
Figure 53-3 The translator converts the Condition-and-Action "trigger" into a
condition clause inside of a wait/or statement.

(A) Multiple Condition Clauses
Following the semicolon that terminates the statement (or following the statement
block), you may enter ,another condition clause. These clauses correspond to
triggers on the Trigger menus or conditions-and-actions blocks inside a state on
the Protocol Spreadsheet. Multiple condition clauses may be placed inside of one
wait/or construction. (There is only one wait/or statement per state.)
Here is an example of a state with twO "triggers":
STATE: keyboard_prompt
CONDITIONS: KEYBOARD "1"
ACTIONS: ALARM
PROMPT ·You have pressed the 1 key.·
CONDITIONS: KEYBOARD "2"
ACTIONS: ALARM
PROMPT ·You have pressed the 2 key.'

A version in C would have two condition clauses:
state_keyboard...prompt:
wait/or

{
keyboard_new_ony_key &:&: (keyboard_a ny_key ::;= '1'):
{
sound alarm ();
displaY...prompt ("You have pressed the 1 key.");

}
keyboard_new_any_key &:&: (keyboard_a ny_key =: '2'):
{
sound alarm ();
display-prompt ("You have pressed the 2 key.");
}

}

If you are mixing spreadsheet tokens with C. place condition clauses inside of
ST ATE: blocks. Any C region at the top of a State block is placed above the
automatic wart/or statement. You must therefore supply your own wait/or word.
since a condition clause is syntactically valid only inside of a wait/or. An
example follows.

53-8

53 Regipns in Spreadsheet
,STATE: keyboard_prompt
:{
waitffJr
{
keyboard_new _anyjuy && (keyboard_any-"ey ='" •J'):
{
sound_alarm();
displaY"'prompt ("You have pressed the 1 k.ey. ");
}
1e:Yboard_new_ally.,.key&&: (keyboardjmy_key "'= 'Z·).~
sound_alarm ();
display...pu)mpt ("You have pressed the 2 by. "J;

}

A word of warning is in order. When your program executes this code, it will
find itself stuck in a wait/or statem~ntheneath the label state_keyboardyrompt.
If you want to exit this waitfor, you must execute a break in a statement block
in one of the condition clauses, Once you have broken outside of the wait/or,
yo~ may go/a another state.
If you add softkey CONOt.T10NS. ACTtONS, or NEXT_STATE blocks to the state
abOve, they. will be placed inside a different wait/or statement. the one that is
created automatically insideastatecaDed state_keYboardyrompt_loop. See

Section 53.2 (particularly Figure 53-2). What may lQok like a single state on the
spreadsheet really will be two different states whiC:l:l never are active at the same
time.

(8) Multiple Expressions
Expressions may be lOgically anded (&&) or ored(lJ) together inside a condition
elapse. Here is the spreadsheet version of a CONDITIONS block with two
extressions:

CONDITIONS: KEYBOARD -2"
FLAG keyboard d\$~led 0
ACTIONS: PROMPT ·You haYepressed the 2 key_'

In~ide

the condition clause in C. the translator supplies a double ampersand
(&&) 'to connect the keyboard expressions with the flag expression:

}

63-9

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Inside a CONDITIONS block, the translator is able to and a softkey condition
correctly with a C expression. Note that the user types the C expression without
a terminating colon. The translator will supply one later:
CONDITIONS: KEYBOARD "2"
{
flag_Keyboard_disabled. current""" 0
}
ACTIONS; PROMPT ·You have pressed the 2 key.'

The anding is also successful when the C expression is placed above the softkey
condition inside the CONDITIONS block:
CONDITIONS;
{
KEYBOARD "2"
ACTIONS: PROMPT -You have pressed the 2 key .•

If you want to insert a comment into a Conditions block. remember that the

translator does not look inside of C regions (except to expand constants). It will
take the comment and and it with the rest of the expressions in the Conditions
block. Since a comment is nota C expression, the program will not compile: see
Section 53.3(D). Note in the following example that a 1 has been inserted inside
the C region along with the comment in order to make the code compile and in
order to make the expression "true."
CONDITIONS:
{
This comment will be anded with the keyboard expression. ·1 1
}
KEYBOARD "2"
ACTIONS: PROMPT 'You have pressed the 2 key.'

,'*

(C) Event Variables
The translator converts most Conditions blocks on the Protocol Spreadsheet into
two or more expressions linked by the logical and operator (&&). The keyboard
condition in the examples above was typical: KEYBOARD "2" on the spreadsheet
became a pair of expressions logically anded in C.
The first expression, keyboard_lIew_any_key, is an event variable. Event
variables are very important in the INTERVIEW implementation of C. and the
programmer should observe the following rules of thumb:
1.

An event variable usually is paired with

a nonevent

variable.

At the

moment an event variable comes true in a wait/or construction, all nonevent
(or "status") variables attached to that event variable are evaluated for truth
or falsity. 'Whenever any keyboard key is struck. the event variable
keyboard_new_any_key comes true. At that moment, the nonevent
expression keyboard_a ny_key == '2' is evaluated to determine whether it is
true or false.

53-10

·53: A@Oiqns.in. Spreadsheet
2, jA wait for statement .must include at least one event expression. A walt/or
·statement without an event· variable will notcompHe. There must be some
event that might trattspireto cause the noneVent expressions to be evaluated.
3. An event variable may appear alone in an expression. It is possible (though
unusual) to have an event expression that is not anded with a nonevent
expression. WbentJ!lettan$lator converts CQNotTIONS: [)"rE GOOD_BCC into C,
for example, the resu~tingexpressionis this simple event variable:
jeya,Jd_b¢c_td;

4.A nonevent variable aiso may appear alone. It also is possible (though the
translator does not do this inside of wait/or statements) to have a nonevent
:expression that is not anded with an event expression-as long as there is an
event expression somewhere in the wait!oreonStrUction. The following
program will compile and work:
extern fast_eyel'lt keybo(lrd_l1ev1_altyjtey;
extern YOiatileul1sifned short k:eyboard_aI'lY_uy;
}

STATE :keyboafd•.Jlr¢mpt
CONDITIONS:
{

keyboard_",ewjlny_key && (byboard_any_key"'" '1')
}
ACTIONS: PROMPT ~YOlJ have pressed the 1 key .•
CONDITI·ONS:
{
keyboard any key ='" '2'

}

--

ACTIONS: PROMPT 'You have pressedtha2 key.

fl

==

In this example. ke:ybQard_any_key
'2' is not anded with an event
variable. As at re$Ult•. it· is attached· automatically tathe event variable
·keyboard_newJlny......byAl'tt) ·2*
ACTIONS: PROMPT "You have pressed the 2 key.·
{

The hybrid example as it stands will not allow you to declare routines and
variables, because the translator will place these declarations in a statement block
ben;eath the dispiaYJrompt routine. For declarations, move the C region to the
top of the Actions block;otuse do~ble braces to open a new statement block
lower down, since declarations are legal following the left brace that introduces
any compound statement.

53.4 Example of Complete C program
Some of the examples .tll th.e prevjous pages of this section were incomplete, in that
they included variables that we~e not deciared, or they lacked a softkey STATE that
could generate a proper program main. The foUowirig 15 an emended example that
compiles and runs. It includes many of the pieces tl:l3t formed the shorter examples
in· this slaction. It is written tor· the Protocol Spr~dsheet as completely as possible in
C. (Se~ Section 52.3 on howtOWrlte a program completely'in C.)
{
extern jasl_ewmt by/)oordJlew...;(ttt'Y_1r.ey;
extern volatile unSigned sh&rt keybfJard_anyj'ey;
task

{

mainO
{

static label current_state;
state alarm on:

current_state", stflte_data_length :: (pduJtr->data_length - 2);
signal (10 _dlJJrmtv);

The same updates of variables and the same signal would be generated if the user
called a send_dlyrmtv_above routine. as follows:
_set_maint_bufLbit (loyh_il_buff. &12Jelay_baton);
send_dlJJrmt,,_above (loyh_il_buff. 12Jelay_baton, lOJJh_sdu + 2. pduJJtr->data_length - 2,
Ox45) ;

The send_dlyrmtv_above routine requires an SDU size value. There is no
receive-path variable (equivalent to m_loyhjdu_size on the monitor path) that
maintains this value. Determine the SDU size from the data_length variable located
in the pdu-structure. In the examples above. pduytr is a structure pointer. The
SDU size. therefore. is referenced as pduytr->data_length. Refer to Section 63.1
for more information on the pdu structure.
NOTE: Do not use m_loyh_sdu_size for receive-path routines such
as send_dlyrmtv_above. It is not updated reliably at the same
moment that other receive-path variables are updated.
Ox45 is the code for a DL_DATA tND primitive.

55.4 Layer 1 Transmit
Line transmissions are accomplished through Ll transmit routines. Shown below is a
program that ends in an ll_il_transmit routine. This routine puts the data contents
(the service data unit or .. SDU." not the buffer header) of an IL buffer out onto the
line.
Note that there is a set of routines leading up to the transmit routine. This set of
routines is necessary to get a buffer. to start a linked list inside the buffer, and finally
to insert several chunks of data into the list before it is transmitted.
unsigned short bufnum;
unsigned short baton;
unsigned short list_hd_ofjset;
static unsigned char data[) '" "((FOX)) ";
static unsigned char pkt_hdr[3} = {OxlO,Ox07,O};
static unsigned char jrm_hdr(2) '" {Ox03, O};
int length;
unsigned short transmit_tag = 1;
}

55-4

55 Receiving and Transmitting Data
STATE: fox
CONDITIONS: 'KEYBOARD' ..
ACTIONS:
{
Jet..Jl_msLbuff(&bufnum,&baton);
_start..Jl_bufLlist(bufnum, &list_hd_offset);
length = sizeof( data) -1;
_insert_U_bufLlist_cnt(bufnum, Ust_hd_offstt. &data [OJ, length);
_insert..Jlj·>ujLlist_cnt(bujnum,list_hd_ojjset.&pkt_hdrfOj.3);
_insert..Jl_bufLlist_cnt(bufnum,list_hd_ojjset.&frm_hdr{Oj,2);
ll_il.:,.transmit(bufnum. baton, USf_hd_(If/set, transmit_tag);
)

The transmit string will look like this on the INTERVIEW's data display:
IS< "6 Et It "6 THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG 0123456789.!ID

(A) Segment Number
The ll_il_transmit routine required four arguments as input. First, it required
the'segment number of the IL buffer that was intended to be transmitted. This
number was supplied by the ..,Bet_il_msg_buJJ routine. and we called the number
bufnum. There are a total of sixteen numbered IL buffers available to the
program.

(B) Relay Baton
The second argument was the number of the "relay baton" or "maintain bit."
This relay baton was supplied by the Jet_il_msLbuff routine. and we called the
var~able that held the number baton. A relay baton is passed down automatically
with every send or transmit routine and serves to hold the buffer until it has
been processed by the next layer (or transmitted by Layer I). Then the baton is
freed.
There are sixteen numbered relay batons available jar each IL buffer. At the
moment that all sixteen batons (or maintain bits) are free, the buffer is returned
automatically to the pool of free IL buffers and its contents are no longer
avaHable to the program.
In many applications-X.25 Layer 2 and Layer 3 personality packages, for
example-an extra maintain bit is reserved (via the _set_maint_buff_bit routine)
each time a buffer is sent down. This extra maintain bit is held onto in case a
frame or packet must be resent, and is not freed (in a Jree_iCmsg_buff
routine) until the outstanding frame or packet has been acknowledged.

(C) List-Header Offset
In addition to buffer number and baton number. the ll_ii_transmit routine also
requires as input the offset from the stan of the buffer to the linked-list header.
This offset is supplied at the moment the linked list is started by the
start il buff list routine. In the program above we called this offset
~
list~hd_oJjset .

-

--

-

55-5

INTERVIEW 7000 Series Advanced Programming: ATLC 107-951 108

PDU

~

iLbuffer_number

~-

.......

"- '\

-- .... ,

--

data _start_offset
~~

--

-

\

"-

~

Pointer-List
IL BUFFER

\

'\
\

\

HEADER

I

DATA
list_header

list_node

-- ....

first_node_offset

.,.,

data_length

last_node_offset

./

I

I

list node

I
I

I
I

data _pOinter

!
I

dataJength

\
\

next_node_offset
\
'\.

I
",,~.>.

.;

/'

-......
/~

I

list_node

,

\

\

I
I
I
/

\

\

Internal
data

\
\

"\ \

\

I

(Layer 2
protocol info)

\
\

\

1/ ,
\

data_pointer

/

I
I

" "- \

.,....-- next_node_offset

\

\

sou

data_pointer

dataJength
~~

\

Internal
data
(Layer 3
protocol info)

n~",~t

I
\
\

\

\
"¢~..

External
data
(User data)

Figure 55-2 When an lL buffer is passed downward. the data-start offset gives the
location of the list header. This list header and the various pieces of the
transmission (the list nodes) are threaded together.

55-6

55 Receiving and Transmitting Data

Figure 55-2 illustrates how the list header ties the linked list together by
identifying the offsets to the first and last nodes. A list node is created by each
_insert_il_bufLlist_cnt or _append_iCbufLlist_cnt routine, The program in
Section 55.4 has three _insert_il_bufLlist3nt routines. The IL buffer that is
transmitted therefore has three list nodes.

(D) Transmit Tag
The fourth argument in the ll_il_transmit routine is a "transmit tag" that
determines the type of BCe to be appended to the transmission. This variable is
stored in the 32-byte header of each IL buffer. Refer to the structure it_buffer
in the table of OSI structures, Table 63-1.
A transmit tag of 1 means a good BCC and 2 means a bad BCC. 3 causes an
aborted transmission.

55.5 Passing a Buffer Between Tasks
At this point we need to modify our ll_il_transmit program to allow different
layers-which are simply separate concurrent tasks in the programming
architecture-to contribute list nodes to the lL buffer intended for transmission. The
resulting transmit string will be the same as before, but three different tasks will have
contributed data components to the transmitted buffer. In our new program, a Layer
4 task will provide the fox message, Layer 3 will provide the _insert_iCbuff_list_cnt
routine that references the 3-byte packet header, and Layer 2 will provide the insert
routine that references the 2-byte frame header.
How do the separate layer tasks communicate with each other so that the right buffer
is accepted at the moment it is handed down? They relay information in the same
way that tasks always communicate, by signals that are detected throughout the
program as event variables. When Layer 4 sends an IL buffer down in a
send_nJrmtv_below routine. an event variable at Layer 3 (up_nJrmtv. not shown in
the program below but implied nevertheless in the N_DATA REQ condition) comes
true and at the same time updates the variables up_n_il_buff and up_n_sdu. Layer 3
can use these variables to identify the new IL buffer and to determine the offset to
the list header in that buffer. With this information, Layer 3 can insert its own list
node into the buffer before passing it down to layer 2.
Here is the program. followed by a few explanatory comments:
unsigned short bUfnum;
unSigned short 14_bawn;
unsigned short 13_baton;
unSigned short 12_baton;
unsignelli short list_htl_offset;
static unsigned char data{] :: "((FOX» ";
static unsigned char pktjldr{3) :: {OxJO,Ox07.0};

55-7

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-10B
static unsigned char frm_hdr!2] = {Ox03,O};
int length;
extern volatile unsigned short up_n_il_buff;
extern volatile unsigned short up_dl_il_buff;
extern volatile unsigned short up_n_sdu;
extern volatile unsigned short up_dl_sdu;
}
LAYER: 4
STATE: fox
CONDITIONS: KEYBOARD· •
ACTIONS:
{
J.et _il_mS8_ buff( &bufnum. &14_baton);
_start_il_bufLlist(bufl'lum, &list_hd_offset) j
length =sizeof(data} -1;
_insert_il_bufLlist_cnt(bufl'lum,list_hd_offset, &data[O], length):
sen d_l'lJ1rm tll_below (bufl'lum, 14_baton.list_hd_offset.O. Ox64. 0);
}
LAYER: 3
ST A TE: packet_header
CONDITIONS: N_DATA REQ
ACTIONS:
{
_insert_il_buff_list_cl'l t (up _n_il_buff. up_n_sdu, &pkt_hdr[O1,3);
_st!t_maint_bufLbit(up_lI_il_buff, &13_baton);
send_dlJ1rmtll_below(up_l'l_il_buff. 13_baton,up_n_sdu, 0, Ox44 ,0);
}
LAYER: 2
ST ATE : frame_header
CONDITIONS: DL_DATA REQ
ACTIONS:
{
_inserUl_bufLlist_cnt(up_dl_il_buff, up_dl_sdu, &frm_hdr[O] , 2);
_set_maillt_bufLbit(up_ dl_il_buff. &12_baton);
sendJ1hJ1rmtll_below (up _dCil_buff, 12_baton, up_dl_sdu, 0, Ox24. 0);
}

In the send-primitive routines. the hex values 64. 44. and 24 identify the primitives
as data requests. See. for example. the values of up_nyrmtv_code in Table 63-4.
Note that there is no longer an ll_il_transmit routine in the program. When Layer 2
executes a sendyhyrmtv_below routine, Layer 1 handles the transmit function
automatically.
The sendyhyrmtv_below routine does not have a transmit-tag argument that allows
us to specify the Bee. Since the ll_il_transmit routine, which has a transmit-tag
input, is being handled automatically. it is not immediately clear how you would send
the transmit string with a bad Bee. Here is one way. Instead of the
sendyhyrmtv_below routine at Layer 2. use the ll_il_transmit routine as follows:

The 2 in the argument represents the transmit tag for a bad

55-8

Bee.

55 Receiving and Transmitting Data

If it seems strange to be using an ll_il_transmit routine at Layer 2, remember that

none of the variables or routines is really layer-specific, In C. layers are simply
concurrent tasks.
A "realistic" implementation of this program might be made somewhat more
complicated by two additional elements. One or more _openjpace_in_il_bulf
routines might be used so that. as far as possible, text data could be copied into the
buffer where it would then be erased when the buffer was freed. (One of the
advantages of IL buffers is that the space inside them can be recycled.)
Another complication is that for the same transmission, more than one linked list
might be started in a single buffer. The example under the _insert_iCbufLlist_cnt
routine in Section 63.3(A) shows Layer 2 accepting a buffer from Layer 3 and
starting a new linked list. This allows Layer 3 to reconstruct its original linked list in
case a packet-resend is needed.

55.6 Sample Transmit Program: Sync or Async Echo
This application monitors incoming data for text strings bounded by ~ and t;.: or ED. It
copies t,hese strings into an IL buffer and then echoes them back out onto the line,
preceded by two ASCII sync characters. The program will work in most data formats
as long as ASCII ~ and £X are included.
The program may be modified for EBCDIC l;,., ~. EX, and ea. Use received-character
variables levarJcvd_charJd and rcvd_charJd for data received on RD.
{

extern Jast_evtmt fevar Jcvd_char_td;
extern lIolatile unsigned short rcvd_char_td;
unsigned short number, length;
unsigned short ii_buffer_number, relay_baton, data_start_offset;
I,4nsigned char echo_string{lOOj '" {'!i,', '!i, '};
STATE: look for stx
CONDITIONS ;{
}
ACTIONS:
{
number = 2;
echo_string[number] '" rcvd_cha,_td;
number++:
}
NEXT ST ATE: construct echo string
STATE: construct_8cho_string CONDITIONS:
{
}

ACTIONS:
{

55-9

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

number++;
if ((rcM_char_ld == 'ex')

II

(rcvd_char_td==

J~'»

{

length = number;
}
}
CONDITIONS: RECEIVE GOOD BCC
NEXT_STATE: transmit_echo_string
ST A TE: transmit echo string
CONDITIONS:-ENTER STATE
ACTIONS:
{

Jet_il_msLbuff(&il_buffer_number, &relay_baton);
_slart_il_bu/Llist fiCbu/fer_number, &data_start_offset);
_insert_il_bufLIist_cnt(iI_buffer_number. data_start_offset, echo_sIring, length);
ll_il_transmit(il_buffer_number, relay_baton, datajtart_offset. 1);

55.7 Sample Transmit Program: BOP Echo
When Format: ::t:'~ti: is selected on the Line Setup screen, every frame that is
received at the line interface is placed in an IL buffer and passed up to Layer 2.
This sample program makes a pointer to the I-field in the most recent IL buffer
received at Layer 2, and then it echoes the data back out in the C equivalent of a
SEND INFO action. If you try this program, be sure to load the X.25 or SDLC package
at Layer 2.
char * dataJtr;
extern Yolatile unsigned short rClldJrame_buffjeg;
extern yo/a tile unsigned short rClldJrame_sdu_offset;
extern volatile unsigned short rClldJrame_sdu_size;
struct sendJrame_structure
{

unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned

char addr_type;
char frame_type;
char nr_type;
char ns_type;
char pJ_'ype;
char bcc_type;
char addr_value;
char cntrl_byte;
char nr_value;
char ns_yalue;

};
struct sendJrame_struclure frame;
unsigned short number, baton, offset;
}
LAYER: 2
STATE: echo
CONDITIONS: RCV INFO
ACTIONS:
{

dataJtr = (void • )(((long)rClldJrame_bufLseg« 16) t rClldJrame_sdu_offse/);
Jel_il_msg_buff(&number, &:.baton);
start iT buff list(number. &offset};
:insert_il_buff_list_cnt(number, offset, dataytr + 2. rClldJrame_sdu3ize - 2);
frame.bcc_type:: 1;
sendJrame(number. baton, offset. &frame);

}

55-10

56 C Basics

·56 C Basics

56-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

eet

**

LAYER: 1
TEST: bsc_one
(static label prev_state;)
STATE: po 11 i ng
CONDITIONS: RECEIVE ONE_OF It~EXIt
ACTIONS: SEND Sy~9../" GOOD_BCC
{prev_state = state_polling;}
NEXT_STATE: ack0
STATE: ack0
CONDITIONS: RECEIVE ONE_OF "lltEX"
ACTIONS: SEND "SYSY0L.70" GOOD_BCC
(current_state = prev_state;
break;
If

)

-'

Figure 56-1 Using C to return to the previous state.

56-2

56 C Basics

56 C Basics
C programming language as implemented in the INTERVIEW 7000 Series is based on the
current ANSI recommendations. It contains several extensions to the language which enhance
its utility in protOCol testing, notably multi-tasking.
C is intended as an aid to INTERVIEW users who have advanced programming knowledge.
A sophisticated programming tool. C can be applied to testing requirements which are not met
by Protocol Spreadsheet selections. C is useful, for instance. in the analysis and "intelligent"
manipulation of variable data strings anticipated within a complex protocoL Additional
applications of C are the creation of customized protocol and program trace displays.
Figure 56-1 provides a means of returning to whatever state was the former state, without you
the programmer knowing which state was previously active. This "go to previous state"
function is not a standard spreadsheet feature. The example employs Bisync protocol to
demonstrate the usefulness of this capability. The test begins in a state called polling. Here.
an ACKl is sent whenever the end of any received data is encountered. and the test passes to
the state called ackO. This time when the end of received data is encountered. an ACKO is
sent,and the test returns to whatever state it was in formerly.
The first C region is the declaration of the variable prevjtate, which allows the variable to be
used anywhere within the test. In the second C region. the variable prev_state is initialized to
the name of the active state. The -third C region shows the transition of the test to the
previously active state. Depending on the contents of the prev_state variable. the former state
could be one of any number of states. This capability means that, as the programmer
expands the simple test, the state ackO can be used again and again as a utility state from
which the test retums to the former state, removing the need for repetitive spreadsheet entry.

56.1

Notable Variations in C
The AR version of C varies in certain respects from the ANSI standard. Notable
exceptions to the standard are outlined below. A full set of implementation-defined
variations appear in Appendix K.

(A) Reserved Words
The following two reserved words, in addition to those covered in the ANSI
standard, are included in C:
ta_k
walt for

58-3

INTERVIEW 7000 Series Advanoed Programming: ATLC-107-951-10B

(8) Predeclared identifiers
The following type identifiers are always predeclared. They are not defined in
any #include files, nor are their definitions required in any program. Thus they
are part of the 11\TTERVIEW C lexicon. even though they are not reserved words
and therefore do not appear in the language summary in Appendix K.
event
fascevent
label

(C) Floating Point Notation
Since Floating Point Notation is not required in the protocol testing environment
and since corresponding calculations could degrade processing speed, floating
point notation is omitted from the AR implementation of C. Fixed point
calculations. however, are performed.

(0) Values Returned from C Functions
Functions declared within AR's implementation of C may only return values for
data types which are 1. 2, or 4 bytes long. Consequently. a function cannot
legally return most structure or union types.

56.2 Editing a C Program
Entries in C are made on the Protocol Spreadsheet, accessed from the Main Program
screen .. All editing functions available on the spreadsheet can be applied to C
coding. Refer to Section 26 for a description of these editing functions.

56.3 Error Reporting in C
. Most syntax errors made on the Protocol Spreadsheet are indicated by strike-through
of the text where the error occurs. This facilitates correction of entries as you create
a test.
Errors which appear in C coding are not indicated by the editor. However, when the
program is compiled (when you press ~). the errors will be noted. If there are
errors in the program. the INTERVIEW will automatically revert to the Protocol
Spreadsheet rather than run the program.

CA) Locating Errors
The cursor is automatically positioned near the first error when the INTERVIEW
reverts to the Protocol Spreadsheet. A diagnostic message about the error will
be displayed at the top (second line) of the screen. Errors pertaining to the

56-4

56 C Basics

general syntax of the spreadsheet are explained in text. Errors noted by the C
pre...processor or compiler are displayed as numbers, with explanatory text if the
filename syslerror_text is accessible at the moment on a disk. (The file should
always be accessible in units with hard disks.) These numbered messages are
listed in Appendix A3.
Press GO-ERR again to move down through the spreadsheet to the next error.
When you press GO-ERR and there are no more errors, the message "No More
Errors" will be displayed.

56.4 Preprocessor Directives
The INTERVIEW supports preprocessor directives #de/ine and #include. The full set
of ANSI preprocessor directives are supported on the INTERVIEW. Included among
these directives are #i/. #else. #ifde/. #i/ndef, and #undef. (Refer to the ANSI
Recommendation for a discussion of these directives.) Implementation-defined
#pragmas are also preprocessor directives. #pragma object and #pragma hook are
two of the AR #pragmas. As the name implies, preprocessor directives are processed
before the program in which they appear is compiled.
PreproC¢5sor directives are easy to recognize, since they are always preceded by a
pound sign (#). Spaces are Significant to the meaning of the directives, since other
delimiters are generally not used. Note also that a semi-colon cannot be used to
terminate a preprocessor directive. Instead. a directive is terminated by a hard
Carriage Return or some indicator of line continuation. Press 8 to terminate the
directive (no indication of the Return will appear on the screen). Type \ (backslash)
and press 8 at the end of the line on the screen to indicate that the directive
continues on the next line. You may also allow text to wrap to the next line by
continuing to type. (Wrapped lines are indicated on the screen by the highlighted
symbol •. )

(A) #deflne
The #define directive gives you the convenience of replacing frequently
referenced items with a text string of any length.
1.

Placement. A #define directive may be placed at the beginning of a logical
line anywhere in a legal C region. The eight valid positions for C regions on
the Protocol Spreadsheet are shown in Figure 53-4. The #define directive
may also be placed in a separate #include file. Use the #include directive as
explained in (B) to invoke the file and make the macro-substitutions it
indicates in your main program file.

56-5

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

2. Format. The directive follows this format:
#define identifier string
For example. if you enter the following line of code,

#define message The quick brown fox ., .. 12345
the identifier message (wherever it appears exactly as written in the file being
acted upon) is replaced in subsequent lines of code by the string The quick
brown fox .... 12345. The replacement. the macro-substitution. is performed
before the code is compiled. When you enter the #define directive, leave a
space between the directive (#define) and the identifier. There should be
no spaces in the identifier. The space following the identifier indicates that
the next ASCII character (or blank) starts the replacement string. Spaces
are allowed and are considered part of the string. Terminate the string (and
the directive) as described at the beginning of this sub-section.
3.

Nesting. #deJine substitutions may be nested. Of course, the nested
replacements must be described by a #define directive which precedes the
#define for the replacement text which contains them.
There is one exception to nesting identifiers-the macro substitution will not
be performed when the identifier occurs in a string. In the example below,
the programmer tries to nest MAXTRIES within the definition of
MESSAGE:
#dejine MAXTRIES ]
#de/ine MESSAGE" Maximum retransmissions i$ MAXTRIES.

H

A call to displayf(MESSAGE.); causes the following to be displayed:
Max!mum retransmissions Is MAXTRIES.

This is cenainly not what the programmer intended.

(B) Nlnclude
#include files, when invoked in a program, are read into the program file before
the program is compiled. As a result, your program has access to commonly
used items such as subroutines (input/output and string operations. for example).
global variables, constants, and structures without your having to enter or modify
the required code repeatedly.
1. Format. The format for the directive is as follows:

#include 
or

#include "filename"

56-6

56 C Basics

#include files follow standard naming conventions. See Section 13.2(E). As
an added convention. the suffix .h is appended to the end of the name (as
in the filename stdio.h).
2. Search rules for #include files. The delimiters you use to surround the
filename determine how the INTERVIEW searches its filing system for the
file.
•

The <> delimiters are intended for files which are supplied by AR.
When these delimiters are used, the following directories-and only the
following directories-are searched, in the order given:
1.

2.

3.
4.

5.
6.
7.
8.
9.

Isyslinclude on current drive (indicated on File Maintenance
screen)
The directory named as the current directory on the File
Maintenance screen (provided that the current directory is not the
root directory for FD1, FD2. or hard disk)
lusrlinclude on current drive (indicated on File Maintenance
screen)
FD1/syslinclude
FD21sysfinclude
HRDIsys/include
FDllusrlinclude
FD21usrlinclude
HRDlusrlinclude

NOTE: The directory names are given in the format which the
INTERVIEW interprets as the absolute path from the root
directory of the disk named before the first slash. So
HRDlsyslinclude means Isyslinclude on the hard disk.
•

The"" delimiters are intended for user-created files. The same
directories are searched for the filename. but they are searched in the
following order:
1.

2.
3.
4.

5.
6.
7.
8.
9.

The directory named as the current directory on the File
Maintenance screen (provided that the current directory is not the
root directory for FDl, FD2. or hard disk)
lusrlinclude on current drive (indicated on File Maintenance
screen)
Isys/include on current drive (indicated on File Maintenance
screen)
FDllusrlinclude
FD2/usrlinclude
HRDlusrlinclude
FDllsyslinclude
FD2/syslinclude
HRDlsyslinclude

56-7

------_._--------_.._--

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

If you have used the same filename for an include file in more than one
directory, the file which is actually read in as a result of an #include directive

will be from the first directory searched which contains that filename. The
delimiters you use. then, can make a difference in the file selected for inclusion.
The filename enclosed in <> or .. " delimiters may be a relative pathname. The
highest directory in the pathname must reside in the current directory or in one
of the !include directories. In response to an #include "disk_iolstdio.h"
directive. for example. the INTERVIEW first looks for a disk_io subdirectory in
the current directory on the File Maintenance screen and then for an stdio.h file
in that subdirectory. If the file is not found, the search for the relative
pathname continues according to the sequence designated for .. " delimiters.
If the file is not located in any of these directories. an error message is returned

to the operator.

(e) #pragma object
Use the #pragma object directive to access the compiled routine definitions in a
linkable-object file. The OBJECT block-identifier discussed in Section 24.4 may
also be used for this purpose. (Also see Section 13.3(P) on creating a
linkable-object file-displayed as type LOBJ in the directory listings on the File
Maintenance screen).
1. Placement. Place the #pragma object directive inside any legal C region on
the Protocol Spreadsheet. Except for those containing the static attribute,
routine definitions from an LOB] file always have global scope. It makes
sense. therefore. to position the directive at the top of your spreadsheet
program along with other global declarations and definitions.

2. Format. The format for the #pragma object directive is as follows:
#pragma object "filename.o"
A #pragma object directive references only one LOB] filename, but you may
include as many directives as you wish.
The relative or absolute pathname of the linkable-object file is enclosed in
quotation marks.

3. Search rules for linkabJe-object files. As your spreadsheet program
compiles. the INTERVIEW's filing system is searched for the linkable-object
files referenced in #pragma object directives.
•

If the referenced LOB] filename begins with FDl I, FD21. or HRDI, the

INTERVIEW interprets it as the absolute pathname and makes only that
one search.
•

Pathnames beginning with a I indicate that the root directory on each
drive should be the beginning point of the search. The drives are
searched in the following order: current drive, FDl, FD2, and HRD.

56-8

•

Otherwise. the name may be a one-word filename, or a relative
pathname which includes the directories leading to the file. The highest
directory in a relative pathname must reside in the current directory or
in one of the /lib subdirectories. The following directories-and only the
following directories-are searched. in the order given:
1.
2.
3.
4.

5.
6.
7.
8.
9.

current directory on the current drive (indicated on the File
Maintenance screen)
lusrllib on the current drive
Isys/lib on the current drive
FDllusrllib

FD21usrllib
HRDlusrlUb
FD11syslJib
FD2/sys/lib
HRDlsyslUb

If the pathname is not located in any of these directories, the program will

not compile and an error message will be returned to the operator.
4. How #pragma object works. When the source of coq,e for the Compile
command is :~~;:HlM~~t':1@~:it, the LOBJ which results usually defines
user-created routines. These routine definitions may be "linked." or
combined. as needed with your spreadsheet program. This means that
routines called within your active program do not always have to be defined
on the Protocol Spreadsheet or in #include files.

NOTE: An LOBJ file may also contain #pragma hook directives.
See Section (D) below. If a #pragma object directive references
an LOB] flle which contains #pragma hook directives, the
"hooks" within that file are ignored. Since Compile l~it;:
always generates #pragma hooks, use the OBJECT block-identifier
to reference the resulting LOB] file.

(a) Referenced linkable-object files searched for routine definitions. If a
spreadsheet program calls a routine for which no definition is provided,
the LOB] files referenced in #pragma object directives are searched in
the order in which they appear on the Protocol Spreadsheet. If a
routine is defined in more than one referenced LOBJ file. the definition
in the first LOB] file listed on the Protocol Spreadsheet will be used.
If the routine definition is not found in the spreadsheet program or in
any referenced linkable-object file, the compilation will abort. When
you go to the Protocol Spreadsheet and look for error messages, the
routine name will appear as an unresolved reference.

56-9

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

(b) Compiled routine definition combined with compiled spreadsheet. When
the routine's definition is located. the compiled code is copied from the
LOBJ file and combined with the compiled code of the spreadsheet
program.

Routine definitions in an LOBJ file may reference additional routines not
defined within the same file. If these indirectly-referenced routines also
are not defined on the Protocol Spreadsheet. the LOB] files are
searched again.
Routine definitions containing the static attribute are local to the LOBJ
file. A static routine will be copied from the file only if it is included in
the definition of another routine.

NOTE: Use #pragma object directives in your active spreadsheet
program only. Do no incorporate them in code that will be
compiled and saved as an LOBJ file. Although the code will
compile, no search fro routine definitions in referenced LOBJ
files will be performed.

(c) Efficiently uses memory. Using #pragma object to reference routines in
linkable-object files. assists in using the INTERVIEW's memory and
spreadsheet buffer efficiently.
•

Only the definitions for routines actually called within the current
spreadsheet program are copied into memory from the LOBJ file.
All other code within the file is ignored.

•

When commonly utilized routines are defined in linkable-object
files, space in the spreadsheet buffer otherwise dedicated to this
purpose can be used for additional programming.

•

Since the code in LOBJ files has already been compiled, the
INTERVIEW can support a larger program without a corresponding
increase in compilation time.

NOTE: Additional #pragma preprocessor directives utilized by
the INTERVIEW are discussed in other sections of the manual.
Refer to Section 61 on Display Window and Trace. for example.
for information on the #pragma tracebuf directive. Except for
#pragma hook (below), these other #pragmas should be part of
the active spreadsheet program. not part of a linkable-object file.

56-10

56 C Basics

(0) #pragma hook
The #pragma hook directive allows compiled C code within a referenced
linkable-object file to be automatically combined with the compiled code of an
active spreadsheet program. There are eight types of #pragma hook
directives-hook_types zero through seven. All types may be system-generated
during the Compile operation when the source of code is !:~~~f:'. but the
resulting linkable-object file always contains at least one hook_type zero.
The programmer also uses hook_type zero (#pragma hook 0). For this reason,
#pragma hook 0 will be the focus of the following discussion. The primary
purpose of #pragma hook 0 is to "force" a routine to be called and executed as
part of a spreadsheet program, even though no explicit call to the routine is
made on the Protocol Spreadsheet. The spreadsheet program may also caU the
routine, but keep in mind that it will be executed twice-once because of the call
on the spreadsheet and once because of the call made via the #pragma hook 0
directive.
1. Format. Create hooks on the Protocol Spreadsheet and then write them to
a file using the WRITE/U editor command. Before typing your hook on the
spreadsheet, press (§!J to prevent the editor from placing a strike-through
over the text.
The format for the #pragma hook 0 directive is as follows:
#pragma hook hook_type "routine_name();"

Follow the directive with a space and enter a decimal (not
constant to identify the hook_type.

he~decimal)

After the hook_type. enter another space, and then the hook text-C code
that calls the routine you want combined with your spreadsheet program.
The call to the routine is placed inside quotation marks and includes
required syntax-parentheses for the arguments and a semi-colon to
complete statement punctuation.
NOTE: Task names are always local to a linkable-object file and
never directly copied from it. The hook text, therefore, cannot
reference a task. The rule for exporting tasks from a
linkable-object file is to let the #pragma hook 0 directive call a
routine which starts the task(s). See Section S. following and
Section 52 for examples.
More than one #pragma hook 0 directive may be present in a single LOBJ
file, but each directive calls only one routine.

56-11

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-10B

2. Routine definitions. Typically. the definition for the routine called in the
directive is located within the same linkable-object file. It may, however. be
in another LOBJ file as long as both files are referenced via OBJECT
block-identifiers on the Protocol Spreadsheet.
The definition of the hook-text routine may also reference a task (which
must be defined in the same file) or it may reference additional routines not
defined within the same file. The rules in Section (C) above for indirectly
referencing routines apply.
Definitions for most of the extern routines included in this manual are not
strictly required.

3. Accessing hooks. If you want the hook text combined with your program,
use the OBJECT block-identifier to reference the LOBJ file. If you use the
#pragma object directive to reference the file. the "hooks" within that file
will be ignored.
4. Hooks are added to task list of program main. As your program compiles.
referenced linkable-object files are searched for hooks. When a hook_type
zero directive is found in the file, the hook text is automatically added to
the bottom of the task-list in the top-level main. If a referenced LOBJ file
contains more than one .. hook," they will be added to the task list in the
order in which they appear in the file.

NOTE: The order of tasks and hooks in the task-list indicates
the order in which main initiates tasks and executes hook
routines. It does not necessarily indicate the order in which. the
actions in tasks or hooks are processed.

5. Execution of hooks. Recall that the main function is system-created during
compilation. Refer to Section 52. Program Main. Because main simply
initiates the execution of each task listed. the (hook-text) routine essentially
runs concurrently with the tests in your spreadsheet program.
Since the hook text is a routine, and not a task, it must actually be executed
by main. not simply started. The definition of the routine determines when,
or whether, any subsequent hooks will be executed by main.
•

If the routine's definition references a task. as in the example below,

main returns quickly. leaving the routine to execute the task. Then
main begins execution of the next hook in the task list.
#pragma hook 0 "example();"
extern fast_ellent fevar_time_of_day;
extern Iloiatile unsigned short crnt_time_of_day;

56-12

56 C Basics
task
{

mainO
{

state_alarm_at_one:
wait/or
{

jevar_time_oj_day &&: (crnt_time_oLday

==

1300):

{

sound_alarm();
}
}
}

} example_task;
example()
{

example_task 0;
}

•

If the routine's purpose is not to start a task (or tasks). then main has to

execute all the code. The more code there is. the longer it will be
before main can return to execute. the next hook.
If the definition includes a waitfor, as in the following example, any
subsequent hooks will never get executed. Instead, main will continue to
wait for the specified event.
#pragma hook 0 "example();"
extern jast_e'ient Inar_time_oj_day;
extern liIolatile unsigned short crnt_time_oj_day;
example 0
{

waitfor
{

levar_time_oLday &:&: (crnt_time_oLday

== 1300):

{
}
}
}

56.5 Data Types
(A) Precisions
When a variable is declared, the compiler allocates space in memory according
to the type declaration that precedes the variable name. There are three sizes
(or precisions) of data allowable in 80286 memory, and three corresponding
data types. A char is allotted one byte of memory. A short is given two bytes.
while a long reserves four bytes of memory. Shorts and longs are varieties of in!
or integer, and the type descriptions short int and long int are permitted. The
type int used by itself is the same as short int.

56-13

iNTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

(8) Signed and Unsigned Types
All three precision types may be signed or unsigned. Signed and unsigned data
types are stored identically, but treated differently in arithmetic operations.
Specifically, they differ in the way they undergo type conversion, comparison.
division, and right shifting.
1.

Type conversion. The following declarations store the same value in
memory:
signed char a = -6;
unsigned char b = -6;

In both cases, the byte stored in memory will be the two's complement of
00000110, or 11111010. (The two's complement is the one's complement +
1.) This bit pattern translates as hex fa or ASCII z. The displayf routine in
the following program will write two z's to the screen:
{
signed char a ;: -6;
unsigned char b = -6;

}

STATE: data_type
CONDITIONS: ENTER STATE
ACTIONS:
{
display! ("%c%c" ,

tl,

b);

When you lengthen the chars to shorts. however, they behave differently.
The unsigned char is left-padded with zeroes. The signed char, having a
leftmost bit equaling 1. is left-padded with ones. This left-padding with ones
is called "sign extension.»
A char is converted to a short automatically when a %d, %u. or %x
conversion is applied to it, so the following example illustrates the difference
between the conversion of signed and unsigned types:
signed char a = -6;
unsigned char b = -6;

STATE: data type
CONDITIONS: ENTER STATE
ACTIONS:
{
display! ("%x%x ". a, b);

}

The variable a will be seen to extend to hex fffa. which is fa left-padded
with eight ones. The unsigned variable b will have been extended by eight
zeroes and will appear unchanged as fa.
If the %x conversion specifiers in the example above are replaced by %d,
the resulting signed-decimal conversion will show a equaling -6, b equaling
250. The signed char will have survived the type-lengthening with its original

negative value intact.

56-14

56 C Basics

Because they can be lengthened without changing their values, signed
variables should be used for any arithmetic operations. Other differences
between signed and unsigned variables, not reflected in Table 56-1. are the
following:
2.

Comparison. If the leftmost bit of a signed variable is 1, then the variable
has a negative value and the expression variable> 0 is false. If the leftmost
bit of an unsigned variable is 1, the variable is positive and variable > 0 is
true.

3. Division and modulus. If the leftmost bit of a signed variable is 1, the two's
complement of the variable rather the stored value will be used in any
division or modulus operation.
4. Right shifting. When a right-shift (») operator is used on a signed
variable. a I-bit is shifted in at the left. When the same operation is
performed on an unsigned variable, a O-bit is shifted in.
Table 56-1 shows the ranges of values that are produced by displayf and
printf routines when the valid conversion specifiers-%c, %d, %ld, and so
on-are applied to the various signed and unsigned data types. Frequently it
makes no difference whether a variable is declared as signed or unsigned.
When a variable undergoes type conversion, however. as in the case of a
char given a decimal or hex conversion. there is a significant difference.

56-15

Table 56-1
Data Types: Ranges of Values Displayed and Printed

b'.rut

char'
signed char'

unsigned charl

Int

char conversion
(%c)

signed decimal conversion
long (%Id)
short (%d)

"6 to*

o to 255

"6 to*

-128 to 127

"6 to*

-32768 to 32767
-32768 to 32767

unsigned Int

-32768 to 32767

short

-32768 to 32767

signed short

-32768 to 32767

unsigned short

-32768 to 32767

long

1

-2147483648 to 2147483647

signed long

-2147483648 to 2147483647

unsigned long

-2147483648 to 2147483647

hex conversion
long (%Ix)
short (%x)

o to 255

o to ff

o to

o to 7f

127
and
65408 to 65535

o to 255

sIgned Int

unsigned decimal conversion
shor%u}
long (%Iu)

and

ff80 to fftf

o to 255

o to ff

o to 65535
o to 65535
o to 65535
o to 65535
o to 65535
o to 65535

o to fftt
o to ffff
o to ffff
o to ffft
o to ffff
o to ffff
o to 4294967295
o to 4294967295
o to 4294967295

Through "Integral promotion,· char is converted automatically to Int in a %d, %u, or %x conversion.

o to fffffffff
o to fffffffff
o to fffffffff

56 C §asics

(C) Static

S,!~rage

Class

A variable must be of the static storage class to pass its value into a wait/or
statement. Declarations at the Program, Layer, or Test level (Levell in the
source code diagram in Figure 52-4) are static even if they are not explicitly
declared so. The same is true of a character array initialized by a string (see
Section 56.7).
A variable that is initialized at the State level must be declared as static by the
programmer if the initialized value is to be used inside await/or.
The following program will display a value of 8 on the prompt line when the
operator presses the spacebar:
ST ATE: pass initialized value

{

-

-

static int initialized:: 8;
CONDITIONS: KEYBOARD • •
ACTIONS:
{
display! (" %d ", initialized);
}

If you removed the word static from the declaration, the initialized value would

not be passed into the condition clause and the program would display 0 or a
.. garbage" number instead of 8.

56.6 Operator Precedence
In an expression with more than one operator, operations are prioritized according to

the ra*ing of operator precedence in Table 56·2. The operator with the highest
precedence is at the top of the table. Precedence decreases as you move down.
Consider this example:
STATE: precedence
{
int a;
a = 3 .. 4 + 2;
display! ("%d». aJ;
}

Because multiplicative operators (*, I, and %) have higher precedence than additive
operators (+ and -). the 3 * 4 operation is performed first. Then 2 is added to the
product of 3 and 4, and finally the sum is assigned to the variable a. (Assignment
operators have very low precedence.) The result of the program is that a is displayed
as 14. Compare this example:
ST ATE: precedence
{
int a;
a = 3 • (4 + 2);
display! ("%d", aJ;

56-17

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Table 56·2
Operator Precedence 1

Operator

Type of Operator

o
[] . -> ++ -++
sizeof
(type)
* I %
+ -

& •

+ -

~

I

« »
< > <= >=
-&

!=

&&
II
? :
= *= /= %= += _= «= »= &=

1

1=

A

primary expression
postfix
unary
cast
multiplicative
additive
bitwise shift
relational
equality
bitwise AND
bitwise exclusive OR
bitwise inclusive OR
logical AND
logical OR
conditional
assignment
comma

Associativity

left to right
left to right
right to left
left to right
left to right
left to right
left to right
left to right
left to right
left to right
left to right
left to right
left to right
left to right
right to left
right to left
left to right

Operators on the same line have the same precedence; rows are in order of decreasing precedence.

Here the additive operation is performed before the multiplicative, since the
parentheses that denote a primary expression (see Table 56-2) have the highest
precedence of all. The result of this program is that decimal 18 is displayed.
Given operations with the same precedence. left-to-right or right-to-Ieft
"associativity" (see the right column in Table 56-2) indicates which is performed first.
This order of processing is significant for an expression such as 36 / 6 I 2. where the
associativity is left to right.
Associativity is very important in assignment operations, which are always interpreted
in a right-to-Ieft direction. Consider this example:
ST ATE: right to left assoolatlvity
{
- - int a = 4;
int b' '" 1;
a:: b;
display! ("%d". a);

56-18

56 C Basics
The result of this program is that 1 is displayed, not 4. Right-to-Ieft associativity also
explains why the following program does not compile.

int a = 3;
3 = 0;
display! (f/%d", a);

A constant never can have a value assigned to it. even if the value equals the
constant.

56.7 Strings
A string is a sequence of characters enclosed in double quotes. This is an example of
a string;
"hello"

A string is an expression of the type pointer, and may be used anyplace in the
program that is appropriate for a pointer. For example. a pointer is appropriate as
the argument of a displays routine:
displays ("hello" I;

The string in this statement does two things during compilation: it writes the character
string "hello" in memory. and it points to the first character in the string. The string
"hello" becomes a 4-byte address that you can examine by displaying it as a long
hexadecimal:
display! ("%lx", "hello");

(A) Using a String to Initialize an Array
Note that the pointer represented by "hello" in the examples above is not stored
anywhere and therefore can be used only once. The string pointer "hello" could
have been stored as a pointer to the first character in an array, as in this
example:
char strinG_array II :: "hello";
display! (string_array);

Stored in this manner, the pointer can be used repeatedly.
An array like string_array that has been "initialized" by a string shares many of
the traits of standard arrays, but it has unique characteristics as well.
1.

Data type. A string may only initialize an array whose elements are of the
. type char.

l . . Null termination. A string is always terminated by a null character. This null
terminator is appended by the compiler. not the programmer.

56-19

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

3. Size. All arrays must declare their size, in any of three ways. The
programmer may declare the length inside of brackets, as in this example:
char array {5];

Or he may leave the brackets empty and provide a list of initiaHzers. insLde
of curly braces, from which the compiler can determine the size of the
array:
char initializer_list_'lrray II = {'h', "e', 'l', Ox6c, 'o'} ;

The third method of indicating size is to leave the brackets empty and
initialize the array with a string, as in our original example of a string
initializer:
char strinE_array [J = "hello";

The compiler will add a terminating null-character to this string, and
calculate an array size of six. To verify that the compiler counts one more
character than the user has entered. you may try the following test. Note
that the sizeo! operator will return the length of any ilrray:

char string_array II = "hello";
int compiler_COUlIt = sizeo!(strinE_orray);
display! ("%d",compile,_count );

4. One-dimensional array. Whereas arrays in general can be multidimensional.
a string-initialized array always has one dimension.

(8) Valid Strings
1.

ASCII and control. With a few exceptions. all ASCII characters, including
control characters, are valid in a string. The exceptions are ~. 'l", ", and \.
These characters are liable to be misinterpreted by the compiler. Null (~)
and linefeed ('l") will be taken to indicate a new logical line in the program.
Double-quote (") will be mistaken for the end of the string. Backslash (\)
will be misinterpreted as the start of an escape sequence.
If one of these characters is included in a string, the program may not
compile. If not. you will be returned to the Protocol Spreadsheet. The
following message will be displayed for nulls or linefeeds: "Error 718:

Newline inside string." For quotation marks. the message is "Unclosed AR
C" region." Depending on their placement in the string. backslashes may
or may not generate an error. Even when compilation succeeds. however.
they will not be interpreted correctly.
It

56-20

56 C B@sics

Table 56·3
C String Non-Literals
Non-literal

ASCII character

Meaning

\a

bell

\b

backspaoe

\f

form feed

\n

linefeed t
carriage return
horizontal tab
vertloal tab
single quote
double quote t
backslash t
ootal repre.entat~n
hex representatkJn

\r
\t
\.v
\'

\"

\\

\##It

\x###

Hex character

0 ..

°Il

°c

0"

°0
Oq
Os

2,
22

'\

5c

any ASCII oharaoter

00 _ ""

any ASCII character

00 _ F~

t These oharacters requtre non-Uteral entries In INTERVIEW strings. The others may be
entered as ASCII chatacters, non-h"terals, or hexadecimal characters.

2.

Non-literals. Most characters in strings are interpreted literally: Each of
the invalid characters listed above, therefore, needs a non-literal
representation. Non-literals are preceded by a backslash. The compiler
converts these non-literals to their one-byte numeric value.

To include a null (or any ASCII) character in a string, use the octal or
hexadecimal representation shown in Table 56-3. Hex and octal numbers
take up to three digits, so use leading zeroes if necessary. Otherwise, a
subsequent digit may be interpreted as part of the value. Suppose, for
example, you want to create the string "~abc". You initialize an array as
follows:
char string{] = "'xOabc";

The string will be stored as "+c" (hexadecimal characters '\i~:J). The correct
declaration was char srring{j = u\XOOOabc". In octal. the null would be
written \000.
Please note that a string that has a null character somewhere other than at
the end will be difficult to display or print completely. Display and print
routines that take strings as input typically begin at the pointer pOSition and
continue until they encounter a terminating null. If. as in the last example. a
null is encountered at the beginning of the string. execution of the routine
will end before anything has been displayed or printed.
Provide precision to the %H conversion specifier to override null termination
of a string while displaying a string in hex: see Section 60.3(C).

56-21

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

3.

Const~nts. Spreadsheet constants may be included in strings. An example of
a spreadsheet constant is the fox message represented as ((FOX)). See Section
25 on Constants.

The C translator expands constants both inside and outside of C regions
before the code is preprocessed.

4. Hexadecimal characters. ASCII characters. including the control characters,
may be entered in strings as hexadecimal characters via the §] key. Hex
representation is considered literal. That is. you may not enter ASCII
characters which require non-literal representation in strings as hexadecimal
characters. The sequence of characters comprising a non-literal may be
entered as hexadecimal characters. Double backslash (\ \), for example. may
be entered as sese.

(C) String Routines
There are several C routines in the INTERVIEW that display or print strings.
See Section 63 on "Print" and Section 60 on "Display Window and Trace" for
detailed descriptions of the prints. displays. and traces routines, as weH as other
display and print routines that use the %s conversion specifier.
There is also a pair of routines. index and rindex. that search inside of strings
for particular characters. These routines are defined (with examples) in Section
67.

56.8 Recommended Sources
The following sources provide accurate. in-depth information on C Programming
Language:

1. ANSI Document X3J 11/86-098. Proposed American National Standard for
Information Systems-Programming Language C.
NOTE: When approved, the number for the ANSI document
will change to: ANSI Standard X3.159-198X.
2. Darnell. Peter A., and Margolis. Philip E. Software Engineering in C. New
York: Springer-Verlag, 1988.
3.

Harbison. Samuel P .• and Steele, Guy L., Jr. C: A Reference Manual. 2d ed.
Englewood Cliffs: Prentice-Hall 1987.

4. Kernighan, Brian W.o and Ritchie. Dennis M. The C Programming Language.
2d ed. Englewood Cliffs: Prentice-Hall. 1988.

56-22

57 Variables

57 Variables
57.1

Creating or Accessing C Variables
Softkey-selectable programming "tokens" entered by the user on the Protocol
Spreadsheet are translated automatically into C during the initial compiler phases after
~ is pressed. (Then the C code in tum is compiled into object code.) The C
variables used by the translator are documented throughout this volume.
C regions available to the user at every level of spreadsheet programming (see Section
53) provide direct access to these variables.
An example of a user-accessible variable is keyboard_new_key, used in the following
program to sound an alarm whenever any ASCII-keyboard key is pressed.
{

STATE: anykey
CONDITIONS:
{
}
ACTIONS: ALARM

The C regions also allow the user to work with variables of his own creation.
Here is an example of a user-created variable named minutes that is used to count
minutes elapsed since the beginning of Run mode. The C program displays this
"counter" on the prompt line of the Run-mode screen.
{

extern fast_event
short minutes;

le~ar_time_aI_day;

STATE: run mode minutes
CONDITIONS: {
}
ACTIONS:
{

minutes++;
pas_cursor (0,0);
displaYf ("Duration of run = %4d minutes", minutes);
}

57-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

The first C region in the example "declares" the variables Jevar_time_oj_day and
minutes. The first of these variables is an event variable that is built into the system
software. All event variables in an active State-block are polled constantly. Once
every minute, Jevar_time_oj_day returns true.
The second variable, minutes, is created by the program itself-that is, by the user.
The declaration in effect creates the variable: it causes 16 bits in memory ("short" =
16 bits) to be dedicated to information stored under the name minutes.
The second C region in the example is placed inside the Actions block. The
statement minutes++ causes the value that is stored in the 16 bits dedicated to
minutes to increment. The function pos_cursor (0,0) places the cursor in the leftmost
column on the second line of the display screen (the Prompt line). The displayJ
function writes a text message to the display screen, beginning at the current cursor
position. In the text message itself. "%" will be replaced by the current value of the
variable minutes. "4" means that four columns on the screen will be dedicated to the
value, and "d" means that the value will be expressed in a decimal number.

57.2 Declaring Variables
Declare your variables and routines in a C region. delimited by curly braces { and },
at the top of your program or at the top of a Constants. Layer. Test, State. or
Actions block. Declare a variable preceded by its type descriptors and followed by a
semicolon, as in these examples:
{

extern fast_eyent keyboard_new _key;
extern fast_event keyboard_new_any_key;
extern fast_event Jevar_time_of_day;
short minutes;

A variable may have its scope limited to a particular Test, State. or Actions block. A
variable also may be redeclared at different levels. (In software revision 5.00 or
earlier, it may not be redeclared at the same level.) Given more than one valid
declaration, the lower or nearer one applies.
The rules governing the placement of variable declarations are laid out in detail in
Section 53.S(A).

(A) Naming Variables
1.

Legal names. The first letter of a variable name may be either a letter or an
underscore. Following characters may be letters. numbers. underscores. or
dollar signs.
Reserved words (indicated in boldface type in Appendix K) may not be
used as variable names.

57-2

57 Variables

2. Naming conventions. Generally speaking. variables that begin with dte_ or
dce_ are used by the software to test DTE and DCE conditions. Variables
that begin rcvd_ are used to test RECEIVE (or RCV) conditions. Variables
that begin m_ are used by the layer packages to construct the protocol
traces.

(8) Modifiers
1.

Data type. The data type for each variable precedes the variable name in
the declaration. All standard data types except float are supported in the
INTERVIEW 7000 Series. Standard data types and their sizes and ranges
are given in Table 56-1.

2. Preassigned modifiers. When you declare a user-accessible external variable.

be sure to use the modifiers which precede the data type for that variable as
listed in variable tables throughout this volume.

57.3 Comparing a Variable to a Value
User-accessible and user-created variables may be tested as part of any standard C
expression.
The following is an example of a user-invented variable called anykey that is declared
with a default value of zero. incremented by the operator pressing any
ASCII-keyboard key. and checked for a value of 3 by an if statement after each
depression of a key. An alarm will sound on the third keystroke.
{

extern fast_event keyboard_new _key;
short anykey;
STATE: press_key
CONDITIONS:
{
}

ACTIONS:
{

anykey++;
if (anykey == 3) sound_alarm ();

The next example uses a built-in, user-accessible variable called crnt_time_of_day
and checks it for a particular value. This 16-bit variable stores the time of day in
hours aJ)d minutes. The Condition in the program (the event variable
fevar _tiine_oLday) is true once per minute. The Action each time the condition is
true is to check crnt_time_of_day for a value of 1129. At 11:29 AM, an alarm will
sound.

57-3

--------_.._._--_._--

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

extern fast_event Jevar_time_oJ_day;
extern 1Iolatile unsigned short crnt_time_of_day;
STATE: alarm clock
CONDITIONS:
{

fevar _time_oLday
}
ACTIONS:
{

if (crnt_time_oJ_day
}

== 1129) sQund_alarm();

57.4 Checking a Variable In a Waitfor Clause
Please note that the following variation on the preceding example does not produce
the same result. The alarm will never sound if this version of the program is run:
{

STATE: alarm clock
CONDITIONS:
{
}
ACTIONS:
{

}

Note that the time-of-day condition that was lodged in an if statement in the
previous example has now been placed in a Conditions block. Conditions blocks on
the Protocol Spreadsheet are converted to waitfor clauses (see Section 53.3). not if
statements. when the program is translated automatically into C coding.

Waitfor clauses work very differently from if statements and other conditional control
structures in C.

(A) Event vs. Nonevent Variables
Two kinds of variables may be used inside of these waitfor clauses-event
variables and nonevent variables. When a state is active, event variables in that
state are checked regularly during routine polling by the CPU. When an event
variable (such as Jevar_time_oj_day) is polled and returns a value of true,
conditional statements containing nonevent variables (such as crnt_time_oJ_day)
also are checked for truth or falsity. In the absence oj an event variable being
polled and returning a value of true, a statement about a nonevent variable
inside of a Conditions block (waitfor clause) never can be true.
Since there is no event variable in the Conditions block (waitJor ,clause) above,
the nonevent variable cmt_time_of_day is never even checked.

57-4

57 Variables

(8) Translation of Softkey Tokens Into Variables
You could have written the "alarm clock" program using only softkey entries. as
follows:
ST ATE: alarm clock
CONDITIONS: TIME 1129
ACTIONS: ALARM

In this case, the C translator will convert the Conditions block into a wait/or
clau&e that uses the event variable fevar _time_of_day to check the nonevent
variable crnt_time_of_day once a minute. Here is the translator's version of the
Conditions and Actions blocks:
wail/or
{

fevar_time_oLday && (crnt_time_oLday == 1129):
{
sound_alarm();
}
}

(C) f::xample of A Nonevent Condition "Waiting For" An Event
The next example illustrates the interplay of event variables and nonevent
variables in a waitfor clause.
extern fast_event k.eyboard_new_key;
short anykey;
STATE: press key
CONDITIONS:
{
}
ACTIONS:
{
anykey++:
}
CONDITIONS:
{
anykey
3
}

==

ACTIONS: ALARM

This program looks similar to a previous one in which the operator hit three
keys and the alarm sounded. Here, however, the alarm does not sound until the
fourth keystroke. The variable anykey begins the test at zero. and increments
(anykey++) with every keystroke. But remember what a condition such as
anykey == 3 in a wait/or clause really means. It means that the condition will be
tru~ when the variable equals three and an event (such as a keystroke) occurs
that causes the variable to be checked. On these terms. the condition is not
satisfied until the fourth event.

57-5

INTERVIEW 7000 Series Advanced ProgrammIng: ATLC-107-951-108

(D)

User-Cr~_ated

Event Variables

The user can create his own event variable simply by declaring a new variable
with the modifiers extern event. Once the event variable has been declared. he
can use the signal function to indicate that the event has occurred. Here is an
example of an event variable called check_number that causes the nonevent
variable number to be checked-and sounds the alarm when the value of number
satisfies the condition.
{
short number = 3;
extern ellent check_number;

ST A TE: user created event
{

--

signal (check_number);

}
CONDITIONS:
{
cheek_number && (number == 3)
}
ACTIONS: ALARM

(E) Rules and Cautions
To sum up the discussion of event and nonevent variables. here are a few rules
of thumb:
1.

If statements, for loops. while loops, and other conditional control structures
may not be used in Conditions blocks (that is, in waitfor clauses). They may
be used in State blocks. above (or in the absence of) Conditions blocks; and
they may be used in Actions blocks.

(Placing an if statement at the top of the State block, above any waitfor
clauses, is how the translator converts ENTER_STATE softkey conditions into
C.)
2.

Event variables are designed for use in Conditions blocks (waitfor clauses)
only. It makes no sense to use an event variable in an if statement. while
loop. etc., since there is no possibility that the event will be true at the
precise moment the statement is being processed.

3.

A Conditions block (waitfor clause) that lacks an event variable can never
come true.

One other word of caution about the importance of event variables: please note
that the following program will not sound the alarm even if the operator presses
a key while the time is 11:29 AM.

57-6

57 Variables

extern fast_ellent keyboard_new _key;
extern lIolatile unsigned short cmt_time_of_day;
}

ST ATE: alarm clock
CONDITIONS:
{
}
ACTIONS: ALARM

The reason this program doesn't "work" is that all variables begin Run mode at
zero. Often a particular event variable must return true before a particular
nonevent variable will be updated. The nonevent variable crnt_time_of_day is
updated only when the event variable feva, _time_oLday is entered in the waitfor
clause and returns true. In the example above, the operator pressing the key will
cause crnt_time_of_day to be checked; but in the absence of fevar _time_oLday,
the value of crnt_time_of_day remains always at zero.

57.5 Checking and Displaying Equivalent Values of a Variable
Variables may be checked and displayed as octal, decimal, hexadecimal, and
ASCII-character values. Decimal comparison and display is the default.

(A) Checking Equivalent Values
To compare a variable to an octal value, precede the value with a zero (0). No
,prefix is necessary to make a decimal comparison. To compare a variable to a
hexadecimal value, precede the value with Ox or OX. To check whether a
variable matches an ASCII character, enter the character in between single
quotes.
The alarm will sound in the example below, since all of the values entered to
the right of the equal signs are equivalent.
{

char foxtrot:: '/';
ST ATE: compare equivalent values
{
if ((joxtrot == 0146) &&: (joxtrot
'!'IJ sound_alarm();
}

--

==

102) &:& (joxtrot :: Ox66) &:& (joxtrot ==

Note that the data type char in the declaration simply means that the variable is
composed of 8 bits. The designation char does not say anything about the
comparison mode or the display mode. (Data types short and int = 16 bits;
long = 32 bits.)

57-7

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

(8) Displaying Equivalent Values
Variables may be displayed in a variety of data formats via the display!
function. The full set of display conversions is given in Table 61-7. The program
below generates a representative sample of display formats. When the program is
run, the prompt line on the display screen will look like this: 152 106 6a 6A j
6A •

char juliet = 'j';
}

ST A TE: display equivalent values

-

{

-

display! ("%0 %d %x %X %e %#u ". juliet, juliet, juliet, juliet, juliet,
juliet);
}

57.6 Isolating Bits from a Variable Value
Some variables are bit-oriented. That is, one bit (or perhaps a small field of bits)
may have significance that is independent of the surrounding bit values. The variable
current_eia_leads (refer to Table 60-1), for example, uses 7 bits to store the onloff
status of seven separate EIA leads, plus an eighth bit to store the status of any lead
that is patched to the VA input jack (see Section 10.3). If you want to check this
variable to determine the status of DTR (for example) you need to determine
whether the bit that represents DTR (the fifth bit from the right or the fifth least
significant bit in the variable) is set to 1 (OTR off) or zero (DTR on). How can you
isolate this bit from the surrounding bits in order to determine its status?
The tool for isolating a bit in a C variable is the "care mask," a group 01 bits (usually
expressed in hexadecimal) in which the bit(s) under scrutiny is set to 1 and all other
bits to zero. The care mask for DTR is OxlO (or 16 in decimal notation). The binary
version, 00010000. shows that only the DTR bit is set to 1. When this care mask is
anded (via the "&" operator) with the variable current_€ia_leads. only two results
are possible, depending on whether the OTR bit in current_eia_Ieads is 1 or O.
With DTR on, suppose that the combination of all lead statuses gives
current_eia_leads a value of e6 in hex-11100UO in binary. The effect of anding this
variable with the care mask for OTR will be as follows:
11100110

& 0001QQQQ
00000000

Now turn DTR off. and the result of the anding will be this:
11110110

& 00010000
00010000

57-8

S7 Variables

The seven "don't care" zeroes in the care mask guarantee seven zero-bits in the
result (because 0 & 1 = 0 and 0 & 0 = 0). So the result of the anding must be either
o if the DTR bit is 0 (on). or hex 10 (decimal 16, binary 00010000) if the DTR bit
is 1 (off).
This C program will detect DTR on:
{

extern fast_event fevar_Itia_changed;
extern const volatile unsigned short cU1'rent_eia_leads;
}

ST ATE: check dtr on
CONDITIONS: {
}
ACTIONS:
{

If you try to run this program, make sure of the following:

1. The Front-End Buffer Setup menu should be configured to buffer control
leads.

2. If you are not connected to a device that provides clock, the Line Setup
menu should be configured to provide internal clock. EIA leads are clocked
through the front-end buffer before they reach the program logic.
3. After the program enters Run mode. use a single-wire patch cord to connect
the +12V output pin on the test-interface module to the DTR lead. The
alarm should sound as soon as the patch is made.
A slightly different condition inside of the if statement will detect DTR off:

The DSR bit is the fourth least significant bit in the current_eta_leads variable. so
the care mask for DSR is Ox08 (binary 00001000). The following if statement will
detect DSR on:

This if statement will detect DTR on and DSR on:

This if statement will dete<:t DTR off and DSR on:

The last condition simply means that you care (l=care) about DTR and DSR and you
want DTR to be 1 (off) and DSR to be 0 (on).

57-9

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

57.7 Pointing to an Address
Some routines require an address as input. The displays (display-string) routine. for
example, requires a CPU memory address as its argument. When executed. the
routine will begin to display characters that it finds at the specified address and at
subsequent addresses, one by one, until a null is encountered. A memory address is
four bytes (32 bits) and is declared as a long.
{
}

STATE: display string

{

-

displays (any_cpu_oddress);

Many of the important addresses needed by the user and by the program can be
found inside of interlayer ("IL") message buffers. When BOP-framed data is
monitored. it is copied automatically into IL buffers. Each time a frame is buffered, a
data primitive is created automatically and the event variable m_loyhyrmtv is
signaled. The segment number of the IL buffer is recorded in the variable
m_loyh_il_buff. This segment number can be converted into an address.
Here, for example, is a program that looks for a DTE data packet. converts
m_Io yh_jebuff into a four-byte address that points to the first data position, and
displays the data contents of the packet.
{

long first_dato_address;
extern volatile unsigned short m_loJh_il_buff;
}
LAYER: 3
STATE: display data
CONDITiONS: DTE DATA
ACTIONS:
{
first_data_address = ((long) m_loJh_il_buff« 16} + 37;
displays (first_data _oddress);

The IL buffer is illustrated in Section 63 of this manual, and the procedure for
converting the buffer-segment number into a memory address is explained in detail in
Section 63.1(C). Briefly, we have cast the segment number (a short. 16 bits) into a
long and moved the number over to its high-order position in the CPU address,
sixteen bits to the left. Then we added 37 to the number to bypass the header
information for the buffer (32 bits) and the frame and packet headers (5 bits).
Each address in memory stores 8 bits. so the second byte in the data field of the
data packet would be first_data_address + 1, the fourteenth byte would be
first_data_address + 13, and so on.

57-10

57.8 Creating a Character Pointer
For most of the variables in a C program, the address is not important to the user or
to the program. The user does not need to know the address in order to declare the
variable. perform operations on it. and compare its value to other values. In general.
addresses of variables are solely the concern of the compiler.
In the case of a routine such as displays, the address is what is important. The value
that is stored at the address is not so important. since the routine will go to the
address and begin displaying the data whatever the value (as long as the value is
displayable) .
There is another kind of variable for which both the address and the value stored at
the address are important. These variables are called pointers. The user creates a
pointer by typing an asterisk ("') just following the data type in a declaration. as in
this example:

The variable packet_typeytr is a four-byte memory address just as
!irst_data_address, declared as a long in the previous example, was a four-byte
address-even though packet_typeylr is declared as a char. The data type char
preceding the asterisk simply means that the amount of data pointed to is eight bits.
Once you use an asterisk to declare the variable a pointer, you can access the
address directly as packet_typeytr or you can access the value stored at that address
as "' packet_typeytr. A displays routine would accept packet_typeytr as input, while
a displayc or display! routine would expect" packet_typeytr.
With the X.2S personality package loaded at Layers 2 and 3 (via the Layer Setup
screen), the following program goes to the memory location pointed to by
packet_t'ypeytr and checks its value to determine whether the packet in the buffer is
a Clear request.

extern 'IIo/atile unsigned short m_lo"ph_ii_buff;
extern event dte.,packet;
char" packet_type.,ptr;
}

ST ATE: search for dte clear
CONDITIONS: {
dte.,poC"'f
}
ACTIONS:
{
packet_,ype.,ptr::: (void .) «(long) m_l()Jh_il_buff« 16) + 36);
if (·packet_typeJtr := Ox13) $aund_olarm(J;
}

57-11

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

The pointer packet_typeytr is a char. but you could just as easily point to a short
(16 bits) or a long (32 bits). If you increment an address. you get the next address,
8 bits farther in memory. If you increment a char pointer, you also get the next
address. If you increment a short pointer. you add two increments to the memory
address. In effect you move the pointer two places. If you increment a long pointer,
you move the pointer by four addresses. 32 bits.
In the example above. the integer m_Ioyh_il_buff is cast as a pointer (void *) after
it is cast as a long. This is to avoid a compiler error ("Warning 31: Illegal implicit
integer-to-pointer conversion") when the new value of m_loyh_il_buff is assigned to
packet_type ytr.

57.9 Pointing with Subscripts
When it is preceded by an asterisk (*), the pointer packet_typeytr returns the
character value that it points to, as we have just seen. Another way to return this
value is to omit the asterisk and add a subscript: packet_typeytr[O}. This mechanism
allows you to access an array of values without moving the pointer.
For example, the transmission header C"TH") in a FID2 SNA information field is six
bytes long. If you establish a pointer to the first TH byte (THO). you can use
subscripts to access any other byte in the field without moving the pointer. The
following program checks the values of two bytes in the TH field (corresponding to
"DAF" and "OAF") before freezing the data display and sounding an alarm.
extern volatile unsigned short m_loJh_il_buff;
char"' th;
}
LAYER: 2
STATE: th pointer
CONDitiONS: DTE INFO
ACTIONS:
{
th = (void *) ((long) m_loJh_il_buff« 16) t 34);
if «th[2] == 5) &:&: (th{3] == J))
{
ctl_capture_Id (Ox10);
ctl_captureJd (OxlOO);
sound_alarm ();

57.10 Creating a String
Strings are used in INTERVIEW programming mainly for transmissions and for
messages to the operator ("prompts"). In the following program, the compiler
decodes the string "QWERTYUIOP" from ASCII to hex, stores it in memory as a
series of contiguous values, adds a null to it, returns the address of the first
character, "Q." and then assigns this address to the variable keyrow:

57-12

57 Variables

10n8 keyrow;

}

5T A TE: assign string address to variable
{
keyrow = "QWERTYUlOP";

- -

-

The variable keyrow now is the four-byte address of "Q" in the string. You can see
this address for yourself by using either "QWERTYUIOP" or keyrow as the argument
in a display! routine:
display! ("%lx ", "QWERTYUIOP");

or
display! (" %lx ". keyrow);

Either version will display a CPU address (hex 04400000) on the second line of the
Run-mode screen.
The string can be displayed in a simple displays routine, since that routine expects a
four-byte address as input:
displays (" QWERTYUIOP");

or
displays (keyrow);

If you want to access individual characters in the string, declare a pointer:
char * keyrow

= "QWERTYUJOP";

With a pointer you can display the entire string or a single character-the seventh
character, "U." in this example:
displays (keyrow);
displayc (keyrow [6J);

Declaring the string an array has virtually the same effect as declaring it a pointer:
char keyrow []

= "QWERTYUIOP";

The name of the array still is the address of the first character in the string and so
may be used in a displays routine; and individual characters still may be specified by
a subscript:
displays (keyrowi;
displayc (lceyrow{6Ji;

The onty difference is that the array name is a constant whose value is assigned in a
declaration and cannot be changed. while the pointer is a variable and may be
incremcinted. assigned a new value, and so forth, while the program is running.

57-13

JNTERVfEW 7000 Series Advanced Programming: ATLC-107-951-108

57.11 Comparing Strings
A string comparison in C may be conducted as follows. First, create a pointer in the
manner described in Section 57.8, or else simply declare one of the pointers to line
data that is provided in the set of user-accessible variables. Example: extern volatile
unsigned char • myacketytr.
Next, create an array that represents the search string you will try to match against
the line data. For example:
char search_string {] = "\xa";

Create a trigger to look for a line event (such as the event variable dteyacket) that
will initialize the pointer.

extern yolatile unsigned char" myacketytr;
char search_string {] :::: { OxlO, Ox04, OxOb };
extern €Yent dteyacker;
}
LAYER: 3
5T ATE: match packet string
CONDITIONS:
{

dte,JJQcket

Compare the pointer-value with the first element of the search string. If a match is
found, increment the pointer and compare the new value to the second element of
the search string; and so on. If a match is found for every element of the string,
take an appropriate action.
ACTIONS:
{

if (search_string [0] == .. myacketytr)
{

myacketytr ++;
if (search_string [1]

== .. myacket,JJtr)

{

m,JJacketytr ++;
if (search_string 12l == .. myacketytr) sound_alarm ();

Here is the same Actions block, only this time the variable element replaces the
numeral in the subscript to search_string. and the same variable is added as a
subscript to myacketytr. This coding may be modified easily for any length string.
For a 9-byte string. for example. simply change the 3 in the if statement to 9.

57-14

57 Variables

ACTIONS;
{

element = 0;
while (search_string (element]
{

== m"packet..ptr [element])
if (search stringlelement+t J == 3)
{
sounojJ.larm ();
break;
}

57.12 Accessing a Variable Inside of a Structure
A structure is a mechanism that makes repetitive declarations of similar variables
unnecessary. For example. there are twelve variables associated with any given
counter created in the program. One variable is the current value of the counter.
one is the last sampled value, another is the highest sampled count, another the total
of all the sampled values, another the number of samples taken. and so forth. If the
user creates four counters via the spreadsheet softkeys, the C translator does not
declare, 48 separate variables (4 x 12). Instead the translator declares a structure for
countetts-called counterjtruct-that declares each of the twelve variables once, as
follows:
struct counter strucl

-

{

unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned

long current;
long last;
long maximum;
long minimum;
short sample_count;
long total_high;
short total_low_low;
short total_law_high;
short out_0IJ(11I8e;
short changed;
long prev;
long old;

Then the translator declares each of the user's four counters as having the structure
counter_struct:

In effect the translator has declared all 48 variables. Suppose the user wants to
access one of these variables. He may wish to display the total value of a counter
whose current value no longer is the total value (since the counter may have been
sampled-and therefore cleared-several times). As long as the total is less than
65,536, the entire number will reside in the seventh variable in the counter jtruct
structure, total low low. If the counter in question is dceJood_bcc. he will access
this "total" varlable-under the namedceJood_bcc.totaCiow_low.

57-15

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Here is a sample trigger that displays this variable whenever the operator presses ill:
STATE: display total dee good bee
CONDITIONS: KEYBOARD ·'ft"
ACTIONS:
{
displaYf ("Total DCE good BCC's = %d", dceJood bcc. total low low);
}

-

--

Refer to Section 62.1 for more detail on the structure of counters.

57.13 Creating a Structure Pointer
We have just seen how a structure can be created to store and access data
conveniently. A structure can also be used as a multibyte pointer that is
superimposed on data that has been stored previously.
In our example we will declare the structure of an IL. buffer and then point this
structure at a newly received IL buffer.
The precise structure of an IL buffer is given in the following declaration. Note that
there are 32 bytes devoted to header information and the remaining 4K bytes are
available for data.
strllct it_buffer
{
unsigned short lock;
unsigned short maintain_bits;
unsigned short buffer_size;
unsigned short transmit_tag;
unsigned short receive_tag;
unsigned long char_buffJrame_start;
unsigned long char_buffJrame_end;
unsigned short tick_count_high;
unsigned short tick_count_mid;
unsigned short tick_count_Iow;
unsigned short available_space_offser;
unsigned short bytes_remaining;
unsigned long bcc_indicator;
unsigned char data [4064];
};

The next step is to create a pointer that has the structure of ii_buffer. First. declare
the structure of ii_buffer, as indicated above. Then declare bufferytr as a
structure-pointer. as follows:
struct ii_buffer • bufferJitr;

The next step is to wait for an INFO frame to be monitored. When the the frame
data has been buffered and m_loyh_il_buff has been updated with the new
buffer-segment number. assign the first address of this buffer to bufferytr.

57-16

57 Variables

Now a structure has been created around the most recent upward-moving IL buffer.
This means that rather than moving a pointer around in the IL buffer, you can
access elements in the buffer directly. The tick_count_low variable. for example.
would be called bufferytr->tick_count_low. (The -> operator is used in place of the
dot operator in structure-pointers.)
The first element of the data string would be called bufferytr ->data fO]. Here is a
program that displays on the prompt line the fifth data element (the packet-type
byte) in the IL buffer for Info frames monitored on DTE.
{

extern volatile unsigned short m_loJh_il_buff;
struct ii_buffer
{

unsigned short lock;
unsigned short maintain_bits;
unsigned short buffer_size:
unsigned short transmit_lag;
unsigned short receive_tag;
unsigned long char_buffJrame_start;
unsigned long char_buffJrame_end;
unsigned short tick_co1.l1tt_high;
unsigned short tick_count_mid;
unsigned short tick_eount_low;
unsigned short ovoilablejpace_offset;
unsigned shorl bytes_remaining;
unsigned long bec_indicator:
unsigned char data [4064];
};

struet ii_buffer" bufferJtr;
}

LAYER: 2
STATE: monitor II buffers
CONDITIONS: DTE INFO
ACTIONS:
{
bujjerJtr::. (void .) ((long) m_loJh_il_buf! «16);
pos_cursor (0,0);
display! ("%02x ", bufjerytr->dataf4});
}

57-17

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

57-18

.,~,
F
"

58 Routines

58 Routines
This manual documents the C routines that are "external" to the C program-that is, defined
elsewhere than in the program. Most of these routines are used by the C translator when it
converts softkey-selectable programming "tokens" -most commonly those tokens that are
appropriate to Actions blocks-entered by the user on the Protocol Spreadsheet. Some, like
the Disk I/O routines. are associated with no spreadsheet conditions or actions and can be
accessed only in C regions on the spreadsheet.

58.1

Declarations
In most of the examples in the manual, we have not bothered to declare routines
since it is not necessary. In the absence of a declaration, the compiler assumes that
the routine is external and that it returns an integer. In nearly all cases, this
assumption works. In those rare cases when the routine returns another data type
(the stats-display routine get_68kyhys_addr, for example. returns a long) it must be
declared.

58.2 Arguments
An argument is an input that the user provides when he calls a routine. Arguments
are placed inside of parentheses just following the routine name, as in this call to the
pos_curspr routine: pos_cursor (l,5);
This routine requires two arguments in order to position the cursor in one of 1,088
possible character positions. The first argument selects one of the seventeen
horizontal rows. The second argument selects one of the sixty-four vertical columns.
Many routines in the INTERVIEW library have arguments whose names end in the
letters ptr or pointer. If you look at the synopsis for the displays routine, for
example. you will see that the only argument is something called stringytr. This is
an address argument. The user enterS a four-byte address as argument when he calls
the displays routine, and the routine goes to this address and begins displaying data
until a null (or other nondisplayable character) is encountered.
Pointers. are four-byte addresses. The following call to the displays routine will go to
the location of ",yacket_injoytr (the firSt byte of user data in a packet) and begin
displaying data until a nondisplayable character is encountered:
displays (m yQck.et_info"prr);

58-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Array names also are four-byte addresses. The folIo\\ring example MIl display the
characters in the array string:
char string []

= "QWERTY";

displays (string);

A string of characters declared inside of double-quotation marks is really a four~byte
address that points to the first character in the string. In the function call displays
("qwertyuiop") , "qwertyuiop" qualifies as a string pointer and therefore satisfies the
formal definition of the routine.
Many routines have no arguments and are called Mth empty parentheses:

Do not omit the parentheses. Without them, sound_alarm is a variable instead of a
routine.

58.3 Returns
In addition to performing various operations, many routines include a return function
that, at the end of the routine, stores a user-defined value in a memory location. As
an example. we Mn look at an X.2S routine called /3_window Jull.
The 13 _window Jull routine is declared automatically by the translator after the user
has made a WINDOW FULL softkey entry. The synopsis for 13 _window Jull shows how
it is declared:
extern unsigned char i)_Window Jull (path_number);

The routine is declared as a char because at the end of the routine, a return function
Mil store a char-sized value (8 bits) in memory. If the packet Mndow is full, the
stored value will be nonzero. If the packet Mndow is not full, the value Mll be zero.
The stored value is accessed any time you call the routine in your program. If you
want to test for the Mndow being full, you can enter this line of code:

Here is a simpler coding for the same test:

This coding works for the same reason that if (1) sound_alarm(); or if (10)
sound_alarm(); Mll sound the alarm. Nonzero constants. variables, and expressions
are true in C and cause statements to be executed inside of if. while, and other
control constructions. Constants. variables. and expressions that equal zero are false
and prevent statements in control structures from being executed.

58-2

58 Routines

If a routine is declared as a short, a short will be set aside in memory and any value
returned by the routine (via a return function) will be stored there. If the routine is
declared a long, a long will be reserved. If the routine is declared void, no space will

be reserved in memory and a call to return a value will not be successful.

58.4 User-Defined Routines
The follOwing coding will blank out the prompt line near the top of the INTERVIEW
run-mode display.
pos cursor(O,O};
disPlays ("

");

If you code these two routines each time you display a user-prompt, you can always

be sure that the prompt line will be blank and that each prompt will overwrite the
previous prompt completely. The only problem is that the two routines are laborious
to type in.
A better way is to declare a routine that executes the two "subroutines"
automatically.
Declare a routine with its arguments inside parentheses and its body-the list of
statements or subroutines that the routine is intended to perform-inside a pair of
curly braces.
lIaid blank"'prompt_lineO

{

pos_cursor(O, 0);
displays ("

Now you can blank out the line simply by typing this:

Suppose you wanted a routine that blanked the prompt line and generated a new
prompt. The new prompt will be the argument for the routine:
lIoid new"'prompt (string...p0inter)

char stringyointer [J;
{

pos_cursor(O, 0);
displays ("
pos_,ursor(O, 0);
displays (strin8yointer);

Now you can generate a prompt against a blank background with this simple routine:
n,w yrompt (" This prompt will overwrite any previous prompt");

58-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

NOTE: User routines may be declared and defined outside of
the current spreadsheet program-in include files or
linkable-object files. See Section 56.4.

58.5 Example Routines
We will provide three examples that will help illustrate how routines are created.

(A) Example Routine: Temporary Prompt
Here is a user-defined routine that blanks the prompt line. displays a new
user-defined prompt. and then waits a user-defined interval before blanking the
prompt line again. The routine is called temporaryJJrompt. The two inputs are
1) the new prompt. and 2) the number of seconds that you want the prompt to
remain on the display.
The routine incorporates one external routine. timeout_restarf_action. discussed
in Section 69.3 of the section titled "Other Library Tools," and one internal
routine. blankJJrompt_line. discussed above.
{

struct
{

unsigned long event_id;
unsigned short eyent_id_uid;
}

timeout"prompt;
void blank."prompUineO
{

pos_cursor(O,O):
displays ("

") :

}

void temporary"prompt (string,JJ0inter, seconds)
char string,JJ0inter ll:
char seconds;
{

blank"prompClin,O;
pos_cursor(O,O) ;
displays (strlng,JJ0lnter);
timeout_restart_action (&tim,out"prompt, seconds • 1000. blank.,JJrompt_line);
}
}
STATE: test_temporary-prompt
CONDITIONS: KEYBOARD· •
ACTIONS:

{

t,mporary,JJrompt("This prompt will sell-destruct in inary_string[l] ::
else binary_string[IJ:: '1';
if ((hex_value & OxlO) :::= 0) binary_string/2J :::
else binary_stringll] ::: '1';
if (hex_value & OxIO) =:: 0) binary_string[3J ==
else binary_string[3]:: 'J';
if «(hex_value & Ox08) == 0) binary_string[41 ::
else binary_string[4J;:; '1';
if «(hex_value & Ox04) == 0) binary_string[5j ::
else binary_string[5] '" '1';
if «hex_value & Ox02) =:: 0) binary_string{6J :::
else binary_string{6j ::: '1';
if «(hex_value & OxOl) == O} binary-.,string{7J :::
else binary_stringf7] ::: '1';
display! ("\n%$", binary_string);
}
}

ST ATE: binary
CONDITIONS: { dce...,ptlcket }
ACTIONS:
{
display_binary (m..,packet...,ptr[2J);
}

58-5

'0';
'0';
'0';
'0';
'0';
'0';
'0';
'0';

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

(C) Example Routine: Compare String Against Line Data
Here is a routine called strcmp that matches a user-entered string to line data,
beginning at a point in the line data that the user specifies. The arguments are
the string itself and a pointer to the beginning of the line data.
When the user enters his string inside double quotes. the compiler writes the
string into memory, appends a zero (null). and returns a pointer to the first
character in the string. The strcmp routine uses this zero to determine when the
match is complete.
If a complete match is found. the return (1 ) routine breaks out of the while loop,
so the return(O) never is executed. A routine that returns 1 (or nonzero) inside

of an if condition will make the condition true.
The sample program that uses the strcmp routine looks on the DCE side for a
data packet with a user-data field that begins "CR'l:-PASSWORD." This string
occurs on the "HDLC/X.25 Data Sample" diskette, DSK-951-007-1. shipped
with your INTERVIEW. Be sure to load in the Layer 2 and Layer 3 X.25
packages if you tryout this program. The Layer 3 package will provide you with
your line-data pointer (myacket_infoytr).
{

extern lIo/atile unsigned char *myacket_info ytr;
int element;
int strcmp (user_stringytr, line_dataytr)
char user_stringytr ll;
char" line_dataytr;
{

element = 0;
while (user_stringytr!elementj == line_dataytr[elementj)
{
if (user_stringytr[++elementJ :::::: 0)

return (1);
}

return (0);
}
}

LAYER: 3
ST A TE: match user data field
CONDITIONS:- DCe- DA'fA
ACTIONS;
{

}

if (strcmp("\xOd\XOaPASSWORD", myackeUnfoytr»
sound alarm ();

-

58-6

59 Monitor/Transmit Line Data

59 MonitorlTransmit Line Data
The external variables and routines in this section are available for use by the programmer to
monitor and transmit data. Their use on the Protocol Spreadsheet is not limited to any
panicular layer, though normally they belong at Layer 1.
The variables and routines approximate Layer 1 spreadsheet-generated conditions and actions.
Refer to Section 28 for more detailed explanations of the purposes of specific conditions and
actions. Sometimes the name of the variable or routine is sufficient for identifying its related
spreadsheet token. When this is not the case, the information is provided below.

59.1

Structures
Use the structure xmit_list. shown in Table 59-1, when transmitting line data via the
Ii_transmit routine. Refer to ll_transmit in Section 59.3(B) for an example of how
to use this structure.

Table 59·1
Transmit Structures

Type

Variable

Value (hex/decimal)

Structure of a transmit list for 11 transmit
routine. Declared as type struct-: Reference
member variables of the structure as follows:
xmlUist .string_length.

Structure Name: xmit_list

unsigned char •

string

unsigned short

stringJ91'lgth

Meaning

pointer to the location of the transmit string-the
transmit string Is declared separately

O-ffffI0-65535

length of the transmit string

59-1

-

------------------------------------------

INTERVIEW 7000 Series Advanced Programming:

ATLC-107-951~108

59.2 Variables
(A) Monitoring Events
1. Emulate or monitor mode. Layer 1 events include characters received. good
or bad Bee·s. aborts. parity errors, and framing errors. All event variabies
in Table 59-2 containing a _td or Jd suffix are valid in either emulate or
monitor mode. These event variables are !evarJcvd_char_rd,
!evar_rcvd_char_td, !evar-Bd_bcc_rd. !evar-Bd_bcc_td, !evar_bd_bccJd,
!evar_bd_bcc_td. levar_abortJd. levar_abort_td, !evar"paritYJd,
!evar"parity_td, levarJrm_error...rd, levarJrm_error jd. and
levar...rcv_bufferJull. The variable !evarJrm_error...rd, for example.
equates to DCE FRAMING_ERROR (or RECEIVE FRAMING_ERROR when you are
emulating DTE).
You can use both td and rd variables relating to the same event in one
conditions block. Suppose you want count all bad BeC' s, from either side
of the line. Enter the following CONDITIONS/ACTIONS block:
CONDITIONS:
{
je'PlJr_bd_bcc_td

II je'PlJr_bd_bccJd

}
ACTIONS: COUNTER bad_bee INC

Using spreadsheet tokens, the same test needs two
blocks:

CONDITIONS/ACTIONS

CONDITIONS: DTE BAD_Bce
ACTIONS: COUNTER bad_bee INC
CONDITIONS: DCE BAD_BCC
ACTIONS: COUNTER bad_bee INC

Use levarJCv _bufferJull and its associated status variable. rcv_bufferJull,
to monitor the status of the character buffer. The moment the buffer is full.
levarJCv _bufferJull comes true and the value of rcv_bufferJull transitions
from zero to a non-zero value. Then. new data begins to overwrite the old
data. The softkey equivalent of levar...rcv_bufferJull is the
layer-independent condition BUFFERfULL when it appears alone in a
conditions block. When BUFFER_FULL is combined with another condition.
in most cases the other condition will supply the event variable and only the
status test will be used. See Section 27 for a discussion of this and other
layer-independent conditions and actions.

59-2

---------------------------------------""-

59 Monitor/Transmit Line Data

Table 59·2
Monitor/Transmit Variables
Type

Variable

Value (hex/decimal)

Meaning

True for each character
received on AD. Une Setup
configured for emulate or
monitor mode.
extern fast_event

True for each character
received on TO. Line Setup
configured for emulate or
monitor mode.

extern fast_event

True when a good Bee is
calculated for an RD block or
frame. Line Setup configured
for emulate or monitor mode.

extern fast_event

True when a good Bee is
calculated for a TO block or
frame. Une Setup configured
for emulate or monitor mode.

extern fast_event

True when a bad Bee is
calculated for an RO block or
frame. Une Setup configured
for emulate or monitor mode.

extern fast_event

True when a bad Bee is
calculated for a TO block or
frame. Une Setup configured
for emulate or monitor mode.

extern fast_event

True when an abort is detected
in an RO frame. Une Setup
configured for emulate or
monitor mode.

extern fast_event

True when an abort Is detected
In a TD frame. Une Setup
configured tor emulate or
monitor mode.

extern fast_event

True when a parity error Is
detected for an RD byte. Line
Setup oonflgured for emulate or
monitor mode.

extern fast_event

True when a parity error Is
detected for a TD byte. Line
Setup configured for emulate or
monitor mode.

fevaryarltLtd

extern fast_event

True when an asyno framing
error Is detected for an RO
byte. Une Setup oonfigured for
emulate or mOnitor mode.

extern fast_event

True when an async framing
error is detected for a TO byte.
Line Setup oonfigured for
emulate or monitor mode.

59-3

-----~--------------

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Table 59-2 (continued)
Type

Variable

Value (hex/decimal)

Meaning

. extern fast_event

True when the INTERVIEW puts
a transmIssion out onto the
link. Line Setup configured for
emulate mode only.

extern fast_event

Returns true at the moment the
character buffer fills with data
and will begin to overwrite
existing data. Line Setup
configured for emulate or
monitor mode.

o

extern volatile unsigned short

1

not full
full
Line Setup configured for
emulate or monitor mode.
Most recent TO character Is
stored In this variable. Line
Setup configured for emulate or
monitor mode.

extern unsigned short

O-ff/O-255
100/256
101/257
1021258
103/259

data character (lower byte in
16-b!t data word in data buffer)
good or bad Bee
flag
sync
abort
Most recent RO character Is
stored In this variable. Line
Setup configured for emulate or
monitor mode.

extern unsigned short

O-fflO-255
100/256
101/257

102/258

103/259

data character (lower byte In
16-blt data word In data buffer)
good or bad Bee
flag
sync
abort
Most recent modifier byte for a
TO data character. This is the
upper byte In the 16-blt data
word reserved for each data
character In the data buffer.
Line Setup configured for
emulate or monitor mode.

extern unsigned char

2
4
8
10116

20/32
40/64
80/128

59-4

data-Initial value (always
Included In value of td modifier)
altemate code set
underline Ird character}
reverse Image
hexadecimal
low intensity
blink
strike-thru (parity error)

59 Monitor/Transmit Line Data

Table 59·2 (continued)
Type

Variable

Value (hex/decimal)

extern unsigned char

2
4

8
10/16
20/32
40/64
80/128

Meaning

Most recent modlfler byte for an
RD data character. This Is the
upper byte In the 16-blt data
word reserved for each data
character in the data buffer.
Une Setup configured for
emutate or monitor mode.
data f always Included in value of
rd modifier)
alternate code set
underline (rd character)-inltial
value of rd modifier
reverse Image
hexadecimal
low intensity
blink
strilce-thru (parity error)

2. Emulate mode only. One variable is valid in emulate mode only. since it
monitors an emulate action. "SENDing" a transmission means queuing a
transmission to send. The layer protocol (the RTS-CTS handshake, for
example. at Layer 1) may delay the actual transmission. The fast-event
variable levar.-xmit_cmplt will not come true until the transmission actually
has been sent. Use this condition to start accurate response-time
measurements.
If you try to use fevar _xmit_cmplt in monitor mode, you will be returned to

the main program menu. When you go to the Protocol Spreadsheet and
search for errors, the following message will be displayed: "Error 140;
Unresolved reference fevar _xmit_cmplt."

(8) Status Variables
Status variables are those in Table 59-2 that do not include event in the Type
column. Their associated event variables guarantee that they are updated and
tested.
1.

Distinguishing character types. Suppose you're monitoring the DCE side of
the link. Every time a character is detected, the event fevar Jcvd_char_rd
comes true, regardless of whether or not the character will be stored in the
character buffer. Not all characters are "data" characters. A character also
may be a flag or the second byte in a block-check, for example.
fevar Jcvd_charJd (or fevar_rcvd_char_td) does not distinguish character
types.
Character type is stored in the high byte of rcvd_charJd or rcvd_char_td.
For data characters, the high byte is zero. The low byte contains the actual
value of the character.

59-5

-------------------------_._._-------------_..

_----------_._----

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

For a "non-data" character, hereafter referenced as a special symbol. the
high byte of rcvd_charJd is a non-zero value. The low byte specifies a
special symbol to be displayed on the data screen, overwriting or replacing
the character. The special symbols are [ID (sync). lID (good BCC) •• (bad
BCC). II (abort), and fE) (flag). See Table 59-2.
Notice on Table 59-2 that the value for good BCC and bad BCC is the
same. Use levar.....sd_bccJd and levar_bd_bccJd event variables to
distinguish between good and bad BCC's (or data BCC's in DDCMP).
Likewise. use levar.....sd_bcc2Jd and levar_bd_bcc2Jd to differentiate
between good and bad header BCC's in DDCMP. Refer to Section 75 for
ODCMP variables.
Aborts are not automatically reflected in rcvd_char_rd and rcvd_char_td.
When seven consecutive 1-bits are received in 7E-framed protocols, the
controller chip generates an interrupt. The bits, however, are not stored in
memory. In this case, use levar_abortJd or levar_abort_td to detect the
interrupt. When this event variable transitions to true, it updates
rcvd_charJd (or rcvd_char_td) to indicate an abort.
Use rcvd_char_td and rcvd_charJd to monitor received characters.
independent of whether or not they will be buffered. The following
condition detects RD data characters only:
CONDITIONS:
{
jellarJcvd_charJd &:&: (/ (rcvd_charJd &: Oxl00))
}

2. Attributes. Data characters and special symbols in the character buffer are
available for normal or enhanced display on the data display-screen. Access
the data display by pressing DATA on the first rack of Run-mode softkeys. or
by selecting it as the initial Run-mode display on the Display Setup menu.
The current attributes for RD data are stored in rd_modijier. Table 59-2
shows how the various attributes are coded. The initial value of rd_modilier
is always five. This value means that the character is data (1) on the RD
(4) side. RD data is always underlined. TD data is never underlined. The
initial value of td_modilier, therefore. is one.
You may change some attributes by using spreadsheet tokens (or their
equivalent C routines). The Layer 1 ENHANCE action allows you to control
reverse-image, blink. hexadecimal. and low intensity enhancements. This
action also updates rd_modilier. td_modi/ier. or both.
When an RD data character is written to the character buffer, the value of
rd_modifier is written to the high byte of a two-byte data event-word. The
data character. found in rcvd_charJd. is written to the low byte. See
Section 59.3(C) on the format of character-buffer event words.

59-6

59. MonitorlTransmit LIne Data

NOTE: The attributes in rd_modifier and td_modifier do not
apply to special symbols. rd_modifier and td_modifier always
reflect the attributes last assigned to data. Underlining applied to
(RD) special symbols on the data display-screen comes from a bit
in the special receive-event word. See Table 59-3.

59.3 Routines
Unless noted otherwise, the routines discussed below apply when the Line Setup
menu shows either emulate or monitor mode.

(A) Controlling Data Display
ctl....enhance_ td
SynO,psis
extern Mid cll_enhanclZ_td(enhance_type_status);
unsigned short enhance_t:tp,_status;

DescIjption
This routine turns various enhancements of the data display on and off on the
DTE side. It also updates the variable td_modifier. The softkey equivalent of
this routine is the ENHANCE OTE action on the Protocol Spreadsheet.

There is one two-byte parameter. The high byte identifies the type of
enhancement to be controlled: blink (40). low intensity (20), hexadecimal
representation (10). ~and reverse image (08). The low-order byte indicates the
status of the enhancement. To indicate a given enhancement is on, the second
byte has the same value as the first. If the enhancement is to be turned off. the
value of the second byte is zero. For example. if you want to tum blink on. the
parameter value is Ox4040. To tum blink off. it is Ox4000.
Multiple enhancements can be controlled with one action by using hexadecimal
addition of the parameters, as in the example for ctl_enhanc€Jd.
Example
Assume X.2S protocol for this example. You want to enhance the packet type
byte on the DTE side with a blinking, reverse image.
LAYER: 1
ST ATE: enhance packet type
CONDITIONS;- OTE STRING "IEl5«XXXXXXXO»~·
ACTIONS:
{
etl enhance td(Ox4040};
ctl=enltance=td(Ox0808);

}

59-7

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B
CONDITIONS: DTE STRING 1EIfJ«XXXXXXXO»~·
ACTIONS:
{

ctCenhance_ td (Ox4000);
ctl_enhance_td(Ox0800);
}

Synopsis
extern 'Void ctl_enhanceJd (enhance _type_status);
unsigned short enhance_type_status;

DescriPtion
This routine turns various enhancements of the data display on and off on the
DCE side. It also updates the variable rd_modifier. The softkey equivalent of
this routine is the ENHANCE DCE action on the Protocol Spreadsheet.

See ctCenhance_td.
Example
Assume X.2S protocol for this example. You want to enhance the .packet type
byte on the DCE side with a blinking, reverse image.
LAYER: 1
STATE: enhanceJ)acket_type
CONDITIONS: DCE STRING '1f]5«XXXXXXXO»I8J8)"
ACTIONS:
{
ctl_enhan"Jd(Ox4848);
}
CONDITIONS: DCE STRING 1EIfJ«XXXXXXXO»~"
ACTIONS:
{
ctl_enhanceJd (Ox4800);
}

Synopsis
extern 'Void ctl_capture_td(status);
unsigned short status;

Description
This routine turns on and off the presentation of DTE data to the screen-that

is, it stops or freezes" the display-and capture of data to the screen buffer
(character RAM). Unlike the Manual Freeze mode initiated by the ~ key,
II

59-8

59 Monitor/Transmit Line Data

however. the "capture off" action does not allow you to scroll through the buffer
while the test continues. The softkey equivalent of this routine is the CAPTURE
DTE action on the Protocol Spreadsheet.

The only parameter is the status of capture, on (OxOO) or off (Oxl0). Turning
capture off freezes the display.
Example
Assume X.25 protocol for this example. You want to turn capture off as soon
as the cause byte is displayed in a Clear packet on the DTE side. Capture will
be resumed when the spacebar is pressed.
LAYER: 1
STATE: find_cause
CONDITIONS: DTE STRING 'fI5«XXXXXXXO))I818J1~·
ACTIONS:
{
ctl_capture_td(OxJO);

}
CONDITIONS: KEYBOARD" "
ACTIONS:
{
ctl_capture_td(OxOO) ;

}

ctl capture rd

-

-

Synopsis
extern void ctl_captureJd(status);
unsigned short status;
Des~ription

This routine turns on and off the presentation of DCE data to the screen-that
is. it stops or "freezes" the display-and capture of data to the screen buffer
(character RAM). Unlike the Manual Freeze mode initiated by the E§I key,
however. the .. capture off" action does not allow you to scroll through the buffer
while the test continues. The softkey equivalent of this routine is the CAPTURE
DCE action on the Protocol Spreadsheet.
~

The only parameter is the status of capture, on (OxOO) or off (OxlOO). Turning
capture off freezes the display.
Examg:le
Assume X.25 protocol for this example. You want to turn capture off as soon
as the cause byte is displayed in a Clear packet on the DCE side. Capture will
be resumed when the spacebar is pressed.

59-9

INTERVIEW 7000 Series Advanced Proarammlna: ATLC-107-951-10B

LAYER: 1
STAT!':, find_cause
CONDITIONS: DCE STRING ''If)f3((XXXXXXXO))~~·
ACTIONS:
{
ctl_captureJd (Oxl 00) ;
}
CONDITIONS: KEYBOARD· •
ACTIONS:
{
ctl_captureJd (OxOO) ;
}

outsync_action
Synopsis
extern '!Ioid outsync_action (side);
unsigned short side;

Pescription
The outsync_action routine applies to synchronous format only. This routine
sends one of the receivers (TO or RD) out of sync and initiates a search for
sync. The softkey equivalent of this routine is the (PROTOCLI OUT_SYN action on
the Protocol Spreadsheet.

The only parameter identifies which side of the line is to go out of sync, 0 for
the PTE side, 1 for the PCE side.
Example
To display PTE-protocol information only, initiate sync each time a start-of-text
character is found. The results of this routine are similar to turning capture off
and on. but here the display does not have to be turned on again. It resumes
automatically with sync.
LAYER: 1
STATE: Qo_out_of_lync
CONDITIONS: DTE STRING .~ •
ACTIONS:
{
outsync_action (0) ;
}

(8) Transmitting
Use the following routines in emulate mode only. If you try to call one of these
routines in monitor mode, you will be returned to the main program menu.
When you go to the Protocol Spreadsheet and search for errors, a message like
the following will be displayed: "Error 140: Unresolved reference
ll_iljransmit. "

59-10

59 Monitor/Transmit Line Data

11 transmit
Synopsis
extern ~oid ll_transmit(count, struct_send_stringytr, xmit_tag);
unsigned short count;
struct xmit_list
unsigned char" stringytr;
unsigned short strinLlength;
};

struct xmit_list " struct_send_stringytr;
unsigned short xmil_tag;

Description
The ll_transmit routine sends a specified string with a user-determined

Bee.

The first parameter is the number of strings to be sent.
The second parameter is a pointer to a structure which in turn identifies the
location and length of each string.
The third parameter is a transmit tag which includes a Bee in bits 0-2: good
(001), bad (010), or abort (011). Bits 3-7 are reserved for future use.
Integers may be used to indicate the value of the transmit tag: good (1). bad
(2). and abort (3).
Example
Assume you want to send a fox message at Layer 1 inside of an X.2S data
packet with a good block check. You might have 2 strings, one with the Layers
2 and 3 header information, and one with the fox message. You would send
these strings as follows:
{
unsigned char headers 11 = {OxOl, OxOO, OxlO, Ox04, OxOO};
unsigned char message [J = "({FOX)) ";
struct xmit_list

unsigned char" string;
unsigned short SIring_length;
};
struct xmit_'ist send_string [] = {&headers[Oj, 5, &message[OJ. sizeo!(message) - l};
}

59-11

__._------

,---------------------_.

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

LAYER: 1
STATE: send_message
CONDITIONS: KEYBOARD ••
ACTIONS:
{

1l_transmit(2, &:send_string[Oj, 1);
}

SynOpsis
extern void ll_il_transmit(il_buffer_number, relay_baton, data_start_offset, transmit_tag);
unsigned short il_buffer_number;
unsigned short relay_baton;
unsigned short data_start_offset;
unsigned short transmit_tag;

Description
This routine sends a designated interlayer message buffer out onto the line.

The first parameter is the interlayer message buffer number.
The second parameter is the maintain bit used to hold the buffer while the send
operation is performed at Layer 1.
The third parameter js the offset from the beginning of the buffer to the service
data unit (SDU).
•
The fourth parameter is a transmit tag which includes a Bee in bits 0-2: good
(001). bad (010). or abort (011). Bits 3-7 are reserved for future use.
Integers may be used to indicate the value of the transmit tag: good (1), bad
(2), and abort (3).
Example
Send the same text as in the example for ll_transmit. The softkey equivalent of
this routine is the SEND action on the Protocol Spreadsheet. Refer to Section
63.3(A) for a description of the Jet_il_msg_buff, _start_il_buff_list , and
_insert_il_buff_list_cnt routines.
{

unsigned
unsigned
unsigned
unsigned

short il_buffer_number;
short relay_baton;
short data_start_offset;
char message [) ,. ..ol\xOOO100~\xOOOa.FOX)) ";

}

59-12

59 Monitor/Transmit Line Data

LAYER: 1
ST A TE : send_message
CONDITIONS: KEYBOARD" •
ACTIONS:
{
Jet_il_mS8_buff(&:il_buffer_number, &:relay_baton):
_start_il_buff_Ust(il_buffer_number. &datajtart_offset);
_insert_il_bufLlist_cnt(il_buffer_number, data_start_ offs,et, &:message [OJ,
(sizeof(message) - 1);
ll_il_transmit(il_ouffer_number, relay_baton, data_start_offset , 1);
}

Synqpsis
extern lIoid idle_action(cnaracter);
unsigned char character;

Description
Only for format SYNC, the idle_action routine allows you to change the idle-line
condition applied by the INTERVIEW. The softkey equivalent of this routine is
the (PROTOCLI IDLE_LN action on the Protocol Spreadsheet.

The only parameter is a character or numeric value representing the idle
character.
Example

X.21 or X.21BIS idles different characters in various states, "F, 16, +. for
example. To signal a change in protocol state, you might change the idle
character to +:
LAYER: 1
STATE: ohange-,die_character
CONDITIONS: KEYBOARD· •
ACTIONS:
{
idle_action('t ');
}

59-13

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Synopsis
extern void set_tcr_b (tcr_register_mask. tcr_register_value);
unsigned char tcr_register_mask;
unsigned char tcr_register_value;

Pescrjption
This routine clamps the transmit line to 0 (space) or 1 (mark). or unclamps it so
that transmit routines may be executed. In X.21. steady zero will signal a clear
request/indication or a clear confirm. while steady 1 will indicate one of the
call-ready or call-setup states. In other contexts. the routine simply initiates and
terminates a break.

The fll'st parameter is the mask that is anded with the current TCR register to
turn the current values of bits 3 and 4 (counting 1-8 from the right) to zero.
This mask is always Oxf3.
The second parameter contains the new values of bits 3 and 4 that will be
written to the register. The three available parameters are Ox08 to clamp the line
to zero. OxOc to clamp the line to 1. and Ox04 to unclamp the line and permit
data transmissions.
Example
This program will generate a 250-millisecond break when the operator presses
the ~ key.
{
extern last_event keyboard_new _any_key;
extern volatile unsigned short keyboard_any_key;
}

STATE.: generate_break
CONDITIONS:
{

keyboard_new_any_key && (keyboard_any_key
}
ACTIONS: TIMEOUT break RESTART 0.250
{
set_tcr_b (Ox13, Ox08):
}
CONDITIONS: TIMEOUT break
ACTIONS:
{
set_tcr_b (OxI3. Ox04);
}

59-14

== Oxle3)

59 Monitor/Transmit Line Data

(C) Writing to Character RAM
For the sake of speed, the 64-Kbyte character buffer uses a shorter data word
than the 32-bit word in the Display Window and traces. Refer to Table 61-4.
A sixteen-bit event word is reserved for each character in the 64-Kbyte
character buffer.
Table 59-3 shows the format of event words. Two kinds of event word should be
distinguished: data and special receive.
1. Data Event-Words. Data event-words may contain enhancement attributes
in the high byte. Whereas attributes comprise 24 bits of a long in the

Display Window and the traces, in the character buffer they are contained in
only 8 bits. Data words in the character buffer. therefore. include a less
flexible set of attributes. Color attributes, for example, are not directly
available in words written to the character buffer. See Section 16, Color
Display. for an explanation of how reverse, blink. and low enhancements in
the character buffer may be mapped to colors in the RGB output.
Table 59-3 lists the available attributes.
The character is located in the low 8 bits. Its value can range from
hexadecimal 0 through FF.

2. Special-Receive Words. The high byte in special-receive words determines
the symbol (from the special graphic character font) that will overlay the
character contained in the low byte. The symbols that may be written to the
tharacter buffer are good BCC's. bad BCC's, aborts. flags, and sync. One
bit, the td/rd indicator. controls on which side the symbol will be displayed.
Symbols on the RD side are underlined. as all RD data is. Notice in
Table 59-3 that the td/rd indicator bit is the same one that controls the
underline enhancement in data event-words.
The value in the low byte is meaningless in the context of special-receive
words. The special symbol will overlay or replace the character. Its value,
nevertheless. can range from hexadecimal 0 through FF.

INTERVIEW 7000 Series Advanced Programming: ATLC-107 951 108

Table 59·3
Character Buffer 1S-Bit Word

Type

Mask (hex)

Meaning

Input (hex)

data-event word:

data
0100

0100

the low byte contains data

0500

add 0100 to the following:

td/rd Indicator:

0000
0400

td character
rd character (underlined)

add modJlied value of td I rd
Indicator to one (or 8 Gombination) of the following:

enhancements: t
tenhancements apply to data
Indioated in low byte)

0000
0200
0800
1000
2000
4000
8000

normal
alternate oode set
reverse Image
hexadecimal
low intensity
blink
strike-thru (parity error on charaoter)

ffOO

special receive-event word:

special receive
8300

0200
8200

special receive-event word
reserved

8700

add 0200 to the fol/owlng:

tdJrd Indicator:

0000
0400

td oharaoter
rd character (underlined)

add modified value of tdlrd
Indicator to one of the
following:

special event:
(symbols for these events overlay the
data indicated In low byte)

0800
1000
1800
2000
2800
3000
3800

good CRC
bad CRC
abort
flag
sync
bad CRC2 (DDCMP)
good CRC2 (DDCMP)

bfOO

reserved

0700

0400

reserved

reserved

Of00

0800

reserved

t Selecting rd (0400) for the td/rd indicator results In the data being underlined. The underline enhancement shares
the same bit. It has been omitted from the list of enhanoements to avoid an error from double counting.

59-16

59 Monitor/Transmit Line Data

The routines for writing 16-bit event words to the character buffer are
add_event_to_buff and add_array_to_buff. These routines may be used when
the Line Setup menu shows either emulate or monitor mode.

Synopsis
extern unsigned tnt add_event_to_buff(event_word);
unsigned int event_word;

Description
The add_event_to_buff routine writes the specified input to the 64-Kbyte
character buffer.

The only input is a 16-bit event-word to be written to the buffer. Table 59-3
lists the coding of event words.
Returns
A one is returned if the event was successfully added to the character buffer. If

the routine failed. zero is returned.
Example
To display only SDLe frames with an address of hexadecimal c2 enter the
following spreadsheet program:
f

LAYER: 1
{
extern unsigned short rcvd_char_td;
extern unsigned short rcvd_char-,d;
}
STATE: Init
CONDITIONS; ENTER_STATE
ACTIONS: CAPTURE BOTH OFF
NEXT_STATE: address
ST ATE: address
CONDITIONS: DTE STRING
ACTIONS:
{
if(rcvd_char_td == Oxe2)
{
add_event_to_buff «(short}tdJnodijier« 8) + rcvd_char_td);
ctl_capture_td(OxOOi;
}
}
CONDITIONS: DTE STRING "!BEl"
ACTIONS: CAPTURE DTE OFF

m-

59-17

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951 108

CONDITIONS: DCE STRING
ACTIONS:
{
if(rcvd_char_rd
Oxe2)

m·

==

{

add_event_to _buff (((short)rd_modijier « 8) + revd_charJd);
ctl_captureJd (OxOO);
}

CONDITIONS: DCE STRING W'
ACTIONS: CAPTURE DCE OFF

SynQPsis
extern unsigned int add_array_to_buff(array...ptr, count);
unsigned short" arraY"'ptr;
unsigned char count;

Description
The add_array_to_buff routine writes specified elements of an array to the
64-Kbyte character buffer.

The first parameter is the location of the array to be written to the character
buffer. The array consists of 16-bit shorts.
The second parameter is the number of elements in the array to be written.
The number of elements which can be written to the buffer must be in the range
0-16. Elements in the array must adhere to the format of event words shown in
Table 59-3.
Returns
The result of the add_array_to_buff routine is all or nothing. A one is returned
when all requested elements of the array are successfully added to the character
buffer. If the routine fails. zero is returned and nothing is written to the buffer.
Example
To display on the Data Screen only X.2S packets with an LCN of 004. enter the
following spreadsheet program. (This program displays the DTE side of the line
only. Additional programming similar to that entered would include DCE data.)

59-18

59 Monitor/Transmit Line Data

LAYER: 1
{
unsigned short dte_array {lOO];
unsigned short lcn;
extern unsigned short rcvd_char_td;
}
STATE: Inlt
CONDITIONS; ENTER_STATE
ACTIONS; CAPTURE BOTH OFF
NEXT_STATE: address
STATE: address
CONDITIONS: DTE STRING
ACTIONS:
{
dte_array [0] ::: (Ox0100 + rcvd_char_td);
}
NEXT_ STATE : frame_type
STATE: frame_type
CONDITIONS: DTE STRING " ((XXXXXXXO)) •
ACTIONS:
{
dte_array [lJ ::: (OxOl00 + rClId_char_td);
}
NEXT_STATE: gfl
CONDITIONS: DTE STRING "((XXXXXXX1»"
NEXT_STATE: address
STATE: gfi
CONDITIONS: DTE STRING 18]"
ACTIONS:
{
dte_array [2] ::: (Ox0100 + rcvd_char_td);
lcn:; «unsigned int)rcvd_chaT_td & oxon «8;

m"

)

NEXT_STATE: len
STATE: len
CONDITIONS: DTE STRING 18].
ACTIONS:
{
dte_array [3]:: (Ox0100 + revd_char_td);
lcn += revd_char_td;
if(len == Ox0004)
{
add_array_to_buff(dte_array, 4);
ctl_capture_td(OxOO) ;
current_state:: state_eo/;
}

else
current_state'" state_address;
break;
}
STATE: aof
CONDITIONS: DTE STRING "Em"
ACTIONS: CAPTURE DTE OFF
NEXT_STATE: address

59-19

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

59-20

60 EIA

60 EIA
The Test Interface Module (TIM) located in the rear of the INTERVIEW determines the EIA
leads available fOf monitoring and control (Section 10). The variables and routines in this
section apply to RS-232, V.35, and RS-449 interface modules. The X.21 module is treated
separately in Section 70.
To use the C variables and routines explained in this section. enable EIA leads by selecting
Buffer Control Leads: ;iiij~:~ on the FEB Setup menu. See Section 7.1(B). If no other source
for clock is provided, use internal clock (Line Setup menu).
The variables and routines approximate Layer 1 EIA spreadsheet-generated conditions and
actions. Their use on the Protocol Spreadsheet is not limited to any particular layer, though
normally they belong at Layer 1.
~,

t,

60.1

Variables
With an. RS-232, V.35, or RS-449 TIM installed, you may monitor RI. DSR, DTR.
CD, CTS, RTS, and UA. The lead names in RS-449 are slightly different: see
Table 60-1.
The fast-event variable levar_eia3hanged detects a change in EIA lead~. It does
not establish which lead(s) has changed. Two associated variables, current_eia_leads
and previous_eia_leads. indicate the status of the seven leads. These are two-byte
(short) variables. Each lead is represented by a different bit in the short. Some bits
are unused. Table 60-1 lists the mask that can be used to isolate each lead.
Whenever a lead Changes, the value in current_eia_leads is written to
previous_eia_leads. Then current_eia_Ieads is updated.

(A) Masking To Detect a Change in a Given Lead
To test whether or not a given lead changed. RTS for example, while
disregarding its status. enter the following condition on the Protocol Spreadsheet:
CONDITIONS:
{
jevar_eia_changed && «(current_eio_leads

A

prhious_eio_leads) & Ox80}

== Ox80)

}

Select a mask value from the list in Table 60-1 to indicate which lead you care
about. Specify multiple leads with a mask derived via hexadecimal addition.

60-1

INTERVIEW 7000 Series Advanced Proarammlna: ATLC-107-951-10B

Table 60-1
EIA Variables
Type

Meaning

Value (hex/decimal)

Variable

True when the status changes
for an EIA lead (non-data).
Line Setup configured for
emulate or monitor mode.

extern fast_event

BS-2321Y.35:
extern const volatile unsigned short

4
8
10/16
20/32

40/64
80/128
200/512

(RS-449)

RI (IC)
OSR (OM)
OTR (TR)
CO (RR)
CTS (CS)
RTS (RS)
UA
A value In this Bst. when anded
(l) with current e/a leads.
equals zero If the lead Is on.
Example:
STATE: rts on
{ If ((currence,a_,eads & OxBO)
== 0) sound_a/arm(): }

Note: This variable WIll store EIA
status If (1) Internal or external
clock Is supplied and (2) EIA
leads are enabled on FEB
Setup. Une Setup configured
for emulate or monitor mode.
Same values as
current ela 'eads. Updated
only
logiC has had a
chance to compare current and
previous leads. Line Setup
configured for emulate or
monitor mode.

extern const volatUe unsigned short

after

The mask for RTS is Ox80. In the example, the event levar_eia_changed
updated current3ia_leads. The new current_eia_leads was
bitwise-exclusive-ORed with previous_eia_leads to identify all the leads that
changed. Then the result was bitwise ANDed with the RTS mask to determine if
RTS was among the leads that changed. If this result was equal to the mask,
the lead changed.

(8) Masking For the Status of a Lead
You may also test the current status of a lead, independent of any change. And
the mask with current_eia_leads. as in this if statement testing for RTS "on":
STATE: test_for_rts_on
{

i/((cur"nt_eia_'eads de 0%80) == 0) sound_alarm();
}

60-2

,"-""'.

60 EIA

If the result is zero. the lead is on. If the result equals the mask. the lead is

off. "On" means that a lead is more positive than +3 volts with respect to signal
ground. "Off" implies only that a lead is not at or above the "on" threshold.
not necessarily that a minus threshold has been attained.

(C) Detect Change and Current Status
The .two examples shown above could be combined to test for RTS changing
from off to on:
CONDITIONS:
{
(jevar_eia_changed .lei «((current_eia_leads • prellious_eia_leads) & OxBO}
((current_eill_leads & Ox80) == 0»

== Ox80}

&&

This example approximates the translator's version of the spreadsheet-token
condition EIA RTS ON when it appears alone in a conditions block. When an EIA
condition is combined· with another condition. in most cases the other condition
will supply the event variable and only the EIA status test will be used.

60.2 Routines
You may control RS-232 EIA leads in emulate mode only. When the Line Setup
menu shows Mode: f~~fi:!~~ij[(:;f you control CTS, CD, and DSR. An *~i£l$'l;1:'ti.t
selection gives you control over RTS and DTR. Entries on the Interface Control
menu may be used to set the leads' initial status (Section 10.6).

ctl eia
Synopsis
extern lIoid ctCeia(on_mask, off_mask);
unSigned short on_mask;
unsigned short off_mask;

Descrjption
The ell_eia routine allows you to control the status of up to three of nine possible
leads. Which leads you control depends on your emulation mode. The softkey
equivalent of this routine is the EIA action on the Protocol Spreadsheet.

The first parameter indicates which leads you want to turn on. Each bit in the
parameter controls a given lead: RTS/CTS (01). DTR/DSR (02), CD (04). AUXO
(10), AUXl (20). AUX2 (40). AUX3 (80). Wherever there is a zero in the first

60-3

--------_._._------

INTERVIEW 7000 Series Advanced Proarammlna: ATLC-107-951-108

parameter. the corresponding lead will be turned on. A one in this parameter will
not cause any lead to be turned off. A value of Oxff will mean don't care (no
action).
The second parameter indicates which leads you want in the "off" condition. Each
bit in the parameter controls a given lead: RTS/CTS (01). DTRlDSR (02). CD (Q4).
AUXO (10). AUX1 (20). AUX2 (40). AUX3 (80). Wherever there is a one in the
second parameter. the corresponding lead will be turned off. Zeroes in this parameter
do not turn leads on. A value of 0 will mean don't care (no action).
NOTE: If both bytes are attempting to control the same lead. the

off parameter will override the on parameter.

Example
Suppose your emulate mode is BtiflIIU. As a DCE. you control the CTS. DSR.
and CD leads. (An attempt to control the status of RTS or DTR will fail, since the
DTE controls these leads.) When RTS is raised. you want to turn CTS on; when RTS
drops, turn CTS off.
LAYER: 1
STATE: controLcts
CONDITIONS: EtA RTS ON
ACTIONS:
{
ctl_eia(OX/e. OxOO);

}
CONDITIONS: EIA RTS OFF
ACTIONS:
{
ctl_eia(Oxf!. OxOl):

}

6Q-4

61 Display Window and Trace

61 Display Window and Trace
The C structures. variables, and routines detailed in this section control the type and location
of certain displays on the INTERVIEW. These displays can be grouped into three categories.
The first display area is the prompt line. the second line on aU Run-mode screens.
The second type of display utilizes the Display Window. available as a selection on the Display
Setup portion of the Line Setup menu. or conditionally accessible via softkey during Run
mode. To write to the Display Window. use the pos_cursor (or restore_cursor) and dispJayc.
displayf. or displays routines. When using Display Window. you may position the cursor
before output is generated on the screen.
The third type of display utilizes one or a combination of the eight available trace buffers.
Trace screens are conditionally accessible via softkey during Run mode. Seven user-traces
appear as choices under the User Trace selection on the Display Setup' menu. The remaining
trace is Program Trace, also an option on Display Setup. Program Trace enables you to track
any or all layers, one or all tests, and movement between states. To write to any of the eight
trace-screens. use the tracec. trace!, and traces routines.
NOTE: You may not use the pos_cursor routine to position the
cursor on any trace screen. New lines (or blank lines) may be
generated via the "\n" specifier.
Attributes-color. underlining. and font, for example-may be assigned to characters in the
Display Window and all of the Trace buffers.
NOTE: Color attributes are applied to the ROB output signal,
not to the plasma screen.

61.1

Current Display Mode
A group' of variables keeps track of sonkey movement from one display screen to
another (see Table 61-1). When you move from the Display Window to the Program
Trace sqreen. for example, the fast-event variable disp/ay_screen_changed indicates
the change of display. The coded value for Display Window now is stored in
prey_display _screen. and the value for Program Trace can be found in
ernt_display _screen.

61-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

These variables also distinguish between Run mode and Freeze mode. This
distinction is important since some keys on the keyboard are mode-dependent. In
Freeze mode. for instance. cursor keys automatically become operational for scrolling
through the buffer. The programmer will want to avoid using these keys as
user-input when crnt_display_screen indicates that the unit is in Freeze mode.
Table 61·1
Current Display Variables

Type

Value (hex/decimal)

Variable

extern fast_event

extern unsigned short

Meaning

True when Run-mode
display-screen Is changed. or
when Run/Freeze mode Is
changed. Value In
ernt display soreen is stored In
prev-display soreen. and
emt -d/splay=sereen Is updated.
Une-Setup configured tor
emulate or monltor mode.
Contains current dlsp.lay screen
(low byte) and indicates whether
unit Is in Run mode or Freeze
mode (high byte). Une Setup
configured for emulate or
monitor mode.

crnt_display_screen

dlsplay-soreen

o
1

2
3
4
11/17

12/18
21/33
31/49
41/65
42166
43/67

44/68
45/69

46/70
47171
51/81

52/82
53/83
54/84
55/85

56/86
57/87
61/97

62/98

100/256

o

61-2

no display
single-line data
dual-line data
single-line data with leads
dual-line data with leads
tabular statistics
graphic statistics
Display Window
Program Trace
Layer 1 Protocol Trace
Layer 2 Protocol Trace
Layer 3 Protocol Trace
Layer 4 Protocol Trace
Layer 5 Protocol Trace
Layer 6 Protocol Trace
Layer 7 Protocol Trace
User Trace 1
User Trace 2
User Trace 3
User Trace 4
User Trace 5
User Trace 6
User Trace 7
TIM package standard stats
TIM package aux
Run/Freeze mode (bit 9)
Freeze mode
Aun mode

81 Display Window and Trace

Table 61-1 (continued)
Type

Variable

Value (hex/decimal)

extern unsigned short

Meaning

Contains previous display screen
{low byte I and Indicates whether'
unit was in Run mode or Freeze
mode (high byte). line Setup
configured for emulate or
monitor mode.
display-screen

o
1

2
3
4
11/17
12/18
21/33
31/49
41/65

42/66
43/67
44168
45/69
46170
47/71
51/81
52/82
53/83
54184

55/85
56/86

57/87
61197
62/98

100/256

o

no display
single-fine data
dual-line data
single-llne data with leads
dual-ftne data with leads
tabular statistios
graphic statistics
Display Window
Program Traoe
Layer 1 Protocol Trace
Layer 2 Protocol Trace
Layer 3 Protocol Trace
Layer 4 Protocol Trace
Layer 5 Protocol Trace
Layer 6 Protocol Trace
Layer 7 Protocol Trace
User Trace 1
User Trace 2
User Trace 3
User Trace 4
User Trace 5
User Trace 6
User Trace 7
TIM package standard stats
TIM package aux
Run/Freeze mode (bit 9)
Freeze mode
Run mode

61.2 Prompt Line
Access to the prompt line is always available via the display"'prompt routine, or its
softkey equivalent. the PROMPT action. Attributes may not be assigned to a prompt
created via either of these methods. (To create a prompt with attributes, use the
pos_cursor and display! routines.) Prompts appear on whatever screen is active at
the time the prompt is written, including trace screens. With one exception,
movement to another display erases the prompt. The only screen which retains the
most reqent prompt is the Display Window.
You may also pOSition the cursor to the prompt line in the Display Window via the
pos_cursor routine. The initial position of the cursor in the Display Window is at the
beginning of the prompt line-row zero, column zero. Anything written to this cursor

61-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

position in the Display Window will appear as a prompt on anyone of the other
display screens (assuming one of them is active at the time the message is written).
Position the cursor below the prompt line for messages intended for the Display
Window only.
Trace buffers retain no record of prompts. When you write to a trace screen, the
initial position of the cursor is the line immediately below the prompt line-row one.
Since you may not position the cursor in trace buffers, all messages written to trace
buffers are appended at the end of the buffer. You may never access the prompt
line via tracef (or tracec or traces) routines.

61.3 Display Window
The Display Window preserves one screen, including the prompt line. of user-entered
messages. When the end of the display screen is reached. the previous messages are
overwritten, beginning at row one (the line below the prompt line).
NOTE: Use the keyboard variables and the send_key routine
explained in Section 69. Other Library Tools, to program the
Run-mode use of I±l and ff) in the Display Window. (For other
Run-mode screens, these keys control the playback speed of disk
data.)

(A) Variables
There are variables accessible to the user which provide information about the
Display Window. Table 61·2 lists the variables and their possible values. Two
variables indicate the current position of the cursor: current_line stores the row
number and current_col stores the column number. To find out which attributes
are active in the Display Window, check the values stored in window_color and
window_modifier. Color is stored in the high byte of the two-byte variable
window _color. Enhancements are stored in the low byte. The current font code
can be found in window _modifier.
NOTE: Attributes assigned via the %m conversion specifier
(refer to tracef-routine input) to characters in trace buffers will
not alter the values of window_color and window_modifier. These
variables refer to the Display Window only.
The variable disp/ay_window_buffer provides the user with access to the
display-window buffer. This variable is an array of 1,088 longs. Each element
in the array contains one byte of character data and three bytes of attributes.
The attributes are determined by the current values of window_color and
window_modifier.

61-4

61 Display Window and Trace

Table 61-2
Display Window Variables

Type
extern unsigned short

Variable

Value (hex/decimal)

current_line

extern unsigned short

Meaning

0-1010-16

Contains the current row
number of the cursor position In
the Display Window. Line Setup
oonflgured for emulate or
monitor mode.

0-3fJO-63

Contains the current column
number of the oursor position In
the Display Window. Line Setup
configured for emulate or
monitor mode.
Two-byte variable. Current
color sefections are Indicated in
the low byte. Current
enhanoements are Indicated In
the high byte. Written to by %m
oonverslons. Attributes are
oopied into data words in
Display Window. Line Setup
configured for emulate or
monitor mode.

extern unslgned short

Isolate bits of interest via
bitwise andlng (&) of mask with
variable. Compare result to
value column. For example,
underline attribute mask =
Ox1oo. Therefore window color
& Ox1oo equals 0 (underline eft)
or Ox1oo (underline on). Line
Setup configured for emulate or

monitor mode.
back.ground color mas/< = 7 (bits
1-3) :

o
1

2
3
4

black
blue
green

cyan

6

red
magenta
yellow

7

White

5

foreground color mas/< = Ox38
(bits 4-6);

o
6
10/16
18/24
20/32

26/40
30/46
38156

61-5

blaok
blue
green
cyan
red

magenta
yellow
White

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Table 61-2 (continued)
Type

Variable

Value (hex/decimal)

(window_color continued)

Meaning

color blink mask

o
40/64

=Ox40 (bit 7):

no blink
blink
c%r strike-thru mask = Ox80
(bit 8):

o
80/128

no strlke-thru
strike-thru
over/lne mask

o

100/256

o

(bit 9):

no overllne
overllne
blank mask

200/512

=Ox100

c

Ox200 (bit 10):

no blank
blank
underline mask = Ox400 (btt
11) :

o
400/1024

no underline
underline
reverse Image mask
12):

o
800/2048

=Ox800 (bit

no reverse image
reverse image
hex mask", Ox1000 (bit 13):

o
1000/4096

no hex
hex
low intensity mask .. Ox2000 (bit
14):
'

o
2000/8192

no low Intensity
low Intensity (RS-170 output)
monochrome blink mask ."
Ox4000 (bit 15):

o
4000116384

no monochrome blink
monochrome blink
monochrome strlke-thru mask
Ox8000 (bit 16):

o
8000/32768

61-6

no monochrome strlke-thru
monochrome strlke-thru

=

61 Display Window and Trace

Table 61·2 (continued)
Variable

Type
extern unsigned char

Value (hex/decimal)

window_modifier

Meaning

Contains the current modifiers.
Une Setup configured for
emulate or monItor mode.
font mask .. 7 (bits 1-3):

o
1

2
3

7
extern unslgned long

displaY-Window_buffer (1088)

ASCII
special graphlo charaoter set
(refer to Table 61-5)
primary font-code selected on
Une Setup
alternate font-current
Implementation Is for call-setup
phase In X.21 (ASCII)
hexadecimal
Array of 32-blt words that make
up the one-screen Display
Window. Each word contains
three bytes of attributes and a
one-byte character. Refer to
Table 61-4. Line Setup
oonflgured for emulate or
monitor mode.

(8) Structures
Once the data word is written to the buffer as an element in the
dispJay_window_buffer array. it can be accessed and written to-and therefore
changed-the same as any other location in memory. There is an extern array,
display_window_index_buffer[17), which provides a method of informing the
display controller on the CPM card that the display needs to be updated. The
structure of this array is shown in Table 61-3.
Each element in the display_window _index_buffer array represents a horizontal
row or line in the Display Window. Each element is a structure with two
variables. mpm and cpm. The first variable in the structure, mpm. increments
automatically whenever a line in the display-window buffer is updated by a
display routine. (If you write to the buffer directly without using one of the
display routines. you must increment this variable .. manually ... ) Its particular
value at any moment is not important. What is significant is whether or not the
value of the second variable in the structure. cpm, is the same as mpm. The
processor on the CPM compares these two variables (for each line) periodically
to determine if a line in the Display Window needs to be rewritten. If the
values of the two variables do not match. it means that a line updated in
memory now needs to be updated by the CPM display-controller software.
After the display is changed, the value of mpm is copied automatically into cpm.

61-7

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

Table 61-3
Display Window Suffer Structures

Type

Variable

Value (hex/decimal)

Structure Name; display_window_index_buffer [171

Meaning

An array of struotures used for detecting
ohanges to the display-window buffer. There are
seventeen elements In the array. one for each
line In the Display Window. When a change is
made to a line in the display-window buffer. the
corresponding element in the array Is accessed.
If a display' routine changes line 3.
dispJay_window_lndex_buffer{3].mpm is
automatically incremented. The CPM detects
the difference between
display_window_index_buffer [3}.mpm and
display_window_index_buffer {3] .cpm and
updates line 3 In the Display Window. Declared
as type extern struct.
You must increment an mpm variable manually
when you write directly (not via a display! routine)
to the Display Window.

unsigned char

mpm

O-tf/O-255

When the MPM updates a line In the
display-window buffer, this variable is
Incremented.

unsigned char

cpm

O-ff/O-255

The CPM checks the value of this variable against
the value of mpm. If they are different. the
value In mpm Is copied into cpm. The updated
line in MPM is then presented on the
display-window screen.

(C) Routines
You may position the cursor before output is generated on the screen via the
pos_cursor and restore_cursor routines- The pos_cursor routine positions the
cursor at the row and column you specify. The restore_cursor routine returns
the cursor to a previous location.
One routine. display!. allows you to add attributes to messages in the Display
Window. including the prompt line. These attributes are listed in Table 61-4.

61-8

61 Disglay Window and Trace

displayc '.,
Syno.psis
extern void displayc(character);
const char character;

Description

The displayc routine outputs a single ASCII character to the Display Window
screen. The placement of the output on the screen may be controlled via the
pos_cursor routine. Attributes may not be used in displayc.

The parameter value may be given as a hexadecimal, octal. or decimal constant;
as an alphanumeric constant inside of single quotes; or as a variable. A
hexadecimal value must be preceded by the prefix Ox or OX; an octal value must
be preceded by the prefix O. If no prefix appears before the input. the number
is assumed to be decimal. Valid numeric entries are 00 to 127, decimal. An
alphanumeric character placed between single quotes will be output as is to the
display.
Example
The displayc entries on the left output the character given on the right. at the
cursor location on the Display Window screen:
displayc('a') ;
dispJayc(65);
displayc(Ox65) ;
displayc(065) ;

a
A

e
5

displayf
Syngpsis
extern int display!(format"'ptr, . . . );
const char • !ormat...ptr;

Description
The display/routine writes output to the Display Window screen, under control
of the string pointed to by format ytr that specifies how subsequent arguments
are converted for output. If there are insufficient arguments for the format, the
behavior is undefined. If the format is exhausted while arguments remain, the
excess arguments are evaluated but otherwise ignored. The display! routine
returns when the end of the format string is encountered. The placement of the
output on the screen may be controlled via the pos_cursor routine.

61-9

.-----------,-.---"'--,-'-~~--.---'~-----

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

The format is composed of zero or more directives: ordinary characters (not
%), which are copied unchanged to the output stream; and conversion

specifications, each of which results in fetching zero or more subsequent
arguments. Each conversion specification is introduced by the character %.
After the %, the following appear in sequence:
•

Zero or more flags that modify the meaning of the conversion specification.
The flag characters and their meanings are:
The result of the conversion will be left-justified within the field.
+

The result of a signed conversion will always begin with a plus or
minus sign.

space If the first character of a signed conversion is not a sign, a space will
be prepended to the result. If the space and + flags both appear, the
space flag will be ignored.
#

The result is to be converted to an "alternate form." For d and i
conversions, the flag has no effect. For 0 conversion, it increases the
precision to force the first digit of the result to be a zero. For x (or
X) conversion, a nonzero result will have Ox (or OX) prepended to it.
For u conversions, the argument is displayed in small hex characters.
For example, displayf (uo/o#u", 258); yields °10 Z. For c and s
conversions, if the argument contains a newline character, it is
displayed as ."..

•

An optional decimal integer specifying a minimum field width. If the
convened value has fewer characters than the field width, it will be padded
on the left (or right. if the left adjustment flag, described above, has been
given) to the field width. The padding is with spaces unless the field width
integer starts with a zero, in which case the padding is with zeros.

•

An optional precision that gives the minimum number of digits to appear for
the d, i. 0, u, x. and X conversions. the maximum number of characters to
be written from an array in an s conversion, or the number of characters to
be written from an array in an H conversion (overriding the usual
null-termination of strings). The precision takes the form of a period (.)
followed by an optional decimal integer; if the integer is omitted. it is treated
as zero. The amount of padding specified by the precision overrides that
specified by the field width.

61-10

61 Oisplay Window and Trace

•

An optional h specifying that a following d, i, 0, u, x, or X conversion
.specifier applies to a short int or unsigned short Int argument (the argument
will have been promoted according to the integral promotions, and its value
shall be converted to short int or unsigned short int before printing); or an

optional 1 specifying that a following d. i. 0, u. x, or X conversion specifier
applies to a long int or unsigned long int argument. If an h or I appears
with any other conversion specifier. it is ignored.
•

A character that specifies the type of l;onversion to be applied. (Special AR
extensions have been added.) The conversion specifiers and their meanings
are:
d. i, 0, U, x, X .

The im argument is converted to signed decimal (d or i). unsigned
octal (0), unsigned decimal (u). or unsigned hexadecimal notation (x
or X); the letters abcdef are used for x conversion and the letters
ABCDEF for X conversion. The precision specifies the minimum
number of digits to appear; if the value being converted can be
represented in fewer digits. it will be expanded with leading zeros.
The default preCision is 1. The result of converting a zero value with
a precision of zero is no characters.
c

The int argument is converted to an unsigned char, and the resulting
character is written.

s

The argument shall be a pointer to a null-terminated array of 8-bit
chars. Characters from the string ate written up to (but not including)
the terminating null character: if the preCision is specified. no more
than that many characters are written. The string may be an array
into which output was written via the sprint! routine. (If the string
pointed to is an array which has been written via the stracef routine.
you must use o/Db rather than %9 to display it.)

p

The argument shall be a pointer to void. The value of the pointer is
converted to a sequence of printable characters. in this format:
0000:0000. There are always exactly 4 digits to the right of the
colon. The number of digits to the left of the colon is determined by
the pointer's value and the precision specified. Use this conversion to
display 80286 memory addresses. The 16-bit segment number will
appear to the left of the colon and the 16-bit offset to the right.

%

A % is written. No argument is converted .

.\n

Displays". No argument is converted.

H

displays a character array (pointed to by the argument) as small hex
characters. If precision is specified. it is used as the length of the
array (overriding the usual null-terminati9nof strings).

61-11

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

b

The argument shall be a pointer to an array of 32-bit words.
Characters from the string are written up to (but not including) the
terminating word containing a null character: if the precision is
specified, no more than that many words are written. If the string
pointed to is an array into which output was written via the straceJ
routine. you must use %b rather than %s to display it. (To display
the information in an array written to via sprintJ. use %$.)

m

The argument is a long integer that indicates attributes to be assigned
to subsequent characters. Attributes stay "on" until they are
specifically turned .. off" with another %m conversion specifier. The
lowest-order byte contains primarily font code. The next higher byte
is not used to set attributes. (In the display-window buffer. this
second byte is reserved for character coding.) The third byte holds
color information. The high byte indicates which enhancements
should be invoked.
Attributes are written automatically to window_color and
window_modifier variables. then copied into subsequent 32-bit data
words in the Display Window. Table 61-4 shows the format of this
32.-bit word.
Attributes may not be assigned as a one-byte value. Even if you want
to alter only one attribute setting, color for example, you must include
it as part of a long. Append an "L" at the end of the hexadecimal
code specifying attributes to indicate the value is a long.
NOTE: If you are specifying an attribute in a lower-order byte of the
long. color for example, and you want the high byte (or eytes) to be
zero, you may omit the high byte provided you have the "L"
appended at the end of the hexadecimal code. The high byte (or
bytes) will be left-padded with zeroes. For example. Ox200000L is
converted to Ox00200000L. Associated characters will be displayed
on a color monitor as green on a black background, as dictated by the
hexadecimal 20 in the third byte. Enhancements are controlled in the
high byte. now assigned a value of zero. Any enhancements
previously turned "on" will be turned "ofL"

If a conversion specification is invalid. the. behavior is undefined.
If any argument is or points to an aggregate (except for an array of characters
using %8 conversion or any pointer using %p conversion). the behavior is

undefined.
In no case does a nonexistent or small field width cause truncation of a field; if
the result of a conversion is wider than the field width. the field is expanded to
contain the conversion result.

61-12

61 Displav Window and Trace

The display! routine returns the number of characters displayed.
Example
To display a date and time in the form .. Sunday. July 3, 10:02,» where weekday
and month are pointers to strings:
LAYER: 1
{
unsigned
unsigned
unsigned
unsigned
unsigned
}

char weekday [lOJ;
char month [101;
short day;
char hour;
char min;

STATE: output_to_displaLwindow
CONDITIONS: KEYBOARD' •
ACTIONS:
{
display!( "%5, %9 %d, %.2d:%.2d\n", weekday, month, day, hour, min);
}

sprintf
The sprint! routine is similar to the display! routine. display! writes output with
or without 'attributes directly to the Display Window. sprint!, fully documented
in Section 64.3, writes output to a character array in which attributes are not
supponed. This routine is useful for writing formatted output to a display,
printer, or file.
See also strace! in Section 61.4(C).

61-13

INTERVIEW 7000 Series Advanced Proarammlng: ATLG-107-951-10B

Table 61-4
Display Window/Trace Buffer 32-Blt Data Word
Mask (hex)t

Bit

Meaning

Input (hex) tt

Modifier attributes. font for example.
are contained In the low byte of the
32-blt word.

OOOOOOgzl

1-3

f.gnt:

OOOOOOgJlL
OOOOOO.Q1L

ASCII
special graphic character set (refer to
Table 61-5)
primary font-code selected on Line
Setup
alternate font-current Implementation
18 for call-setup phase In X.21 (ASCII)
hexadecimal

OOOOOOQ2,l
00OOO0113L
OOOOOOgIL
OOOOOOML

4

Special character Indicator:
(used In trace buffer only; should not
be altered by user)

OOOOOOgJlL

only value In modifier In trace buffer
header
Character Is not displayable but
contains control Info used Internally by
the trace lOgic. When a "'n" Is
Included In a tracef routine. for
example. a new line Is generated. but
nothing Is displayed on the trace
screen. The tracef routine
automatically sets this bit before the
32-bIt word Is written Into
trace_bur. array.
unused. but should be zero

OOOOOOML

5-8
9-16

t

OOOOOOmL
oOOOffOOL

OOOOOOgJlL
OOOOgJlOOL

Character data Is contained In the
second byte of the long word. Input
should be 00 In all %m conversions.

Use the masks to change attributes of characters In the Display Window or trace buffer. In the Display Window.
characters are represented In the second byte of the longs that comprise the 1.088 array elements In
display window buffer. In the trace bur structure. the characters are represented In the second byte of the
longs that make up the trace but. array. To change one attribute of a character while leaving the others
unchanged:
-

display_wlndow_buffer[positlonJ = «dlsp/ay_wlndow_buffer[posltlonJ & (-attribute-mask))

I Input);

To change only the font of the twenty-first character In the trace buffer from Its current setting to the special
graphic font. for example:

12_trbuf.array[20J. ((trace_buf.array[20J & (-0x00000007L))

I OxOOOOOOO1L):

Anding the character with the mask will Indicate the current setting of an attribute:
If (/2_trbuf.array[20J & oxooooooo7L) equals 2. then the 21st character In the Trace 2 user-trace buffer Is
being displayed In the font selected on the Une Setup menu.

tt In display( routines. the %m conversion specifier writes Input to the Window_color and window_modifier
variables. These variables are copied Into subsequent data words In the Display Window. In tracef routines, the
%m conversion specifier writes Input to trace_buffer_header. The header Is then copied Into each subsequent
data word In the buffer. Combine attributes via hexadecimal addition.

61-14

1'...............

1

+

61 DIsplay Window and Trace

Table 61-4 (continued)
Bit

Mask (hex)

Input (hex)

Meaning
C%r Is contatned In the third byte Of
the long. Combine color attributes via
hexadecimal addition.

17-19

OO.QZOOOOL

B"kgmuod eQlcr:

OOQQOOOOL
OO!UOOOOL
OOQZ,OOOOL
O0Q30000L
OOQ40000L
OOQ,§OOOOL
OOQ,60000L
OogzOOOOL
20-22

black
blue
green
cyan
red
magenta
yellow
white

OOMOOOOL

Eortground color:

OOQQOOOOL
OOQ80000L
001QOOOOL
OOlaOOOOl.
OO.zgOOOOL
002§OOOOl.
OO.sgOOOOl.
OOMOOOOl.
23

black
blue
green

cyan
red
magenta
yellow
white

Color blink:

OO!lQOOOOl.
OO.Q.O.OOOOL
OOiQOOOOL

24

no blink
blink
Cctor strlki-lhru:

OOaQOOOOL
OOQqOOOOl.
OOimOOOOL

no strilI$p/ay WindOw and Trace
Table 61-5

Special
Dlsplay

'1.

Graphl~

Ch"r"cter Sett

Input (hex/decimal)

Display

,

0

+

.r

1a/26
1b/27

2

10/28

3

ld/29

))

4

T

1e/30

«(

5

.J...

1fI3l

...

6

-I

20/32

Iil

7

t-

21133

§g

8

~

22/34

IEl

9

~

23/35

m

a/10

@1

b/11

.~

25/37

II

0112

26/38

Ifil

d.ll/1a,17

I
I

;l

e/14

§~

28/40

fIlS

i

29/41

10/16

I

2a/42

12/18

~

2b/43

13/19

wtI

20/44

14120

•

2d/45

1
J

•

15/21

t

Input (hex/decimal)

24/36

27/39

~

28/46

~

2f/47

tID

16/22

.J

17123

•

30/48

L

18/24

(space)

31/49

r

19/25

Written to the Display Wlndow or a traoe buffer when low (modifier) byte of 32-b1t data word '" OxOl.

61-17

INTERVIEW 700D Series Advanced Programming: ATLC-107-951-10B

Table 61-5 (continued)
Display

Input (hex! decimal)

Display

Input (hex/decimal)

¥

80/128

:J

9a/154

•

81/129

+j

9b/155

r

82/130

~

90/156

.J

83/131

;(

9d/157

84/132

t?

90/158

85/133

')

911159

:;I

86/134

5'

aO/160

"

87/135

f

811161

..(

a8/136

').I

a2/162

.,

89/137

'T

a3/163

::t

8a/138

~

a4/164

*.,.

8b/139

"7

a5/165

80/140

--

a6/166

.::l

8d/141

X

a7/167

1lI

8e/142

::.:

a8/168

~

8f/143

)

a9/169

901144

J'

aa/170

J1

91/145

I::

ab/171

,(

.,

92/146

J

aol172

93/147

.....

ad/173

I

94/148

'lIi

ae/174

*1J

95/149

71

af/175

96/150

~

bO/176

*
lJ

97/151

6.

b1l177

98/152

j.

b2/17a

7'

99/153

:e

b31179

61-18

61 DIsplay, Window and Trace
Table
Display

~
~:'

~1·5.

(continued)

Input (hex/decimal)

Displa.y

Input (hex/decimal)

-p

b4/180

Fit

ce/206

:2

b5/1Bl

PI

ef/207

3

b6/182

It

dO/20B

'5

b71183

a!

d1/209

IJ

bB/184

tE

d21210

JIJ

b9/185

6

d3/211

I,.

ba/lS6

0

d4/212

0

bb/187

0

d5/213

'J

be/18S

U.

d6/214

::J

bd/189

U

d7/215

l\

ben90

9

d8/216

bf/191

0

d9/217

C

00/192

U

da/21S

U

01/193

¢

db/219

e

02/194

£

dc/220

a

e3/195

13

dd/221

041196

R

de/222

'

~;

a
a
a-

05/197

C

c71199

e

c8/200

6

62/226

e

09/201

U

e3/227

e

oa/202

Pi

841228

"i

cb/203

N

e5/229

i

cc1204

~

86/230

i

cd/20S

Q

871231

s
a

c6/198

df/223
eO/224
e1/225

61-19

INTERVIEW 7000 Series Advanced ProgrammIng: ATLC-107-951-108

Table 61-5 (continued)
Display

Input (hex/decimal)

i.

e81232

.-

69/233

...,

Display

Input (hex/decimal)
edf237
ee/238

ea/234

§

e11239

~

ebf235

•

fO/240

!4

eo/236

displays
Synqpsis
extern \loid displays (stringytr);
canst char .. stringytr;

Description
The displays routine writes output to the Display Window screen, under control
of the string that is pointed to by stringytr. The displays routine returns when
the end of the string is encountered. The placement of the output on the screen
may be controlled via the'pos_cursor routine. Attributes may not be used in
displays.

The input is a pointer to a string c'omposed of zero or more ordinary characters.
Octal or hexadecimal values also may be included in the string, with octal
preceded by \ and hex by \X. Pad each value to three integers with leading
zeroes.
Example
The following entry
pos_cursor( 0, 0 );
di$plays(UEnd of test. ");

produces the following output on the prompt line:
End of test.

The following coding produces the same output:
pos_cursor( 0, 0 );
const char" stringytr;
stringytr = "End of test. ";
displays (stringytr);

61-20

61 Display Window and Trace

SYD:QlJSis
extern void display..,prompt(string..,ptr};
canst char * strinc..,ptr;

Description
The display-prompt routine displays.a desigllated string at the beginning of the
prompt line. The cursor is automatically positioned at row zero. column zero.
Once the prompt is written, the cursor is returned to its previous position. The
softkey equivalent of this routine is the PROMPT action. The prompt is visible on
whichever display screen is active at the time the prompt is written. The most
rec;;nt prompt is retained in the Display Window. Attributes may not be used in
display-prompt.

The input is a pointer to a string composed of 2:eroor more ordinary characters.
Octal or hexadecimal values also· may be include<;! in the string, with octal
preceded by \ and hex by \x. Pad each value to three integers with leading
zeroes.
EXSliIDple
Refer to the example provided for the displays routine. The same string could
be output to the same position without calling the pes_cursor routine:
display..,prompt(" End of test. ");

or
const char"' string..,ptr;
string..,ptr = "End of test. ";
display..,p7ompt (.mingytr);

SynoLlsis
extern unsigned int pos_cursor(row, column);
unsigned char row;
unsigned char column;

De$cription
This routine pOSitions the cursor on the Display Window screen by row and
column numbers.
NOTE: The pos3ur~or routine. m~y not be used to position the
cursor on trace screens.

61-21

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

The first parameter is the row number. Possible values: 0-16. (The top line of
the screen is reserved for header information and cannot be written to.)
The second parameter is the column number. Possible values: 0-63.
Returns
The pas_cursor routine returns the previous cursor position in the form of an
unsigned int. The high byte contains the row number; the low byte identifies the
column number.
Example
To position the cursor at the far left edge of the prompt line on the Display
Window, enter zero for both parameters.
LAYER: 4
STATE: wrlte_to_dlsplay
CONDITIONS: KEYBOARD· "
ACTIONS;
{
pos_cursor(O,O):
displays(UDisplay on prompt line. ");

}

restore_cursor
Synopsis
extern !loid resto re_curso! (position) ;
unsigned int position;

Description
The restore_cursor routine returns the cursor to a previous position.
NOTE: The restore_cursor routine may not be used to position
the cursor on trace screens.

The only input is an unsigned int in the same form that is used by the returned
value of the pas_cursor routine. The high byte identifies the row number. The
low byte identifies the column number.
;e:x3mple
Suppose the cursor is located in the middle of the Display Window. You want
to write a message to the prompt line, but return to your previous location on
the screen to continue your display.

61-22

.61 Oitrpla't Window and Trace

unsigned int previous;
}
STATE: display
CONOITIONS:
ACTIONS:
{

KEYBOARD • •

pos_cursor(8 ,0);
Oil row 8, column 0 oj the Display Window. ");
previous'" pos_cursor(O,O);
displllys("Tltis sentence is on the prompt line. ");

dispfays("This line begins

rutQl'e_€ur$or(previous) ;
displays("This sentence begins on row 8, column 58 oj the Display Window, the
position of the cursor at the time pos_cursor(O,O) was called.");

}

61.4 Program and User Traces
Unless their sizes are increased. Program Trace and the User Traces retain a
maximum of 4096 characters. equivalent to four full screens when every character
space is used. (See Section (:6)2, below on increasing the size of trace buffers.)
When a buffer's limit is reached. new characters written to the end of the buffer
force out the same number of characters from the begiIllling of the buffer. The
prompt line is not pan of these buffers. Messages are appended to the end of the
buffers. .In Freeze mode you may scroll through the buffer using the cursor keys.
You write messages to the User Traces only by using C routines. The Run-mode
softkeys for User Traces-USER TR. TRACE 1, TRAce 2, TRAce 3, TRACE 4. TRACE 5,
TRACE 6, TFIACE 1-appear when the buffers are used in a program.

(A) Variables
There are no extern variables associated exclusively with Traces.

(8) Structures
1.

Declaring trace buffers. The trace routines that write to any of the trace
buffers requite a pointer to the appropriate trace buffer as input. To point
to one of the trace buffers, you must first have declared it as a structure.
The structure that is common to trace buffers is named trace_buf. This
structure is already declared in a file called trace_buJ.h located in the
HRDlsyslinclude directory. The trace_buf structure contains another
structure. trace_buffer_header, which also is declared in the trac€_buf.h file.
(These structures are explained in Table 61-6.) Use the Ninclude
pre-processor directive to include both declarations in your program.
There are eight trace buffers available (including the Program Trace), each
one having its own display screen. All are instances of the trace_buf
~tructure. Declare each one you use as an extern struct. as in this example:
'extern struct trace j)uj 11 jrbuj;

The

names of all the trace buffers are listed in Table 61-6.

61 ... 23

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Table 61-6
Trace Buffer Structures

Type

Variable

Value (hex/decimal)

Structure Name: trace_buffer_header

Meaning

Structure of a header for traoe buffers.
Declared as type extern struct. Declared
automatically if a softkey-entered TRACE aotion
is taken, Contained In the struoture of the trace
buffer. Declaration contained in file named
HRDlsyslincludeltracB_buf,h. Written to by %m
conversion specifier.
Because It Is an extern struoture. values of
component variables should not be altered
dlreotly by the user. In some Instanoes. e. g .•
altering array size, the result could be a crash,

O-ffflO-4095

end of data within the buffer. Maximum value is
one less tt:lan the array_size.

0

traoe buffer is not full
traoe buffer Is full. As new lines are written to
the end. of the trace buffer. lines at the beginning
of the buffer are removed.
.

unsigned short

logicaLend

unsigned short

logicaLend_wrap_count

unsigned char

modifier

unsigned char

oolor

O-ff/O-255

For specifiC values and their meanlngs. see
Table 61-4.

unsigned ohar

enhanoe

D-ff/O-255

For specific values and their meanings. see
Table 61-4.

unsigned short

writeJock

0-ffffflO-65535

prevents two processes from writing to the same
buffer at the same time. Should not be altered
by user or future acoess to the traoe buffers
may be locked out.

unsigned short

array-size

1000/4096

size of buffer; at present only one value

unsigned ohar

line_size

0-3t10-63

number of characters In last line In buffer

unsigned char

spare

0

reserved for future use

non-zero

Sln.!~lu[i ~lUDi'

Special-character Indicator bit and bit 8 must be
zero. For other specific values and their
meanings. see Table 61-4.

Structure. of a trace buffer. Declared as type
extern struct. Declared automatioally if a
softkey-entered TRACE aotion is taken.
Declaration contained In file named
HRD/syslincludeltrace_but. h.

trace_buf

structure of the trace-buffer header described
above

hdr
unsigned long

array of data Words In the buffer

array {4096]

61-24

6.1·... D#$:Q/,YWlnt'iOWBnd Trace

Table 8t-8 (ecmtinued)
Type

Meaning

Value·.. (hex/decimal)

. Structure of the Program Trace buffer •. an
instanoe of the tr6Q! bur structure declared In
file named HRDlsysllncluaeltraoe_but. h.
Declared as type extern struot tre.cebuf.
Deolared. automatically If a seftkey-entered
TRACE.actlonIs tal
extern struct trace_buj pro8_trbuj;
}
LAYER: 2
STATE; display_to_proQ_tr
CONDITIONS: KEYBOARD" •
ACTIONS:
{

tracec(&pro8_trbuf, 'a');
tracec(&pro8_trbuj. '\n');
traeee (&proLtrbuf. 65);
tracec(&pr08_trbuf, '\n ');
traeee( &pro8_trbuj, Ox65);
traeec( &prog_trbuf, '\n');
tracee (&proLtrbuf, 065):
}

.When the user views the PRoe; TR screen, the output will look like this:

a
A

e
5

tracef
Synopsis
extern int traeef(trace_bufjerJtr, formatJtr, . . . );
extern struet trace_buj * trace_bufferJtr;
canst char * formatJtr;

Description
The tracef routine writes output to a specified trace screen, under control of the
string, pointed to by formatytr. that specifies how subsequent arguments are
converted for output. If there are insufficient arguments for the format. the
behavior is undefined. If the format is exhausted while arguments remain, the
excess arguments are evaluated but otherwise ignored. The tracef routine
returns when the end of the format string is encountered.

The first parameter is a pointer to the trace buffer into which the output will be
written.
For the second parameter, see the display! routine. Placement of "\n" in the
format string of a call to trace! generates a blank new line on the selected trace
screen. (In a display! routine, the newline character does not blank the new
line.)

61-28

61. DifPlay Window and Trace
Attributes are written via. the %m conversion specifier to trace_buf.hdr.modifier.
trac€_buf.hdr.color. and trace_bu!.hdr.enhance. The attributes are copied from
these variables into subsequent 32-bit data words mthe Program Trace and User
Traces. Table 61*4 shows the format of this 32...bit word.
Ret\;!rus
The trace! routine returns the number of characters displayed, or a negative
value if the unit is in freeze mode.

Example
This program traces X.29 PAD-control message£; in PTE and DCE data packets.
The letters "DCE" are underlined in the DCE trace lines.
LAYER: 3
{

#include 
extern struct trace_bu/13_trbu/;
extern unsigned char" TI'IyackittJnjoytr;
extern unsigned short TI'Iyack.etJcn;
unsigned char pad_ctrl_msg;
STATE: p8,oket_type
CONDITIONS: DTE DATA Q= 1
ACTIONS:
{

pad_ctrl_msg:: TI'Iy(JckftUnfoytr[OJ;
trace/ (&lJ_trbu/. "DTE LCN:%.3x PAD MSG:%.2x\.n". myacleet_lcn.
pad_ctrl_TI'Isg);
}
CONDITIONS; DCE DATA Q= 1
ACTIONS:
{

pad_ctrl_msg"' myad:eUn!lJ,Jtr[O];
tracef (&13jrbu/. "%mDCE%m LCN.. %.3x PAD MSG:%.2x\n", Ox04000000L,
OxOOOOOOOOL, mYlScket_lcn, pad_ctrl_msg);
}

stracef
Syugpais
extern \loid stracef(arrayytr, strillgytt);
unsi8ned long arrayytr;
canst char" stringytr;

DesGriptign
The strace! routine is similar to the trace! routine, except that stracef writes
output to a variable. while trace! writes output to a .tra¢e screen. The output is
under control of the string pointed to by stri1t8..ptr that specifies how subsequent
arll4ments are convened for output. If there are insufficient arguments for the
format, the behavior is undefined. If the format is exhausted while arguments
remain, the excess arguments are evaluated but otherwise ignored. The stracef
routine returns when the end of the format string .·is encountered .

.61-29

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

The strace! routine differs from sprint! in that it generates an array of longs.
whereas sprint! generates an array of chars. When the strace! array is written to
a trace buffer (or to the Display Window) it carries its predefined attributes
along with it. An sprint! array. by contrast, will receive the attributes that are
active in the buffer at the moment.
At the end of the output string. there will be a null character with the Special
Character Indicator bit set in its modifier attribute-byte.

The first parameter is a pointer to the variable into which output will be written.
The array which will hold output must be declared as a long. By allocating 32
bits for each element, the array may accommodate attributes assigned via the
%m conversion specifier. Attributes comprise 24 bits of the long. The preferred
form of the declaration is unsigned long name {1 ~O}. The size and name of the
array are user-determined.
For the second parameter, see the display! routine.
gample
This program traces X.29 PAD-control messages for DTE and DeE data
packets. The resulting trace is identical to the one generated by the example
under trace!. Note that attributes that are turned on in an strace! array do not
need to be turned off after the array has been brought. via the %b conversion
specifier. into a trace! format string.
LAYER: :)
{

#include 
extern struct trace_bu/13_trbu/;
extern unsigned char * m..p0cket_in/o"ptr;
extern unsigned short m"pQcket_lcn;
unsigned char pad_ctrl_msg;
unsigned long source/4];
STATE; packet_type
CONDITIONS: DTE DATA Q::: 1
ACTIONS:
{
strace/ (source, .. %s", "DTE");
}
NEXT STATE: pad mag trace
CONDiTIONS: DCe-DATA Q= 1
ACTIONS:
{

straee! (source, .. %m%s", Ox04000000L, "DeE");
}
NEXT_STATE: pad_m$O_trace
STATE: I,'>lild_mso_trace
CONDITIONS: ENTER STATE
A.CTIONS:
{

pad ctrl msg:: m"pocket in/0..ptr[O];
trace/ (&13_trbuf, "%.1> LCN;%.3x PAD MSG: %.2x\n", source, mJQck.et_Icn,
pod_ctrl~sg);

61-30

11· .Di:fplar

Window and TrIce

traces
Synopsis
exte~n void traces(trace..:.bufjerJltr, ~lringJltr);
extern struct tt'Dcej>uf tracejJf.ifferJtr;
ccm:;'t char" string-ptr;

Description

The traces routine writes output to a specified trace screen, under control of the
string that is referen~d by stri~gJJtr. The tl'ilCeS routine returns when the end
of the string is· encountered.
~

The first parameter is a pointer to the trace buffer into which the output will be
written.

For the second parameter, see the displays routine.

E1Sa;i!!l?le
In this instance, output will be written to the

TRACE 1

screen.

The following entry
#include<.trace jluf.lI>
extern Jtruct tNJcej>uf 11_,rbuf;
}

LAVeR: 1
STATE: any
CONDITIONS; KEYBOARD
ACTIONS:
{
ttaces(&l1_trl:Juj, "Emt cjf test. "};
}
M

•

produces the following output on the TRACE 1 trace screen:
End of test.

The following coding produces the same output:
{

#include 
exteJCn struct trace_bll! lljrbuf;
}

LAYER: 1
. STATE: any
CONDITIONS: KeYBOARD" •
ACTiONS:
{
const char .. string-ptr;

strin8-ptr" "End of t~st. ";
traces (4f;l1..:;trbtif. strin8-ptr j;
}

61-31

'':'TERVIEW 7000 Series Advanced PrOgramming: ATLC-107-9S1-10B

61.5 Attributes
Attributes are written to the Display Window and to the trace buffers in 32-bit words
that include 8 bits of character data (the second-lowest byte) and 24 bits of
attributes. The format of the 32-bit data word, given in Table 61-4, is the same for
the Display Window and for the trace buffers.
In display/ routines, the %m conversion specifier writes input to window_color and
window_modifier variables. These variables are then copied into data words written to
the Display Window by string pointers in this and subsequent display! routines. See
Figure 61-1.
In trace! routines, the %m conversion specifier writes input to the
trace_buffer_header structure for a particular user-trace buffer. The header is then
copied into each data word written to the particular user buffer by string pointers in
this and subsequent trace! routines. See Figure 61-2.

(A) Applying Attributes As Data Is Buffered
There are two ways an attribute may be assigned to a character in the Display
Window. One way uses the %m conversion specifier to assign attributes to the
window _color and window_modifier variables. This program, for example,
includes a display! routine that uses the %m conversion specifier to write
underlined data to the Display Window:

STATE: apply_attrlbutEuo_wlndow_coIor_varlable
CONDITIONS: ENTER_STATE
ACTIONS:
{
pos_cursor (1,0);
display! ("%mThis data is underlined in the Display Window.", Ox04000000L);

}

The chart in Table 61-4 shows the hex value 04000000L in the "input" column
alongside the underline attribute. This means that when the value Ox04000000L
is input to the conversion specifier %m, an underline attribute is applied to the
current display/ string and any that follow until the attribute is turned off. The
underline attribute actually is applied to the external window _color variable. See
Table 61-2. The window_color and window_modifier variables lend their
attributes to every character that is written in a format string to the Display
Window. In Run mode if the user presses the softkey for DSP WND. he will see
his underlined string. Subsequent characters or strings written to the Display
Window also will be underlined.

61-32

61.· . Display Window and Trace

window_modifier
16

1 elts

/I

.

display_window_ btafferlO]

.-

..

.display_window_buffer {1 ]

--

°0

I I !
1 Bits

.-.

display_window_buffer {2]

L:,'; ::.::11 I :1: I;
I:J I'; I:: 11 ::>111 I;:~
J ';

24

--.

display_window_ bufferI3]

II: I

I

24

a

1&

1 Bits

I

16

Figure 61-1 When a display! routine is called, the attributes assigned via the %m
conversion specifier are stored in two extern variables, accessible to the user. Both
c910r and enhancealtributesare eontaiQed in winaQw.wler. ~ low byte in
.,J~ndQw,-cQlorin(liutesthe color; the high bytecontai"nsenhaneements. In this
ep.mple, the fl.dlowing attn1>utfi will. bea.$~pe41Oebarl1ctws written to the
Qisplay Window: rev(!fse""ima~~an(letJliClnt,~n"'1ln-ld~.ok color. and ASCII
fdnl •. Before a eharaeteri$wnttento the Display Win($oliV. jUs combined in a long
with its attributes, as mapped in the figure.

61-33

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

tracef(&11_trbuf, "%mDATA", OxQ,8!QOOg,QL);
//
///
/ //

..........

/ //
/1/

/ II

I /1

11_trbuf

r--------------------------------------.-

I/ IIfI
I \ \
\ \\~~~-----------~-~~-~~-~--~-~
\ \ "
modifier'
\

\,,~---------------------~----~
i
color
I
,~~-~~~-~~-T-~~--~-~-~-r~-~~~
"i
I
enhance
I

~---~-----T-----------r-----

l

!

I
....
(enhance)
(color)

!

I
t
(modifier)

f

.- ....

11_trbuf .array[O]

L:

0,

I I I

.- ....

L

°Il

II I

24

32

.- ....

11_trbuf . array [2]

II I

24

3.2

11_trbuf .array[11

1
1

10

(character)

11:~"l
16

10

!I I

8

11I:~,,1

°0
I II

1 Bits

I: :-- 1 I';:"'III~:J, :I
I '.: J I:~: J 1 II
1>0

I ! I

24

32

.- ....

II
II

1 Bits

8

16

I I

11_trbuf .array [3 J

°0
I I I

8

16

°0

A

I I

32

I

24

I

1 Bits

! ! !

!

16

8

11 ....trbuf .array [4096]

Figure 61-2 When a trace! routine is called, the attributes assigned via the %m
conversion specifier are stoted in three variables in the trace-buffer header of a
designated buffer. In this example. ll_trbu/.hdr holds the following attributes:
reverse-image enhancement, green-on-black color, and ASCII font. Before a
character is written to 1he buffer, it is combined in a. long with Its attributes, as
mapped in the figure.

61-34

1

Bits

61 Display Window and Trace

The same attribute could be applied to a string in any of the user-trace buffers.
as follows:
#include 
extern struct trace_buf ll_trbu/:
}

STATE: applLattribute_to_header
CONDITIONS: ENTER_STATE
ACTIONS:
{
tracef (&ll_trbuf. "%mThis data is underlined. ", Ox04000000L);
}

Only the header for the TRACE 1 display is affected by this %m conversion.
Only the TRACE 1 buffer is written to. When other trace buffers are
subsequently written to. the strings will not receive underlining as a result of the
attributes applied above to the TRACE 1 header.

(8) Applying Attributes to Buffered Data
The Display Window is an array of 1.088 long integers. each including one byte
of character data and three bytes of attributes. The character data is generated
by strings in display routines. The attributes for each character are derived from
the current window_color and window _modifier values at the time the character
is written to the display-window buffer.
Once the data word is written to the buffer as an element in the array, it can be
accessed and written to-and therefore changed-the same as any other location
in memory. In the example that follows, a string is written to the Display
Window without underlining. Then. as a result of a keyboard input from the
operator, the first 32-bit word in the string (containing the first character, the
letter "Tn) is given a new value that includes the underline attribute.
{

extern unsigned long display_window _but/err 1088J;
extern struet
{

unsigned ehar mpm;
unsigned char epm;
}

display_window _index_buffer 117];
}
STATE: apply_attribute_directly _to_display_window
CONDITIONS: ENTER_STATE
ACTIONS:
{

pos_cursor(l.O);
displaYf (U This data is not underlined.");
}

61-35

INTERVIEW 7000 Series Advanced Programming: ATLC-1 07-951-108

CONDITIONS: KEYBOARD • *
ACTiONS:
{
display_window_buffer/64] = ((display_window_buffer{64] &
Ox04000000L) ;
display_window _index_buffer[1]. mpm ++;
}

~Ox04000000L)

Incrementing display_window_index_bujjer.mpm is necessary to alert the
processor on the CPM card (containing the display-controller software) that the
program has changed the contents of the Display Window. Refer to Table 61-3
for an explanation of this structure.
The bitwise anding and oring in the example are necessary if you want to change
certain bits in the word without affecting others. Note that the value whose
complement (-) is anded with dispJay_window_bujjer element #64 is the "mask"
for the underline attribute in Table 61·4; and the value to the right of the or
operator (!) is the "input" value for the underline attribute.

61-36

61 Display Window and Trace

Table 61·7
Conversion Specifiers

Specifier

~.

Argument type

Conversion Type

%b

integer-array pointer

array of long integers. 2nd byte of each
long Is displayed as character. 1st, 3rd, and
4th bytes interpreted as attributes. Array
begins at pointer. ends at element containing
null character and Special Character bit = 1.

%1

integer

signed decimal representing 15-blt value

%c

unsigned oharacter

unsigned oharacter

%#c

unsigned character

newline oharacter displayed as
.aoted on

%d

integer

signed decimal representing lS-bit value

%Id

integer

signed deolmal representing 31-bit value

%H

character-array pointer

oharacter array indicated by argument
appears as small hex oharacters.
(Precision as to number of characters
becomes length of the array. overriding
usual null-termination of strings.)

%m

integer

long Integer not displayed or printed, but
written to attribute header-variable tor Display
Window or tor one of the trace buffers

%0

integer

unsigned ootal representing 1S-bit value

%10

integer

unsigned ootal representing 32-bit value

%#0

integer

unsigned octal representing 1S-blt value,
preoeded by 0

%#10

integer

unsigned octal representing 32-b!t value,
preceded by 0

%p

Integer

unsigned hexadecimal (lower-case letters)
representing 32-bit value. with a minimum 5
digits displayed and a oolon between the 4
right-hand digits and the 1-4 left-hand digits.
Useful for displaying CPU segment number and
offset.

%8

oharacter-array pointer

array of oharacters beginning at pointer and
ending at null terminator or at array-length
preoision, whichever oocurs first

%#8

oharacter-array pointer

newline character displayed as
acted on

%u

Integer

unsigned deoimal representing 16-bit value

%11.1

integer

unsigned decimal representing 32-blt value

%#1.1

Integer

hex characters lexample:
16-bit value

9 f ES

%#11.1

integer

hex characters (example:
representing 32-bit value

BFES 30 1:J

61-37

~

rather than

~

)

rather than

representing
)

INTERVIEW 7000 SerIes Advanced Programming: ATLC-107 951 108

Table 61·7 (continued)
Specifier

Argument type

Conversion Type

%x

Integer

unsigned hexadeolmal (lower-case letters)
representing 16-blt value

%Ix

integer

unsigned hexadecimal (lower-case letters)
representing 32-blt value

'Yo#x

Integer

unsigned hexadecimal (lower-case letters)
representing 16-blt value. preceded by Ox

%#ix

integer

unsigned hexadecimal (lower-case letters)
representing 32-blt value. preceded by Ox

%X

Integer

unsigned hexadecimal (upper-case letters)
representing 1S-blt value

%IX

Integer

unsigned hexadecimal (upper-case letters)
representing 32-blt value

%ItX

integer

unsigned hexadecimal (upper-case letters)
representing 16-blt value, preceded by Ox

%#iX

integer

unsigned hexadecimal (upper-case letters)
representing 32-bit value. preceded by Ox

%\n

none

displays an ...

%%

none

displays a %

61.6 Protocol Trace Buffers
There are two Protocol Trace buffers. one dedicated to Layer 2 and the other to
Layer 3 data. Run-mode softkeys for accessing these traces-PROTOCL, L2TRACE,
and L3TRACE-appear when personality packages are loaded in at Layers 2 and 3.
The prompt line is not part of these buffers.
The size of each Protocol Trace buffer is 65,536 bytes. Of this total, two bytes are
dedicated to the buffer header and two bytes to the trailer. The usable size of a
Protocol Trace buffer. therefore, is 65.532 bytes. When a buffer'S limit is reached.
new characters written to the end of the buffer force out the same number of
characters from the beginning of the buffer. In Freeze mode you may scroll through
the buffer using the cursor keys.
You cannot write directly to the Protocol Trace buffers. Monitor the position within
the buffers, as well as the wrap count. using the variables and structures discussed
below.

(A) Variables
The addresses of the variables in Table 61-8 identify the physical location of the
beginning and end of each Protocol Trace buffer. The beginning position is at
the first data byte in the buffer. The end is just after the last data byte.

61-38

61 Display Window and Trace

Table 61·8
Protocol Trace Buffer Variables

Type
extern unsIgned char

Variable

Value (hex/decimal)

12pp_trbuff

Meaning

" First data byte In the Layer 2
Protocol Trace buffer. Address
of this variable-segment
number plus offset-will indicate
the physical location of the first
data byte, two bytes from the
beginning of the buffer. Line
Setup configured for emulate or
monitor mode.

extern unsigned long

First byte In the two-byte trailer
of the Layer 2 Protocol Trace
buffer-I.e .• after the last data
byte. Address of this
variable-segment number plus
offset-will Indicate the physical
location of the end of the data
area, hexadecimal FFFE bytes
from the beginning of the
buffer. Line Setup configured
for emulate or monitor mode.

extern unsigned char

First data byte in the Layer 3
Protocol Trace buffer. Address
of this variable-segment
number plus offset-will Indicate
the physical location of the first
data byte, two bytes from the
beginning of the buffer. Line
Setup conngured for emulate or
monitor mode.

extern unsigned long

First byte In the two-byte trailer
of the Layer 3 Protocol Trace
buffer-i.e., after the last data
byte. Address of this
Variable-segment number plus
offset-will indicate the physical
location of the end of the data
area, hexadecimal FFFE bytes
from the beginning of the
buffer. Line Setup configured
for emulate or monitor mode.

61-39

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

(8) Structures
The structure variables in Table 61-9 contain the high and low bytes of a
beginning and ending offset and wrap-count in the Layer 2 and Layer 3
Protocol Trace buffers. Create a logical beginning (or ending) offset within a
buffer by combining the two offset-variables relating to a beginning (or ending)
pOSition into a single. two-byte offset. Add the resulting offset to the address of
13_trbuff to identify the physical address of a logical location.
The. example below uses #define preprocessor directives for determining
beginning and ending offsets in the Layer 3 Protocol Trace buffer. When
get_13pp_value_end is encountered in a program. for example. each of the two
"end" offset-variables is cast into a long and. if necessary. shifted left to its
appropriate position in an offset. Then the two variables are added together.
#define get _13pp_value_begin
«(unsigned long)(13pp_trbuILctl.begin_ofLhi) «8) +
«unsigned long)(13pp_trbulLctl. begin _ ofLlo)))
#define get_13pp_lIalue_end
(((unsigned long)(13pp_trbuILctl.end_oILhi) «8) +
«(unsigned fong) (l3pp_trbufLctl. end_ofLlo)))

When the ending offset. in this example, is added to the address of 13 _trbuff,
the result is the address of the logical end in the buffer:
unsigned long end_address;
end_address = &13_trbuff + get_lJpp_vQlue_end;

You may also use the offsets and wrap counts to determine how much data is
currently in the buffer. Include the wrap count in the high two bytes of a
four-byte offset. Then subtract the beginning offset from the ending offset.
#define get_13pp_lIalue_begin
((unsigned long)(/3pp_trbufLctl.begin_wrapjli) «24) +
((unsigned long) (/3pp_trbufLctl.begin_wrap_Io) « 16) +
«(unsigned long)(/3pp_trbuff_ctl.begin_ofLhiJ «8) +
«unsigned long) (13pp _trbulLctl. begin_olLlo) ) )
#define get_13pp_lIalue_end
(((unsigned long} (lJpp_trbuILctl.end_wrap_hi) «24) +
((unsigned long)(l3pp_trbulf_ctl.end_wrap_lo] «16) +
((unsigned long)(13pp_trbuff_ctl.end_oILhi) «8) +
((unsigned long) (/3pp_trbulf_ctl. end_ofLlo))
unsigned long end. begin. count;
.end = get_13pp_va/ue_end;
begin = get_13pp_value_begin;
count = end - begin;

61-40

61 Display Window and Trace

Table 61-9
Protocol Trace Buffer Structures

Type

Variable

Value (hex/decimal)

Meaning

Declared as type struct. The variables contained
In this structure monitor logical location In a
Protocol Trace buffer. Reference structure
variables as follOWS: Ipp_trbuff_ctl.begin_off_hi.

Structyre Name: Ipp_trbufCcti

unsigned char

O-fflO-255

High byte of a 2-byte offset from the physical
beginning of the Protocol Trace buffer to a
logical beginning In the buffer. Range of the
two-byte offset is 2 through hexadecimal FFFE.

unsigned char

O-ff/O-255

low byte of a 2-byte offset from the physical
beginning of the Protocol Trace buffer to a
logical beginning In the buffer. Range of the
two-byte offset Is 2 through hexadecimal FFFE.

unsigned char

O-ffJO-255

High byte of a 2-byte count of the number of
times a logical beginning has wrapped through
the Protocol Trace buffer.

O-fflO-255

Low byte of a 2-byte count of the number of
times a logical beginning has wrapped through
the Protocol Trace buffer. It will have a value of
zero only once. Once the count reaches
hexadecimal FFFF, It will wrap to one.

unsigned char

0-ffl0-255

High byte of a 2-byte offset from the physical
beginning of the Protocol Trace buffer to a
logical end In the buffer. Range of the tWO-byte
offset is 2 through hexadecimal FFFE.

unsigned char

0-fflO-255

low byte of a 2-byte offset from the physical
beginning of the Protocol Trace buffer to a
logical end in the buffer. Range of the two-byte
offset Is 2 through hexadecimal FFFE.

unsigned char

O-ff/O-255

High byte of a 2-byte count of the number of
times a logical end has wrapped through the
Protocol Trace buffer.

unsigned char

0-(flO-255

Low byte of a 2-byte count of the number of
times a logical end has wrapped through the
Protocol Trace buffer. It will have a value of zero
only once, Once the count reaches hexadecimal
FFFF, It will wrap to one.

unsigned char

begin_wrap Jo

An Instance of the Ipp_trbuff_ctl structure,
declared as type extern struct Ipp_trbuff_ctl.
The variables contained In this structure monitor
loglcat location In the Layer 2 Protocol Trace
buffer. Has the same structure as
Ipp trbuff etl. Reference structure variables as
follows: 12pp_ rrbuff_ct!. begin_off_h.

Structure Name; 12pp_trbuff_ctl

61-41

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Table 61-9 (continued)
Variable

Type

Value (hex/decimal)

Structure Name: 13pp_trbuff_ctl

ee)

Meaning

An Instance of the Jpp trbuff ctl structure,
declared as type extern struct /pp trbuff ctl.
The variables contained In this structure monitor
logical location In the Layer 3 Protocol Trace
buffer. Has the same structure as
Ipp trbuff cO, Reference structure variables as
follows: i3pp_trbuff_ctl.begin_off_h.

Routines
There are no routines associated exclusively with Protocol Traces.

61-42

62 Counters, Timers! and Accumulators

62 Counters, Time,rs, and Accumulators
62.1

Coun~ers
The translator declares the following structure for counters that are entered as softkey
tokens on the Protocol Spreadsheet:
struct counter_struct
unsigned long current;
unsigned long last;
unsigned long maximum;
unsigned long minimum;
unsigned short sample_count;
unsigned long total_high;
unsigned short total_low_low;
unsigned ShOTt total_law_high;
unsigned short out_of_rtlTtge;
unsigned short changed;
unsigned long prev;
unsigned long old;

};
struet counter_struct counter_name={O,O,O.-Oul};

The first eight counter variables in the structure are used to calculate statistical values
whenever the counter is sampled. See Table 62-1. Three of the
.variables-counter_name. current. counter_name.prev. and counter_name ,oid-come
into play each time the counter is incremented. decremented. or set to a particular
value.
Counters are internal program variables and counter interrupts are strictly
program...generated signals, so the C programmer is free to ignore this structure and
maintain counts and statistics in a different way. Please note. however, that the
68010 CPU expects this counter structure when it polls the 80286 periodically for
statistical values to display in columns on the tabular and graphic stats screens.

(A) Current, Previous, and Old Values
When a counter is incremented, decremented. or set to a specific value on the
Protocol Spreadsheet, the program does not signal a counter_name_change
interrupt automatically, First it verifies that the new value of the counter really
is a change from the previous value. See Table 62-2. For this comparison, the
program needs to maintain two variables, counter_name. current and
counter_name .prev.

62-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Table 62-1
Counter Structures
Type

Variable

Meaning

Structure Name: counter_struct

Structure of a counter. Declared as type struct.
Declared automatically If a program counter Is
used. Program oounters assigned to structure
as follows: struct counter struct counter name.
Reference a structure variable as follows:counter _name. current.

unsigned long

current

This value of the counter Is acted on directly by
program actions.

unsigned long

last

Last sampled value; displayed on the tabular
statistics screen.

unsigned long

maximum

Maximum value of all samples; displayed on the
tabular statistics screen.

unsigned long

minimum

Minimum value of all samples; displayed on the
tabular statistics screen. Should be initialized as
-Oul.

unsigned short

sample_count

Number of samples.

unsigned long

total_high

High four bytes of an eight-byte counter total.

unsigned short

totaUowJOw

Low two bytes of an eight-byte counter total.
This two-byte variable counts to 65.535.

unsigned short

totaUow_hlgh

Bytes 3 and 4 of an eight-byte counter total.

unsigned short

out_ofJange

Number Is out of range. either incremented
beyond the range or decremented below 0;
should not be factored into averages.

unsigned short

changed

For future use.

unsigned long

prey

When converting a counter action to C. the
translator compares prey with ourrent to
determine whether counter has changed. Then
prey is updated to ourrent and
counter_name_change is signaled.

unsigned long

old

When converting a counter condition to C. the
translator compares old with current to
determine whether true condition Is new
(tranSitional). After program logiC has examined
counter, old is updated to prey.

Here. for example, is the C translation of the simple action COUNTER example
SET 5.
counter_example. current = s;
if (counter_example.prev 1= counter_example. current)

{
counter_example. old '" counter_tlxample.prev;
counter_example.prev '" counter_exampfe.current;
signal (counter_example _change);

}

62-2

62 Counters, .Timers, and Accumulators

Table 62-2
Counter Variables

Type

Variable

Meaning

extern event

True when the named counter Is
Incremented, decremented, or
set to new value. This event will
not be triggered unless a
spreadsheet condition names
the counter. Une Setup
configured for emulate or
monitor mode.

It is clear from the translation that the variable counter_example .prev is used to
limit the number of counter_example_change interrupts to those cases where the
current value of the counter really has changed.
What is counter_name. old used for? We will preface the answer by citing the
behavior of the counter in the following spreadsheet example.
STATE: threshold condition
CONDITIONS: KEYBOARD ~ •
ACTIONS: COUNTER spac$bar INC
CONDITIONS: COUNTER spacebar GE 7
ACTIONS: ALARM

Each time you press the space bar while this program is running, the counter will
increment, but no matter how many times you press the space bar the alarm will
only sound once. It will sound on the seventh keystroke, the first time the
counter is greater than or equal to 7. If the program had a decrement or set
action that lowered the counter to less than 7. the alarm would sound again
when the counter reached the 7 threshold.
The translator accomplishes this threshold condition by coding the waitfor clause
as follows:
c()unttr~spacebar_chQngt

&& (/ (counre:,_spacebar.old >= 7» && (cQunte,_spacebar.current >: 7):

Since counter_spacebar.prev was used (and then updated to "current") in the if
statement that sent the counter_spacebar_change interrupt, the "old" value is
required in the waitfor condition to insure a "transitional" or "threshold"
COlil11ter condition.

62-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

(8) Sampling a Counter
Here is the translator's version of a counter sample action:
coun ter_name. last :; counter_name. current;

il (counter_name. current> counter_name. maximum)
{

counter_name. maximum:; counter_name. current;
}

il (counter_name. current < counte,_name.minimum)
{ .

counter_name. minimum:: counter_name. current;
}

counter_name. sample_counttt;
{

unsigned long temp;
temp:: (counter _name. current & OxOOOOllfl) + counter_name. total_low _low;
counter_name. total_low_low :; temp;
temp:: (counter_name. current »16) t counter_name. total_low_high t (temp» 16);
counter_name. total_low _high:: temp;
counter_name. total_high += temp » 16;
}

counter_name. current '" 0;

In order to establish an average value for all samples. a grand total for current
values at the time of each sampling must be maintained. Since an ordinary
INTERVIEW current counter is 32 bits, the counter that maintains the grand
total of current counts must be larger (64 bits). There is no data type this large
in C, and so the "total" counter is distributed among three variables and the
somewhat complicated coding involving the temp variable is required to add the
current counter to this composite counter.

(C) Updating the Statistics Screen
The CPM polls the MPM continuously to see if data is available to be output to
the printer or the plasma display. This data includes character data. trace data,
prompts. and values to be posted to the statistics screens.
In order to know where on the statistics screens the values for the particular
counters (and timers and accumulators) should be placed, the 68010 CPU on
the CPM needs some help from the program (that is. from the MPM). This
help is in the form of a "stat message" that the translator (or the programmer)
codes once at the beginning of the program. The stat message is a structure that
the MPM sends to the CPM. See Table 62·3. The stat message says. in effect.
"Here is the address of a counter structure. When you access this structure
during the running of the program in order to pull out the current. last.
maximum, minimum, total. and sample-count values. display those values on the
row of the tabular stats screen where the user has typed spacebar" (for
example).

62-4

62 Counters, Timers, and Accumulators

Table 62-3
Counter, Timer, and Accumulator Structures
Type

Variable

Value (hex/decimal)

Structure Nome: stat_msg

unsigned short
unsigned short

type

Structure of a stat message. A stat message Is
sent once for each named counter, timer, or
accumulator. Declared as type struct. Declared
automatically if a softkey-entered COUNTER is
used as a condition, or If softkey-entered
COUNTER. TIMER, or ACCUMUL action is taken.
Program stat messages assigned to structure as
follows: struct stat_msg name. You must
assign values to the elements of the structure.
Reference a structure variable as follows:
name.type.
OaOO/2560

Register statistics objects from the MPM to the
CPM. Other values and meanings for future use.

o

accumulator
counter
timer

0100/256
0200/512

The MPM (80286) address of a counter. timer.
or accumulator name, converted to CPM (68010)
format. To get an object name address. enter:
name. obJect_name =
get_68k_phys_addr(" name_of_counter" , ;

unsigned long

unsigned long

Meaning

The MPM (80286) address of a counter, timer,
or accumulator structure. converted to CPM
(68010) format. To get a structure address for
a oounter. enter: name.object address =
get_68k_phys_addr(&counter_name_of_counter) ;

object_address

Here is a C program that causes the current value of a counter named "key" to
increment on the tabular-statistics screen each time an ASCII-keyboard key is
struck.
struet
unsigned short op_type;
unsigned short type;
unsigned long object_name;
unsigned long object_address;

} stat_msg;
extern unsigned long get_68k.J'hys_Qddr(};

62-5

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

struc.t counter_struct
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unSigned
unsigned
unsigned
unsigned
unsigned
unSigned

long current;
long last;
long maximum;
long minimum;
short sample_count;
long total_high;
short total_law_low;
short total_low _high;
short out_at_range;
short changed;
long prey;
long old;

};

struct counter_structure counter_key;
extern fast_event keyboard_new _key;
}

STATE: update_stat_screen
{

stat_msg.op_type :: 2560;
stat_msg. type = 256:
stat_msg.object_name = get_68kJhys_oddr("key");
stat_msg. object_address::; get_68kJhys_addr(&counter_key);
send_stat_message(&stat_msg} ;
waitfor
{

keyboard_new_key:
{

counter_key. currenltt;
}
}

The variable stat_msg.object_name is a pointer to the name of the counter that
the user has entered on the protocol spreadsheet. The program gives this name
to the CPM. and expects the CPM to locate the name among the names that
the user has entered on the tabular or graphic statistics menu. The delivery to
the CPM of a pointer to the stats-menu name and a pointer to the counter
structure is the purpose of the stat message. The message allows the CPM to
correlate a line on the statistics results screen with an actual program counter (or
timer or accumulator).

62-6

62 Counters, Timers, and Accumulators

NOTE TO C PROGRAMMERS: When the translator creates a
counter variable it adds the prefix counter_ to the spreadsheet
name. but the programmer who is working primarily in C and is
not making use of spreadsheet counters can name the counter
any way he wishes, with or without the prefix. Similarly, the
string that is communicated to the CPM in stacmsg.objecf_name
("key" in the example above) must agree with the name on the
stats menu. but it need not bear any resemblance to the name of
the counter structure.

NOTE ALSO: In most of the examples in this manual. we have
not bothered to declare routines since it is not necessary. In the
absence of a declaration. the compiler assumes that the routine is
external and that it returns an integer. In nearly an cases, this
assumption works. get_68/r.yhys_addrO returns a long, however.
and must be declared.

62-7

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-10B

62.2 Timers
The translator declares the following structure for timers that are entered as softkey
tokens on the Protocol Spreadsheet:
struct timer_struct
{

unsigned long current;
unsigned long last;
unsigned long maximum;
unsigned long minimum;
unsigned short sample_count;
unsigned long total_high;
unsigned short total_low_low;
unsigned short total_low _high;
unsigned long start_tick_value;
unsigned short running:
unsigned short changed;

};

There are no timer conditions in the software (since timeouts provide the
time-triggering function), and therefore all of the variables in the structure serve as
data for the CPM when it updates the stats screens. See Table 62-4. A stat message
must be sent so the CPM can correlate a line on the statistics results screen with the
correct program timer. The stat message is documented in the previous section on
counters. The timer stat message is different only in respect that the stat_msg.type
element should be set to 512 instead of 256.
Timer restart, continue. and stop actions are explained in this section. The clear
action is simply a matter of changing the elements in the structure to zero (except for
timer_name.minimum, which becomes the one's complement of zero).

(A) Time Ticks
Time ticks are timed increments of either of two hardware counters in the
INTERVIEW. The programmer can select which of the two timing mechanisms
to use for a given timer.
One tick-counter is on the FEB card and is used to time-stamp incoming data
and EIA leads. The intervals between ticks is determined on the FEB Setup
menu. Ticks can be enabled/disabled on the same menu. The current value of
this counter is available in a variable called ll_tick_count. See Table 62-5. The
current value always reflects the number of ticks since the program entered Run
mode. The number of ticks mayor may not equate to the amount of time in
Run mode, since ticks are also encoded in playback data and the playback rate
is subject to "local conditions" such as playback speed and idle suppression.
FEB time ticks are the most precise timing mechanism in that they have a
resolution to 10 microseconds. They also represent the most durable method of
timekeeping, since they preserve the original data timings even during playback.

62-8

62 Counters, Timers, and Accumulators

Table 62-4
Timer Structures
Type

Variable

Value (hex/decimal)

Meaning

Structure Name; tlmer_struct

Struoture of a timer. Declared as type struct.
Declared automatically If a program timer is
used. Program timers assigned to structure as
follows: struot timer struct timer name.
Reference a structure variable as follows:
timer_name . current .

unsigned long

current

Current value of timer. not updated while timer Is
running. Values are In microseconds rounded to
tick-unit on FEB Setup screen.

unsigned long

last

Value of last sample; displayed on the tabular
statistics screen.

unsigned long

maximum

Maximum value of all samples; displayed on the
tabular statistics screen.

unsigned long

minimum

Minimum value of all samples; displayed on the
tabular statistics screen. Should be Initialized as
-Oul.

unsigned short

sample_count

Number of samples.

unsigned long

total_high

High four bytes of an eight-byte timer total.

unsigned short

totaUow-,ow

Low two bytes of an eight-byte timer total.

unsigned short

totaUow_high

Bytes 3 and 4 of an eight-byte timer total.

unsigned long

start_tick_value

Tiok-oount in microseconds when timer was
started, restarted, or continued. For
line-related conditions at Layer 1. this value is
stored In 11 tick count; for non-line condlt.ions,
use get_waittime_286_tiCKs routine.

unsigned short

running

o

Stopped. This variable Is polled and a zero stops
the timer from Incrementing and sets the current
value to timer name.current (understood as
microseconds).
Running. All l' s In this variable causes the timer
to inorement, showing a value that equals
(wall-time ticks - timer name.start tick value) +

-0

timer_name. current. -

unsigned short

changed

For future use.

-0

62-9

--

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951 108

Table 62·5
Timer Variables
Type

Meaning

Variable

extern unsigned long

This variable counts ticks from
the start of Run mode.
Tick=sec, msse, etc.,
depending on FEB setup.
Subtract early value from later
value to create a timer.
ACTIONS:
{ dlsplayf (. %Id msecs ••
(/1 tick counttimer_name. start_tick_va/ue) ) ;}
Add to start of run time to
determine more preolse current
time for time-stamping events.
Une Setup configured for
emulate or monitor mode.

extern unsigned long

Date when Run mode entered.
Byte '1 (low byte) Indicates day;
byte 2 stores month; and bytes
3 and 4 Indicates year. May be
used to time-stamp events.
See also start of run time.
Line Setup configured-for
emulate or monitor mode.

extem unsigned long

t

start_ofJun_t!me

Time when Run mode entered.
Byte 1 flow byte) indicates
seconds; byte 2 stores minutes;
and byte 3 indicates hours.
May be used to time-stamp
events. See also
start of run date and
11 tick count. t
une Setup configured for
emulate or monitor mode.

In the example below, the display( (or tracet) routine uses timer variables to time-stamp good BCCs on the DCE
side. (Similar programming could determine the current date.) The tick unit selected on the FEB Setup menu is
secondS. Adjust the program as needed for other tick units.
{

extern unsigned long start_of_run_date, start_of_rul'!_time, lI_tick_count;
unsigned short seconds, hours, minutes, tick_mins, tick_sees, tick_hours;
#define SECS(run_time) (unsigned short)(run_time & Oxff)
#define MINS(run_time) «unsigned short)(rulf_time »8) & Oxffl
}

STATE: time
CONDITIONS: DCE GOOD BCC
ACTIONS:
{
tick sees :: 11 tick count % 60;
tick=mins:: (ll_tick_count + SECS(start_o!Junjime)) I 60;
tick_hours = (tick_min! + MINS(start_o!Jul'I_time)) I 60;
display!("Time: %.2d:%. 2d: %. 2d\n",
(unsigned short)((start_o!Julf_time» 16) & Oxff) + tick_hours)%24,
(MINS(start_o!Jun_time) + tick_mins) %60,
(SECS(start_ofJun_time) + tick_secs)%60;;
}

62-10

62 Counters, Timers, and Accumulators

The other tick-counter is on the MPM and is referred to as the wall-time clock.
This clock ticks once per millisecond and drives the timers displayed on the
statistics results screens-at least while they are incrementing. At the moment a
timer stops incrementing, the programmer can reach in and replace the
incremented value with a timer value based the FEB tick-counter instead.
The current value of this wall-time tick-counter is available to the program via
theget_wall_time_286_ticks routine. The current value always reflects both the
number of ticks and the actual elapsed time ("wall time") since the program
entered Run mode.

(8) Running
While it increments on the stats screen, a timer always is driven by waH-time
ticks. To start a current timer incrementing. first you must have sent a stat
message to correlate the timer structure with a timer line on the stats screen. At
that point the simple statement timer_name.running = -0 will stan the timer.
The value of the timer at any given time while it is running will be the MPM
(wall-time) ticks minus the timer_name.start_tick_value plus any
timer_name. current value.
To stop a timer, change timer_name.running to zero. The current column of
the timer will immediately display the value of timer_name. current (zero, unless
you have done something in your program to calculate the current value of the
timer). The stats display will interpret timer_name. current as a value in
microseconds and convert it to the unit selected for that timer line.

(C) Restart
The translator has two different versions of the timer restart action, depending
on what condition precipitated the action. The first version is used if the
condition was data-related (or EIA-related) and time ticks are enabled on the
FEB Setup menu. Here is this data-timer version:
unsigned long temp;
convert_tick_count (ll_tick_count, &:temp);
timer_name. current::: 0;
limer_name.start_tick_value .. temp;
timer_name. running::: -0;

The convert tick count routine converts 11 jick_count into microseconds and
stores the result in temp. The value of temp is assigned immediately to
timer_name.start_tick_value. When the 68010 sees that timer_name.running
equals the one's complement of zero, it subtracts the start-tick value from the
ll-tick count and displays the difference in the current column of the timer line.
Since the start-tick value was derived a moment before from the l1-tick count.
the difference win be zero. The current column on the stats screen should begin
a timer at zero following a restart.

62-11

~ - -~~~~--~-- ------~-----------------~---~---------------------------------------"-------------------."--~.-.-

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

A slightly different version of the program is used if the condition was
nondata-related or if time ticks are disabled in the FEB. The
convert_tick_count routine is not used and the following routine is used in its
place:
get_walCtime_286_ticks (&'temp);

This routine returns the current value of the wall-time tick-counter, in
milliseconds zero-padded to microseconds. It stores the value in temp and the
program proceeds as above.

(D) Continue
The timer-continue action is very similar to the restart. There are just two
differences. One, the action is enclosed in an if statement that verifies that
timer_name. running equals zero-that the timer actually is stopped, in other
words; and two. timer_name. current is not set to zero, but retains the value it
received the last time the timer stopped.

(E) Stop
Here is one of the two versions of a timer stop action:
if (timer_name. running /= 0)
{

unsigned long temp;
convert_,ick_count (lJ_tick_count, &temp);
timer_name. current += ump - timer_name.start_tick_'Ila[ue;
timer_name. running '" 0;
}

In this translation, the start-tick value is subtracted from the current tick count.
and any pending current value (held over if the timer was continued) is added
in. The result is a new timer_name. current value. This value is posted to the
stats screen as soon as the 68010 sees timer_name.running = O.
The other version of the stop action uses get_wall_time_286_ticks instead of
convert_tick_count.

(F) Sample Action
The code that produces the sample action is identical to the code that sampled a
counter. See Section 62.1 (B). The timer_name.sample_count variable's not
equaling zero causes minimum, maximum. and average values to be displayed.

62.3 Accumulators
Shown below is the structure of an accumulator as the translator declares it (and
as the 68010 accesses it to update the statistics screens). Also refer to
Table 62-6. Note that there is no current value, since an accumulator neither
counts nor times. There are no "previous" and "old" values. because in its
spreadsheet implementation an accumulator never is tested in a Conditions
block.

62-12

62 Counters, Timers, and Accumulators
struct accumulator_struct
{
unsigned long last;
unsigned long maximum;
unsigned long minimum;
unsigned short sample_count;
unsigned long total_high;
unsigned short total_low_low;
unsigned short totaLlow _high;
un$igned short changed;

};
struct accumulator_struct accumulator_name={O,O, -Gul};

Here is the translator's version of an accumulate action when the object of the
accumulation (selected by the user) was the maximum sampled value of a
counter named framechar.
accumulator_name. last :: accumulatorJramechar. maximum;
if (occumulator_,ulme.last > accumulalO,_name.maximum)
{

accumulator_name. maximum :: accumulator_name. last:
}
if (accumulator_name. last < accumulator_name. minimum)
{
accumulator-,tame. minimum;:: accumulator_name. last;
}

accumulator_name. sample_counttt;
{
unsigned long temp;
temp;:: (accumulator....name. last &: OxOOOOffff) t accumulator_name. total_low _low;
accumulator_name. total_low_low = temp;
temp;:: (accumulator_nome. last »16) t accumulator_name. total_low_high t (temp» 16);
accumulator_name. total_low_high:: temp;
accumutato,_name.total_high t= temp» 16;
}

accumulator_name. changed :: -0;

A stat message must be sent so the CPM can correlate a line on the statistics
results screen with the correct accumulator. The stat message is documented in
the previous section on counters. The accumulator stat message is different only
in respect that the stat_msg.type element should be set to 0 instead of 256.
The accumulator_name. sample_count variable's not equaling zero causes
minimum. maximum, and average values to be displayed.

14""
., I
i

62-13

INTERVIEW 7000 Series Advanced Programming: ATLC-l07-951-10B

Table 62-6
Accumulator Structures
Type

Variable

Meaning

Structure Name: accumulator_struct

Structure of an accumulator. Declared as type

struot. Declared automatically by program when
the user softkey-enters an ACCUMULATE
action. Specific accumulator assigned to
structure as follows: struct accumulator struct
accumulator name. Reference a structure
variable as follows: accumulator_nama. last.
unsigned long

last

Value of last sample; displayed on the tabular
statistics screen.

unsigned long

maximum

Maximum value of all samples: displayed on the
tabular statistics screen.

unsigned long

minimum

Minimum value of all samples: displayed on the
tabular statistics screen. Should be Initialized as
~Oul.

unsigned short

sample_count

Number of samples.

unsigned long

total_high

High four bytes of an' eight-byte accumulator
total.

unsigned short

totaUow_low

Low two bytes of an eight-byte accumulator
total.

unsigned short

totaUow_high

Bytes 3 and 4 of an eight-byte accumulator total.

unsigned short

changed

For future use.

62.4 Routines

Synopsis
extern unsigned long get_68kJlhys_addr(variableJltr);
unsigned char· variableJltr;

Description
This routine converts the address of a specified variable in the 80286 processors
(MPM boards) to 68010 (CPM) format. This routine must be declared.

The only parameter is the address to be converted.

62-14

62 Counters , Timers! and Accumulators

Returns
The get_68kyhys_addr routine returns the converted address.
Example
See send_stat_message routine.

send_stat_message
Syno,psis
extern void send_stat_message(struct_stat_msgytr};
struet stat_msg
{

unsigned
unsigned
unsigned
unsigned

short op_type;
short type;
long object_name;
long object_address;

};

Description
The send_stat_message routine sends the stat message structure to the 68010
CPU (CPM board). The current use of this routine sends the addresses of
program counters, timers, and accumulators in the 80286 processors (MPM
boards) to the CPM board where the tabular and graphic statistics displays are
located.
The routine is called only one time in a program for each named counter, timer,
or accumulator. Entering COUNTER as a condition or action (or TIMER or
ACCUMUL as actions) via softkey on the Protocol Spreadsheet automatically
declares the counter named and sends the stat message.

The only parameter is a pointer to the structure of the stat message. For an
explanation of the elements of the stat message, see Table 62-3.
Example
You plan on incrementing a counter named "dte_info" when a DTE Info frame
is detected.
{

struct
{

unsigned short op_type;
unsigned short type;
unsigned long object_name;
unsigned long object_address;
} stat_msg;

62-15

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

struct counter_structure
{
unsigned long current;
unsigned long last;
unsigned long maximum;
unsigned long minimum;
unsigned short sample_count;
unsigned long total_high;
unsigned short total_low _low;
unsigned short total_low _high;
unsigned short out_at_range;
unsigned short changed;
unsigned long prev;
unsigned long old;

};
struct counter_structure counter_dte_info :: {O, 0, 0, -Oul};
extern unsigned long get_68kyhys_addr();
}
LAYER: 2
STATE:send_stat_message
CONDITIONS: ENTER_STATE
ACTIONS:
{
stat_msg.op_type = 2560;

stat_msg. type:: 256;
stat_msg. object_name:: get_68kyhys_addr("dte_in/o" );
stat_msg. object_address = get_68kyhys_addr( .lcounter_dte_info);
send_stat_message( .lstat_msg);
}
NEXT_STATE: count_Info
STATE: count_Info
CONDITIONS: OTE INFO
ACTIONS:
{

counter_ dte_info. curren 1++;
}

SynQpsis
extern void get_wall_time_ticks(ticks_68kJormatytr);
unsigned long" ticks_68kJormatytr;

Description
The get_wall_time_ticks routine gets the number of wan-time ticks (in CPM
storage format) from the time ~ was hit. The wall clock gives millisecond
resolution rounded to microseconds.

The only input is a pointer to the location where the returned time-tick value
will be stored.

62-16

-----~-;
f

62 Counters t Timers! and Accumulators

'I'.

I

Example

unsigned long ticks;
}
LAYER: 2
STATE: get_tioks
CONDITIONS: KEYBOARD •
ACTIONS:

~

{

get_ wall_time_ticks (&ticks);
}

- -

-

get wall time 286 ticks

-

Synopsis
extern \laid get_wall_time386_ticks{ticks_286Jormatytr);
unSigned long" ticks_286Jormatytr;

Desgiption

r-.
, ! .

The get_wall_time_286_ticks routine gets the number of wall-time ticks (in
MPM storage format) from the time 8 was hit. The wall clock gives millisecond
readings rounded to microseconds. Use this routine prior to setting the
start_lick_value in a timer action when Time Ticks: 1~;; has been selected on
the Front-End Buffer Setup screen. Also use this routine to derive the
start_tick_value if the condition is not line-related, e.g., KEYBOARD, even when
.
time ticks are enabled on the FEB Setup menu.

;

The only input is a pointer to the location where the returned time-tick value
will be stored.
Example
{

unsigned long tick.s_286;
}

LAYER: 3
STATE: get ticks
CONDITioNS; KEYBOARD' •
ACTIONS:
{
get_wall_time_286_'icks ( &ticks_286};
display! (" %lu". ticks_286);
}

62-17

..•.

_. __._--- --- _._...._---_. __ .-._._-_..

__ _-_._----- ._----_._-_._ _--..

..

--------,------.--~------------

..---.-------

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

convert_tick_count
Syno.psis
extern void convert_tick _count (mpm Jormat _ticks. converted_ticksytr);
unsigned long mpmJormat_ficks;
unsigned long • converted_ticksytr;

Description
The convert_tick_count routine converts a designated tick count into
microseconds.
Use this routine to derive the start_tick value for a timer action if ticks are
enabled on the FEB Setup menu and the condition is line-related, e.g., RCV
INFO.

The first parameter is a designated tick count as long as it is in MPM storage
format. It may be any of the layer tick counts. The unit of the ll_tick_count
(and other layers' tick counts) value is determined on the Front End Buffer
menu.
The second parameter is a pointer to the location where the returned tick count
converted to microseconds will be stored.
Example

extern unsigned long II _tick_count;
unsigned long converted_ticks;
}
LAYER: 1
STATE: oonvert_ticks
CONDITIONS: RECEIVE GOOD_BCC
ACTIONS:
{

convert_tick_count (II_tick_count, &converted_ticks);
display! (" %lu'·. converted_ticks);
}

62-18

63 OSI

630S1

It··
i
I

63-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107 951-108

POU

iLbuffer_number

--------

-

data_ start_offset

--- "-,
- ....

""

"'-

......

"'-

~

"-

Pointer-List

IL BUFFER

-

\
",
\

\

HEADER

\

!

DATA
list_header

--.

first_node _offset

/

'"

list_node

---

{

data_pointer

I

I

data_length

\
\

sou

data_length

/

I
I
I

data_pointer

last_node_offset

I

I

list node

\

\

next_node_offset

-

,
"-' .
/"

I
I
I
I

I

list_node

Internal
data

data_pointer

I

dataJength

n~~et
~
-..;.,;;:.::

\

II'

\
I
I
I

-

/

,

"\ \ \\

\

next node offset

\

\
\

" "-\

I

(Layer 2
protocol info)
\

\

\

,

\

Internal
data
(Layer- 3
protocol info)

\
\

External
data
(User data)

Figure 63-1 Primitive Data Unit and sample Pointer-List Buffer being passed down
the layers.

63-2

63 OSI

63 OSI
The most conveni,ent tools for handling protocol headers while data is moving down and up
the layers in the ll'."TERVIEW are the spreadsheet SEND and GIVE_DATA actions in the various
protocol packages. For instances when a protocol package is not loaded, such as when you
are developing a new protocol or simply using a protocol that is not yet an option on the .
Layer Setup screen, OS1 structures. variables. and routines in C become essential tools also.

63.1

Structures
The programmer may access the information in primitive data units conveniently by
using a C structure as a multibyte pointer that is superimposed on data in the PDU's.
Before using a structure-pointer, it is necessary to understand the contents of IL
buffers and primitive data units. All structures referenced may be found in
Table 63-1.

(A) Interlayer Message Buffers
There are a maximum sixteen IL buffers in use at a given time. These buffers
may be one of two kinds: data-character or pointer-list. In buffers being
pas~ed up the layers. data-character buffers (Figure 63-2) are always used. In
buffers going down the layers, pointer-list buffers (Figure 63-1) are primarily
used. The difference is that pointer-list buffers contain list-nodes which provide
information about the location of data (or "lists") inserted or referenced in the
buffer, while data-character buffers do not.
1. Header. Each IL buffer contains a header that stores useful information
such as the status of the maintain bits that prevent the buffer from being
returned to the general pool; the position of the buffered data in the
INTERVIEW's display buffer; and the tick count (time) when the data was
buffered from the Hne. (See iI_buffer structure.)
2.

Service Data Unit. The IL buffer also contains the data itself. This data
component, the service data unit (or "SDU"). is added to as the buffer is
passed down the layers. and subtracted from as a buffer travels up the
layers. A data-character IL buffer includes all the data that was present
when the data was first buffered, and the contents of this buffer do not
change as the buffer is passed up the layers. What changes is the service
data unit. derived from the data-start offset in the PDU.

63-3

INTE:RVIE:W 7000 Series Advanced Programming: ATLC-107-951-108

The first part of the SDU in a pointer-list buffer is a list-header node
(structure ii_list_header) which contains information about the location of
the first and last text nodes. As a buffer is passed down from Layer 3 to
Layer 2 in X.2S (see Figure 63-1), a new text node containing a Layer 3
protocol header is inserted in buffer. Since the Layer 3 data will precede
user data, the list node for the protocol information is referenced ahead of
any other list nodes, changing the first-node reference in the Ust header. (If
text is appended to the end of existing data, the list node referenced as last
will change.)
The SDU in a pointer-Ust buffer also includes list nodes (structure
ii_list_node) which give a pointer to data, the length of the data pointed to,
and the offset from the start of the buffer to the next list node.
Finally. the service data unit in all buffers includes data, whether copied into
the buffer (usually protocol information) or located in memory outside of the
buffer (usually user data).

PDU

ii_buffer_number
data_ start_offset

Data-Character
- - - - - - - ..... IL BUFFER

---- ............

~

__ ......

0.-. .....

"" \

data_length

\\

'\

HEADER
DATA

,.......t-...-.-._....L._.. _.. - ..-... -. . -...-...-.. -....-.. -.-1 .. -- at Layer 2

~(Lay.'~P'QI.C.,l"IQ)
····'r. :.... .--................................._ ..................... --- at Layer 3
.

l
I
l;;

.,

~
t<

.;r'

~

SOU Size'/
Layer 2

1 sou Size J

I~
~,

Layer

3·~.

~~,~

Figure 63·2 Primitive Data Unit and sample Data-Character Buffer being passed up
the layers.

63-4

63 OSI

(B) Primitive Data Units
Like interlayer message buffers. PDU's have a format that is dependent on
which direction the primitive is being passed. Refer again to Figure 63-1 and
Figure 63-2.
1. IL buffer number. The buffer number to be passed with the primitive is
always stored in the primitive. This buffer number is actually an
80286-processor segment number.
2. Data-start offset. The offset to the beginning of the service data unit for a
given layer is different for the two types of buffers. In a pointer-list buffer
going down the layers. the data-stan offset will indicate the offset from the
beginning of the buffer to the list-header node. This offset will vary if
different linked lists have been started at different layers. Each list will have
its own list header. In a data-character buffer going up the layers. the
data-stan offset will change from layer to layer. For example. a buffer
containing X.25 data that is being passed from Layer 2 to Layer 3 will have
an offset at Layer 3 two bytes beyond the offset at Layer 2.
3. Data length. The size of the SDU in a data-character buffer also varies
from layer to layer. In the example just given. the SDU will be smaller by
two bytes at Layer 3 than it was at Layer 2. In pointer-list buffers. the
length of all data is unknown at any given layer.

(e) Accessing Information in Structures
Th~re

are two stages that are preliminary to accessing the information in these
stnlctures. The first step is to convert the 80286-processor segment number into
a 32-bit address. The second stage is to place a pointer, in the shape of an IL
buffer structure. at that address. Let's use an IL buffer as an example.
1.

Converting a segment number. The IL-buffer segment number is returned
any time you access one of the external. protocol-independent iCbufjer
variables listed in Table 63-1. These variables have names like
mjo_dl_il_buff and up_n.J1_buff.
To make a pointer to an IL buffer. (1) shift the 80286 segment number to
the left sixteen bits, since a full address in the 80286 is 32 bits long; (2) cast
it as a long. so that the segment number is in the high 16 bits and the offset
to a buffer for that segment is zero (the low 16 bits); and (3) cast it as a
pointer. The fonowing expression will take care of all three requirements:
(void .) ((long) m _lo_ dUU>uff «16):

.r~.

r

I

Now you have a pointer to the first memory location of the most recent
monitor-mode IL buffer passed up from Layer 2 to Layer 3. An
upward-moving IL buffer was illustrated in Figure 63·2. The precise
structure of both the IL buffer is given in the fan owing declaration.

I

63-5

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

{

struct ii_buffer
{
unsigned short lock;
unsigned short maintain_bits;
unsigned short buffer_size;
unsigned short transmit_tag;
unsigned short receive_tag;
unsigned long char_buffJrame_start;
unsigned long char_buffJrame_end;
unsigned short tick_count_high;
unsigned short tick_count_mid;
unsigned short tick_count_low;
unsigned short available_space_offset;
unsigned short bytes_remaining;
unsigned long bee_indicator;
unsigned char data [4064J;
};

2. Create a structure-pointer at a given address. First, declare the structure of
il_buffer, as indicated above. Then declare ii_bufferyointer as a
structure-pointer, as follows:

Converting the segment number and assigning it to ii_buffer yointer may be
accomplished with this one statement:

Now a structure has been created around the most recent upward-moving IL
buffer at Layer 3. This means that rather than moving a pointer around in
the IL buffer, you can access elements in the buffer directly. The
tick_count..Jow variable. for example, would be called
jebufferyointer->tick_count..Jow. (The -> operator is used in place of the
dot operator in structure-pointers.)
The first element of the data string would be called
il_bufferyointer->data[Oj. Here is a program that displays on the prompt
line the fifth data element. the packet-type byte, in every IL buffer that is
monitored at Layer 3.

63-6

63 OS!
{

extern event m_lo_dl"'prmtv;
extern volatile unsigned short m_lo_dl_iCbuf/;
struct ii_buffer
{

unsigned short lock;
unsigned short maintain_bits;
unsigned short bufjer_size;
unsigned short transmit_tag;
unsigned short receive_tag;
unsigned long char_buffJrame_start;
unsigned long char_bufjJrame_end;
unsigned short tick_countyigh;
unsigned short tick_count_mid;
unsigned short tick_count_low;
unsigned short available_space_offset;
unsigned short bytesJemail.lil.lg;
unsigned long bcc_indlcator;
unsigned char data [4064];
};

struct iCbufjer .. ii_buffer"'pointer;
}
LAYER: 3
STATE: monitor_ILbuffers
CONDITIONS:
{

mjo_dlyrmt\J
}

ACTIONS:
{

iCbufjeryointer = (void *) ((long) m_lo_dl_iCbufj«16);
pas_cursor (0,0):
displayf ("%02x ", ii_bufferyointer->data{4 J);
}

If you run this program, be sure to load in the Layer 2 and Layer 3
personality packages for X.25. These packages will take care of delivery of
the monitor primitives to Layer 3.

r

- I

63-7

----------_._-----_._---------

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Table 63-1
OSI Structures
Type

Variable

Value (hex/decimal)

Meaning

Structure Name: pdu

Structure of an OSI primitive data unit (PDU).
Declared as type struct. Use this structure as follows.
Declare the entire structure. Make a pointer to a PDU
by shifting m 10 dl pdu seg (or up n pdu seg) 16 bits
to the left. Then convert this pointer to a pointer to a
PDU structure: struct pdu * pdu_polnter
pdu pointer =( void *}((long)m 10 dl pdu seg« 16).
Reference a structure-pointer variable as-follows:
pdu_polnter->prlmltive _code.

unsigned char

primitive_code

Codes for OSI variables are listed In Table 63-2
through Table 63-8. For Layer 3 primitive codes,
for example, refer to Table 63-4. The value of this
variable Is also stored In external variable
mJo_d,-prmtv_code (or up_nJlrmtv_code).

unsigned char

path

unsigned long

parameter

For future use. At present. under user control.

unsigned short

relay _baton

Maintain bit passed with an Interlayer-message
buffer, both direotlons. Zero In this variable
Identifies maintain bit.

0-8

Path number, both directions. The value of this
variable Is also stored In extemal variable
mJo_dlyrmtv_path (or up_n_prmtv_path).

Segment number of the interlayer-message
buffer. both directions. The value of this variable
Is also stored in external variable m 10 dl II buff
(or up_n-'I_buff).
- - --

unsigned short

unsigned char

buffer_contents

o

Contains data-character buffer type. Must be
used for buffer being passed up.
Contains pointer-list buffer type. May be used
for buffers being passed uP. but is currently used
primarily for buffers being passed down.

unsigned short

Offset from the beginning of the buffer to the
header node In the SOU of an interlayer-message
buffer In an OSI primitive being sent down from a
layer above. In a primitive being sent up from a
layer below, It Is the offset to the SOU. Varies
according to the layer at which the buffer is
located. For example. In a buffer passed up to
Layer 3 from Layer 2, the offset would be to the
beginning of the Layer 3 header. bypassing Layer
2 header Information. The value of this variable
is also stored In external variable
m_lo_dl_sdu_offset (or up_n_sdu).

unsigned short

Length of the service data unit, Including headers
and user data. Only for primitives sent up from
layer below. Varies with the layer where the
buffer is located. For example. at Layer 3,
length would exclude Layer 2 header (or trailer)
information. The value of this variable Is also
stored In external variable m_lo_dl_sdu_Slze.

63-8

63 OSI

Table 63-1 (continued)
Type

Variable

Value (hex/decimal)

Structure Name: ii_buffer

unsigned short

Meaning

Structure of an Interlayer-message buffer. both
directions. Declared as type struct. Use this
structure as follows. Declare the entire structure.
Malee a pointer to an II_buffer by shifting
mJo_dUU,uff (or up_n_"_buff) 16 bits to the left:
"_buffer_pointer = (void .1( (long)(lo_dLII_buff « 16).
Then convert this pointer to a pointer to an II buffer
structure: struct 1I buffer • II buffer polnter:Reference a structure-painter-variable as follows:
'LbufferJlolnter->tlck_countJow .

o

lock

Internal variable which prevents structure from
being updated by more than one program at the
same time.
Two-byte variable which provides the status of
the maintain bits. A bit with a value of 1 Is in
use.

unsigned short

unsigned short

buffer_ slle

unsigned short

transmit_tag

1000/4096

Currently. the only value.

alts 1-3 define bcp Ind!patlon:

o

no bee
good bee
bad bee
abort
half bad bee (DDCMP)

1

2
3
4

Bits 4-8 for future use.
unsigned short

Bits 1-3 define bQC Indlcatlon:

receive_tag

no bee
good bee
bad bee
abort
half bad bee (DDCMP}

0
1

2
3
4

Bit 4 Identlfies side

Clf

the Une:

td
rd

0
1

Bit 5 msssa.ge bYffer overflow:
frame fits In buffer
frame too large for the buffer

0
1

Bits 6-8 for future use.
unsigned long

char_buff_frame_start

Looatlon in the character buffer of the start of
the buffered data.

unsigned long

char_buff_frame_end

Location In the character buffer of the end of the
buffered data.

(ii_buffer structure continued on next page)

63-9

INTERVIEW 7000 Series Advanced Programmina: ATLC-107-951-10B

Table 63·1 (continued)
Type

Variable

Value (hex/decimal)

Meaning

ii_buffer (continued)
Value of Internal variable that oounts the number
of times 11 tick count has reaohed Its maximum
value. Together. the three II_buffer tick-count
variables preserve at each layer the original time
when the end of the data (BCC) was clocked Into
the buffer.

unsigned short

unsigned short

tick_count_mid

16 high-order bits of 32-blt it_rick_count.

unsigned short

ticK_countJOw

16 low-order bits of 32-blt l1_f/ck_count.

unsigned short

available_space_offset

Offset to the next available space In the
Interlayer-message buffer.

unsigned short

bytesJemalning

Available number of bytes remaining In the buffer.

unsigned long

bcc Jndicator

unsigned char

data [4064]

o

reserved
Contains all data Including each layer's header
Information. as well as the first of two block
oheck characters. Does not vary from layer to
layer.

Structure Name: iUist_header

Struoture of the header node in an
Interlayer-message buffer. Only for primitives
sent down from the layer above. Declared as
type struct. Use this structure as follows.
Deolare the entire structure. Make a pOinter to
an II list header by shifting up n II buff (or
m 10 dill buff) 16 bits to thelett-and adding the
data -staff offset from the PDU structure (also
stored as external variable up n sdu or
m 10 dl sdu offset):
- (ifs(headeryointer =
(void .)( ((long)up_n_ILbuff) « 16) + up_n_sdu).
Then convert this pointer into a pointer to an
II list header structure:
struot 'Lllst_header * II-,ist_headeryointer.
Reference a structure-pointer variable as follows:
1\Jlst_headeryolnter->last_node_offset.

unsigned short

Offset from the beginning of the buffer to the
first text node In the buffer. Varies acoordlng to
the layer at which the buffer Is looated. At Layer
2, the offset would be to different starting node
than at Layer 3.

unsigned short

la9t_node_offset

Offset to the location of the last text node In the
buffer, from the beglnnlng of the buffer.

unsigned long

reserved

reserved

63-10

63 OSI

Table 63-1 (continued)
Type

Variable

Value (hex/decimal)

Structure Name: iUist_node

Meaning

Structure of text nodes In an interlayer-message
buffer. Only for prlrntlives sent down from the
layer above. Declared as type struct. Use this
structure as foUows. Declare the entire
structure. Make a pointer to an IUlst_node by
shifting lIP_n_lI_buff (or mJo_dULbuff) 16 bits to
the left and addlng the first_MOde_offset (or
last node offset) from the H list header
structure: ILDst_nOdeJl0lnter ::(void *)((fIong)I.IPJI_"_buff« 16) +
KJlst_headerJl0lnter->first_node_offset). Point
to the next node as foDows:
next_nodeJlolnter =- (IIJI8t_"odeJlolnter +
IUIst_nodeJlointer->next_oode_offset) .

unsigned char •

dataJlolnter

Pointer to the data In a text node.

unsigned short

dataJength

Length of the data in a text node.

unsigned short

next_node_offset

Offset to the location of the next text node In the
buffer. from the beginning of the buffer.
Generally, there Is a text node for each layer's
header informatiOn and one for the Year data. A
buffer th.t stwted at Layer 3 would have two
text nodes, one for Layer 3 header Information
and one for user data (If any}. At Layer 2, the
buffer would acquire an additional text node.

63-11

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-10B

63.2 Variables
OSI variables are layer-specific. The information stored in the OSI variables may be
obtained by using the structure-pointer to IL buffers and primitives. But rather than
requiring the user to repeat this process at each layer as a buffer moves through the
layers. monitor and emulate variables have been made available at Layers 2-7 to
store layer-specific, as well as general. information: the interlayer-buffer number,
the offset to the service data unit. the path number, the size of the SDU. the
segment number of the PDU, etc. There are also event variables which indicate that
a primitive has been received at a given layer. Table 63-2 through Table 63.-8 give
the current OSI variables and their meanings.
The. exchange of connect primitives shown primarily in Figure 30-4 is demonstrated in
Figure 63-3 using C variables and routines. The SEND actions insert data in a buffer
and send the buffer in a DATA REQ primitive. See Section 63.3 for an explanation of
the _insert_il_buff_list_cnt and send primitive routines. The conditions use event
variables to detect primitives and non-event variables to identify specific primitive
types.
LAYER 3:

{send d! prmtv below
(II buffer nuriiber, relay baton,
- data start offset. 1).
OX40. path);}

,l
j

{Io dl prmtv &&
== OX4S Il

(lo_dlJ>rmt~code

SEND RESTART

1----1

....J DL_DATA L_
"

LAYER 2:
{up d! prmtv &&
(up_dLprmtv:.code == Ox40)}

SEND SABM

Rev UA

I

REO

',,,"
etc.

{send dl prmtv above

(II buffer number, relay baton,

- data-start offset, slie,
l)x43 ,-path I ;}

Figure 63-3 Layer 3 uses connect primitives to be sure that the Layer 2 entity below has
established a link.

63-12

,,"

63 OSI

Table 63·2
Layer 1 OSI Variables
Type

Variable

Value (hex/decimal)

extern volatile unsigned char

20/32

21/33
22/34
23/35

24/36
25/37

2a/42
2b/43
2c/44
2d/45

26/46
2f/47
30/48
31/49
33/51
34152
35/53
38/56
39/57

ph
ph
ph
ph
ph
ph
ph
ph
ph
ph
ph
ph
ph
ph
ph
ph
ph
ph
ph

Meaning

activate req
activate Ind
activate resp
activate conf
data req
data ind
reset req
reset ind
reset resp
reset conf
deactivate req
deactivate Ind
debug req
debug Ind
error report Ind
xmlt req
set Idle req
mgt facility req
mgt faclUty ind

OSI primitive code for primitives
moving between Layers 1 and 2.
Una Setup configured for
emulate mode only.

63-13

INTER.VIEW 7000 Series Advanced Programming: ATLC-107-951-108

Table 63-3
Layer 2 OSI Variables
Type
extern event

Variable

Value (hex/decimal)

Meaning

True when an OSI primitive Is
received at Layer 2 from Layer
1. Line Setup configured for
emulate mode only.

loyhJlrmtv

extern event

True when an OSI primitive Is
received at L.ayer 2 from Layer
1. Une Setup configured for
emulate or monitor mode.

extern event

True when an 051 primitive Is
received at Layer 2 from Layer
3. Une Setup configured for
emulate mode only.

extern volatile unsigned short

OSI primitive data unit (PDUj
IAPX-286 segment number
received at Layer 2 from Layer
1. This segment number can
be converted to a pointer by
shifting It left 16 bits. Line
Setup configured for emulate
mode only.

extern volatile unsigned short

OSI primitive data unit (PDU)
iAPX-286 segment number
received at Layer 2 from Layer
1. This segment number can
be converted to a pointer by
shifting it left 16 bits. Line
Setup configured for emulate or
monitor mode.

21/33
23/35

extern volatile const unsigned char

25/37

2b/43
2d/45

2f147
31/49
33/51
39/57

ph activate Ind
ph activate conf
ph data ind
ph reset Ind
ph reset con1
ph deactivate Ind
ph debug ind
ph error report ind
ph mgt facility ind
OSI primitive code received at
Layer 2 In a PDU from Layer 1.
Line Setup configured for
emulate mode only.

24/36

extern volatile canst unsigned char

25/37

63-14

td ph data Ind
rd ph data ind
051 primitive code received at
Layer 2 in a PDU from Layer 1 .
Line Setup configured for
emulate or monitor mode.

63 OSI

Table 63·3 (continued)
Type

Variable

Value (hex/decimal)

extern volatile const unsigned char

0-8

extern volatile const unsigned char

0-8

Meaning

Path number received at Layer
2 in a PDU from Layer 1. Line
Setup configured for emulate
mode only.
Path number received at Layer

2 In a PDU from Layer 1. Line
Setup configured for emulate or
monitor mode.
extern volatile unsigned short

Interlayer-buffer number (an
IAPX-286 segment number)
received at Layer 2 in a PDU
from Layer 1. This segment
number can be converted to a
pointer by shifting It left 16 bits.
Line Setup configured for
emulate mode only.

extern volatile unsigned short

Interlayer-buffer number (an
IAPX-286 segment number)
reoeived at Layer 2 in a PDU
from Layer 1. This segment
number can be converted to a
pOinter by shifting It left 16 bits.
Une Setup configured for
emulate or monitor mode.

extern volatile unsigned short

In OSI primitive received at
Layer 2 from Layer 1, the offset
to where the service data unit
begins. Line Setup configured
for emulate mode only.

extern volatile unsigned short

In 051 primitive received at
Layer 2 from Layer 1 , the offset
to where the service data unit
begins. Line Setup configured
for emulate or monitor mode.

extern volatHe unsigned short

Size of the service data unit in
an Interlayer-message buffer,
displayed as SIZE on the Layer
2 trace soreen. Received at
Layer 2 from Layer 1. Same as
data length in a PDU. Line
SetuP configured for emulate or
monitor mode.

extern volatile unsigned short

051 primitive data unit (PDUj
IAPX-286 segment number
received at Layer 2 from Layer
3. This segment number can
be converted to a pointer by
shifting It left 16 bits. Line
Setup configured for emulate
mode only.

63-15

-----------------------------.---

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Table 63-3 (continued)
Type

Variable

Value (hex/decimal)

extern volatile const unsigned char

40/64
42166
44/68
48/72
4a174
40/76
4e/78

50/80

52/82
58/88

dl
dl
dl
dl
dl
dl
dl
dl
dl
dl

Meaning

oonn req
oonn resp
data req
expd data req
reset req
reset resp
disoonn req
debug req
unit data req
mgt faoillty req

051 primitive code received at
Layer 2 In a PDU from Layer 3.
Une Setup configured for
emulate mode only.
extern volatile const unsigned char

up_dlyrmtvyath

0-8

Path number received at Layer
2 in a PDU from Layer 3. LIne
Setup configured for emulate
mode only.

extern volatile unsigned short

Interlayer-buffer number (an
iAPX-286 segment number)
received at Layer 2 In a PDU
from Layer 3. This segment
number can be converted to a
pointer by shifting It left 16 bits.
Line Setup configured for
emulate mode only.

extern volatile unsigned short

Offset to the start (header
node) of the service data unit in
an Interlayer-message buffer.
Received at Layer 2 from Layer
3. Same as data starr offset in
a PDU. Une Setup configured
for emulate mode only.

extern unsigned long

32-blt 11 tlok count stored in
header 01 most recent IL buffer
passed up to Layer 2.
Preserves at each layer the
original time when the end of
the data (Bee I was clocked
into the buffer. Une Setup
configured for emulate or
monitor mode.

63-16

63 OSI

Table 63·4
Layer 3 OSI Variables

Type

Variable

Value (hex/decimal)

Meaning

extern event

True when an OSI primitive is
reoeived at Layer 3 from Layer
2 . Line Setup configured for
emulate mode only.

extern event

True when an OSI primitive is
reoeived at Layer 3 from Layer
2. Line Setup configured for
emulate or monitor mode.

extern event

True when an OSl primitive Is
reoeived at Layer 3 from Layer
4. Une Setup configured for
emulate mode only.

up_n_prmtv

extern volatile unsigned short

OSI primitive data unit (PDU)
IAPX-286 segment number
received at Layer 3 from Layer
2. This segment number can
be converted to a pointer by
shifting It left 16 bits. line
Setup configured for emulate
mode only.

extern volatile unsigned short

OSI primitive data unit (PDU)
iAPX-286 segment number
received at Layer 3 from Layer
2. This segment number oan
be oonverted to a pOinter by
shifting it left 16 bits. Line
Setup configured for emulate or
monitor mode.

'T.

extern volatUe

41165
43/67

const unsigned ohar

45/69
49/73
4b/75
4d177
41179

51/81
53/83
55185

59/89

dl connind
dl conn conf
ell data!nd
dl expd data ind
dI reset !nd
dl reset oonf
dl disconn ind
dldebuglnd
dl unit data Ind
dl error report Ind
dl mgt facility lnd
OSI primitive oode received at
Layer 3 in a PDU from Layer 2.
Une Setup configured for
emulate mode only.

63-17

INTERVIEW 7000 Series Advanced Programming: ATLG-107-9S1-10B

Table 63-4 (continued)
Type

Variable

Value (hex/decimal)
44/68
45/69

extern volatile const unsigned char

48/72

49/73

54/84
55/85

td
rd
td
rd
td
rd

Meaning

df data Ind

dl
dl
dl
dl
dl

data Ind
expd data Ind
expd data Ind
unit data Ind
unit data Ind

OSI primitive code received at
Layer 3 In a PDU from Layer 2.
Une Setup oonfigured for
emulate or monitor mode.

0-8

extern volatile const unsigned char

Path number received at Layer

3 In a PDU from Layer 2. Une
Setup oonfigured for emulate
mode only.

0-8

extern volatile const unsigned char

Path number received at Layer

3 In a PDU from Layer 2. Une
Setup configured for emulate or
monitor mode.
extern volatile unsigned short

Interlayer-buffer number (an
IAPX-286 segment number)
received at Layer 3 In a PDU
from Layer 2. This segment
number can be converted to a
pOinter by shifting it left 16 bits.
Line Setup configured for
emulate mode only.

extern volatile unsigned short

Interlayer-buffer number (an
IAPX-286 segment number)
received at Layer-3 In a PDU
from Layer 2. This segment
number can be converted to a
pointer by shifting it left 16 bits.
Une Setup configured for
emulate or monitor mode.

extern volatile unsigned short

In OSI primitive received at
Layer 3 from Layer 2, the offset
to where the service data unit
begins. Une Setup configured
for emulate mode only.

extern volatile unsigned short

In OSI prlmltlve received at
Layer 3 from Layer 2. the offset
to where the service data unit
begins. Line Setup configured
for emulate or monitor mode.

extern volatile unsigned short

Size of the service data unit In
an Interlayer-message buffer,
displayed as SIZE on the Layer
3 trace screen. Received at
Layer 3 from Layer 2. Same as
data length in a PDU. Line
Setup configured for emulate or
monitor mode.

63-18

63 OSI

Table 63-4 (continued)

Type

Variable

Value (hex/decimal)

extern volatile unsigned short

Meaning

OSI primitive data unit (PDU)
IAPX-286 segment number
received at Layer 3 from Layer
4. This segment number can
be converted to a pointer by
shifting It left 16 bits. Line
Setup configured for emulate
mode only.

60/96
62/98
641100

extern volatlle conat unsigned ohar

66/102
68/104
5a/106
50/108

6.1110
70/112
72/114
74/116
76/118
78/120

n
n
n
n
n
n
n
n

conn req
oonn resp
data req
data aok req
expd data req
reset req
reset resp
dlsoonn req
n debug req
n unit data req
n qual data req
n qual data ack req
n mgt facUlty req
OS! primitive code received at
Layer 3 In a PDU from Layer 4.
Line Setup configured for
emulate mode only.

0-8

extem volatile canst unsigned ohar

Path number reoeived at Layer
3 In a PDU from Layer 4. Line
Setup oonfigured for emulate
mode only.

extem volatile unsigned short

Interlayer-buffer number (an
IAPX-286 segment number)
received at Layer 3 In a PDU
from Layer 4. This segment
number can be converted to a
pointer by .shlftlng It left 16 bits.
Line Setup oonfigured for
emulate mode only.

extern volatile unsigned short

Offset to the start (header
node) of the service data unit in
an Interlayer-message buffer.
Reoeived at Layer 3 from Layer
4. Same as data start offset in
a PDU. Line Setup configured
for emulate mode only.

extem unsigned long

32-blt 11 tick count stored In
header of most reoent IL buffer
passed up to Layer 3.
Preserves at each layer the
original time when the end of
the data (BCC) was olocked
Into the buffer. LIne Setup
configured for emulate or
monitor mode.

63-19

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Table 63-5
Layer 4 OSI Variables
Type

Variable

Value (hex/decimal)

Meaning

extern event

True when an OSI primitive Is
received at Layer 4 from Layer
3. Une Setup confIgured for
emulate mode only.

extern event

True when an OSI primitive Is
received at Layer 4 from Layer
3. Line Setup configured for
emulate or monitor mode.

extern event

True when an OSI primitive is
received at Layer 4 from Layer
5. Line Setup configured for
emulate mode only.

extern volatile unsigned short

OSI primitive data unit (PDU}
IAPX-286 segment number
received at Layer 4 from Layer
3. This segment number can
be converted to a pointer by
shifting It left 16 bits. Line
Setup configured for emulate
mode only.

extern volatile unsigned short

OSI primitive data unit (PDUI
IAPX-286 segment number
received at Layer 4 from Layer
3. This segment number can
be converted to a pointer by
shifting It left 16 bits. Une
Setup configured for emulate or
monitor mode.
61/97

extern volatile const unsigned char

63/99
65/101

67/103
69/105

6b/107
6d/10S
6f/l11

71/113
73/115
75/117

771119
79/121
7a/122

n conn Ind
n conn cont
n data Ind
n data ack Ind
n expd data Ind
n reset Ind
n reset conf
n dlsconn lnd
n debug Ind
n unit data Ind
n qual data Ind
n qual data ack Ind
n mgt facility Ind
n error report Ind
OSI primitive code received at
Layer 4 In a PDU from Layer 3.
Line Setup configured for
emulate mode only,

63-20

63 OSI

Table 63-5 (continued)
Variable

Type

Value (hex/decimal)

extern volatile const unsigned char

64/100
651101
68/102
69/103
74/116
75/117

td
rd
td
rd
td
rd

Meaning

n data Ind
n data Ind
n expd data Ind
n expd data Ind
n unit data Ind
n unit data ind

OSlprlmltlve code received at
Layer 4 In a POU from Layer 3.
Line Setup configured for
emulate or monItor mode.
extern volatile canst unsigned char

0-8

Path number received at Layer
4 In a POU from Layer 3. Une
Setup configured for emulate
mode only.

extern volatile const unsigned char

0-8

Path number received at Layer
4 In a POU from Layer 3. Line
Setup configured for emulate or
monitor mode.

extern volatUe unsigned short

Interlayer-buffer number (an
IAPX-286 segment number)
received at Layer 4 In a POU
from Layer 3. This segment
number can be converted to a
pointer by shifting It left 15 bits.
line Setup configured for
emulate mode only.

extern volatile unsigned short

Interlayer-buffer number (an
IAPX-28S segment numben
received at Layer 4 In a POU
from Layer 3. This segment
number can be converted to a
pointer by shifting It left 1S bits.
line Setup configured for
emulate or monitor mode.

extern volatile unsigned short

In OSI primitive received at
Layer 4 from Layer 3, the offset
to where the service data unit
begins. Line Setup configured
for emulate mode only.

extern volatile unsigned short

In OSI primitive received at
Layer 4 from Layer 3, the offset
to where the service data unit
begins. line Setup configured
for emulate or monitor mode.

extern volatile unsigned short

Size of the service data unit In
an Interlayer-message buffer.
Received at Layer 4 from Layer
3. Same as data_length In a
POU. Line Setup configured for
emulate or monitor mode.

63-21

---

-

---

._----------_.- -- .. -------.-.--.--------.--.--..~-.--- ...

--------'".---_.._----_..--------_.. _._--_..... _ - -

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Table 63·5 (continued)

Type

Variable

Value (hex/decimal)

extern volatile unsigned short

Meaning

OSI primitive data unit (PDUl
IAPX-286 segment number
reoelved at Layer 4 from Layer
5. This segment number can
be converted to a pOinter by
shifting It left 16 bits. Line
Setup configured for emulate
mode only.

80/128

extern volatile oonst unsigned ohar

82/130

84/132
88/136

8e/142
90/144
921146
98/152

t oonn req
t oonn resp

t data req
t expd data req
t dlsconn req
t debug req
t unit data req
t mgt facility req

OSI primitive code received at
Layer 4 In a PDU from Layer 5.
Line Setup configured for
emulate mode only.

0-8

extern volatile oonst unsigned char

Path number received at Layer

4 In a PDU from Layer 5. Line
Setup configured for emulate
mode only.
extern volatile unsigned short

Intenayer-buffer number (an
iAPX-286 segment number)
received at Layer 4 In a PDU
from Layer 5. This segment
number oan be converted to a
pointer by shifting It left 16 bits.
Line Setup configured for
emulate mode only.

extern volatile unsigned short

Offset to the start (header
node) of the service data unit In
an Intenayer-message buffer.
Received at Layer 4 from Layer
5. Same as data start offset In
a PDU. Line SetuP configured
for emulate mode onty.

extern unsigned long

32-bit /1 tick count stored In
header 01 most recent IL buffer
passed up to Layer 4.
Preserves at each layer the
original time when the end of
the data (BeC) was olocked
Into the buffer. Una Setup
configured for emulate or
monitor mode.

63-22

63 OSI

Table 63-6
layerS OSI Variables
Type

Value (hex/decimal)

Variable

Meaning

extern event

True when an OSI primitive is
received at Layer 5 from Layer
4. Une Setup configured for
emulate mode only.

extem event

True when an OSI primitive Is
received at Layer 5 from Layer
4. Une Setup configured for
emUlate or monitor mode.

extem event

True when an OSI primitive Is
received at Layer 5 from Layer
I). Une Setup configured for
emulate mode only.

extem volatile unSigned short

OSI primitive data unit (PDU)
IAPX-286 segment number
reoeived at layer 5 from Layer
4. This segment number can
be oonverted to a pointer by
shifting It left 16 bits. Una
Setup configured for emulate
mode only.

extern volatile unsigned short

OSI prtmitlve data unit (PDU)
IAPX-286 segment number
received at layer 5 from layer
4. This segment number can
be converted to a pointer by
shifting it left 16 bits. Line
Setup configured for emulate or
monitor mode.

extern volatile const unsigned char

81/129
83/131
85/133

t oonn Ind
t conn conf

89/137

t expd data Ind
t dlsconn Ind
t debug iOO

8f/143
91/145
93/147
95/149
99/153

t data ind

t unit data Ind

t error report ind
t mgt faollity ind
OSI primitive code received at
layer 5 In a PDU from layer 4.
LIne Setup oonfigured for
emUlate mode only.

841132

extern volatHe const unsigned char

85/133

88/136
89/137
941148
95/149

td t data Ind
rd t data 100
td t expd data Ind
rd t expd data Ind
td t unit data 100
rd t unit data Ind
OSI primitive code reoeived at
Layer 5 In a PDU from layer 4.
Une Setup configured for
emulate or monitor mode.

63-23

._----,----

INTERVIEW 7000 Series Advanced Programming; ATLC-107-951-108

Table 63-6 (continued)
Type

Value (hex/decimal)

Variable

extern volatile const unsIgned char

0-8

extern volatile const unsIgned char

0-8

Meaning

Path number received at Layer
5 In a PDU from Layer 4. Une
Setup configured for emulate
mode only.
Path number received at Layer

5 in a PDU from Layer 4. Line
Setup configured for emulate or
monitor mode.
extern volatile unsigned short

Interlayer-buffer number (an
IAPX-286 segment number)
received at Layer 5 In a PDU
from Layer 4. ThIs segment
number can be converted to a
pointer by shifting It left 16 bits.
Line Setup configured for
emulate mode only.

extern volatile unsigned short

Interlayer-buffer number (an
IAPX-266 segment number)
received at Layer 5 In a PDU
from Layer 4. This segment
number can be converted to a
pointer by shifting It left 16 bits.
Line Setup configured for
emulate or monitor mode.

extern volatile unsigned short

In OSI primitive receIved at
Layer 5 from Layer 4. the offset
to where the service data unit
begins. Line Setup configured
for emulate mode only.

extern volatile unsigned short

In OSI primitive received at
Layer 5 from Layer 4. the offset
to where the service data unit
begins. Une Setup configured
for emulate or monitor mode.

extern volatile unsigned short

Size of the service data unit In
an Interlayer-message buffer.
Received at Layer 5 from Layer
4. Same as data _length in a
PDU. LIne Setup configured for
emulate or monitor mode.

extern volatile unsigned short

OSI primitive data unit (PDUj
IAPX-266 segment number
received at Layer 5 from Layer
6. This segment number can
be converted to a pointer by
shifting it left 16 bits. Une
Setup configured for emulate
mode only.

63-24

63 OSI

Table 63·6 (continued)
Type

Variable

Value (hex/decimal)

extern volatile const unsigned char

aO/160
821162
84/164
a8/168
8c/172
ael174
bO/176

b2l178
b8f184

Meaning

s
s
s
s

conn req
conn resp
data req
expd data req
s release req
s release resp
s debug req
s unit data req
s mgt facility req
OSI primitive code received at
Layer 5 In a PDU from Layer 6.
Une Setup oonfigured for
emulate mode only,

0-8

extern volatHe const unsigned char

Path number received at Layer
5 in a POU from Layer 6, Une
Setup configured for emulate
mode only,

extern volatile unsigned short

Intertayer-buffer number (an
IAPX-286 segment number)
reoelved at Layer 5 in a POU
from Layer 6, This segment
number can be converted to a
pointer by shifting It left 16 bits.
Une Setup configured for
emulate mode only.

extern volatile unsigned short

Offset to the start (header
node) of the service data unit in
an interlayer-message buffer.
Received at Layer 5 from Layer
6. Same as data start offset in
a POU. LIM SetUp coriftgured
for emulate mode only.

extern unsigned long

32-bit 11 tick count stored In
header of mOst recent IL buffer
passed up to Layer 5.
Preserves at eaoh layer the
original time when the end of
the data IBCC) was clooked
Into the buffer. Line Setup
oonflgured for emulate or
monitor mode.

63-25

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Table 63·7
Layer 6 OSI Variables
Type

Value (hex/decimal)

Variable

Meaning

extern event

True when an OSI primitive Is
received at Layer 6 from Layer
5. Une Setup configured for
emulate mode only.

extern event

True when an OSI primltive Is
received at Layer 6 from Layer
5. Une Setup configured for
emulate or monitor mode.

extern event

True when an OSI primitive is
received at Layer 6 from Layer
7. LIne Setup configured for
emulate mode only.

extern volatile unsigned short

OSI primitive data unit (POU)
IAPX-286 segment number
received at Layer 6 from Layer
5. This segment number can
be converted to a pointer by
shifting It left 16 bits. Une
Setup configured for emulate
mode only.

extern volatile unsigned short

OSt prlmitl.ve data unit (POU)
IAPX-286 segment number
received at Layer 6 from Layer
5. This segment number can
be converted to a pOinter by
shifting It left 16 bits. Line
Setup configured for emulate or
monitor mode.
a1/161
a3/163
a5/165

extern volatile const unsigned char

a9/169
ad/173

af/175
bl/177
b3/179

bS/18l
b9/l85

a4/164
a5/165
a8/168

extern volatile const unsIgned char

a9/169

b4/180
b5/181

63-26

s conn Ind
s conn conf
s data Ind
s expd data Ind
$ release Ind
s release conf
s debug Ind
s unit data Ind
s error report Ind
s mgt facility Ind
OSI primitive code received at
Layer 6 In a POU from Layer 5.
Une Setup configured for
emulate mode only.
td s data Ind
rd s data Ind
td s expd data Ind
rd s expd data Ind
td s unit data Ind
rd s unit data Ind
OSI primitive code received at
Layer 6 In a POU from Layer S.
Line Setup configured for
emulate or monitor mode.

63 OSI

Table 63-7 (continued)

Type

Variable

Value (hex/decimal)

Meaning

extern volatile const unsigned char

0-8

Path number received at Layer
6 In a PDU from Layer 5. Une
Setup configured for emulate
mode only.

extern volatile const unsigned char

0-8

Path number received at Layer
6 In a POU from Layer 5. Une
Setup configured for emulate or
monitor mode.

extern volatile unsigned short

Interlayer-buffer number (an
IAPX-286 segment number)
received at Layer 6 In a POU
from Layer 5. This segment
number can be converted to a
pointer by shlftinQ It left 18 bits.
line Setup configured for
emulate mode only.

extern volatile unsigned short

Interlayer-buffer number (an
iAPX-266 segment number)
received at Layer 6 In a POU
from Layer 5. This segment
number can be converted to a
pointer by shifting It left 16 bits.
Une Setup configured for
emulate or monitor mode.

extern volatile unsigned short

In OSI primitive received at
Layer 61rom Layer 5, the offset
to where the service data unit
begins. Line Setup configured
for emulate modit only.

extern volatUe unsigned short

In OSI primitive received at
Layer 6 from Layer 5. the offset
to where the service data unit
begins. LIne Setup oonflgured
for emulate or monitor mode.

extern volatile unsigned short

Size of the servioe data unit In
an Interlilyer-message buffer.
Received at Layer 6 from Layer
5. Same as dins_'ength in a
PDU. Line Setup configured for
emulate or monitor mode.

extern volatile unsIgned short

OSI prtmltlve data unit (POU)
IAPX-286 segment number
received at Layer 6 from layer
7. This segment number oan
be oonverted to a pointer by
shifting It left 16 bits. Line
Setup configured for emulate
mode only.

63-27

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Table 63·7 (continued)
Type

Value (hex/decimal}

Variable

extern volatile canst unsigned char

00/192
c2/194
04/196
c8/200
00/204

ce/206
dO/208
d2/210
d8/216

p
p
p
p
p
p
p
p
p

Meaning

conn req
conn resp
data req
expd data req
release req
release resp
debug req
unit data req
mgt facility req

OSI primitive code received at
Layer 6 from Layer 7 In a PDU.
Line Setup configured for
emulate mode only.

0-8

extern vo/atlle canst unsigned char

Path number received at Layer
6 from Layer 7 In a PDU. Line
Setup configured for emulate
mode only.

extern volatile unsigned short

Interlayer-buffer number (an
IAPX-286 segment number)
received at Layer 6 from Layer
7 In a PDU. This segment
number can be converted to a
pOinter by shifting It left 16 bits.
Line Setup configured for
emulate mode only.

extern volatile unsigned short

Offset to the start (header
node I of the service data unit In
an Interlayer-message buffer.
Received at Layer 6 from Layer
7. Same as data start offset In
a PDU. Line Setup configured
for emulate mode only.

extern unsigned long

32-blt 11 tick count stored In
header of most recent IL buffer
passed up to. Layer 6.
Preserves at each layer the
original time when the end of
the data (BCC) was clocked
Into the buffer. Une Setup
configured for emulate or
monitor mode.

63-28

63 OSI

Table 63-8
Layer 7. OSI Variables
Type

Variable

Value (hex/decimal)

Meaning

extern event

True when an OSI primitive is
reoelved at Layer 7 from Layer
6. Une Setup oonfigured tor
emulate mode only.

extern event

True when an OSI primitive is
received at Layer 7 from Layer
6. Line Setup configured for
emulate or monitor mode.

extern volatile unsigned short

OSI primitive data unit (POU)
IAPX-286 segment number
received at Layer 7 from Layer
6. This segment number can
be oonverted to a pointer by
$hitting It left 16 bits. Une
Setup oonfloured for emulate
mode only.

extern volatile unsigned short

OS! primitIve data unit (POU)
IAPX-286 segment number
received at Layer 7 from Layer
6. This segment number can
be converted to a pointer by
shifting It left 16 bits. Line
Setup configured for emulate or
monitor mode.

011193
03/195
c51197
09/201
od1205
of!207
d11209
d3/211

extern volatile oonst unsigned char

d5/213
d9/217

p
p
p
p
p
p
p

conn Ind
conn conf
data Ind
expd data Ind
release Ind
release conf
debug Ind
p unit data ind
p error report Ind
p mgt facility Ind
Ost primitive code received at
Layer 7 In a POU from Layer 6.
Line Setup configured for
emulate mode only.

extern volatile const unsigned ohar

04/196
05/197
08/200
09/201
d4/212
d51213

td p data Ind
rei p data Ind
td p expd data Ind
rd p expd data Ind
td p unit data Ind
rd p unit data Ind
OSI primitive code received at
Layer 7 In a POU from Layer 6.
Un. Setup configured for
emulate or monitor mode.

extern volatile const unsigned char

0-8

Path number reoeived at Layer
7 In a POU from Layer 6. Line
Setup configured for emulate
mode only.

63-29

INTERVIEW 7000 Series Advanced Proarammlng: ATLC-107-951-10B

Table 63·8 (continued)
Type

Value (hex/decimal)

Variable

extern volatUe .const unsigned char

mJo-p-prmtv-path

extern voiatHe unsigned short

extern volatile unsigned short

extern volatile unsigned Short

extern volatile unsigned short

extern volatile unsigned .hort

extern unsigned long

Meaning

Path number received at Layer
7 In a PDU from Layer 6. line
Setup conflQured for emulate or
monitor mode.
Interlayer-buffer number (an
IAPX-286 segment number)
received at Layer 7 In a PDU
from Layer 6. This segment
number can be converted to a
pointer by shifting It left 16 bits.
line Setup confioured for
emutate mode only.
Interlayer-buffer number (an
IAPX-286 .egment number)
received at Layer 7 In a PDU
from Layer 6. This segment
number can be converted to a
pointer by shifting It left 16 bits.
line Setup configured for
emulate or monitor mode.
In OS! primitive received at
Layer 7 from Layer 6. the offset
to where the service data unit
begins. line Setup configured
for emulate mode only.
In OSI primitive received at
Layer 7 from Layer 6. the offset
to where the service data unit
begins. LIne Setup. conflQured
for emulate or monitor mode.
SIze of the service data unit In
an Interlayer-message buffer.
Received at Layer 7 from Layer
6. Same as data length In a
PDU. Une Setup-configured for
emulate or monitor mode.
32-blt 11 tick count stored In
header Of most recent IL buffer
passed up to Layer 7.
Preserves at each layer the
original time when the end of
the data (BCC) was clocked
Into the buffer. line Setup
configured for emulate or
monitor mode.

63.3 Routines
OSI routines available at each layer make sending primitives to a layer above or
below possible (see Figure 63-3). The routine name and its argUments provide the
same information as the softkey selections on the Protocol Spreadsheet. (In the early
phases of compiling the program, the. C translator uses the routines to convert the
spreadsheet softkey-token primitives into C.) All routines are protocol-independent.

63-30

63 OSI

(A) Layer-Independent 081 Routines
The following interlayer buffer service routines operate at any layer, regardless of
protocol (or in the absence of a protocol package).

Synqpsis
extern void Jet_il_msLbuff(buffer_numberytr, maintain_bUytr);
unsigned short" bUffer_numberytr;
unsigned short" maintainj,itytr;

Description
The Jet_iCmsg_buff routine gets a free interlayer message buffer from the pool
and returns the buffer number to the caller for use in subsequent calls to other
interlayer buffer services. It also returns a maintain bit for use in the freeing
operation.

~\
i '

$<
.•
~'

I

The first parameter is a pointer to the location where the buffer number is to be
stored. The buffer number that is returned is actually an iAPX-286 segment
number which can be converted to a pointer by shifting it 16 bits to the left. If
there is no free buffer available, the routine will wait for one to become
available.
The second parameter is a pointer to the location where the maintain bit will be
stored. Since it must be· used in the freeing operation, the maintain bit value
should not be modifie.d. The zero bit in this variable indicates your maintain
bit.
Example
The variables in which the returned buffer number and maintain bit will be
stored must be declared. When calling the routine, reference the addresses of
these variables.
unsigned short iI_buffer_number;
unsigned short relay_baton;
}
LAYER: 4
ST ATE: get a buffer
CONDmONS; KEYBOARD· •
ACTIONS:
{

Jet _iCmsgjJlt/f( &il_buffer_number, &retay_baton);
}

The routine will get a buffer number and store it in variable ii_buffer_number.
It will also return a maintain bit and store it in variable relay_baton.

63-31

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

SynQPsis
extern void _start_il_bufLlist(il_buffer_number, stt1rt_offsetJ'tr);
unsigned short ii_buffer_number;
unsigned short • start_offset"'ptr;

Description
The jtart_il_bufLlist routine starts a linked list of text inside an interlayer
message buffer. The list is made up of a header node and text nodes. The
header node contains offsets to the first and last text nodes. Each text node
contains a pointer to the actual text, the length of the text, and the offset to the
next text node. This routine actually creates the header node inside the
interlayer message buffer and initializes the first and last text node offsets to
zero, indicating an empty list. It will return the offset to the list header node for
use in subsequent list service calls.

The first parameter is the interlayer message buffer number that will contain the
list.
The second parameter is a pointer to the location where the offset to the list
header will be stored. The returned offset will be zero if there is insufficient
room in the buffer for the header node and one text node. Otherwise, it is the
offset from the beginning of the message buffer to the start of the header node.
To convert the offset into a pointer. shift the buffer number 16 bits to the left
and add the offset:

Example
Get a buffer and start a linked list. The variable in which the returned offset
will be stored must be declared. When calling the routine, reference the address
of this variable.
unsigned short il_buffer_number;
unsigned short relay_baton;
unsigned short data_start_offset;
}

63-32

63 OSI

'*

STATE: start_a_list
CONDITIONS: KEYBOARD' "
ACTIONS:
{
Jet_il_msLbuff(&.il_bufferJlumber, &relay_haton);
_start_il_bufLlist (ii_buffer _number, &.data_start_offset);

See _insert_il_bufLlist_cnt routine on how information is inserted in the buffer. *;
}

The routine will get the offset to the header node and store it in variable
data~start_offset.

Syngpsis
extern unsigned short _dupjl_buff_li!tjtart(iJ_buffer_number, start_offset,
new_start_offsetJltr):
unsigned short ii_buffer_number;
unsigned short start_offset;
unsigned short" new_start_ofJsetJltr;

'~'
,

Description
This routine duplicates the header node of a pointer list. In order for a layer to
retain the ability to resend a buffer-that is, to reference again the same list
header with the same fll'St-nade offset-it must keep its own linked list safe from
data inserted at a layer below. The _dup_iCbuff_list_start routine allows the
lower layer to start its own list.
If the lower layer will insert data into the buffer, it need duplicate only the list
header ("listjtart"). not the entire list. If the layer will append data to the

end of the buffer. it must duplicate the complete linked list via the
_dup_il_bufLlist routine.

The first parameter is the interlayer message buffer number in which the header
node will be duplicated.
The second parameter is the offset to the header node to be duplicated.
The third parameter is a pointer to the location where the offset to the new
header node will be stored.
Returns
This routine returns zero if there is not enough room in the buffer for the
duplicated header node and at least one list node.

63-33

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Example
Duplicate the header node of a buffer passed down from Layer 3.

extern lIolatile unsigned short up_dl_il_buff;
extern volatile unsigned short up_dCsdu;
unSigned short 12_data_start_offset;
}
LAYER: 3
STATE: message
CONDITIONS: KEYBOARD· •
ACTIONS: DL_DA TA REO· CiS !'t,(FOX)) •
LAYER: 2
STATE: duplicate_header
CONDITIONS: DL_DATA REO
ACTIONS:
{

_dup_il_bufLlisl_start{up_dl_il_buff, up_dl_sdu, &12_data_start_offset);
/* See _insert_il_bufLlist_cnt routine on how information is inserted in the buffer. "/
}

-dup-n- buff-list
Syn9.Qsis
extern unsigned short _ dup_il_bufLlist (ii_buffer_number. start_offset, new _start_offset Jlr);
unsigned short ii_buffer_number;
u1ISigned short start_offset;
unsigned short • new_start_offsetJtr;

DescriptiQn
This routine duplicates an entire pointer list. In order for a layer to be able to
retain the ability to resend a buffer-that is, to reference again the same list
header with the same first- and last-node offsets-it must keep its own linked
list safe from data inserted and appended at a layer below. The
_dup_il_buff_list routine allows the lower layer to have its own list.
If the lower layer will append data to the buffer, it should duplicate the entire
linked list. If the layer will only insert data into the buffer, it need only
duplicate the header node via the _dup_iCbufLlist_start routine.

The first parameter is the interlayer message buffer number in which the list will
be duplicated.
The second parameter is the offset to the header node of the list to be
duplicated.

63-34

f~
!

63 OS!

<

The third parameter is a pointer to the location where the offset to the header
node for the new list will be stored.

Returns
This routine returns zero if the duplication is successful. If there is not enough
room in the buffer to duplicate the list, one is returned.
Example
Duplicate the entire pointer list of a buffer passed down from Layer 3.
{

extern ..,olatile unsigned short up_dl_il_bufj;
extern ..,olatile unsigned short up_dl_sdu;
unsigned short 12_data_startj>ffset;
}
LAYER: 3
STATE: message
CONDITIONS: KEYBOARD' "
ACTIONS: DI._OATA REQ 00.. "'~«FOX»·
LAYER: 2
STATE: duplicateJist
CONDITIONS: DL_DAT A REO
ACTIONS:
{

_dup_il_buJl_Ust(up_dUl_buff, up_dl_sdu, &12_datajtart_offset};
/* See _oppend_il_bufLlisl_cnt routine on how information is appended to the buffer. */

_open _space_in JI_buff
Synqpsis
extern ..,aid _open _spact_in_il_buJlOCbuJler_number, length, space_ affse(ytr);
unsigned short it_buffer_number;
unsigned short length:
unsigned short * space_ofjsetytr;

Description
The _open_space_in_il_buff routine opens up the requested amount of space in
the specified interlayer message buffer. It returns an offset from the beginning
of the buffer to the start of the open space.

~,
i

The first parameter is the interlayer message buffer number in which space is to
be made.

63-35

-< <--<------------<-<-<-_._<----- <-- -------_.. _---<_._<---<-----------,-----

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

The second parameter is the amount of space (number of bytes) requested.
The third parameter is a pointer to the location where the returned offset will be
stored. The returned offset will be zero if there is insufficient room in the
buffer.
To convert the offset into a pointer. shift the buffer number 16 bits to the left
and add the offset:

Example
Always open space in the buffer if you are going to copy data (usually header
information) into the buffer. If you are not going to copy data into the buffer.
but reference its location in memory outside the buffer (usually user data), you
do not need to open space.
The variable in which the returned offset will be stored must be declared. When
caIling the routine. reference the address of this variable. The length may be
entered as a numeric value. in which case a length variable need not be
declared.
For example, a buffer at Layer 3 will have three X.25-header bytes inserted.
The call for space to hold the header would look like this:
{
unsigned short il_buffer_number;
unsigned short relay_baton;
unsigned short data_start_offset;
unsigned short available"-space_o!!set;
}
STATE: get_space
CONDITIONS: KEYBOARD· •
ACTIONS:
{
Jet_il_msg_buff( &i1_buffer_number, &rell1Y_baton);
_stl1rt_il_bufLlist(il_buffer_number, &data_start_offset);
_opeIlJpace_ill_il_buff(il_buffer_number, 3, &available_space_offset );

, .. See _illsert_il_bufLlist_cnt routine on how information is inserted in the buffer. */

The routine will get the offset to the next available space in the buffer and store
it in variable availablejpace_o!!set.
Once space has been opened. the buffer-number and available-space variables
can be converted into an open-space pointer. With this pointer. data can be
copied into the space. The pointer can then be referenced in an
_insertJi_bu!!_list_cnt routine. so that the opened space becomes threaded onto
the linked list in the IL buffer. See the programming example under
_insert_iIj'u!!jist_cnt.

63-36

63 OSf

Syncmsis
extern void Jree_il_msLbuff(il_bufferJlumber, relay_baton);
unsigned short il_buffer_number;
unsigned short relay_baton;

Description
The Jree_iCms8_buJJ routine returns an interlayer message buffer to the pool of
free buffers. Before actually returning the buffer to the pool, this routine
verifies that all maintain bits have been reset. assuring that all users have freed
this buffer.

The first parameter is the interJayer-buffer number to be freed.
The second parameter is the maintain bit associated with the buffer user to be
freed.
Example

SynQpsis
extern. void _set_maint_bufLbit(il_buffer_number. new_bit..ptr);
unsigned short il_buffer_number;
unsigned short • new_bit"'plr;

Descdption
The jet_maint_bufLbit routine sets a new maintain bit for a given interlayer
message buffer. It returns that bit to the caller to be used in the freeing
operation.

~,

..

!

The maintain bit allocated in the ....seCil_msg_buff routine should be considered
valid only for the layer at which it was obtained. Once you pass a buffer, the
maintain bit win hold the buffer at the next layer only until action on it has been
processed. (In Spreadsheet terms, the buffer will be held until the ACTIONS
block has been processed in response to the first CONDITIONS block identifying
the buffer. In any other CONDITIONS block referring to the buffer. the buffer
will not be found unless an additional maintain bit was set.) The maintain bit

63-37

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

eventually will be freed automatically whether or not any action is taken on it at
the next layer. To hold a buffer at a particular layer, or to continue passing the
buffer (in either direction), a new maintain bit must be set. The same maintain
bit cannot be used continuously, since it will be freed after the first process on it
(an ACTION to send. for example).
If you wish to keep a buffer available for your use while also sending it to
another layer, set two maintain bits. One will be used to pass the buffer; the
other will "maintain" the buffer for other processes. The latter will have to be
freed via the Jree_il_msLbuff routine.

The first parameter is the interlayer-buffer number in which the new bit will be
set.
The second parameter is a pointer to the location where the returned maintain
bit will be stored. There are sixteen maintain bits reserved for each interlayer
buffer. Each bit is identified by a two-byte variable with a single zero. The first
maintain bit allocated is the least significant, so the value returned is
hexadecimal FFFE (binary 11111111 11111110). The last maintain bit
allocated is 7FFF (01111111 11111111). If all the maintain bits are already in
use, FFFF will be returned.
The maintain bit value should not be modified. It must be used in the freeing
operation to make sure the buffer is returned to the free buffer pool.
Example
The variable in which the returned maintain bit will be stored must be declared.
When calling the routine, reference the address of this variable. For example.
you receive a buffer at Layer 2 from Layer 3 (up _dCil_buff) and insert
information into it. Before passing the buffer to Layer 1. set two maintain bits.
The one stored in variable maintain_bit will hold the buffer for the purpose of
repeated resends of the frame, if necessary. and win have to be freed via the
Jree_iCms8_buff routine. When you pass the buffer down, use the bit in
variable 12Jelay_baton. When you resend the frame. set a new resend_baton
bit and pass that down, still holding maintain_bit in reserve for subsequent
resends.
unsigned short 12_relay_baton;
unsigned short resend_baton;
unsigned short maintain_bit;
extern lIolatile unsigned short up_dl_il_buff;
extern volatile unsigned short up_dl_sdu;
U1Isigned short 12_data_start_offset;
unsigned short allailablejpace_o!!set;
static unsigned char 12_data{2] = {OxOI, OxOO};
int i;
unsigned char" ptr_12;

63-38

63 OSI
#define makeJtr(number,ofjset) ((Mid "')(((long)numbe7« 16) + oJJset))
}
LAYER: 3
ST ATE: send fox message
CONDIT10NS:-KEVBOARD· *
ACTIONS: DL_DATA REO oCt .... "6 ((FOX)) "
LAVER: 2
STATE: send_a_buffer
CONDITIONS: DL_DATA ReQ
ACTIONS:
{
/* See _i7lsert_il_buJf_list_cnt routine for an explanation of how information is inserted in the
buffer. *1
_dup_il_bufj_list_start (up _dCi/_buff, up_dl_sdu. &12_data_start_offset);
_open_spaceJ7I_il_bufj(up_dl_il_bufj. 2, &avaiTable_space_ofjstt):
plr_12 = malce-Pt7(Up_dCil_bujJ. aMJlab/e_space_offsl!t);
for(i = 0; i < 2; iH)

{

*pt7_l2 '" data_12[i};
pI7_12++;
}

plr_12 -=2;
_inserUI_bufLlist_cnt(up_dl_il_buJf. 12_data_start_ofjset. plr_12. 2);
_set_maint_bufj-'Jjt(up_dCil_buJJ•. &maintain_bit);
_set_maint_bufj_bit(up_dl_iCbuff. &12Jelay_baton);
sendJh-prmtv_below(up_dUCbuJJ. 12Jelay_bato7l, 12_data_start_ofjset, 0, Ox24, OJ;
}
LAYER: 1
ST ATE: resend buffer
CONDITIONS: RECEIVE STRING iEl°;J((XXXX1001))'
ACTIONS;
{
Jtt_main t_bufLbit (up_dl_il_bufj, &resend....bato7l);
l1_il_transmU(up_dl_il_buff. resend_baton, 12_data_start_ofjset. 1);
/* See Section 59, MonitorlTransmlt Line Data, for an explanation of the l1_il_transmit
routine. */
}
CONDITIONS: RECEIVE STRING m«XXXXQ001»·
ACTIONS:

{

Jree_il_msg_buff(up_dUI_buff, maintain_bit);

/. See Jree_il_ms8_buff for an explanation of this routine. -/
}

Synuffer_number. &relay_baton);
_starUE_bufLtin (iCbtt/fe;_number, &data_start_offset);
/* Do not include the terminating null character in the length determination of a string. */

length = sizeof(data) - 1;
,. The address of data outside of the bufter is given for insertion. The data itself is not copied
into the buffer. The buffer is tb,en palJsed down to Layer 4 (5ee sendJyrmtv_below for an
explanation of this routine). */

_insert_il_bufLlist_cnt(il_buffer_number, data_start_offset. &data [0], length);
send_tyrmtvjJelow(il_hujfer_number, relay_haton, data_start_offset, 0, Ox84 , 0);
}

At Layer 4 a new maintain bit is s~t to use in passing the buffer to Layer 3.
Since no data is inserted. the same data_start_ollset is used (in the form of the
variable up_t_sdu). The buffer is then passed down to Layer 3 (see
send_nJ1l'mtv_belcw for an explanation of this routine).
LAYER: 4
STATE: pass
CONDITIONS: T_DATA_REQ
ACTIONS:
{

_set_maint_bufLbit(up_t_il_Duff, &14Jelay_baton);
send_nJrmtv_below(up_Cil_buff. 14Jelay_baton, up_t_setu, 0, Ox64 , 0);
}

At Layer 3, space is opened for an X.2S packet header. A pointer to the
op$ned space is createdandthe~ta is inserted into the linked list passed down
from Layer 4.

&3...41

INTERVIEW 7000 Series Advanced Pr0Q,rammina: ATLG-107-951-108

LAYER: 3
STATE: Insert_and_send
CONDITIONS: N_DATA_REQ
ACTIONS:
{
_open_space_in_il_bujj(up_n_il_buff, 3, &available_space_offset);
ptr_i3 = makeJtr(up_n_il_bl.iff, allailable_space_o!fset);
for(i = 0; i < 3; i++)
{
"ptr_13 = I3_data!;];
ptr_13tt;
}
/* The location of the data in the buffer Is referenced in the insert routine, so the pointer must
be moved back to the beginning of the opened space. The offset to the Layer 3 header node is
given in the insert routine. If the insertion is not successful, an alarm will sound and a message
will be displayed on the prompt line of the screen. */

ptr_lJ -=3;
ifUnsert_il_bufLlist_cnt(up_n_il_buff. up_n_sdu, ptr_IS. 3) /: 0)
{

sound_alarm();
displaYJrompt("lnsert jailed at Layer 3. ");
}
/* A new maintain bit is set for passing the buffer. The buffer is then passed down to Layer 2
(see send_dlJrmtv_below for an explanation of this routine). "1
_set_main t_bujLbit (up_n_il_bujf, &13Jelay_batonj;
send_dlJrmtll_below(up_n_il_bufj, 13Jelay_oaton. up_n_sdu, 0, Ox44, 0);
}

At Layer 2. a new linked list is started. The Layer 2 header could be inserted
into the linked list passed down from Layer 3; but if Layer 3 wants to retain the
ability to resend a buffer-that is, to reference again the same list header with
the same first-node offset-it must keep its own linked list safe from data
inserted at Layer 2.
LAYER: 2
STATE: insert more
CONDITIONS: DL_DATA_REQ
ACTIONS:
{
/* The _dup_il_bujLlist_start routine allows Layer 2 to start its own list. Part of this routine
copies the Layer 3 header into the Layer 2 header node. .. I
_dup_il_bufLlist_start(up_dUl_buff. up_dl_sdu. &12_data_start_offset);
/* Space is opened in the buffer. A pointer to this location is created and the data is copied
into the buffer. "I
_open_space_i"_il_bufj(up_dl_il_buff. 2, &Qvailable_space_ofjsct);
ptr_12 = makeJtr(up_dl_il_buff. a1Jailable_space_ofjset);
for(; =0; j < 2; i+t)
{
"ptr_l2'" 12_data[il;
ptr_12+t;
}

/* The location of tbe data in the buffer is referenced in the insert routine, so the pOinter must
be moved back to tbe beginning of ~e opened spac::e. Tbe offset to the Layer 2 header node is
given in the insert routine. If the insertion is not successful, an alarm will sound and a message
will be displayed on tbe prompt line of the screen. ,. I

63-42

63 OSI

pt,_12 -=2;
ifCinserUl_bufLlist_cnt(up_dUl_buff, 12_data_start_offset, ptr_I2, 2) 1= OJ
{
sound_alarm ();
pos_cursor(O, 30) ;
displays(" InseTt failed at Layer 2. ");
}
/* PI. new maintain bit is set for passing the buffer. The buffer is then passed down to Laye~ 1

(see sendyhJJrmtll_below for an explanation of this routine). */
_set_ma in t_bufLbit (up_dJ_il_buff, &12Jelay_baton);
sendJJhJJrmtv_below(up_dl_il_buff. 12Jelay_baton. 12_data_start_offset, 0, OxU, 0);
}

The following text will be sent out onto the line and displayed as line data:
~"6D~ "r "6 THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG 0123456789f\@

SynQPSis
extern unsigned short _append_il_bufLlist_cnt(il_buffer_number, data_start_offset, textytr.
text_length) ;
unsigned short it_buffer_number;
ul'lSigned short data_staTt_offset;
unsigned char" textytr;
unsigned short text_length;

Description
The _append_il_bufLlist31it routine appends a text node at the end of a linked
list of text inside of an interlayer message buffer. It will set the text pointer and
count in the text node to the information provided.

Returns

Example

.......

f!~

j

,

>'

Two modifications to the program shown for the _insert_il_bufLlist3nt routine
are all that is required to make the program work for appending data. The
changes primarily involve Layer 2 in the example. so we will replicate only that
ponion of the program below. Substitute _append_il_buff_list_c1it for every
occurrence _insert_iCbuff_list_cnt. When data is to be appended in a buffer,
you should duplicate the entire linked list received from the layer above, not just
the header node. So also substitute _dup_i(pufLlist for _dup_il_buff_list_start.

63-43

_ _ ._-----_._._--_._._-------------,,--.__._----

-------_._----------------------------- ... ... .. __

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

LAYER: 2
STATE: insert_more
CONDITIONS; DL_DATA_REQ
ACTIONS:
{
_dup_iCbufLlist(up_dl_il_buff, up_dZ_sdu, &12_data_start_offset);
_open_space_in_il_buff(up_dl_il_buff, 2. &available_space_offset);
ptT_12 :: make....ptT(up_dl_il_buff. available3pace_offset);
for(1 = 0; i < 2; i++}
{
"ptT_l2 = 12_data[i];
ptr_12t+:
}
ptrj2 -=2;
ifCappend_il_bufLlist_cnt(up_dl_it_buff. 12_data_start_offset. ptT_l2, 2) 1= OJ
{
soundjllarm ();
POS_cUTsor(O,JO);
displays ("[nsert failed at Layer 2. ");
}
_set_maint_bufLbit(up_dZ_il_buff. &I2Jelay_baton);
send""pn....prmtv_below(up_dl_iCbuff, 12Jelay_baton, 12_data_start_oJfset, 0, OxU, OJ;
}

The following text will be sent out onto the line and displayed as line data:
THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG 0123456789°1. f;,.~!f..~l%@]

(B) Layer 1 OSI Routines
OSI data primitives are handled automatically between Layers 1 and 2. In the
"up" direction, line data is placed in an IL buffer and the associated data
primitive is given automatically to Layer 2. In the "down" direction, data
primitives are received at Layer 1 and put out automatically onto the line.
In the absence of line data, if you want to originate a buffer at Layer 1 and
send it upward, use the following routine. In primitives being sent down the
layers, Layer 1 will automatically send the primitive out onto the line.

SynOl'sis
extern void send""ph_to_above(il_buffer_number, relay_baton, data_stort_offset, size, code,
poth);
unsigned ShOTt ii_bufferJlumber;
unsigned short relay_baton;
unsigned short data_staTt_offs et;
unsigned short size;
unsigned char code;
unsigned char path;

63-44

IT'

63 OSI

I

Description
The send"ph_to_above emulate routine passes a specified interlayer message
buffer from Layer 1 to Layer 2 in an OSI primitive. Received line data is
placed in an IL buffer and passed automatically to Layer 2. If you wish to get a
buffer "manually" at Layer 1 and then pass it up, use this routine.

The first parameter is the interlayer buffer number returned by the
Jet_il_mSLbuff routine.
The second parameter is the .returned maintain bit from the Jet_il_msLbuff
routine. As soon as Layer 2 processing on the buffer is completed, the bit is
automatically freed.
The third parameter is the returned offset (from the call to _start_il_buff_list) to
the Layer 1 service data unit in a buffer.
The fourth parameter is the length of the data in the buffer.
The fifth parameter is the code specifying the type of primitive in which the
buffer will be sent. Refer to variable lO"ph"prmtv_code in Table 63-3 for the
appropriate primitive code.
The sixth parameter is the path number along which the buffer will be sent.
Example
Get a buffer at Layer 1. Assuming X.25 protocol, insert data into the buffer
and pass it up to Layer 2.
{

unsigned short ii_buffer_number;
unsigned short relay_baton;
unsigned short data_start_offset;
unsigned short available_space_offset;
int lengthi
int Ii
static unsigned char data[] = {Ox01, Oxoo, Ox10, Ox04, Oxoo, OX02, Ox01, Ox01};
unsigned char" ptr;
}
LAVER: 1
STATE: get buffer
CONDITiONS: KEYBOARD • •
ACTIONS:
{

JeCil_msg_buff(&:il_buffer_numbtr, &:relay_baton);
_start_il_buff-Ust (il_buffer_n umber, &:data_start_offset );
length::: sizeof(data):
_open_space_in _iCbuff(il_buffer_number, length, &:a'tlailable_space_offset) ;
ptr'" (void "')(((lollg)ICbuffer_lIumber« 16) + available_space_offset );

63-45

INTERVIEW 7000 Series Advanced Programming: ATLC-107 951-108
for(i :: 0; i < length; itt)
{
"ptT;; data[i};
ptrH;
}

ptr-=length;
_insert_il_buff_list_cnt(il_buffer_number, data_stan_offset, ptr, length);
sendyh_to_above(il_buffer_number, relay_baton, data_start_offset, length, Ox25, 0);
}

(C) Layer 2 OSI Routines
The following routines pass OSI primitives from Layer 2 to either Layer 3 or
Layer 1.

Synopsis
extern void send_dlyrmtlJ_above (iCbuffer_number, 12Jelay_baton, 12_data_start_Offset, size,
12_code, path);
unsigned short ii_buffer_number;
unsigned short 12Jelay _baton;
unsigned short 12_data_start_offset;
unsigned short size;
unsigned char 12_code;
unsigned char path;

Description
The send_dlyrmtv__above emulate routine passes a specified interlayer message
buffer from Layer 2 to Layer 3 in an OSI primitive.

The first parameter is the interlayer buffer number to be sent. For a buffer
which has been received at Layer 2 from Layer I, the variable loyh_il_buff
may be used to identify the buffer number.
The second parameter is the returned maintain bit from a call to
_set_maint_buff_bit. It is used only to pass a received buffer from Layer 2 to
Layer 3. As soon as Layer 3 processing on the buffer is completed, the bit is
automatically freed.
The third parameter is the offset to the Layer 2 service data unit in a received
buffer. The variable loyh_sdu contains the offset to the service data unit when
the buffer reached Layer 2. The offset must be incremented by the length of
the Layer 2 header.

63-46

63 OSI
NOTE: In general, do not modify extern variables. such as
loyhjdu, which may be updated by other processes. Name
another variable. assign it the same va)ue, and then increment
that variable. Or. after loyhjdu has been named in the
argument of the send routine, add the length of the Layer 2
header. as in the example below.
The fourth parameter is the length of the data in the buffer. Use the length
indicated in the pdu structure-pdu.data.Jength. Then subtract the length of the
Layer 2 header.
The fifth parameter is the code specifying the type of primitive in which the
buffer will be sent. Refer to variable lo_dlyrmtv_code in Table 63-4 for the
appropriate primitive code.
The sixth parameter is the path number along which the buffer will be sent. For
a buffer which has been received at Layer 2 from Layer 1, the variable
loyhyrmtvyath may be used to specify the path number.

Example
A l?uffer is received at Layer 2 from Layer 1. Assuming X.2S protocol. the
data specific to Layer 2 (the frame header) begins at the SOU offset
(to yh_sdu) and consists of two bytes. Before the buffer is passed up to Layer 3,
the offset to the SOU and the size of the snu will be ~djusted by two bytes and
a new maintain bit will be set.
{

struct pdu
{

unsigned char primitive_code;
unsigned char path;
unsigned long parameter;
unsigned short relay_paton;
unsigned short U-,!uffer_number:
unsigned char buffer_contents;
unsigned short data_start_offset;
unsignltd short data_'ength;
};

strucl pdu • pduytr;
extern volatile unsigned short loyhydujeg;
extern lIolatile canst unsigned char loyhyrmtvyoth;
ext.ern yo/a tile unsigned short 10 yh_febuff;
ex~ern lIolatile unsigned Short l.oJh_sdu;
unfigned short 12JelaY-'1flton;
}

63-47

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

LAYER: 2
STATE: send_butter_up
CONDITIONS: PH DATA IND
ACTIONS:
{

pdu..ptr = (void <0) ((long}lo"ph"pdu_seg« 16);
_set_main t_bujLbit (lo"ph_iljJujj, &12Jelay_bQton);
send_dl"'prmN_abolle(lo"ph_iljJuf!, 12Jelay_baton, IO"ph_sdu + 2,
pdu"ptr->data_length - 2, Ox45, IO"ph"prmtll"path);

send m dl prmtv above

- -

-

-

Synopsis
extern void send_m_dl"prmtll_abolle(il_buf!er_number, 12Jelay_baton, 12_data_start_ojjset,
size, 12_code, path);
unsigned short it_bujjer_number;
unsigned short 12_relay_baton;
unsigned short 12_dara_start_of!set;
unsigned short size;
unsigned char 12_code;
unsigned char path;

Description
The send_m_dlyrmtv_obove monitor routine passes a specified interlayer
message buffer from Layer 2 to Layer 3 in an OS! monitor primitive.

See send_dlyrmtv_above. Use the monitor variables m_loyh_il_buff,
m_loyh_sdu_offset, and m_loyh_sdu_size as input. Refer to variable
m_lo_dlyrmtv_code in Table 63-4 for the appropriate primitive code.
Example
Make the appropriate variable declarations. For a condition monitoring RD data
primitives. the Layer 2 programming block should look like this:
LAYER: 2
STATE: send_buffer_up
CONDITIONS: PH_RD_DATA IND
ACTIONS:
{
_set_maint_bufLbit(m_l0..Ph_il....buf!,&l2Jelay_baton);
send_m_dl"prmtv_abolle(mjo"ph_il_buf!, 12Jelay_baton,m_ IQ"'ph_sdu_ojjset + 2,
m_lo"ph_sdu_size - 2, Ox45, m_Io"ph"'prmtv....path};

63-48

63 OSI

send ph prmtv below

- -

-

Synppsjs
extern void send.J>h....Prmtv_below(il_buffe'_number. 12Jelay_baton, 12_data_start_offset. size,
12_code. path);
unsigned short ii_buffer_number;
unsigned short 12Jelay_baton;
unsigned short 12_data_start_offset;
unsigned short size;
unsigned char 12_code;
unsigned char path;

DeScription
The sendyhyrmtv_below emulate routine passes a specified interlayer message
buffer from Layer 2 to Layer 1 in an OSI primitive.

The first parameter is the interlayer buffer number to be sem. For a buffer
which has been received at Layer 2 from Layer 3. the variable up_dl_il_buff
may be used to identify the buffer number. If the buffer originated at Layer 2,
use the buffer-number variable named in the Jet_ilJns8_buff routine. (See
_insert_il_bufLlist_cnt routine example at Layer 5.)
The second parameter is the returned maintain bit from a call to
_set_maint_buff_bit. It is used only to pass a received buffer from Layer 2 to
Layer 1. As soon as Layer 1 processing on the buffer is completed. the bit is
automatically freed. If the buffer originated at Layer 2. use the maintain bit
variable named in'the ...set....il_ms8_buff routine. (See _insert_il_bufLlist_cnt
routine example at Layer 5.)
The third parameter is the offset to the Layer 2 Ust header node in the buffer.
For a buffer which has been received at Layer 2 from Layer 3, the variable
up_dCsdu may be used to indicate the offset.
The fourth parameter is the size of the data in the buffer. It will always be set
to zero since the data length is unknown in a primitive being passed down the
layers.
The fifth parameter is the code specifying the type of primitive in which the
buffer will be sent. Refer to variable phyrmtv _type in Table 63-2 for the
appropriate primitive code.
The sixth parameter is the path number along which the buffer will be sent. For
a buffer which has been received at Layer 2 from Layer 3, the variable
up_dlyrmtvyath may be used to specify the path number.

63:-49

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Example
A buffer is received at Layer 2 from Layer 3. No text will be inserted at Layer
2. (For information on inserting text. see _insert_il_buff_list_cnt routine.) The
buffer will be passed to Layer 1. requiring a new maintain bit to be set. If
values are entered for the code and path. variables for code and path need not
be declared.
{

extern \lola tile unsigned short up_dl_il_buff;
extern yolatile unsigned short up_dl_sdu;
unsigned short lZJelay_baton:
}
LAYER: 2
STATE: pass_buffer_down
CONDITIONS: DL_DATA REQ
ACTIONS:
{

_set_ maint_bufLbit (up_dl_ii_buff. &lZJelay_baton);
sendJhJrmt\l_below(up_dl_il_bufJ. lZJelay_baton, up_dl_sdu, 0, OxU. 0);
}

(0) Layer 3 OSI Routines
The following routines pass OS! primitives from Layer 3 to either Layer 4 or
Layer 2.

Synopsis
extern \loid send_nJrmtll_abo\le(il_buffer_number, 13Jelay_baton, 13_da ta_s tart_offset, size.
C3_code, path);
unsigned short ii_buffer_number;
unsigned ShOTt l3Jelay_baton;
unsigned short 13_data_start_ofJset;
unsigned short size;
unsigned char IJ_code;
unsigned char path;

DescriPtion
The send_nyrmtv_above emulate routine passes a specified interlayer message
buffer from Layer 3 to Layer 4 in an OS1 primitive.

The first parameter is the interlayerbuffer number to be sent. For a buffer
which has been received at Layer 3 from Layer 2. the variable lo_dJ_iCbuff may
be used to identify the buffer number.
'

63-50

63 OSI
The second parameter is the returned maintain bit from a call to
_set_mainC::"bu//_bit. It is used only to pass a received buffer from Layer 3 to
Layer 4. As soon as Layer 4 processing on the buffer is completed, the bit is
automatically freed.
The third parameter is the offset to the Layer 3 service data unit in a received
buffer. The variable lo_dCsdu contains the offset to the service data unit when
the buffer reached Layer 3. The offset must be incremented by the length of
the Layer 3 header.
NOTE: In general. do not modify extern variables. such as
lo_dl_sdu, which may be updated by other processes. Name
another variable. assign it the same value. and then increment
that variable. Or, after Jo_dl_sdu has been named in the
argument of the send routine. add the length of the Layer 3
header. as in the example below.
The fourth parameter is the length of the data in the buffer. Use the length
indicated in the pdu structure-pdu.data_length. Then subtract the length of the
Layer 3 header.
The fifth parameter is the code specifying the type of primitive in which the
buffer will be sent. Refer to variable lo_nyrmtv_code in Table 63-5 for the
appropriate primitive code.
The sixth parameter is the path number along which the buffer will be sent. For
a buffer which has been received at Layer 3 from Layer 2, the variable
lo_dlyrmtvJath may be used to specify the path number.
Example
A buffer is received at Layer 3 from Layer 2. ASSuming X.2S protocol, the
header conSists of three bytes. The offset to and size of the service data unit
will be adjusted by three bytes. a new maintain bit will be set, and the buffer will
be passed up to Layer 4.

struct pdu
{

unsigned char primitive_code;
unsigned char path;
unsigned long parameter;
unsigned short relay_baton;
unsigned short ii_buffer_number;
unsigned char buffer_ctmtents;
unsigned short data_staTt_offset;
unsigned short datil_length;
};

63-51

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-10B

strucl pdu .. pdu"'ptr;
extern 1I0latile unsigned short 10_dl"'pdu_seg;
extern volatile const unsigned char lo_dl"'prmtv"'path;
extern lIo1atile unsigned short 10 _dl_iebuff;
extern volatile unsigned short IO_dIJdu;
unsigned short 13_relay_baton;
}
LAYER: 3
STATE: send_buffer_up
CONDITIONS: DL_DATA IND
ACTIONS:

{
pdu...ptr = (void ")((Iong)lo_dlydu_seg« 16);
_set_maill t_bufLb/t (lo_dl_il_buff. &:.l3Jelay_baton);
selld_nJ"·mtll_abolle(lo_dl_il_buff. 13Jelay_baton, lo_dl_sdu + 3.
pdu"'ptr->data_length - 3, Ox6S. lo_dl"'prmtv"'path);

Syn0j2sis
extern tJoid send_m_nyTmtll_abolle(il_buffer_number, 13Jelay_baton, 13_data_start_offset.
size. l1_code. path);
unsigned short it_buffer_number;
unsigned short 13_relay_baton;
unsigned short 13_datajtart_offset;
unsigned short size;
unsigned char 13_code;
unsigned char path;

Desctiption
The send_m_nJrmtv_above monitor routine passes a specified interlayer
message buffer from Layer 3 to Layer 4 in an OSI monitor primitive.

See send_nJrmtv_above. Use the monitor variables m_lo_dl_il_buff,
m_Io_dl_sdu_offset, and m_Io_dl_sdujize as input. Refer to variable
m_lo_nJrmtv_code in Table 63-5 for the appropriate primitive code.
Example
Make the appropriate variable declarations. For a condition monitoring RD data
primitives. the Layer 3 programming block should look like this:
LAYER: 3
STATE: send_buffer_up
CONDITIONS: DL_RD_DATA IND
ACTIONS:
{
_set_maintj)ufLbit(m_lo_dl_il_buff. 4t13Jelay_baton);
send_m_n.J'rmtv_Qbo\Je(m_lo_dl_il_buJl. 13JelaY_baton. mjo_dl_sdu_offset + 3,
m_lo_dl_sdu_size - 3, Ox65 , m_lo_dl"'prmtv"'poth);

63-52

63 OSI

- -

-

send dl prmtv below
Synopsis
extern void send_dlJ1rmtv_below(it_huffer_lIumblr, 13Jelay_baton, 13_data_start_offset, size,
13_code, path);
unsigned ShOTt ii_buffer-'lumber;
unsigned ShOTt 13JelaY_baton;
unsigned short 13_data_srart_oJJset;
unsigned short size;
unsigned char I3_code;
unsigned char path;

Description
The send_dl"yrmtv_below emulate routine passes a specified interlayer message
buffer from Layer 3 to Layer 2 in an OSI primitive.

.<'~~
"

1

The first parameter is the interlayer buffer number to be sent. For a buffer
which has been received at Layer :3 from Layer 4, the variable up_n_il_buff may
be used to identify the buffer number. If the buffer originated at Layer 3, use
the buffer-number variable named in the J€t_il_ms8_buff routine. (See
_insert_il_buff_Iist_cnt routine example at Layer 5.)
The second parameter is the returned maintain .bit from a call to
_set_maint_buff_bit. It is used only to pass a received buffer from Layer 3 to
Layer 2. As soon as Layer 2 processing on the buffer.is completed. the bit is
automatically freed. If the buffer originated at Layer 3, use the maintain bit
variable named in the Jet_iCmscbu!! routine. (See _insert_il_buff_list_cnt
routine example at Layer 5.)
The third parameter is the offset to the Layer 3 list header node in the buffer.
For a buffer which has been received at Layer 3 from Layer 4, the variable
up_"_sdu may be used to indicate the offset.
The fourth parameter is the size of the data in the buffer. It will always be set
to zero since the data length is unknown in a primitive being passed down the
layers.
The fifth parameter is the code specifying the type of primitive in which the
buffer will be sent. Refer to variable up_d(prmtv_code in Table 63-3 for the
appropriate primitive code.
The sixth parameter is the path number along which the buffer will be sent. For
a bJ.lffer which has been received at Layer 3 from Layer 4, the variable
up..."yrmtv"yath may be used to specify the path number.

63-53

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Example
A buffer is received at Layer 3 from Layer 4. No text will be inserted at Layer
3. (For information on inserting text, see _insert_il_buff_list_cnt routine.) The
buffer will be passed to Layer 2, requiring a new maintain bit to be set. If
values are entered for the code and path, these variables need not be declare_d.

extern volatile unsigned shoTt up_n_il_bujj;
exterll volatile unsigned short up_lI_sdu;
unsigned short 13Jelay_baton;
}
LAYER: 3
STATE: pass_buffer_down
CONDITIONS: N_DATA REQ
ACTIONS:
{

_set_main t_bujLbit (up_n_il_bujj. &.13Jelay_baton);
send_dlyrmlv_be/ow(up_lI_il_buff. f3Jelayj)aton. up_n_sdu, 0, Ox44 , 0);
}

(E) Layer 4 OSI Routines
The following routines pass OSI primitives from Layer 4 to either Layer 5 or
Layer 3.

Synqpsis
extern void send_tyrmtv_a bOlJe(il_bujjer_number, 14Jelay_batoll. 14_data _start_offset. size,
14_code, path);
unsigned short il_bujfer_number;
unsigned short 14Jelay_baton;
ullsigned short 14_data_start_ojjset;
unsigned short sise;
unsigned char 14_code;
unsigned char path;

DeSCription
The send_tyrmtv_above emulate routine passes a specified interlayer message
buffer from Layer 4 to Layer 5 in an OS1 primitive.

The first parameter is the interlayer buffer number to be sent. For a buffer
which has been received at Layer 4 from Layer 3, the variable lo_n_il_buff may
be used to identify the buffer number.

63-54

63 OSI
The second parameter is the returned maintain bit from a call to
_set_maint_buff_bit. It is used only to pass a received buffer from Layer 4 to
Layer 5. As soon as Layer 5 processing on the buffer is completed, the bit is
automatically freed.
The third parameter is the offset to the Layer 4 service data unit in a received
buffer. The variable lo_n_sdu contains the offset to the service data unit when
the buffer reached Layer 4. The offset must be incremented by the length of
the Layer 4 header. if any.
NOTE: In general, do not modify extern variables, such as
lo_n_sdu, which may be updated by other processes. Name

another variable. assign it the same value, and then increment
that variable. Or. after lo_n_sdu has been named in the
argument of the send routine. add the length of the Layer 4
header. if any.
The fourth parameter is the length of the data in the buffer. Use the length
indicated in the pdu structure-pdu.data_length. Then subtract the length of the
Layer 4 header, if any.

ti"
I

The fifth parameter is the code specifying the type of primitive in which the
buffer will be sent. Refer to variable lo_tyrmtv_code in Table 63-6 for the
appropriate primitive code.
The sixth parameter is the path number along which the buffer will be .sent. For
a buffer which has been received at Layer 4 from Layer 3, the variable
lo_nyrmtvyath may be used to specify the path number.
Exanmle
A buffer is received at Layer 4 from Layer 3. The offset to and size of the
service data unit will be adjusted if needed. a new maintain bit will be set, and
the buffer will be passed up to Layer 5.
struct pdu
{

unsigned char primitive_code;
unsigned char path;
unsigned long parameter;
unsigned short relay_baton;
unsigned short it_buffer_number;
unsigned char buffer_contents;
unsigned short data_stan_offset;
unsigned short data_length;
};

fT\

struct pd.u * pdu-ptr;
extern volatile unSigned short lo_nJldu_seg;
extern lIolatile const unsigned char lo_n-prmtll-Pl1rh;

I

j

63-55

iNTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

extern volatile unsigned short lo_n_il_buff;
extern volatile unsigned short lo_n_sdu;
unsigned short 14_relay_baton;
}
LAYER: 4
STATE: send_butter_up
CONDITIONS: N_DATA IND
ACTIONS:
{

pduJtr = (void -)((long)lo_nJdu_seg« 16);
_set_maint_bufLbit(lo_n_il_bu/f. &:14Jelay_baton):
send_tJrm tv_above (lo_n_il_buff, 14Jelay_baton, lo_n_sdu,pduJtr->data_length,
Ox85,Io_nJrmtvJath);
}

Synopsis
extern void stmd_m_IJrmtv_above(iCbu/ferJlumber, 14Jelay_baton, 14_data_start_o/fset.
size, 14_code, path);
unsigned short i13)uffer_number;
unsigned short 14_relay_baton;
unsigned short 14_data_start_offset;
unsigned short size;
unsigned char 14_code;
unsigned char path;

Description
The send_m_t"'prmtv_above monitor routine passes a specified interlayer message
buffer from Layer 4 to Layer 5 in an OSI monitor primitive.

See sel1d_t"'prmtv_above. Use the monitor variables m_lo_n_iCbuff.
m_lo_"_sdu_offset. and m_lo_njdu_size as input. Refer to variable
m_lo_t"'prmtv_code in Table 63-6 for the appropriate primitive code.
Example
Make the appropriate variable declarations. For a condition monitoring RD data
primitives. the Layer 4 programming block should look like this:
LAYER: 4
STATE: send_bufter_up
CONDITIONS: N_RD_DATA tND
ACTIONS:
{

_set_maint_bufLbit(m_lo_n_il_buff, &:14Jelay_baton);
send_m_tJrmtv_abQve(m_1Q_n_il_bu/f, 14_relay_batQn,m_lo_n_sdu_offset ,
m_lo_n_sdu_size, Ox85, m_l0J'Jrmt\lJath);

63-56

63 OSI

send n prmtv below
-

-h.-.

-

SynO,psis
extern void send_lIyrmtv_below(il_bufJe'Jlumber, 14_relay_baton, 14_data_start_offset, size,
till_code, path};
unsigned short ii_buffer_number;
unsigned short 14Jelay_baton;
unsigned short 14_data_start_offset;
unsigned short size;
unsigned char 14_code;
unsigned char path;

Description
The send_n"'prmtv_below emulate routine passes a specified interlayer message
buffer from Layer 4 to Layer 3 in an OS1 primitive.

t'r,
!

The first parameter is the interlayer buffer number to be sem. For a buffer
which has been received at Layer 4 from Layer 5, the variable up_t_il_buff may
be used to identify the buffer number. If the buffer originated at Layer 4, use
the buffer-number variable named in the ...set_il_msLbuff routine. (See
_insert_il_buff_lisl_cnt routine example at Layer 5.)
The second parameter is the returned. maintain bit from a call to
Jet_maint_buff_bit. It is used only to pass a received buffer from Layer 4 to
Layer 3. As soon as Layer 3 processing on the buffer is completed. the bit is
automatically freed. If the buffer originated at Layer 4, use the maintain bit
variable named in the Jet_il_mss_buff routine. (See _insert_il_bufLlist_cnt
routine example at Layer 5.)
The third parameter is the offset to the Layer 4 list header node in the buffer.
For a buffer which has been received at Layer 4 from Layer 5, the variable
up_t_sdu may be used to indicate the offset.
The fourth parameter is the size of the data in the buffer. It will always be set
to zero since the data length is unknown in a primitive being passed down the
layers.
The fifth parameter is the code specifying the type of primitive in which the
buffer will be sent. Refer to variable up_n"'prmtv_code in Table 63-4 for the
appropriate primitive code.
The sixth parameter is the path number along which the buffer will be sent. For
a buffer which has been received at Layer 4 from Layer 5. the variable
up_t"'prmtv"'path may be used to specify the path number.

63-57

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Example
A buffer is received at Layer 4 from Layer 5. No text will be insened at Layer
4. (For information on insening text, see _insert_iCbuf'-list_cnt routine.) The
buffer will be passed to Layer 3. requiring a new maintain bit to be set. If
values are entered for the code and path, variables for code and path need not
be declared.
{

extern voilltile unsigned short up_t_il_buff:
extern voilltile unsigned short up_t_sdu:
unsigned short 14Jellly_bllton:
}
LAYER: 4
STATE: pass_buffer_down
CONDITIONS: T_DATA REQ
ACTIONS:
{

_set_maint_bufLbU(up_t_ll_bujj. tlI4Jellly_bllton):
send_n...JIrmtv_below(up_t_i1_bujj, 14_relay_bllton. up_t_sdu. 0, Ox64. 0):
}

(F) Layer 5 OSI Routines
The following routines pass OSI primitives from Layer 5 to either Layer 6 or
Layer 4.

Synopsis
extern void send_sJrmtv _Ilbov, (ii_buffer_number, 15Jllay_baton. 15_dlltll_stllrt_ offs't. size.
IS_cod" pllth):
unsigned short iI_buffer_number:
unsigned short lS_rellly_bllton:
unsigned short lS_datll_stllrt_ojjset:
unsign,d short siz,;
unsign,d chllr IS_cod,;
unsigned char pllth:

Descrjptjon
The send_sJrmtv_obove emulate routine passes a specified inter-layer message
buffer from Layer 5 to Layer 6 in an OSI primitive.

The first parameter is the inter-layer buffer number to be sent. For a buffer
which has been received at Layer S from Layer 4. the variable lo_t_iCbuff may
be used to identify the buffer number.

63-58

63 OSl
The second parameter is the returned maintain bit from a call to
_set_maint_buff_bit. It is used only to pass a received buffer from Layer 5 to
Layer 6. As soon as Layer 6 processing on the buffer is completed, the bit is
automatically freed.
The third parameter is the offset to the Layer 5 service data unit in a received
buffer. The variable lOj_sdu contains the offset to the service data unit when
the buffer reached Layer S. The offset must be incremented by the length of
the Layer 5 header, if any.
NOTE: In general, do not modify extern variables. such as

lo_t_sdu, which may be updated by other processes. Name
another variable. assign it the same value. and then increment
that variable. Or, after Jo_t_sdu has been named in the argument
of the send routine. add the length of the Layer 5 header. if any.

The fourth parameter is the length of the data in the buffer. Use the length
indicated in the pdu structure..;.;.pdu.data.....length. Then subtract the length of the
Layer 5 header. if any.

.\~
I

".

t

The fifth parameter is the code specifying the type of primitive in which the
buffer will be sent. Refer to variable I03.J'rmtv_code in Table 63-7 for the
appropriate primitive code .
The sixth parameter is the path number along which the buffer will be sent. For
a buffer which has been received at Layer 5 from Layer 4, the variable
JQ_tJrmtv.JIath may be used to specify the path number.
EXi\m;ple
A buffer is received -at Layer 5 from Layer 4. The offset to and size of the
service data unit will be adjusted if needed, a new maintain bit will be set, and
the buffer will be passed up to Layer 6.
{
struct pdu
{

unsigned char primitive_code;
unsigned char path;
unsigned long parameter;
unsig!led short relay_baton;
unsigned short ii_buffer_number;
unsigned char buffer_contents;
unsigned short datajtart_offset;
unsigned short data_length;
};

struct pdu • pduytr;
extern lIolatile unsi8ned short la_tydu_seg;
extern volatile canst unsigned char lo_t"prmt""path;
extern volatile unsigned short lo_t_il_b.uff;
extern volatile unsigned short lo_t_sdu;
unsigned short l5Jelay_baton;
}

63-59

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

LAYER: 5
STATE: send_buffer_up
CONDITIONS: T_DATA IND
ACTIONS:
{
pduytr = (\loid *)((long)lo_tydu_seg« 16);
_set_main t_bufLbit (lo_t_il_bu/f, &15Jelay_baton);
send_syrmt\l_above(lo_t_il_buff. 15Jelay_baton, 10_t_sdu, pduytr->data_length,
Oxa5, lo_tyrm.tvyath);

- --

send m s prmtv above

-

Syna,psis
extern void send_m _$ ..rrm tv_above (il_buffer_number. 15Jelay _baton, 15_data_start_offset,
size, IS_code, path):
unsigned short ii_buffer_number;
unsigned short ISJelay_baton;
unSigned short 15_data_start_offset;
unsigned short size;
unSigned char IS_code;
unsigned char path;

Description
The send_mJyrmtv_above monitor routine passes a specified inter-layer
message buffer from Layer 5 to Layer 6 in an 051 monitor primitive.

See send_syrmtv_above. Use the monitor m_lo_t_il_bujj. m..Jo_tjdu_ojjs€t,
and m_lo_t_sdu_size variables as input. Refer to variable m_lo_syrmtv_code in
Table 63-7 for the appropriate primitive code.
Exarn,ple
Make the appropriate variable declarations. For a condition monitoring RD data
primitives. the Layer 5 programming block should look like this:
LAYER: 5
STATE: send_buffer_up
CONDITIONS: T_RD_DATA IND
ACTIONS;
{
_set_maint_bufLbU(m_lo _I_iE_buff, &15Jelay_balon);
send_m_syrmtv_iZbove(m_lo_t_il_bu/f, 15_relayj;aton,m_lo_t_sdu_offset,
m_lo_t_sdu_size, OxaS, m_lo_tyrmtvyath);
}

63-60

~I"

63 OSI

{

I

--

send t prmtv below

-

Synopsjs
extern void send_t...Jlrmtv_below(il_buffe'_lIumber, lS-,elay_baton, 15_data_start_offset, size,
IS_code, path};
unsigned short iCbuf!er_lIumberj
unsigned short IS -,elay_baton;
unsigned short 15_datajtart_offset:
unsig!1ed short size;
unsigned char IS_code;
unsigned char path;

Description
The send_tyrmtv_below emulate routine passes a specified inter-layer message
buffer from Layer 5 to Layer 4 in an OSI primitive.

The first parameter is the inter-layer buffer number to be sent. For a buffer
which has been received at Layer 5 from Layer 6. the variable up_s_il_buff may
be used to identify the buffer number. If the buffer originated at Layer 5, use
the buffer-number variable named in the ,Jet_iCmsg-"uff routine. (See
_insert_il_bufLlist_cnt routine example at Layer 5.)
The second parameter is the returned maintain. bit from a call to
_set_maint_buff_bit. It is used only to pass a received buffer from Layer 5 to
Layer 4. As soon as Layer 4 processing on the buffer is completed, the bit is
automatically freed. If the buffer originated at Layer 5, use the maintain bit
variable named in the ..,8et_il_msg_buff routine. (See _insert_il_bufLlist_cnt
routine example at Layer 5.)
The third parameter is the offset to the Layer 5 list header node in the buffer.
For a buffer which has been received at Layer 5 from Layer 6, the variable
upj_sdu may be used to indicate the offset.
The fourth parameter is the size of the data in the buffer. It win always be set
to zero since the data length is unknown in a primitive being passed down the
layers.
The fifth parameter is the code specifying the type of primitive in which the
buffer will be sent. Refer to variable up_tyrmtv_code in Table 63-5 for the
appropriate primitive code.

r'i'"

The sixth parameter is the path number along which the buffer will be sent. For
a buffer which has been received at Layer 5 from Layer 6, the variable
upjyrmtvyath may be used to specify the path number.

I
I

63-61

INTERVIEW 7000 Series Advanced Proarammlna: ATLC-107-951-10B

Example
A buffer is received at Layer 5 from Layer 6. No text will be inserted at Layer
5. (For information on inserting text. see _insert_il_buD_list_cnt routine.) The
buffer will be passed to Layer 4. requiring a new maintain bit to be set. If
values are entered for the code and path. variables for code and path need not
be declared.
{

extern Yolatile unsigned short up_s_iCbuf/:
extern Yolatile unsigned short up_s_sdu:
unsigned short IS_relay_baton;
}
LAVER: 5
STATE: pass_buffer_down
CONDITIONS: S DATA REQ
ACTIONS:
{

_set_maint_buff_bit(up_s_il_buf/. d:lSJelay_baton);
send_t"'prmtv_below(up_s_iCbuf/. ISJelay_baton. up_s_sdu, 0, Ox84. 0):
}

(G) Layer 6 OSI Routines
The following routines pass OS! primitives from Layer 6 to either Layer 7 or
Layer 5.

SynOJ?sis
extern yoid send..,p..,prmfY_aboye(il_buf/,r_number, 16_,,'ay_baton. 16_data_start_of/set, size,
16_code, path):
unsigned short il_buf/er_number;
unsigned short 16_,elay_baton;
unsigned short 16_data_start_of/set;
unsigned short size;
unsigned char 16_code;
unsigned char path;

Description
The send"p"prmt,,_above emulate routine passes a specified interlayer message
buffer from Layer 6 to Layer 7 in an OSlprimitive;

The first parameter· is the interlayer buffet' number to be sent. For a buffer
which has been r~celved at Layer 6 from :Layer 5. the variable lo_s_iCbul! may
be used to identify the -buffer number.

63-62

63 OSI

The second parameter is the returned maintain bit from a call to
_set_maint_bufLbit. It is used only to pass a received buffer from Layer 6 to
Layer 7. As soon as Layer 7 processing on the buffer is completed, the bit is
automatically freed.
The third parameter is the offset to the Layer 6 service data unit in a received
buffer. The variable lo_sjdu contains the offset to the service data unit when
the buffer reached Layer 6. The offset must be incremented by the length of
the Layer 6 header. if any.
NOTE: In general, do not modify extern variables. such as
lo_sjdu, which may be updated by other processes. Name
another variable, assign it the same value, and then increment
that variable. Or, after Jo_s_sdu has been named in the
argument of the send routine, add the length of the Layer 6
header, if any.
The fourth parameter is the length of the data in the buffer. Use the length
indicated in the pdu structure-pdu.data_Jength. Then subtract the length of the
Layer 6 header, if any.
The fifth parameter is the code specifying the type of primitive in which the
buffer will be sent. Refer to variable loyyrmtv_code in Table 63-8 for the
appropriate primitive code.
The sixth parameter is the path number along which the buffer will be sent. For
a buffer which has been received at Layer 6 from Layer 5, the variable
lo_syrmtvyath may be used to specify the path number.
Example
A buffer is received at Layer 6 from Layer 5. The offset to and size of the
service data unit will be adjusted if needed, a new maintain bit will be set, and
the buffer will be passed up to Layer 7.
{

struct pdu
{

unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned

char primitive_code;
char path;
long parameter;
short relay_baton;
short il_buffer_number:
char buffer_contents;
short data_start_offset;
short data_length:

};
{~
I '

strlilct,pdu • pdu...J>tr;
extern Yoil#ile unsigned short lo_s-pdu_seg;
extern volatile const unsigned char 10_s-prmtv-path;

I

63-63

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

extern volatile unsigned short lo_s_il_buff;
extern volatile unsigned short lo_s_sdu;
unsigned short 16_relay_baton;
}
LAYER: 6
STATE: send_buffer_up
CONDITIONS; S_DATA IND
ACTIONS:
{
PdUJtr = (void *)((long)lo_sJdu_seg« 16);
_set_maint_bufLbit(lo_s_il_buff, &16Jelay_baton);
sendJJrmtv_above(lo_s_il_buff, 16Jelay_baton, lo_s_sdu, pduJtr->data_length,
Oxc5. io_sJrmtvJath);

Synopsis
extern void send_mJJrmtv_above(il_buffer.:..number, 16Jelay_baton. 16_data_start_offset.
size, 16_code. path);
unsigned short it_buffer_number;
unsigned short l6_relay_baton:
unsigned short l6_data_start_offset;
unsigned short size;
unsigned char 16_code;
unsigned char path;

DescrjJ2tion
The send_myyrmtv_above monitor routine passes a specified interlayer
message buffer from Layer 6 to Layer 7 in an OS! monitor primitive.

See sendyyrmtv_above. Use the monitor variables m_lo_s_il_buf/,
m_lo_sjdu_o//set, and m_lo_s_sdujize as input. Refer to variable
m_ioyyrmtv_code in Table 63·8 for the appropriate primitive code.
r;xample
Make the appropriate variable declarations. For a condition monitoring RD data
primitives. the Layer 6 programming block should look like this:
LAYER: 6
STATE: send_buffer_up
CONDITIONS: S_RD_DATA IND
ACTIONS:
{
_set_maint_bufLb/t(m_lo_s_il_buff, &16Jelay_baton);
send_mJJrmtv_abMe(m_lo_s_il_buff. 16_relay_baton,m_ lo_s_sdu_offset.
m_lo_s_sdu_size, Oxt;5, m_lo_s""prmtvJtlth};

63-64

63 OSI

--

send s prmtv below

-

Syngpsis
extern void send_sJrmtv_below(il_buff"Jlumber. 16_relaY_baton, 16_data_start_offset. size.
16_code. p11th);
unsigned short iI_buffer_number;
unsigned short 16J,lay_baton;
unsigned short 16_data_start_offset;
unsigned short size;
unsigned char 16_code;
unsigned char path;

Description
The send_syrmtv_below emulate routine passes a specified interlayer message
buffer from Layer 6 to Layer 5 in an OSI primitive.

.~
. I
I

The first parameter is the interlayer buffer number to be sent. For a buffer
which has been received at Layer 6 from Layer 7, the variable upy_il_buff may
be used to identify the buffer number. If the buffer originated at Layer 6, use
the buffer-number variable named in the Jet_iCmsg_buff routine. (See
_insert_il_bufLlist_cnt routine example at Layer S.)
The second parameter is the returned maintain bit from a call to
_set_maint_buff_bit. It is used only to pass a received buffer from Layer 6 to
Layer 5. As soon as~ayer 5 processing on the buffer is completed... the bit is
automatically freed. If the buffer originated at Layer 6, use the maintain bit
variable named in the Jet_U_msgyuff routine. (See .Jnsert_il_bufLlist_cru
routine example at Layer 5.)
The third parameter is the offset to the Layer 6 list header node in the buffer.
For a buffer which has been received at Layer 6 from Layer 7, the variable
upY jdu may be used to indicate the offset.
The fourth parameter is the size of the data in the buffer. It will always be set
to zero since the data length is unknown in a primitive being passed down the
layers.
The fifth parameter is the code specifying the type of primitive in which the
buffer will be sent. Refer to variable up_syrmtv30de in Table 63-6 for the
appropriate primitive code.
The sixth parameter is the path number along which the buffer will be sent. For
a buffer whi~ has been received at Layer 6 from Layer 7, the variable
upyyrmtvyath may be used to specify the path number.

63-65

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Example
A buffer is received at Layer 6 from Layer 7. No text will be insened at Layer

6. (For information on insening text. see _insert_il_buff_list_cnt routine.) The
buffer win be passed to Layer 5, requiring a new maintain bit to be set. If
values are entered for the code and path. variables for code and path need not
be declared.

extem lIolatile unsigned short up"'p_il_buff;
extern lIolatile unsigned short up"'p_sdu;
unsigned short 16JetaY_baton;
}
LAYER: 6
ST ATE: pass_buffer_down
CONDITIONS: P_DATA REO
ACTIONS:
{
_set_maint_bufLbit(up"'p_il_buff, &16Jelay_baton);
sendjJrmtll_below(up"'p_il_buff, 16JelayjJaton, uPJ_sdu, 0, Oxa4, 0);
}

(H) Layer 7 OSI Routines

Syno.psis
extern lIoid sendJJrmtll_below(il_buffer_number. relay_baton, data_start_offsel, size, code,
path);
unsigned short iCbuff,,_numbtr;
unsigned short relay_baton;
unsigned short data_start_offset;
unsigned short size;
unsigned char code;
unsigned char path;

Description
The sendy""prmtv_below emulate routine passes a specified interlayer message
buffer from Layer 7 to Layer 6 in an OSI primitive.

The first parameter is the interlayer buffer number to be sent. Use the
buffer-number variable named in the Jet_i(;.msLbuff routine. (See
_insert_iCbufLUst_cnt routine example at Layer 5.)
The second parameter is the returned maintain bit from the call to
Jet _il_mS8_buff·

63-66

63 OS!
The third parameter is the returned offset (from a call to jtart jCbu/LUst) to
the Layer 7 list header node in the buffer.
The fourth parameter is the size of the data in the buffer. It will always be set
to zero since the data length is unknown in a primitive being passed down the
layers.
The fifth parameter is the code specifying the type of primitive in which the
buffer will be sent. Refer to variable upyyrmtv_code in Table 63-7 for the
appropriate code.
The sixth parameter is the path number along which the buffer will be sent.
Example
A buffer is obtained at Layer 7. The buffer will be passed to Layer 6, without
any data inserted. (For information on inserting text, see _insert_iCbuff_list_cnt
routine.) If values are entered for the code and path, variables for code and
path need not be declared.

unsigned short ii_buffer_number;
unsigned short data_start_offset;
unsigned short relay_baton;
}
LAYER: 7
STATE: pass_butfer_down
CONDITIONS: KEYBOARD· •
ACTIONS:

{
Jet _il_mS1Lbuff(&il_buffer_number, &relay_baton);
_start_iI_buff_list (ii_buffer-,lUmber, &data_start_offset);
send"'p"'prmtv_betow{il_buffer_number, relay_baton, data_s.tart_offset, 0, Oxc4, 0);
}

.~,
. !
1

63-67

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

63-68

64 Print

64 Print
The PRINTER pan is a serial interface through which the programmer may direct output from
the INTERVIEW to a printer. The printer port is located at the rear of the INTERVIEW
between the REMOTE RS-232 and AUXILIARY ports.
NOTE: Before directing output to the printer port, configure the
Printer Setup menu as explained in Section 14.2.
Each spreadsheet PRINT action or call to one of the C print routines causes output to be
added to a queue of unprinted text in the print buffer. If not doing so already. the print
server also begins to poll the print buffer for text to print. As long> as there is unprinted text
in the buffer. the print server polls the buffer, removes text. and sends it to the printer port
of the Ir..'TERVIEW. Use the "print_buffer structure to monitor the flow of text in and out
of the print buffer.
Use any of the four C print routines explained in this section to add text to the print buffer.
Three. of them-printc, printf. and prints-are similar to the displayc, displayf. and displays
routines which direct output to the Display Window. See Section 61.3(C). With the
set"print_header routine. you determine the heading which will appear at the top of each
printed page. One other routine. sprintf. writes output to a string. The string can then be
referenced in subsequent cans to printf. (You may also use the string named in sprintf in
calls to displayf, tracef, or fprintj.)

64.1

Structures
Refer to Table 64-1 for the structure of the print buffer. Compare -print_buffer.in
with "print_buffer.out to determine whether or not the print buffer has emptied.
When the values of these two variables are equal, the buffer is empty.
NOTE: Consider the variables in the "print_buffer structure
read-only variables. In general, do not modify extern structures
or variables which may be updated by other processes.
At time$, processes may add transactions to the print buffer more quickly than the
print server takes them out. If a process cannot add to the buffer without overwriting
unprinted text, a buffer overrun occurs. When your INTERVIEW is configured for

64-1

.. -

~-

_. - ._--

-~-----

- - - - - -- - -- - ..------~-~~---~---.------~---"-------~~--"-....--'~....-----.~~---.---"----.-,------------~-.----..----

-.-------~-.---,.~".---

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

data playback. you can minimize print-buffer overruns by periodically suspending
playback and allowing the print server to empty the buffer. In judging how often to
suspend playback, keep in mind the following points: 1) In general, the more
conditions a program has that trigger print actions, the more frequently playback
should be suspended. 2) When planning to print Run-mode buffers. remember that
the faster the playback speed, the quicker the print buffer fills.

Table 64-1
Print Structures

Type

Variable

Value (hex/decimal)

Structure Name: print_buffer

Meaning

Struoture of the print buffer. Declared as type
struot.

unsigned short

In

8-207110-8199

offset into the print buffer (from the physical
beginning of the buffer) to the location where
next transaction text will be added. Advances
with each spreadsheet PRINT action or call to a
C print routine. When in equals out, the print
buffer is empty.

unsigned short

out

8-207110-8199

offset Into the print buffer (from the physloal
beginning of the buffer) to the last transaction
text printed from the buffer. Advances eaoh
time text Is actually sent out the printer port of
the INTERVIEW. When out equals in, the print
buffer is empty.

unsigned short

buffer_end

209/8201

offset to the physioal end of the print
buffer-I.e., to the end of the array named
buffer (see below)

unsigned short

look

char

polling

when process is printing, locks out ether
processes from accessing the print buffer

o

print server is not polling
print server Is polling print buffer for text to print

non-zero

ohar

overrun

ohar

buffer [8192J

o

print buffer Is not in overrun state
print buffer Is In overrun state-I. e .• a process
attempting to add text to the print buffer can't
because unprinted text In the buffer would be
overwritten. Following message will appear on
printout: ·prlnt buffer overrun has occurred.'

non-zero

array of text transactions
An Instance of the prlnCbuffer structure,
declared as type extern struot print_buffer. Use
the variables contained In this structure to
monitor flow of text In and out of the print buffer.
Reference struoture variables as follows:
yrinCbuffer.in.

Structure Name: _print_buffer

64-2

;~~

64 Print

i

The following example shows how you might use a TIMEOUT condition to check the
print buffer periodically. Each time the timeout expires, the program determines
whether or not the buffer is half full. If so, playback is suspended. If the buffer is
only one-quarter full, playback is resumed. (Other conditions in the program, not
illustrated here, would cause print actions to send output to the print buffer.)
{

#define PRINT_BUFFER_SZ 8192
#define STOP_POINT (PRINT_BUFFER_SZI2)
#define START_POINT (PRINT_BUFFER_SZI4)
}
LAYER: 1
{

struct print_buffer
{

unsigned short
unsigned short
unsigned short
unsigned short
char polling;
char overrun;

in;

out;
buffer_end;
lock;

};

extern struct print_buffer Jrint_buffer;
int crnt_buffer_sz;
}
STATE: check_print_buffer
CONDITIONS: ENTER_STATE
ACTIONS: TIMEOUT RESTART ok_buffer 0.01
CONDITIONS: TIMEOUT ok_buffer
ACTIONS:
{

crnt_buffer_sz = «(Jrint_buffer.in + PRINT_BUFFER_SZ) - Jrint_huffer.out) %
PRINT_BUFFER_5Z;
if(crnt_buffer_sz> STOP_POINT)
suspendJcrdJlay () ;
else if(crnt_huffer_sz < START_POINT)
startJcrd Jlay ();
}
TIMEOUT RESTART ok_buffer 0.01

64.2 Variables
There are no variables associated exclusively with print functions.

64-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-10B

64.3 Routines
printc
Synopsis
extern void printc(character);
const char character;

Description
The prime routine outputs a single ASCII character to the print buffer for printing.
converting the value provided as the argument into its ASCII equivalent. Decimal
and octal values are converted to hexadecimal format before the ASCII equivalent is
sought.

The only parameter is a numerical value. The value may be given as a hexadecimal,
octal, or decimal constant; as an alphanumeric constant inside of single quotes; or as
a variable. A hexadecimal value must be preceded by the prefix Ox or OX; an octal
value must be preceded by the prefix O. If no prefix appears before the input, the
number is assumed to be decimal. Valid numeric entries are 00 to 127. decimal. An
alphanumeric character placed between single quotes will be output as is to the
printer.
Example
The printc entries on the left output the printed character given on the right:
printc('a') ;
printc(65) ;
printc(Ox65);
printc(065) ;

a
A
e
5

printf
Synonsis
extern int printfiformatytr, . . . );
const char'" format...ptr;

Description
The print! routine writes output to the print buffer for printing. under control of the
string pointed to by format ytr that specifies how subsequent arguments are converted
for output. If there are insufficient arguments for the format, the behavior is

64-4

64 Print

undefined. If the format is exhausted while arguments remain. the excess arguments
are evaluated but otherwise ignored. The printf routine returns when the end of the
format string is encountered.

The format is composed of zero or more directives: ordinary characters (not %).
which are copied unchanged to the output stream; and conversion specifications, each
of which results in fetching zero or more subsequent arguments. Each conversion
specification is introduced by the character %. After the %. the following appear in
sequence:
•

Zero or more flags that modify the meaning of the conversion specification.
The flag characters and their meanings are:
The result of the conversion will be left-justified within the field.

+

The result of a signed conversion will always begin with a plus or minus
sign.

space If the first character of a signed conversion is not a sign, a space will be
prepended to the result. If the space and + flags both appear, the space
flag will be ignored.
#

The result is to be converted to an "alternate form." For d, i, u. c, and
s conversions, the flag has no effect. For 0 conversion, it increases the
precision to force the first digit of the result to be a zero. For x (or X)
conversion. a nonzero result will have Ox (or OX) prepended to it.

•

An optional decimal integer specifying a minimum field width. If the converted
value has fewer characters than the fi~ld width~ it will be padded on the left (or
right. if the left adjustment flag. described above. has been given) to the field
width. The padding is with spaces unless the field width integer starts with a
zero, in which case the padding is with zeros.

•

An optional precision that gives the minimum number of digits to appear for the
d. i, 0, u, x. and X conversions. or the maximum number of characters to be
written from an array in an s conversion. The precision takes the form of a
perjod (.) followed by an optional decimal integer; if the integer is omitted, it is
treated as zero. The amount of padding specified by the precision overrides that
specified by the field width.

•

An optional h specifying that a following d. i, 0, u, x. or X conversion specifier
applies to a short int or unsigned short int argument (the argument will have
been promoted according to the integral promotions. and its value shall be
converted to short int or unsigned short int before printing); or an optional 1
specifying that a follOwing d, i. 0, u, x, or X conversion specifier applies to a
long int or unsigned long int argument. If an h or 1 appears with any other
conversion specifier. it is ignored.

64-5

,-----,_._._--,...._,-_._. - - -

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

•

A character that specifies the type of conversion to be applied. (Special AR
extensions have been added.) The conversion specifiers and their meanings are:
d, i, 0, u, x. X

The int argument is converted to signed decimal (d or i), unsigned octal
(0), unsigned decimal (u). or unsigned hexadecimal notation (x or X); the
letters abcdef are used for x conversion and the letters ABCDEF for X
conversion. The precision specifies the minimum number of digits to
appear; if the value being converted can be represented in fewer digits. it
will be expanded with leading zeros. The default precision is 1. The
result of converting a zero value with a precision of zero is no characters.
c

The int argument is converted to an unsigned char, and the resulting
character is written.

s

The argument shall be a pointer to a null-terminated array of 8-bit chars.
Characters from the string are printed up to (but not including) the
terminating null character: if the precision is specified, no more than that
many characters are printed. The string may be an array into which
output was written via the sprint! routine.

p

The argument shall be a pointer to void. The value of the pointer is
converted to a sequence of printable characters, in this format:
0000:0000. There are always exactly 4 digits to the right of the colon.
The number of digits to the left of the colon is determined by the
pointer's value and the precision specified. Use this conversion to print
80286 memory addresses. The segment number will appear to the left of
the colon and the offset to the right.

%

A % is written. No argument is converted.

\n

Writes hexadecimal OD OAt the ASCII carriage-return and linefeed
characters. No argument is converted.

If a conversion specification is invalid, the behavior is undefined.
If any argument is or points to an aggregate (except for an array of characters using
%s conversion or any pointer using %p conversion), the behavior is undefined.

In no case does a nonexistent or small field width cause truncation of a field; if the
result of a conversion is wider than the field width, the field is expanded to contain
the conversion result.

Returns
The prim! routine returns the number of characters output.
Example
To print a date and time in the form "Sunday! July 3, 10:02," where weekday and
month are pointers to strings:

64-6

64 Print

LAYER: 1
{

unsigned
unsigned
unsigned
unsigned
unsigned
unsigned

char date_time flOOJ;
char weekday [10};
char month {1O];
short day;
char hour;
char min;

}

STATE: output_to_PI"lnter
CONDITIONS: KEYBOARD· •
ACTIONS:
{
print/( "%$, %$ %d, %.2d:%.2d\n", weekdlIY. month, day, hour, min);
}

sprintf
SynQPsis
extern int sprint!(strinK..J1tr. !ormat"ptr);
unsigned char string fl28];
const char" !ormat..ptr;

Desctiption

~.
~

The sprint! routine is similar to the print! routine, except that sprint! writes output to
a string. while print! writes output directly to the print buffer for printing. The sprint!
routine is useful for writing formatted output to a display. printer, or file.
The output is under control of the string pointed to by!ormat"ptr that specifies how
subsequent arguments are converted for output. If there are insufficient arguments
for the format, the behavior is undefined. If the format is exhausted while arguments
remain. the excess arguments are evaluated but otherwise ignored. The sprint!
routine returns when the end of the format string is encountered.

The first parameter is a pointer to the array to which output will be written.
For the second parameter. see print! routine.
Returns
This routine returns the number of characters written into the array, not counting the
added nuB terminating character.
Example
Refer again to the sample program for the dispJay! routine in Section 61.3(C). This
time you also want to send the outpUt toa printer. By using the sprint! routine, you
only have to enter the format string once.

64-7

--

~

---

----~~--~------

--- --

-

- ---~------

--_. -

~-~.------------~.--~---~--~~--~~.......,"-.~------- -~-~--------------

----

INTERVIEW 7000 Series Advanced Programming: ATLG-107-951-10B

LAYER: 1
{
unsigned char date_time {100);
unsigned char weekday flO);
unsigned char month flO);
unsigned short day;
unsigned char hour;
unsigned char min;
}
STATE: output_to_display_window_and_printer
CONDITIONS: KEYBOARD· •
ACTIONS:
{
sprint!(date_time, "%£, %s %d, %.2d: %.2d\n", weekday, month, day, hour,
min);
displayf("%s". date_time);
printf("%s", date_time);
}

set print header

-

-

Synopsis
extern int setyrint_header(formatytr);
canst char"' formatytr;

DescriPtion
This routine writes output to the print buffer. to be printed after each form feed.
under control of the string pointed to by formatytr. Paging is done automatically by
the INTERVIEW. The setyrint_header routine returns when the end of the format
string is encountered.

The format is composed of zero or more ordinary characters. Octal or hexadecimal
values also may be input. with octal preceded by \ and hex by \x. Pad each value
to three integers with leading zeroes.
The status information shown above the prompt line on the display screens of the
INTERVIEW can be sent to a printer with the following inputs:
#d

date

#t
#p

time
(hh:mm)
page (not shown on the display screens)

(mmfdd/yy)

#b

block number

##

#

Rewms
The setyrint_header routine returns the length of the header (0-255), or a -1 if the
header exceeds the buffer size.

64-8

64 Print

Example
If you want the date, time. and page number to appear in the heading on each page
sent to a printer. enter the following:
LAYER: 2
ST ATE: header
CONDITIONS: ENTER_STATE
ACTIONS:
{
setJrint_header("#### #d #t
}

#p ####\n");

The printer output will look like this:
09/01/89

09:80

Page

III! 09/01/89

09:81

Page

#11

1 III

prints
SynOl'sis
extern \loid prints (stringJtr) ;
const char * stringJtr;

Description
The prints routine is similar to the displays routines, except that prints writes output
to the print buffer for printing while displays writes output to the Display Window.
The output is under control of the string pointed to by the argument. The prints
routine returns when the end of the string is encountered. The softkey equivalent of
this routine is the PRINT PROMPT action on the Protocol Spreadsheet. A PRINT
PROMPT action automatically time-stamps the output. Although prints does not, you
can create your own time or date stamp with setyrint_header.

The input is
The newline
String. Octal
preceded by

a pointer to a string composed of zero or more ordinary characters.
nonliteral sequence "\n" writes hex OD OA (ASCII CR"t) to the output
or hexadecimal values also may be included in the string, with octal
\ and hex by \x. Pad each value to three integers with leading zeroes.

INTERViEW 7000 Series Advanced Programming: ATLC-107-9S1-10B

Example
The following entry
prints("End of test. ");

produces the following output to a printer:
End of test.

64-10

. I
""

65 Disk 110

65 Disk 1/0
The disk 1/0 routines explained in this section allow disk files to be read from and written to
during Run mode. ., Streams" describes how most of the routines operate on a data stream
rather than the actual file. Under "Routines," all the disk 1/0 routines are explained. These
routines perform read and write functions as well as other ftle maintenance tasks in Run
mode, such as creating directories, renaming files,· and deleting files.

65.1

Streams
Most disk I/O routines are not executed on the actual disk file. but on a stream
which includes a copy of the file's data. Opening a disk file for reading or writing
associates a stream with the file. A stream may be input or output. Input streams
are read-only. Output streams are write-only. In either case, the stream remains
associated with a disk file until the file is closed.
You may have more than one stream associated with a given file. (A maximum of
ten streams may be open at one time.) For example, to read from and write to an
existing file, you must open the file twice. once to create an input stream and once
to create an output stream.

(A) Stream Components
A stream contains everything needed to perform disk I/O functions on a file.
1.

Buffer. A buffer containing a copy of the data in a disk file is part of the
stream. When a disk file is opened for reading, sectors of the disk
containing the file are. copied.to this buffer.
Sometimes a file's size may exceed the maximum size (512 bytes) of the
buffer. In this instance, as much data from the file as will fit in the buffer is
copied. As each character is read.from the inputStr~am, it is removed.
{The ungetc routine may temporarily return a removed. character to an input
stream.) Each call to !read~ fgcte, or fgets further empties the buffer, while
leaving the contents of the disk file unchanged. When the buffer is empty,
the next sector (or sectors) of the disk file is (are) automatically copied into
the buffer.
Similarly. when a file is opened for writing. the empty buffer is filled as

/Write or other outpUt. routines are invok.ed. Characters written to the output

.IT'
, I

$tream are not transferred to the diskflle until there is a call to fflush .
Fflush is automatic in fdose or when the stream buffer is full.

65--1

INTERV/€W 7000 Series Advanced Programming: ATLC-107-9S1-10B

2. File-position indicator. The file-position indicator keeps track of
progression through the disk file. For files opened in read mode, the
indicator is initially located at the first character (character zero) in the file.
As characters are read from the input stream, the indicator advances through
the file.
For existing files opened in append mode, the indicator is positioned after
the last character in the file. For newly created files or files opened in
overwrite mode, it is located at the beginning of the file. Every time an
output routine is executed, the file-position indicator is advanced by the
number of characters successfully written to the stream.

3. Buffer pointer. The stream also contains a pointer into the associated buffer
of a file. In input streams, it points to the next character to be read. In
output streams, it points to the next empty byte.
4. EOF indicator. If the end-of-rue (EOF) indicator is set in a input stream,
it means that a read operation encountered the end of the file. The EOF
indicator is cleared via calls to Jopen. fseek, rewind. clearerr, or ungetc.
5. Error indicator. In input streams. this indicator gets set when an Jread,
fsetc, or Jsets routine does not successfully execute. Attempting to execute
these input routines (or unsetc) on an output stream sets the error indicator.
In output streams. the error indicator gets set when the !flush, Jwrite. Jputc,
Jputs, or JprintJ routine does not successfully execute. or when output
routines try to execute on an input stream. A call to Jopen, clearerr. or
Jseek. clears the error indicator in either input or output streams. A rewind
operation on an input stream also clears the indicator.

(8) Stream Pointer
The fopen routine returns a pointer to the stream. Disk I/O routines which
perform operations on a stream require the stream pointer as an argument. It
has been named stream-ptr in the routines discussed below.

(C) Locking Streams
Each file stream is locked internally during operations on it. If the user program
is executing different conditions on multiple processors and both actions require
writing to the sczme Jile stream. internally the stdio library will allow the first task
that requests to write to execute until completion and the second task will be
locked out. All processes that are locked out are temporarily put to sleep and
removed from the tasking queues for that CPU. When the first process
completes its operations on the stream, the locked-out processes are woken up
,and may· try to claim the lock. Deadlock or deadly embrace situations can
never arise internally to the stdio library.

65-2

65 Disk I/O

If two or more file streams are associated with a single file, processes on each

stream may try to operate on the file concurrently. Internal locking does not
apply in this situation, so use the locking routines.

65.2 Routines
Disk 110 routines fall into four categories. The first category includes routines valid
for both input and output streams. including the two locking routines (not exclusive
to disk I/O). The remaining groups are routines valid for input streams only. routines
applicable to output streams only. and routines which handle other file maintenance
functions.
The routines and their descriptions closely conform to the ANSI specification for the
Programming Language C, as defined in the draft document published July 9, 1986.
Discrepancies with the ANSI standard are noted. The document number is
X3J11-86-098. Refer to pages 107-129.
Use the #include  pre-processor directive with all disk I/O routines. The
stdio. h file contains type definitions and function prototypes. making declarations of
the routines unnecessary.
When a filename is required as an argument. give the absolute pathname of the file.
prefixed by the device name. Valid device names are FDI, FD2, or HRD. See
Section 13.2(B) for a discussion of absolute pathnames. The disk filename is
required as an argument for the fopen routine. which opens a file for reading or
writing. From that point on, disk 1/0 routines relating to that file use the stream
pointer. explained above. as input. File maintenance routines, such as rename or
remove, use the filename as input.
NOTE: A single program can perform disk 1/0 functions as well
as data playback or recording. Disk 1/0. however, must be
suspended while disk recording (or play1;>ack) proceeds, and vice
versa. RAM recording, on the other hand, may occur
simultaneously with disk I/O operatjons. Refer to the
startJcrdylay and suspendJcrdylay routines in Section 69 for
more information on the interaction between disk I/O and
recording/playback.

(A) Input/Output-Stream Routines
Several disk I/O routines may be executed on either input or output streams.
fopen opens an existing disk file for reading or writing. or creates a new file. In
each case, a stream is associated with the file until there is a call to jclose.
fclose or a specific caU to !flush delivers any output written to a stream to the
host environment where it will be written to the disk file.
NOTE.: Always include a call to fclose in your program to make
sure output is written to the file.

65-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Test the end-of-file and error indicators with the feof and ferror routines,
respectively. These same indicators may be cleared via the clearerr routine.
The fseek and rewind routines manipulate the file-position indicator and erase
any memory of a character put into the stream via ungetc.
The lock and unlock routines prevent deadlock from occurring when processes
on multiple streams try to operate concurrently on a single file.

fopen
Syno.psis
#include <.stdio.h>
extern FILE - lopen (/ilenameytr, madeytr);
canst char" lilenameytr;
const char" mOdeytr;

Description
The fopen routine opens a file for access. Depending on the open mode, a file
can be opened for reading (via an input stream) or for Writing (via an output
stream). For existing files. this routine also clears the end-of-file and error
indicators.

The first parameter is a pointer to the file to be opened, represented as the
name of the file. placed inside double quotation marks. The filename must be
the absolute pathname. prefixed by the device name (HRD, FD1, or FD2).
The second parameter is a pointer to a string (represented as. a character inside
double quotation marks) which identifies the type of open to be performed. Of
the ANSI standard open modes. the following are supported:
r

Open an existing file for reading only. The file-position indicator is
located at the start (character zero) of the file.

w

Create a file. or open an existing file. for writing only. For an existing
file, truncate its length to zero and discard the contents.

a

Create a file. or open an existing file, for writing only. For an existing
file, retain the contents and locate the file-position indicator at the
end of the file. Append new data to the end of existing data, unless
a call to fseek or rewind has repositioned the file-position indicator.
In this instance, overwrite existing data. (This implementation is
different frorn the ANSI specification which appends new data to the
end of existing data regardless of any previous calls to fseek.)

65-4

65 Disk /f0

rb

Currently implemented the same as "r." Use "rb" for the Iseek
routine.

wb

Currently implemented the same as "w." Use "wb" for the Iseek
routine.

ab

Currently implemented the same as "a." Use "ab" for the Iseek
routine.

Returns
This routine returns a pointer to the stream. with a type definition FILE
(defined in the stdio.h file).
If the open fails (for example, the £He does not exist). zero is returned.

Example
Open a file called "butIOJ" in the lusT' directory on a disk in floppy drive 2.
Store the pointer to the stream in streamytr. Indicate whether or not the open
is successful on the prompt line.
{

#include <.stdio.h>
FILE .. streamJ'tr;
}
LAYER: 1
STATE: open_a_file
CONDITIONS: ENTER_STATE
ACTIONS: PROMPT "Press 0 to open file.
CONDITIONS: KEYBOARD "00·
ACTIONS:
{

if«(streamJ'tr = fopen("FD2IusrfbuffOI", "r"))
displaYJ'rompt("Cannot open file.
else
displayyrompt("File opened.

== 0)
");

") ;

fclose
Synopsis
#include <.stdio. h>
extern int /close(streamJ'tr);
FILE" streamJ'tr;

DeScription

~.'
I

'.

w:

All opened files must be closed. If the disk file to be closed is an input file,
then any data remaining in the stream buffer is discarded. If the file is an
output file. any data written to the stream is written to the file. (In other words,
Iclose automatically calls Iflush.) The stream is freed from its association with
the disk file. and the disk file is closed.

I

65-5

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951 108

The only parameter is the stream pointer.
Returns
If the stream is successfully closed. zero is returned. If errors are detected. or if

the stream is already closed, a non-zero value is returned.
Example
Close the file that was opened in the !open example. Indicate whether or not
the close is successful on the prompt line.
#include 
FILE • stream"'ptr;
}
LAYER: 1
STATE: open_and_close_a_flle
CONDITIONS : ENTER_STATE
ACTIONS: PROMPT 'Press 0 to open file.
CONDITIONS: KEYBOARD ·00'
ACTIONS:

{
ij«slream...ptr =jopen("FD2Iusrlbujj01", "r")) == 0)
display...prompt("Connot open file.
else
display"'prompt("File opened.
}
CONDITIONS: KEYBOARD 'cC'
ACTIONS:
{
if(fetose(stream...ptr) /: 0)
display...prompt("Either file is already closed, or etose cannot be executed.
else
display"'prompt(UFile closed.

");

");
");

fflush
Synopsis
#include 
extern int fflush (stream"'ptr)
FILE" stream"'ptr;

Description
If streamytr points to an output stream, the !flush routine causes any unwritten
data for that stream to be delivered to the host environment where it will be
written to the file. If streamytr points to an input stream, the !flush routine

undoes the effect of any preceding ungetc operation on the stream.

The only parameter is the stream pointer.

65-6

65 Disk 110

Returns
If a write error occurs, non-zero is returned and the error indicator is set.

Example
Assume the X.25 personality package has been loaded in at Layer 2. Whenever
you receive a frame type "unknown," write the actual value of the control byte
to an output file stream and to the disk file.
{

#include 
FILE" stream-ptr;
extern lIolatile const unsigned char rClldJrame_cl'ltrl_byte_l;
}

LAYER: 2
STATE: wrlte_thenjflush
CONDITIONS: ENTER_STATE
ACTIONS:
{

i!«stream-ptr = fopen(UFD2Iusrljrame_unkwn", "a")) == 0)
display-prompt (" Cannot open file.
else
display-prompt("File opened.
pos_cursor(l,O) ;
}
CONDITIONS: RCV UNKNOWN
ACTIONS:
{
ij(jprintf(stream-ptr, "%02x\n ", rClIdJrame_cntrl_bytej) < 0)

~,

r

i
i

displayf("Error in printing to strt:am.
else
displayf(" Print to stream completed.
if(fflush (stream...,ptr) 1= OJ
display-prompt ("Write error.
else
display-prompt("Write to file completed. Press C to close file.

\1'1");
\1'1");
");

"J;

}
CONDITIONS: KEYBOARD ·oC·
ACTIONS:
{

ij(jclose(stream"'ptr) != 0)
displaY"'prompt ("Either file is already closed, or close cannot be executed.
else
display"'prompt (" File closed.

feaf
Synopsis
#include 
extern int feof(stream...,ptr);
FILE .. stream...,ptr;

Description

fl"
!

This routine tests the end-of-file indicator for an associated stream.

65-7

..);
");

INTERVIEW 7000 Series Advanced ProgrammIng: ATLC-107-9S1-108

The only parameter is the stream pointer.
Returns
The feof routine returns a non-zero value if the end-of-file indicator is set for
the stream.
Exanmle
Get a character from a file. If it is not at the end of the file. display it;
otherwise prompt with "End of file."
#include <.sldlo. h>
FILE· stream-ptr:
int character;
}
LAYER: 1
STATE: test_for_8ot
CONDITIONS: ENTER_STATE
ACTIONS: PROMPT "Press 0 to open file.
CONDITIONS: KEYBOARD ·00"
ACTIONS:
{

ifUstream-ptr = fopen("FD2IusrlbuffOl", "rp"» == 0)
display-prompt("Cannot open file.
else
display-proml't("File opened .. Press G to gel character.
pos_cursor(J ,0);

");
H);

}
CONDITIONS: KEYBOARD "gaO
ACTIONS:
{

character =jgetc(streamytr);
if(feof(stream,JJtr) /= 0)
display-prompt("End af file.
else
displayf(" 'roc", character);

Press C to close flle.

") ;

}
CONDITIONS: KEYBOARD "cC·
ACTIONS:
{
i!(fclose(stream-plr) 1= 0)

display-prompt("Either file is already closed, or close cannot be executed.
else
displaYJrompt("File closed.

ferror
Synopsis
#include <.std/a. h>
extern int !error(stream-ptr);
FILE" stream-ptr;

65-8

""

-

---------~-----~

-----------~

");
");

65 Disk I/O

Description
This Toutine tests the error indicator for a stream.

The only parameter is the stream pointer.
Returns
The lerror routine returns a non-zero value if the effOf indicatof is set for the
stream.
Example
Read a file called "buIIO]" from the lusr directofY on the disk in drive 2. If
the number of elements read is less than the number designated to be read.
determine whether an end-of-file was encountered or a read error occurred.
{

#indude 
FILE "' strfam...ptr;
char data [6091 J;
siu_t n;
}
LAYER: 1
STATE: read_a_file
CONDITIONS: ENTER_STATE
ACTIONS: PROMPT "Press 0 to open file.
CONDITIONS: KEYBOARD "00'
ACTIONS:
{
if«(stream"'ptr ""/open("FD2IusrlbujjOl", "r"J)
displaY"'prompt("Cannot open jile.

==

0)

else
displaY"'prompt(ftFile opened. Press R to read the file.
}
CONDITIONS: KEYBOARD orR"
ACTIONS:
{
n = fread(data, 1, 6091, stream"'ptr);
if(n 1= 6091)
{
ij(jerror(stream...ptT) 1=0)
displaY"'prompt(" Rtad effor.
tlst i/fJeoj(stream"'ptr) t= 0)
display"'prompt(" End-oJ-Jile encountered.
}

else
displayj("\n%.6091s", data);
displaY"'prompt("PrtssC to dose the lile.
}

");
") ;

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

CONDITIONS: KEYBOARD ·cC"
ACTIONS:
{
ifCfclose(streamJtr) 1= 0)
displaYJrompt("Either file is already closed, or close cannot be executed.
else
display Jrompt(" File closed.

");
");

clearerr
Syn0j2sis
#include 
extern void clearerr(streamJtr);
FILE • streamJtr;

Description
This routine clears the end-of-file and error indicators for a stream. When an
error occurs. no further operations are allowed until the error indicators are
explicitly cleared. (These indicators are also cleared by a jopen or rewind
operation.)

The only parameter is the stream pointer.
Example
If a write error occurs. clear the indicators.
{
#include 
FILE • streamJtr;
int character;
}
LAYER: 1
STATE: clear Indicators
CONDITIONS: ENTER_STATE
ACTIONS: PROMPT "Press 0 to open file.
CONDITIONS: KEYBOARD '00'
ACTIONS:
{

if«streamJtr '" fopen ("FD2IusrlbuffOJ ", "wb")) == 0)
displaYJrompt("Cannot open file.
else
displaYJrompt(UFile opened: Press P to write character.

65-10

") ;

'1') ;

65 Disk I/O

CONDITIONS: KEYBOARD "PP'
ACTIONS:
{
character"" fputc('h', stream"ptr);
if(cnaracter "':: EOF)
{
displaY"prompl("Write error. All indicators will be cleared.
clearerr(stream"ptr);
}
else
displaY"prompt("Write complettd. Press C to close the file.
}
CONDITIONS: KEYBOARD ·ce·
ACTIONS:
{
if(fclose(stream"ptr) != 0)
displayyrompt("£ither file is already dosed, or close cannot be executed.
else
displayyrompt("File cloud.

,.') ;

");
"):

fseek
Synopsis
#include 
extern int fseek(stream"ptr. bytes, reference);
FILE" stream"ptr;
long int bytes;
int reference;

De&cription
This routine manipulates the file-position indicator, according to the ANSI
specification for binary files. Future read operations will be referenced from that
point. jseek dears the end-of-file indicator and resets the ungetc variable.
NOTE: The ANSI specification for text files is not currently
implemented. To ensure proper execution of jseek if future
releases include the ANSI specification for text files. open files
for jseek as binary ("rb," "wb," or ·'ab").

The first parameter is the stream pointer.
The second parameter is the number of characters the file-position indicator
should be moved from a specified position. A positive number advances the
file-position indicator forward in the file; a negative number moves it backward.

65-11

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

The third parameter specifies the location of the file-position indicator.
SEEK_SET"will move the file-position indicator from the beginning of the file;
SEEK_END will move the file-position indicator from the end-of-file; and
SEEK_CUR will move the file-position indicator from its current position.

Returns
This routine returns non-zero for an improper request; otherwise it returns zero.
Example
Open a file and move the file-position indicator 4 characters from the beginning
of the file. Each time the lID key is pressed. move the indicator one character
backward from its current position. After 4 executions. the indicator will be
back at the beginning of the file.
{

#include 
FILE • streamJ'tr;
int character;
}
LAYER: 1
STATE: move_indicator
CONDITIONS: ENTER_STATE
ACTIONS: PROMPT "Press 0 to open file.
CONDITIONS: KEYBOARD "00'
ACTIONS:
{

if«streamJ'tr = fopen("FD2IusrlbuffOI". "rb")} :;:= 0)
displaYJ'7ompt("Cannol open file.
else

");

{

displaYJrompt(" File opened. ");
pos_cursor(O,14) ;
if(jseek(streamJ'tr. 4, SEEK_SET) != 0)
displays ("Improper fseek request.
else
displays("Fseek completed. Press S to seek new position.

");

H);

}
CONDITIONS: KEYBOARD ·sS·
ACTIONS:
{
if(jseek(streamJtr. -J. SEEK_CUR) != 0)

displaYJ'rompt(" Improper fseek request. Press C to close file.
else
displaYJromptC"Fseek completed. Press C to close file.

65-12

");

~
I '

65 Disk I/O

f

i
CONDITIONS; KEYBOARD ·cC·
ACTIONS:
{
if(Jclose(strtam"ptr) 1= O}
displaY"prompt("Either file is already closed, or close cannot be executed.
else
dlsplaY"prompt("File closed.

");
");

rewind
Synopsis
#include 
extern yoid rewind(slream..ptr);
FILE" streamJ'tr;

Description

I'i'
. !

This routine returns the file-position indicator to the beginning of the file (Le., it
is equivalent to an fseek with the number of characters to move set as zero and
the specified position SEEK_SET). The rewind operation also clears the
end-of-file and error indicators and erases any memory of the character in a
previous ungetc operation .

,

The only parameter is the stream pointer.
Example
In this example, the first call to fgetc following the rewind operation will read the
first character in the file.
{

#inc/ude 
FILE * streamJ'tr;
int character;
}
LAYER: 1
ST ATE: moveJndicator
CONDITIONS; ENTER_STATE
ACTIONS: PROMPT "Press 0 to open file.
CONDITIONS: KEYBOARD '00·
ACTIONS:
{

if«streamJ'tr ': fopen("FD2/usrlbuff01", "rb")) == 0)
displaYJ'rompt("Cannot open file.
else
displaYJ'rompt("File opened. Press S to f.eek.

65-13

");

");

INTERVIEW 7000 Series Advanced Programming: ATLC-107 951 108

CONDITIONS: KEYBOARD
ACTIONS:

·ss·

{

iflfseek(stream...ptr, 4, SEEK_SET] (; 0)
displaY"'prompt(uJmproper fseek request.
else
displaYJ'rompt(UFseek completed. Press spacebar to rewind.

") ;

");

}
CONDITIONS: KEYBOARD" •
ACTIONS:
{

rewind(stream...ptr) ;
displaYJ'rompt(UPress G to get a character.

"j;

}

CONDITIONS: KEYBOARD "gG"
ACTIONS:
{
character =fgete(stream...ptr};
displaY"'prompt("Press C to elosefUe.
}
CONDITIONS: KEYBOARD ·ce·
ACTIONS:
{
tf(fclose(stream...ptr) /= 0)
displaY"'prompt(" Either file is already closed, or close cannot be executed.
else
dispZaY"'prompt("File closed.

H);

");
");

lock
Synopsis
#include 
extern void loek(/oelc_variable"'ptr);
int "' loek_variable"'ptr;

Description
The lock routine implements a lock using the integer variable pointed to by the
routine parameter. If the lock variable is currently locked, the task goes to
sleep. When an unlock on the same variable occurs (within an independent
task), the task invoking the lock function will attempt to claim the lock. If
successful, the task is executed; otherwise, it goes back to sleep until the next
unlock.

NOTE: If locking is used at any place in the program, all related
or possibly concurrent routines must also use the locking
functions.

65-14

65 Dish 110

NOTE: The lock variable should always be defined as a global
integer, never as local to a function. The lock variable should
never be altered by the user program or deadlock can occur.
Deadlock also results if the lock is invoked twice within the same
task without an intervening unlock.

The only parameter is a pointer to the lock variable.
Example
Two tasks concurrently write to their own file streams. The file streams are local
to the routine writeJox. making them independent of each other even though
both are referenced by streamytr. During the !close operation (which
automatically calls fflush) , however. both tasks need to write to the same file.
The locking routines ensure that the writes to the· file occur sequentially. not
concurrently.
#include 
COlm char data [] ::: "((FOX)\'n";
int key;
void writeJox()
{
FILE • streamJtr;
size_t 'I;
lock (&I:ey);

if«stream"ptr::: fopen("FD2IusrlbuffOI", "a"»
displaYJrompt("Ca1'l.not open file.
else
displaYJfompt("File opened.
n :: fwrite(data. 1. sizeof(data)-i, stream"ptr);

== 0)
");
") ;

pos_cursor(1,O);
if(n /= (sizeo!(data)-l»

display!("Write error.
else
displayf("Write completed.
if(felose(streamJtr) !e 0)
displayf("Either file is already closed. or close cannor be executed.
else
displayf(" File closed.
unloel: ( &I:ey) ;

}
}
LAYER: 1
TEST: a
STATE: write and signal
CONDITIONS: RECEIVE STRING "THE QUICK BROWN FOX"
ACTIONS: SIGNAL xyz
{

!:~

writeJox();
}

!

65-15

\n"};
\n");

n) ;
");

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

TEST:b
STATE: write_only
CONDITIONS: ON_SIGNAL
ACTIONS:
{
writeJox();
}

xy:

unlock
SynQl)sis
#include 
extern void unlock(lock_1Iarlable"'ptr);
int .. lock_1Iariable"'ptr;

Description
The unlock routine implements the inverse of the Jock routine using the same
integer variable. Sleeping tasks will be woken up to retry their attempt to claim
the lock. One will succeed. and the rest will go back to sleep. See also lock
routine.

The only parameter is a pointer to the lock variable.
Example
See lock routine.

(8) Input-Stream Routines
The following routines are valid for input streams only. An attempt to apply
them to output streams results in a read error. The error indicator for the input
stream will be set.
Three routines read characters from the input stream. The fread and fgets
routines transfer a specified number of characters from the stream buffer into a
user-defined array. fgetc reads the next character from the input stream. The
ungetc routine temporarily forces a designated character back into the input
stream.

fread
SynQ,Psjs
#include 
extern size_t /read(datIJ...ptr, size, number, stream"'ptr);
1Ioid .. data"'ptr;
size_ t size;
size_t number;
FILE" stream...ptr;

65-16

65 Disk 110

Description
This routine reads elements from the input-stream buffer and puts them into a
user-defined buffer. The file-position indicator is advanced by the number of
characters successfully read. The !read routine can read a file whose elements
are more than eight bits each, 16-bit shorts or 32-bit longs, for example. The
!gets routine is similar to !read. !gets, however, reads only 8-bit characters.
The primary use of !read is to read the entire contents of a file, whereas the
primary purpose of !gets is to read from a file one line at a time.

The first parameter is a pointer to an array in which the incoming data should
be placed.
The second parameter is the number of bytes in each element to be read. If
the value of this parameter is zero, the contents of the array and the stream
remain unchanged.
The third parameter is the number of elements to be read. If the value of this
parameter is zero, the contents of the array and the stream remain unchanged.
The fourth parameter is the stream pointer.
Returns
The !read routine returns the total number of elements read. If the number of
elements read is less than the number of elements designated to be read, an
end-of-file has been encountered or a read error has occurred. Use the leo!
and !error routines to distinguish an end-of-file from a read error. If an error
occurs, the location of the file-position indicator is indeterminate.
Example
Read in a file called "buff01" from the lusr directory on the disk in drive 2 and
display it on the Program Trace screen. (See Section 61.4 for information on
using trace buffers in C.) Determine the size of the array data from the file size
indicated on the File Maintenance screen.
{

#include <.traee_buf.h>
#include 
FI4E .. streamytr;
eMr data [6091];

size_, n;

extern struct trace_buf pro8_trhuJ;
}

65-17

INTERVIEW 7000 Series Advanced Programming: ATLC-107 951-108

LAYER: 1
STATE: read_a_file
CONDITIONS: ENTER STATE
ACTIONS: PROMPT "Press 0 to open file.
CONDITIONS: KEYBOARD '00'
ACTIONS:
{
if(streamJtr" fopen("FD2/usrlbuff01", "r")) ;; 0)
displaYJrompt("Cannot open file.
else
displaYJrompt("File opened. Press R to read the file.
}
CONDITIONS: KEYBOARD OrR"
ACTIONS:
{
n = fread(data, 1, 6091, streamJtr);
if(n 1= 6091)
display"'prompt("Either a read error has occurred, or an EOF has been
encountered.
");
else
{
tracef(&proLtrbuf, "%.6091s", data);
display Jrompt (U Press C to close the file.
}
}
CONDITIONS: KEYBOARD ·cC·
ACTIONS:
{
iffJclose(stream...ptr) != 0)
displaYJrompt("Either file is already closed, or close cannot be executed.
else
displaYJrompt("File closed.
}

") ;

'~)

;

");
ttl;

fgets
Synopsis
#include 
extern char" fgets(stringJtr, max_number, stream"'ptr);
char" string...ptr;
int max_number;
FILE to stream"'plr;

Description
This routine gets at the most one less than the specified number of characters
from an input stream and puts them in an array. If an EOF, newline, or null is
encountered in the stream, no more characters win be read, even if the specified
number of characters has not yet been read. The newline will be retained. A
terminating null character is written after the last character read into the array.
The file-position indicator is advanced by the number of characters successfully
read. The fgets routine is similar to fread. The fread routine can read a file

65-18

65 Disk 110

whose elements are more than eight bits each. 16-bit shorts or 32-bit longs, for
example. jgets, however, reads only 8-bit characters. The primary use of fgets
is to read from a file one line at a time.

The first parameter is a pointer to the array into which the characters will be
put.
The second parameter is the maximum number of characters (minus one) to be
read.
The third parameter is the stream pointer.
~turns

If the routine is successful, a pOinter to the array is returned. If end-of-file is
encountered before any characters have been read into the array or if a read
error occurs, a null pointer is returned. The contents of the array are

indeterminate when a read error occurs.
Example
Five characters. at the most, from a disk file will be put into an array called
data and displayed on the screen.
{

#include 
FILE .. streamJ'tr;
char data (10];
}
LAYER: 1
STATE: read_characters
CONDITIONS: ENTER_STATE
ACTIONS: PROMPT • Press 0 to open file.
CONDITIONS: KEYBOARD ·00·
ACTIONS:
{

-::: jopen (UFD2IusrlbufjOl". "r'J) == 0)
displaY"'prompt("Cannot open jile.
else
displaYJ'rompt(" File opened. Press G to get string.
ij((str~(JmJ'tr

H);

.)

;

}
CONDITIONS: KEYBOARD "g(3"
ACTIONS:
{
jgets(data, 6, streamJ'tr);

displayj("\n%.6s", data};
display"'prompt (" Press C to close the file.
}

65-19

");

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

CONDITIONS: KEYBOARD ·cC·
ACTIONS:
{

i!Cfclose(stream"'ptr) /= 0)
displaY"'prompt("Either file is already closed, or close cannot be executed.
else
displaY"'prompt("File closed.

");
");

}

fgetc
Synopsis
#include 
extern int !g,tc(str,am...ptr);
FILE • stream...ptr;

Description

The jgetc routine gets the next character (if present) from the input stream.
The character is an unsigned char cast-to an int (stored in the least-significant
byte of the int). The file-position indicator advances by one character.

The only parameter is the stream pointer.
Returns

This routine returns the next character in the input stream. EOF is returned if
an end-of-file is encountered or if a read error occurs. The stdio.h file defines
the macro EOF as -1. Use the feof and jerror routines to determine the reason
for a returned EOF.
Example
In the following example. open an input file for reading. Each time the @ key
is pressed. display the next character in the file.
{

#include 
FILE • stream"'ptr;
int character, ,nd;
}
LAYER: 1
STATE: get next character
CONDITioNS:-ENTER_STATE
ACTIONS: PROMPT ·Preaa 0 to open flle.
OONDITIONS: KEYBOARD ·00·
ACTIONS:
{

i!((stream"'ptr == !op,n("FD2tusrlbuf!Ol",
displaY"'prompt("Cannot open fil,.

"r"» ... 0)

,Ise

display...prompt("Fil,op,n,d. hess G to g,t a character.
display!("'n"):
}

65-20

r"~1'4

65 Disk 110

!

CONDITIONS: KEYBOARD "gQ"
ACTIONS:
{
character:: fgetc(streamytr);
if(character :; EOF}
{
end:: fecf(streamytr);
if(end != 0)
displayyrompt(U EOF encountered.
else
displayyrompt(" Read error.

") ;
") ;

}

else
displayf(" "foe", character);
}
CONDITIONS: KEYBOARD ·oC·
ACTIONS:
{
if(fclose(streamytr) 1= 0)
displaY"'prompt("Either file is already closed, or close cannot be executed.
else
displayyrompt(" File closed.
}

");
");

ungetc
SynQPsis
#include 
extern int ungetc(character, streamytr);
int character;
FILE * stream..,ptr;

Description
This routine temporarily forces a specified character into a variable associated
with the input stream, overwriting the previous ungetc variable. The routine
does not affect the location of the file-position indicator. The next fgete will
read the ungetc variable. not the stream. An intervening fflush. jseek, or rewind
erases memory of the character. If the ungttc function is called too many times
on the same stream without an intervening read. fflush. fseek. or rewind
operation on that stream, the operation may fail. Ungetc also clears the
end-of-file indicator.

The first parameter is the character to be put into the input stream.
The second parameter is the stream pointer.
Returns
This routine returns the spedfied character. If the operation fails, EOF is
returned and the input stream remains unchanged. It will fail if the values of
the specified character and the macro EOF are equal.

65-21

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Example
Read a character from the stream. Press the !ill key when you want to return
the last character read to the stream. The next call to fgetc will read the
returned character.
#include <.stdio. h>
FILE" streamytr;
int character;
}
LAYER: 1
ST ATE: get_next_charaoter
CONDITIONS: ENTER_STATE
ACTIONS: PROMPT ·Press 0 to open fHe.
CONDITIONS; KEYBOARD· 00'
ACTIONS:
{

if((slreamJtr '" fopen("FD2Iusrlbuf!OJ", "r"» == 0)
displaYJrQmpt("Cannot open file.
else
displaYJrompt(UFile opened. Press G to get a character.

"):

}
CONDITIONS: KEYBOARD "gG"
ACTIONS:
{

character =fgetc(streamytr);
if(character == EOF)
displaYJrompt("End of file or read error.
else
{

pos_cursor(O,O);
displayf("character = %c

Press U to return character to stream.", character);

}

}
CONDITIONS: KEYBOARD "uU'
ACTIONS:
{

I!«ungetc(character, streamJtr)) ='" EOF)
displayyrompt(" Character no/returned.
else
displaYJrompt(" Character returned.
}
CONDITIONS: KEYBOARD ·cC·
ACTIONS:

");
");

{

if(fclose(streamJtr) /= 0)
displayyrompt("Either file is already closed, or close cannot be executed.
else
display Jrompt (" File closed.

65-22

");
");

~
!

...

f.

i

65 Disk 110

C

1

(C) Output-Stream Routines
The following routines are valid for output streams only. An attempt to apply
them to input streams will result in a write error. The error indicator for the
output stream will be set.
Four routines write to output streams. The !write and !puts routines transfer a
specified number of characters from a user-defined array into the stream buffer.
!putc writes a character to the next empty byte in an output-stream buffer.
!print! writes formatted output to an output stream similar to the way display!
writes output to the Display Window.

fwrite
SynQPsis
#include 
extern size_t !write(outputytr, size, number, streamytr);
const void" outputJtr;
size_t size;
size_t number;
FILE • streamJtr;

DescriptiQn
This routine writes elements from a user-defined array to the output-stream
buffer. The file-position indicator is advanced by the number of characters
successfully written.

The first parameter is a pointer to an array from which the data should be
taken. Declare it as canst if it is read-only. In cases where the array will be
written to, as in the example below. do not include const as part of the
declaration.
The second parameter is the number of bytes in each element to be written.
The third parameter is the number of elements to be written.
The fourth parameter is the stream pointer.
Returns

~ff'.

\i

The !write routine returns the total number of elements written. If the number
of elements written is less than the number of elements designated to be written,
a write error has occurred. If an error occurs, the location of the file-position
indicator is indeterminate.

65-23

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Example
Read the contents of a file. and write them to a new file.
{

#include <.stdio. h>
FILE * read_stream;
FILE" write_stream;
char output {6091];
size_t 11;
}
LAYER: 1
STATE: wrlte_to_a_fl1e
CONDITIONS: ENTER_STATE
ACTIONS: PROMPT 'Press 0 to open flies.
CONDITIONS: KEYBOARD '00·
ACTIONS:
{

if«read_stream :: jopen("FD2Iusrlbujf01", "rn))

== 0)

{

displaYJrompt("Cannot open buff01. "};
pas_cursor (0, 21);
}

else
displaYJrompt("BujfOlopened. ");
pas_cursor(O,16);
}

ij«write_stream :: jopen("FD2IusrtnewJile", "w"» == 0)
displays(" Cannot open newJile.
else
displays("NewJile opened, Press R to read buJjOJ.
}
CONDITIONS: KEYBOARD OrR"
ACTIONS:
{
n = fread(output, 1, 6091, read_stream);
if(n /= 6091)

displaYJrompt("Either a read error has occurred. or an EOF has been
encountered.
");
else
displayyrompt("Press W to write to newJile.
}
CONDITIONS: KEYBOARD ·wW·
ACTIONS:
{
n = fwrite(output. 1, 6091, write_stream};

ij(n J= 6091)
display yrompt("Write errar. Press C to close files.
else
displaYJrompt("Write completed. Press C to clase fites,
}

65-24

");

65 Disk 110
CONDITIONS: KEYBOARD "cC'
ACTIONS:
{
if(jclose(read_stream) J= 0)
{
displaYYTompt("Either bUffOl is already closed, or close cannot be executed.
pos_cursor(O,O);
}
else

displaYYTompt("BuffOl closed. "):
pos_cursor(0.16):
}
if(jclose(write_stream) != 0)
displays("Either newJile is already closed, or close cannot be executed.
else
displays("NewJile closed.

");

");
"J;

fputs
SynQPsis
#include 
extern int fputs(strin8ytr, streamytr);
const char * stringytr;
FILE « streamytr;

Description
This routine writes a string of characters from an array. excluding the
terminating nun character. to the output stream. The file-position indicator is
advanced by the number of characters successfully written.

The first parameter is a pointer to the string to be written.
The second parameter is the stream pointer.
Returns
This routine returns zero if it is successful; it returns a non-zero value if a write
error occurs.

Example
Write a fox message at the end of existing data in a file.
#indude 
FILE • streamytr;
char data [] = "(!FOXl)'\n";
}

65-25

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951 108

LAYER: 1
STATE: wrlte_a_string
CONDITIONS; ENTER_STATE
ACTIONS: PROMPT 'Press 0 to open file.
CONDITIONS: KEYBOARD '00'
ACTIONS:
{

if«streamJtr =fopen("FD2/usr/buffOl", "a")) == 0)
displaYJrompt("Cannot open file.
else
displaYJrompt("File opened. Press P to write string.

");

}

CONDITIONS: KEYBOARD ·pP·
ACTIONS:
{

if(fputs(data. streamJtr) /= 0)
displaYJrompt("Write error. Press C to close file.
else
displaYJrompt("Write completed. Press C to close file.
}
CONDITIONS: KEYBOARD 'cC'
ACTIONS:

{
if(fclose (strea mJtr) 1= 0)
displaYJrompt("Either file is already closed, or close cannot be executed.
else
displayJrompt (" File closed.

");

"J;
H);

}

fputc
SynoPSis
#include 
extern int fputc(character, streamJtr);
int character;
FILE" streamJtr;

Description
This routine writes a given character (cast to an unsigned char) to an output
stream. The file-position indicator advances one character.

The first parameter is the character to be written to the output stream. It may
be given as a hexadecimal, octal. or decimal constant; as an alphanumeric
constant inside single quotes; or as a variable. A hexadecimal value must be
preceded by the prefix Ox or OX; an octal value must be preceded by the prefix
O. If no prefix appears before the input, the number is assumed to be decimal.
The second parameter is the stream pointer.

65-26

65 Disk 110

Returns
If the character is successfully ",,'litten to the output stream. the routine returns
that character. If a write error occurs. EOF is returned and the error indicator
is set.

Example
Open the named file. If the file does not already exist, create it. If it does
exist, truncate its length to zero, thereby deleting its contents. Put the character
read from the input stream pointed to by read_stream into the output stream
pointed to by writejtream. This example is similar to the one given for fwrite,
except that in this case, each time the ® key is pressed, only one character is
copied, rather than the entire file.
{

#include 
FILE .. read_stream;
FILE" write_stream;
int character;
}

LAYER: 1
STATE: eOPY_8_character
CONDITIONS: ENTER_STATE
ACTIONS: PROMPT 'Press 0 to open flies.
CONDITIONS: KEYBOARD '00'
ACTIONS:
{
if((readjtream =fopen("FD2IusrlbutfOI", "rU)) == 0)
{
displaY"prompt("Cannot open buffOl. "J;
pos_cursor(O,21 );
}
else
{
displaY"prompt (U BujfO] opened. ..);
pos_cursor(O, 16};
}
if((write_stream = fopen("FD2IusrlbuffOl_copy", "w")) ;::= 0)
displays("Cannot open bujfOl_copy.
else
displays("BuffOl_cQPY opened. Press P to copy a character.
}
CONDITIONS: KEYBOARD ·pP*
ACTIONS:
{
character -= fgetc(read_stream);
if(character ::= EOF)
{
if(feof(read_stream) 1= 0)
displaY"pTompt("EOF encountered. Press C to close files.
else
displaY"prompt (" Read error. Press C to close files.
}

65-27

") ;

") ;

If} ;

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

else
/putc(character. write_stream);
}
CONDITIONS: KEYBOARD ·cC·
ACTIONS:
{
i/(fclose(readj;tream) I; 0)
{

displayyrompt("Either bu//01 is already closed, or close cannot be executed. ");
pos_cursor(O,O) ;
}

else
{

displayyrompt("Bu//Ol closed. ");
pos_cursor(O,16);
}

i/(fclose(write_stream) 1= 0)
display/("Either buffOl_copy is already closed, or close cannot be executed.
else
display("Bu/fOl_copy closed.

"):
");

}

fprintf
SynQl2sis
#include 
extern int jprint/(stream,JJtr, !ormotytr, ... ):
FILE" streamytr;
char" !ormotytr;

Description
The jprintf routine is similar to the sprintj routine. except that jprintj writes
output to an output stream, while sprintj writes output to an array. The output
is under control of the string pointed to by jormatytr that specifies how
subsequent arguments are converted for output. If there are insufficient
arguments for the format, the behavior is undefined. If the format is exhausted
while arguments remain, the excess arguments are evaluated but otherwise
ignored. The fprint/ routine returns when the end of the format string is
encountered. (Sprintj is documented in Section 64.3.)

The first parameter is the stream pointer.
The second parameter points to the format string composed of zero or more
directives: ordinary characters (not %). which are copied unchanged to the
output stream; and conversion specifications, each of which results in fetching
zero or mQre subsequent arguments. Each conversion specification is introduced
by the character %. After the %, the following appear in sequence:

65-28

65 Disk 110

•

Zero ~: more flags that modify the meaning of the conversion specification .
The flag characters and their meanings are:
The result of the conversion will be left-justified within the field.

+

The result of a signed conversion will always begin with a plus or
minus sign.

space If the first character of a signed conversion is not a sign. a space will
be prepended to the result. If the space and + flags both appear. the
space flag will be ignored.
#

The result is to be converted to an "alternate form." For d, i, c, and
s conversions, the flag has no effect. For 0 conversion, it increases
the precision to force the first digit of the result to be a zero. For x
(or X) conversion, a nonzero result will have Ox (or OX) prepended to
it.

•

An optional decimal integer specifying a minimum field width. If the
converted value has fewer characters than the field width, it will be padded
on the left (or right. if the left adjustment flag. described above, has been
given) to the field width. The padding is with spaces unless the field width
integer starts with a zero, in which case the padding is with zeros.

•

An optional precision that gives the minimum number of digits to appear for
the d, i, 0, u, x. and X conversions or the maximum number of characters
to be written from an array in an s conversion. The precision takes the
form of a period C.) followed by an optional decimal integer; if the integer is
omitted. it is treated as zero. The amount of padding specified by the
precision overrides that specified by the field width.
.

•

An optional h specifying that a follOwing d, i, 0, U, x, or X conversion
specifier applies to a short int or unsigned short im argument (the argument
will have been promoted according to the integral promotions, and its value
shall be converted to short int or unsigned short int before printing); or an
optional 1 speCifying that a following d, i. 0, u, x, or X conversion specifier
applies to a long int or unsigned long int argument. If an h or I appears
with any other conversion specifier, it is ignored.

•

A character that speCifies the type of conversion to be applied. (Special AR
extensions have been added.) The conversion specifiers and their meanings
are:

65-29

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

d, i,

0,

u, x, X

The int argument is converted to signed decimal (d or i), unsigned
octal (0), unsigned decimal (u), or unsigned hexadecimal notation (x
or X); the letters abcdef are used for x conversion and the letters
ABCDEF for X conversion. The precision specifies the minimum
number of digits to appear; if the value being converted can be
represented in fewer digits, it will be expanded with leading zeros.
The default precision is 1. The result of converting a zero value with
a precision of zero is no characters.
c
s

p

The int argument is converted to an unsigned char, and the resulting
character is written.
The argument shall be a pointer to a null-terminated array of 8-bit
chars. Characters from the string are written up to (but not including)
the terminating null character: if the precision is specified, no more
than that many characters are written. The string may be an array
into which output was written via the sprintj'routine.
The argument shall be a pointer to void. The value of the pointer is
converted to a sequence of printable characters, in this format:
0000:0000. There are always exactly 4 digits to the right of the
colon. The number of digits to the left of the colon is determined by
the pointer's value and the precision specified. Use this conversion to
display 80286 memory addresses. The 16-bit segment number will
appear to the left of the colon and the 16-bit offset to the right.

A % is written. No argument is converted.
\n
Writes hexadecimal OA, the ASCII linefeed character. No argument
is converted.
If a conversion speCification is invalid. the behavior is undefined.
%

If any argument is or points to an aggregate (except for an array of characters
using %s conversion or any pointer using %p conversion), the behavior is

undefined.
In no case does a nonexistent or small field width cause truncation of a field; if
the result of a conversion is wider than the field width, the field is expanded to
contain the conversion result.

Rety.ms
This routine returns the number of characters written, or a negative value if an
output error occurred.
Example
Assume the X.2S personality package has been loaded in at Layer 2. \\Then an
unknown frame is received, copy the actual value of the control byte to an
output stream.

65-30

,,~•..
, I

65 Disk ffO

I
#include 
FILE" stream.J1tr;
extern volatile canst unsigned char rClIdJrame_cntrl_byte_l;
}
LAYER: 2
STATE : save_unknowns
CONDITIONS: ENTER STATE
ACTIONS: PROMPT ·Press 0 to open file.
CONDITIONS: ENTER STATE
ACTIONS:
{

if«stream"ptr;. jopen("FD2Iusrljrame_unkwn", "w")}
displaY"pr!Jmpt("Cannot open jile.
else
displaY"prompt(" File opened.
}
CONDITIONS: RCV UNKNOWN
ACTIONS:

== 0)
U);

{

ijifprintj(stream..ptr, "%02x\n", revdJrame_clItrl_byte_l} < 0]
display..prompt(UError in printing to stream.
else
displaY"prompt("Print to stream compltted. Press C to close jile.
}
CONDITIONS: KEYBOARD "cC'
ACTIONS:
{
ijifclose(stream..ptr) != 0)
display..prompt("Either jile is already closed, or close cannot be executed.
else
display..prompt (" File closed.

");
");

}

(D) File Maintenance Routines
rename
Synopsis
#include 
extern int rename(oldjile..ptr, newjile"ptr);
const char" aldjile"ptr;
canst char ,. newfite..ptr;

ThiS routine renames a specified file. A file can only be renamed if it resides
on the active disk, indicated on the Current Directory line of the File
Maintenance screen. Renaming an open file does not affect subsequent disk If0
opentions on the stream. The stream is still associated with the same file. even
though the filename has changed.

65-31

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

The first parameter is a pointer to a string. the current name of the file. Give
the absolute pathname of the file, prefixed by the device name (HRD. FDI. or
FD2).
The second parameter is a pointer to a string, the new name to be given to the
file. Give the absolute pathname of the file, prefixed by the device name.
Returns
If the rename operation succeeds, zero is returned. If it fails, a non-zero value
is returned. If the renaming fails, the file will still be known by its original

name.
Example
Change the name of a file from old to backup. Prompt whether or not the
rename operation was successful.
{

#include 
}
LAYER: 1
ST ATE: rename
CONDITIONS: ENTER_STATE
ACTIONS: PROMPT ·Press spacebar to rename file.
CONDITIONS: KEYBOARD' •
ACTIONS:
{
i!(rename("FDIlltsrlold", "FDllusrlbackup") 1= 0)

displaY"prompt(" Rename jailed.
else
displaY"prompt("File has been renamed.

..) ;

remove
Synopsis
#include 
extern int remove (jile..Ptr) :
const char • jile..Ptr:

Description
This routine removes the named file from the disk. The file must be closed in
order for the remove operation to succeed. Subsequent attempts to open the
file will fail. Empty directories may also be removed with this routine.

lnl:2lJ1S.
The only input is a pointer to a string, i.e., the filename. It must be the
absolute pathname, prefixed by the device name (HRD, FD1, or FD2).

65-32

65 Disk I/O

Returns
Zero is returned if the file is removed; non-zero if it is not (for example, the
file does not exist in the specified location).
Example
Remove file old/ile from the lUST directory on the disk in floppy drive 1.
Prompt whether or not the remove operation was successful.
#include 
}
LAYER: 1
STATE: delete_a_file
CONDITIONS: ENTER_STATE
ACTIONS: PROMPT "Press D to delete file.
CONDITIONS: KEYBOARD "dO"
ACTIONS:

{
if(remove("FDltusrIQldfile") !::: 0)
displaY"'prompt(UFile has not been deleted.
else

displaY"'prompt("File deleted.

") ;

mkdir
Synopsis
#include 

extern int mkdir(directory"'ptr);
char • directory"'ptr;

Description
This routine creates a directory.

The only parameter is a pointer to a string, Le., the name of the directory to be
created. The absolute pathname must be used, prefixed by the device name
(FD1. FD2. or HRD).
Returns
If the directory is created, zero is returned; otherwise. a non-zero value is

returned.
Example
Create a sub-directory called disk_i_o in the
drive 2.

lUST

directory on the disk in

65-33

.,------_.._-----

INTERVIEW 7000 Series Advanced Programming: ATLC-107...,951-10B

{

#include 
}
LAYER: 1
ST ATE: make_directory
CONDITIONS: ENTER_STATE
ACTIONS: PROMPT "Press M to make a directory.
CONDITIONS: KEYBOARD "mM"
ACTIONS:
{
il(mkdir("FD2Iusrldisk._i_a") != 0)

display yrDmpt(" Directory not crea ted.
else
display yrompt ("Directory created.

");

}

Synopsis
#include 
extern int _setJile_type(pathnameytr, type_bullytr};
char" pathanmeytr;
char" type_bullytr;

Description
This routine determines the type identification of a specified file on the File
Maintenance screen. If a file is created by a "w" or "a" open mode and a file
type is not specified with the _setJile_type routine, it win be designated as an
ASCII file.

The first parameter is a pointer to a string, the name of the file. The filename
must be the absolute pathname, prefixed by the device name (HRD. FDl, or
FD2).
The second parameter is a pointer to a string, the file type. The type may be
any of the following (upper or lower case is acceptable):
SYS

System

DIR

Directory

PRGM

Program

SETUP

Setup

OBJ

Object code

LOBJ

Linkable-object

ASCII

ASCII

BITIM

Bit-image data

CHDAT

Character data

65-34

65 Disk 110

Returns
If the operation succeeds, the routine returns zero; otherwise. it returns a

non-zero value.

Example
The following example is almost the same one used for /write: read the contents
of a program file and write them to a new file. The difference is that new Jile is
set to be a program file. In the fwrite example. the type designation in the file
directory would default to "ASCII." It would still load and run as a program
file. however. since the file's contents, not its type label, determine which
operations are valid.
{

#include 
FILE .. read_stream;
FILE .. write_stream;
char output {6091];
siZil_t 1'/;
}
LAYER: 1
STATE: wrlte_to_a_flle
CONDITIONS: ENTER_STATE
ACTIONS: PROMPT • Press 0 to open flies.
CONDITIONS: KEYBOARD "00·
ACTIONS:
{
if((read_stream = fopen(UFD2IusrlbuffOl", "r")} == 0)
{
displaY....Prompt( .. Cannot open buff01. "};
pos_cursor(O, 21) ;
}
else
{
displaY""prompt('"BuffOl opened. ");
pos_cursor(O,16);
}
if((write_stream '" fopen("FD21usrlnewJile", "w")) == 0)
dispiays("Ca1'lnot open newJile.
else
displays(" New Jile opened. Press "sS" to set the file type.
}
CONDITIONS: KEYBOARD '$5·
ACTIONS:
{
ifLsetJile_type(UFD2IusrlnewJile", "PROM"} != 0)
displaY""prompt(UFile type not set. Press R to read buff01.
else
display....prompt("File type set. Press R to read buffOl.

") ;

n);

");

65-35

---------,------

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

CONDITIONS: KEYBOARD "rR"
ACTIONS:
{
n =fread(output, 1,6091. read_stream);
if(n 1= 6091)
displayyrompt("Either a read error has occurred, or an EOF has been
encoun tered.
");
else
displayyrompt(" Press W to write to newJile.
}

CONDITIONS: KEYBOARD ·wW·
ACTIONS:
{
n :;fwrite(output, 1,6091, write_stream};
if(n 1= 6091)
displayyrompt("Write error. Press C to close files.
else
displayyrompt("Write completed. Press C to close files.
}
CONDITIONS: KEYBOARD 'cC"
ACTIONS:
{
if(fclose(read_stream) f= 0)
{
displayyrompt("Either buff01 is already closed, or close cannot be executed.
pos_cursor(O,O) ;
}
else
{
displayyrompt(UBuffOl closed. "i;
pos_cursor(O,16);
}
if(fclose(write--stream) 1= 0)
displays ("Either newJile is already closed, or close cannot be executed.
else
displays ("New file closed.
}

");

");
");

-get-file-type
Synopsis
#include 
extern int ...8etJile_type(pathnameytr, type_buffytr);
char" pathnameytr;
char" type_buffytr;

Description
This routine determines the type of a specified file.

The first parameter is a pointer to a string. the name of the file. The filename
must be the absolute pathname, prefixed by the device name (HRD. FDt, or
FD2).

65-36

65 Disk 110

The second parameter is a pointer to an array in which the file type should be
written. See _setJile_type for the different file types.
Returns
If the operation succeeds. the routine returns zero; otherwise, it returns a

non-zero value.
Example

#include 
FILE" streamytr;
char type [8]:
}
LAYER: 1
STATE: find_type
CONDITIONS: ENTER_STATE
ACTIONS: PROMPT • Press G to get file type.
CONDITIONS: KEYBOARD "gG"
ACTIONS:

{
ifCgetJile_type("FD2IusrlnewJ!le", &type[OJ) f= 0)
displaYJTompt("File type not found.
else
displayf("Flle type=%s.

");

", type);

65-37

--

------

------------------------------------_._------------_.----_._-----_._---_._.

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

65-38

66 Status

66 Status
The structures and variables referenced in this section provide information about the current
status of the programmer's INTERVIEW. This information must be accessed via C coding on
the Protocol Spreadsheet since these structures and variables have no softkey equivalents.

66.1

Unit Configuration
Two strll<;tures presented in Table 66-1 may be accessed by the user to identify
current features of the INTERVIEW. unit_setup variables reflect current Line Setup
menu and FEB tick-rate selections. unit_conj'ig variables contain information about
the user's INTERVIEW hardware and software.

,~
I '

i

66.2 Current Display Mode
The variables display_screen_changed, crnt_display_screen, and prev_display_screen
track movement via softkey from one display screen to another. These variables also
indicate transitions between Run mode and Freeze mode. .They are documented in
Section 61. 1.

a6-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Table 66-1
Status Structures

Type

Variable

Value (hex/decimal)

Meaning

Structure Name; unIt_setup

Structure containing Une Setup and FEB tick-rate
salactlons. Daclared as type extern struet.
Referenoa mamber variables of the structure as
follows: unit_setup. speed_dee.

unsigned long

If Clock Source selactlon Is Internal. this variable
has Speed value entered on Une Setup. If Clock
Source Is External. this variable has DCE spaed
Indicated under Clock Source: Internal Split.

unsigned long

If Clock Source selection Is Internal, this variable
has Speed value entered on Una Satup. If Clock
Source Is External, this variable has DTE speed
Indlcatad under Clock Source: Internal Split.

unsigned long
a/10
64/100
3e8/1000

2710/10000
186aO/100000
14240/1000000

o

unsigned char

normal
normal-Inversa
reverse-normal
reverse-Inverse

1
2
3

unsigned char

blts-per_byte

5-8

unsigned char

clocking_type

o

Internal
external
Internal-spilt

1

2

o

unsigned char

disk
line

1
unsigned char

format

o

sync
bop
async
Isoc

1
2
3
unsigned char

mode

o

automonltor
monitor
emulate dee
emulate dte

1
2

3
unsigned char

parity

tick rate .elected on FEB Satup
10 usee
100 usec
1 msec
10 msec
1000 msec
1 sac

o

none
even
odd
mark
space

1

2
3
4

ASCII. EBCDIC. etc.

unsigned char

66-2

66 Status

Table 66-1 (continued)
Type

Variable

Value (hex/decimal)

Structure Name; unit_config

Meaning

Structure contalnlng unit configuration. Declared
as type extern struct. Reference member
variables of the structure as follows:
unlt_con fig . floppy_exists_mask.

unsigned char

floppy_exists_mask

1
2

floppy 1
floppy2t

unsigned char

hard_disk

o

not present
present

1

unsigned char
unsigned char
unsigned char

test_board
mux
modem

o
1

not present
present

o

not present

1

present

o
1

not present
present

0-4

number of MPM boards present

unsigned char

num_mpms

struct mpm_lnfo

mpm [4}

array of structures. Each element In the array Is
an instance of the structure mpm Info and
corresponds to one of four MPM boards which
may be present. Reference member variables of
the struoture elements in the array as follows:
unlt_oonfJg.mpm{Oj.present.

unsigned char

cpmJev

reserved

unsigned char

gbm_rev

reserved

unsigned char

pcmJev

reserved

unsigned char

modemJev

reserved

unsigned char

mux_rev

reserved

unsigned char

tim_type

fO/240

AS-232

11/241

X.21
V.35

12/242
f3/243
f4/244

15/245
f6-fbJ246-251
fo/252
fdf253
1e/254
ff/255

RS-449
expansion adaptor
RC-8245
reserved
ISDN

a.703
T1
none
the value of this variable plus one yields the CPM
memory size (In bytes)

unsigned long

(unit_conflg continued on next page)

,.~,

. I,

t

If (unicconfig.floppy_exists_mask & value) ..",value, the drive Is present.
For example. If (unlt_oonflg.floPPy-exlsts_mask & 2)
2. floppy drive 2 Is present .

=..

66-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-10B

Table 66.. 1 (continued)

Type
unsigned long

Variable

Meaning

Value (hex/decimal)

salCtest_errors

(mask)

self-test errors encountered during
power-uptt

1
2
4
8
10/16
20/32
40/64
80/128
1001256
200/512
400/1024
800/2048
1000/4096
2000/8192
4000/16384
8000/32768
10000/65536
20000/131072
40000/262144
80000/524288
100000/1048576
20000012097152
400000/4194304
800000/8388608
1000000/16777216
2000000/33554432
4000000/67108864
8000000/134217728
10000000/268435456
- 20000000/536870912
40000000/1073741824
80000000/2147483648

CPM DRAM error
CPM 32-blt counter
CPM System Timing Controller (9513a)
CPM DMAC
MPMO DRAM (tested from CPM-g!obal bus)
MPMO DRAM (tested from MPMO)
MPMO Interrupt latch
unused
MPM1 DRAM (tested from CPM-global bus)
MPMl DRAM (tested from MPM1)
MPM1 Interrupt latch
unused
MPM3 DRAM (tested from CPM-global bus)
MPM3 DRAM (tested from MPM3)
MPM3 Interrupt latch
unused
unused
unused
unused
unused
unused
unused
unused
unused
unused
unused
unused
unused
unused
unused
unused
unused

unsigned long

version

6

current value for this version of unlCconfig
structure

unsigned long

model_number

19c8/6600

INTERVIEW 6600
INTERVIEW 6800 TURBO
INTERVIEW 7000
INTERVIEW 7200 TURBO
INTERVIEW 7500
INTERVIEW 7700 TURBO

la90/6800
lb5817000

1020/7200
1d4c/7500

1e14/7700

(unlt_contlg contInued on next page)

==

tt If (unit contig.setf test errors & mask)
mask, the error is present.
If (Unlt=config.sett=tes(errors & Oxfffftfff) ..'" 0, no errors enoountered during power-up.

66-4

rr'

66 Status

."~'

Table 88-1 (continued)
Type
unsigned char

Variable
feb_type

0
1

3

original V8r8Ion
version WIth Increased speed of software and
faster ac0811 to tIckI from FEB
version which supports high-speed RAM
recordInQ, tp8CIftcaIIy aggregate T1 or G.703
data capture
version which allo IUPportS INTERVIEW 7200 and

0
1

7700 TURBOs
unit II not TURBO
unit It TURBO

2

unsigned char

Is_turbo

unsigned char

xdramJev_num

unsigned char

xdram§esent

XDRAM revision number
0

1

(t

Meaning

Value (hex/decimal)

XDRAM board II not present
XDRAM board II present

unsigned long

xdram_lo_addr

low end Of memory range

unsigned long
unsigned long

xdram_~_addr

high end of memory range

spare 1

reserved/undefined

unsigned long

spare2

relerved/undefined

unsigned long
unsigned long

spare3
spare4

reserved/undefined
reserved/undefined

unsigned long

spareS

reserved/undefined

unsigned long
unsigned long

sparee
spare7

reserved/undefined
r ..erved/undeflned

unsigned long

spareS

reserved/undefined

unsigned long

spare9

reserved/undefined

unsigned long

sw_verslon

software verslont1'1'

unsigned long

fw_verslon

firmware verslon1'1'1'
Structure containing information on specific MPM
board. Instance Of this structure for each MPM
board Is contained In array named
unlcconflg.mpm. Declared as type extern
struef.

SI[YG1Y[1 t41mii mpm_info

rev_num

MPM revllion number
speclflc MPM board (of four) not present
speclflc MPM board (Of four) present

unsigned char
unsigned char

present

unsigned long

lo_addr

low end of memory range

hLaddr

high end Of memory range

unsigned long

0
1

1'1'1'To dllplay the software v.,-sIon In the lame format presented on the main menu screen. S. 00 for example. use the
following format In a calf to dl8pllllyf (or trace!) :
dlsplsyf("%lu.%02/u%o·. ((unlcconflg.sw_veralon» 8)1100), ((unlcconflg.sw_veralon» 8}%1oo) ,
(ohar) (un/f_conflg.~_verslon & 0Xff)):

The same format may be used for p;-.sentatton of the firmware version.

INTERVIEW 7000 Series Advanced Proaramming: ATLC-107-951-108

66-6

57 Remote Port I/O

67 Remote Port I/O
The REMOTE RS-232 pon is a "spare" serial interface through which the programmer may
communicate with other equipment. The remote pan is located at the rear of the
1l\1TERVIEW next to the printer pan. (The REMOTE LED on the front panel of the
INTERVIEW is related to remote control of the unit. unimplemented at this time.)
Remote-port functions must be coded in C regions on the Protocol Spreadsheet. There are
no spreadsheet-token equivalents of the C variables and routines described in this section.
Use these variables and routines in either emulate or monitor mode to transmit and receive
data through the remote pan.
The remote-communications process on the CPM controls the flow of data between the user's
program and the remote port. When data is received through the remote pont this process
temporarily buffers it in a 2048-byte input queue. The user's program makes requests for
data from the input queue via the rmt-Eetc. rmt-Eetl. and rmt-Ects input routines discussed
below. When the remote-communications process receives a request, it removes data from
the queue and passes it to the task. If there are no outstanding requests at the time data is
received. it is discarded from the input queue-Le., data received between requests cannot be
retrieved. This is the default condition of the input queue.
To "lock" all received characters in the input queue, call rmt_Iock. When the input queue is
locked, the remote-communications process removes data only when 1) a user task has
requested data via the rmt-Eetc, rmt-Eetl, or rmt-Eets routine, 2) the input queue is full and
some data must be discarded in order for incoming data to be buffered. or 3) rmt Jlushi is
executed. "Unlock" the input queue with rmt_unlock. rmt_unlock. rmtJlushi, and
rmtJlusho are automatically executed whenever the INTERVIEW returns to Program mode.
NOTE: Although requests to receive (or transmit) data from more
than one task will be queued by the remote-communications
process, a single task can have only one such request outstanding
at a time.
Similarly, when the programmer wants to send data out the remote port, he calls rmtyutc,
rmtyuts, or rmtyutb. The remote-communications process temporarily places these requests
in an output queue before transmitting them through the remote pon.

67.1

Structures
There are no structures associated exclusively with remote functions.

67-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-10B

67.2 Variables
Table 67-1 lists the event variables specific to remote port I/O operations. Use most
of these variables to detect changes in the status of the input and output queues.
As data is received through the remote port. the remote-communications process
temporarily stores it in the input queue. Use rmt_input_not_empty,
rmt_input_almostJull, and rmt_input_over/low to monitor how full the input queue
is. When the input queue is "almost full," incoming data must be stopped in order
to prevent the queue from overflowing.

rmt_input_almost_empty and rmt_input_empty are significant events as the remote.
communications process takes data out of the input queue. These events indicate
that that the input queue is ready to accept more data.

67-2

67 Remote Port flO

Table 67-1
Remote Port 110 Variables

Type

Variable

Value (hex/decimal)

Meaning

extern event

True when a break (NULL with a
framing error) Is received
through the remote port. Line
SetUp oOhflgured for emulate or
monitor mode.

extern event

True when remote Input-queue
transitions from empty to not
empty. Beginning to receive
characters. Une Setup
configured for emulate or
monitor mode.

extern event

True when the remote
'input-queue transitions from
less than 3/4 full to 3/4 full as
data Is being put Into the queue.
Una Setup configured for
emulate or monitor mode.

extern event

True when remote input-queue
transitions from not full to full.
At this pOint. the oldest existing
data In the queue Is discarded
to make room for new data
coming In the remote port. Line
Setup configured for emulate or
monitor mode.

extern event

True when the remote
input-queue transitions from
more than 1/4 full to 1/4 full as
data Is being taken out of the
queue. Une Setup configured
fot emulate or monitor mode.

extern event

True when remote input-queue
transitions from not empty to
empty. All characters have
been read or disoarded. Line
Setup configured for emulate or
monitor mode.

extern event

rmt_output_empty

True when remote output-queue
transitions from not empty to
empty. All data output to the
remote port has been
transmitted. Una Setup
configured for emulate or
monitor mode.

67-3

-------------------,-----.-,----'''-----------,~--------------------

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

67.3 Routines
Remote routines fall into three categories. Input routines are used to read data
received from the remote port. Use output routines to transmit data through the
remote port. The last category of routines reads or sets parameters for the remote
port.

(A) Input Routines
Use rmtJetc, rmtJetl. and rmtJets to read data received through the remote
port. Use rmt_lock and rmt_unlock to control the flow of data from the input
queue.

Syngpsis
extern int
Iltt wait;

rml~etc(wait);

Description
The rmtJetc routine reads the next character (if present) from the remote port.

If no character is available from the input queue when rmtJetc is called. this
parameter determines when the routine will return. A non-zero value for this
parameter means wait for a character to become available before returning. If
another task has already requested data from the queue. this request will be
queued.

When the value is zero, the routine will return without a character if none is
available. If there is already an outstanding request from another task. a zero
value also causes the remote-communications process to return from the routine
without checking the input queue.

NOTE: More than one test (task) may request data from the
input queue. The remote-communications processes queues these
requests as they are made. To ensure that requests are processed
in turn. use this "wait" parameter consistently across tests. If you
set the parameter in a caH to rmtJetc (or rmtJets) in one test,
do the same in all tests.

67-4

67 Remote Port 110

Returns
If a, character is present in the input queue, this routine returns the character (as
an int) read. If no character is present and the routine's "wait" parameter is
zero, a -1 will be returned. When the parameter is zero, a -1 also will be

returned if there is already an outstanding request from another task.
Example

In the following example, the routine win not wait for a character to become
available in the remote port before returning. Each time the § key is pressed.
the next character. if present, will be displayed. If a -1 is returned instead of a
character, a message to that effect will be displayed on the prompt line.
LAYER: 1
ST ATE: geU"~xU::hllrl!leter
CONDITIONS: ENTER_STATE
ACTIONS:
{

display.,..prompt("Press C to get next character.

") ;

rmt_lock:.();

f~
i

}
CONDITIONS: KEYBOARD ·eCn
ACTIONS:
{

int character;
character'" rmtJetc(O};
ij(character :: -l}
display"'prompt("No character available.
else
displayj(" %c". character};

");

SYnopsis
extern int rmtJetl(string"'ptr. max_length};
char * string.,..ptr;
int max_length;

Description
rmt..,8etl reads from the remote pan one line at a time. This routine gets at the

mOSt the specified number of characters from the remote port and puts them in
an array. Unless a carriage return or line feed is encountered. the routine will
not return until the specified number of characters has been read. A carriage
retl;lrn or linefeed causes the routine to return, even if the specified number of
ch~racters has not yet been read. The carriage return or line feed will be
replaced by a terminating NULL character in the array.

67-5

INTERVIEW 7000 Series Advanced Programmlna: ATLo-107-951-10B

The first parameter is a pointer to the array into which the characters will be

put.
The second parameter is the .maximum number of characters to be read.

Returns
This routine returns the number of characters (preceding the terminating NULL)
read into the array.
Example

Each time the [Q key is pressed. twenty characters. at the most. will be read
from the remote pont put into an array called data. and displayed on the
screen.
LAYER: 1
STATE: read_Ine
CONDITIONS: ENTER_STATE
ACTIONS:
{

display"'prompt("Press L to get next line.
rmUoclr.();
}

CONDITIONS: KEYBOARD -IL·
ACTIONS:
{

int number;
unsigned char data [2SJ;
number = rmtJetl(data, 20);
display/("\'fI'l.u characters read:\n'l..20s\n", number, data);
}

Syngpsis
extern int rmtJets(string...ptr, length, wait);
char • string...ptr;
int length;
int wait;

Df!scdption'
Similar tonntJetl. this roUtine gets a specified number of characters from the
remote pOtt and puts them in an array. Unlike rmtJetl. characters continue to
be read even if a carriage return or linefeed is encoUntered. The array is not.~ ..
NULL-terminated.

67-6

67 Remote Port 110

The first parameter is a pointer to the array into which the characters will be
put.
The second parameter is the number of characters to be read.
If the specified number of characters is not available from the input queue when
rmtJetl is called, the third parameter determines when the routine will return.
A non-zero value for this parameter means wait for the specified number of
characters to become available before returning. If another task has already
requested data from the queue, this request will be queued.

When the value is zero, the routine will return with less than the specified
number of characters if all are not available. If there is already an outstanding
request from another task, a zero value also causes the remote-communications
process to return from the routine without checking the input queue.
NOTE: More than one test (task) may request data from the
input queue. The remote-communications processes queues these
requests as they are made. To ensure that requests are processed
in turn, use this "wait" parameter consistently across tests. If you
set the parameter in a call to nntJets (or rmtJetc) in one test.
do the same in all tests.

Returns
This routine returns the number of characters read from the remote port.

Example
When the lID key is pressed. 4000 characters will be read from the remote port.
put into an array called data. displayed on the screen (until a NULL is
encountered-see %$ in trace! routine. Section 61). and written to a file named
echo_time. This is the program that might be run to receive the file transmitted
in the rmt..putb example.
{

#041ne FILE_LENGTH 4000
#define FILENAME" FD 11 usrl echo_time"
#include 
#include u/. It>
extl!rn struct trace_but ll_trbu/.
FlU" streamytr;
sizl; t II;

unsigned char data [FILE_LENGTH};
int !count;

67-7

INTERVIEW 7000 Ser;es Advanced Programming: ATLC-107-951-108
LAYER: 1
STATE: get_string
CONDITIONS: ENTER STATE
ACTIONS:
{
rmt_lock ();
ij((streamytr:: jopen(FILENAME, "w"» == 0)
displaYJlrompt("Cannot open jile. ");
else
{
displaYJlrompt(" Press S to read string. ");
pos_cursor(l, OJ;
}
}
CONDITIONS: KEYBOARD "s5'
ACTIONS:
{
count = rmtJets(data, FILE LENGTH, 1);
i/(count != FILE_LENGTH} displayj("Could not read entire string. \n"};
tracej(&'ll_trbuj. "%d characters read: \n%s\n\n", count, data);
n = jwrite (data , 1, FILE_LENGTH. streamJltr);
lj(n 1= FILE_LENGTH)
displayj("A write error has occurred. \n");
else
displayj(" File written. \n");
ij(fclose(streamJltr) 1= 0)
displayj(UEither jite is already closed, or close cannot be executed. \n");
else
displayj("File closed. \n");

SynQpsis
extern int rmtJlushi();

Description
If characters have been received in the input queue, but have not been read yet.
this routine causes them to be discarded. Whenever the INTERVIEW enters or
leaves Run mode. rmtJlushi is automatically executed. This ensures that the
input queue is empty.

NOTE: A call to any of the routines which set the parameters of
the remote port also causes rmtJlushi to be executed
automatically. The routines which only get the current
parameters of the remote port have no effect on the input queue.
When the programmer calls rmtJlushi, requests for data from the input queue
will be processed before the input queue is flushed. When a call to rmtJlushi is
made from another test, however. input routines waiting for characters from the
input queue will be returned.

67-8

~

67 Remote Port 110

...

Returns

rmtJlushi returns a zero when the input queue is flushed successfully.
Otherwise, it returns a non-zero value.
Example
This example is the same as that for rmtJetc. Notice that as the program
enters the first state. the input queue is flushed.

x~
I .'

!

LAYER: 1
ST ATE: get_next_chara,cter
CONDITIONS: ENTER_STATE
ACTIONS:
{
displaY'yrompt(" Press C to get next character.
rmt_lockC);
rmtJlushi();
}
CONDITIONS: KEYBOARD ·oC·
ACTIONS:
{
int character;
character = rm t...,&etc (0) ;
if(character :=-1)
displaY'yrompt("No character available.
else
displayf(" 
#include 
extern struct trace_buf l1_trbuf;
FILE • stream...ptr;
size t 1'1;
unsigned char data IFILE_LENG1'H];
unsigned char size /FILE_LENGTHtlOOJ;
int count;
}
LAYER: 1
STATE: transmit string
CONDITIONS~ ENTER_STATE
ACTIONS:
{

i/«(stream...ptr z jopen(FILENAME, "r")) :.., OJ
displ(l.Y"'prompt (" Cannot open lile. " );

67-15

INTERVIEW 7000 Series Advanced ProgrammIng: ATLC-107-9S1-10B

else
pos_cursor(1 ,0);
n ;: fread(data, I, FILE_LENGTH, stream"'ptr);
if(n /= FILE_LENGTH)
displayf("Either a read error has occurred, or an EOF has been
encountered. \n",;
if(fclose(streamytrJ /= 0)
displayf("Either file is already closed, or close cannot be executed. \n");
else
display!("File closed. \n");
if(n == FILE_LENGTH)
displayyrompt("Press T to transmit characters. ");
}

}
CONDITIONS: KEYBOARD OtT"
ACTIONS:
{
count = rmt..,putb(data, FILE_LENGTH, 1);
if(count 1= FILE_LENGTH)
displayf("Could not output entire string. \11");
sprilltf(size, "%d characters transmitted: %%. %dH", COUllt, count);
tracef( &:l1_trbuf, size. data);
tracef(&:ll_trbuj, "\n\n");
}

rmt flusho
Synopsis
extern tnt rmtJlusho();

Description
If characters are queued to be output from the remote port. but have not been

transmitted yet. this routine causes them to be discarded. This ensures that
anything previously in the output queue port will be deleted.

rmtJlusho is automatically executed when the INTERVIEW returns to Program
mode.
NOTE: A call to any of the routines which set the parameters of
the remote port causes rmtJlusho to be executed automatically.
The routines which only get the current parameters of the remote
port have no effect on the output queue.

Returns

rmtJlusho returns a zero when the output queue is flushed successfully.
Otherwise, it returns a non-zero value.

67-16

67 Remote Port 110

Example
This example is the same as that for rmtyutc. Notice that as the program
enters the first state, the output queue is flushed.
{

unsigned char data fl ::: "«FOX))";
unsigned char character'
int i, length, error;
}
LAYER: 1
STATE: transmlt_a_oharaoter
CONDITIONS: ENTER_STATE
ACTIONS:
{

rmtJlushoO;
displaYJlrompt("Press C to transmit character.
length = sizeo!(data);

..) ;

}
CONDITIONS: KEYBOARD ·oC·
ACTIONS:
{
forO::: 0; i < length; i+t)
{

character" data[iJ;
error = rmtJlutc(character, 0);
if(error ==-i}
{
displaYJlrompt("No space available in output queue.
break;

l'l'
i

");

}

else
displayf(U % c", character);

Syno.psis
extern int rmt_suspendo();

Description
If characters are queued to be output from the remote pan, but have not been
transmitted yet, this routine causes transmitting to be suspended. The output
queue will not be flushed. Use this routine only when the remote pon
handshaking mode is full-duplex without flow control.

Returns
,.~\

, I
i

rmcsuspendoreturns a zero when transmitting is successfully suspended.
Otherwise, it returns a non-zero value.

67-17

INT£RVI£W 7000 Series Advanced Programming: ATLC-107-951-10B

Example
When the INTERVIEW receives an X-OFF as a signal to stop sending data, it
will suspend transmissions from the remote port.

extern event rmt_input_not_empty;
int character;
}

LAYER: 1
STATE: suspend_output
CONDITIONS: ENTER_STATE
ACTIONS:
{
rmt_loclc();
}
CONDITIONS:
{
rmt_input_not_empty
}
ACTIONS:
{
character = rmtJetc(1);
if(character == Ox13)
rmt_suspendo();
}
TIMEOUT ckJnput RESTART 0.00'
CONDITIONS: TIMEOUT ok_Input
ACTIONS:
{
character = rmtJetc(1);
if(character
Ox13)
rmt_suspendo();
}
TIMEOUT ckJnput RESTART 0.001

==

rmt resumeo
Synopsis
extern int rmtJesumeo();

Description
This routine resumes transmission of characters from the remote port. Use this
routine only when the remote port handshaking mode is full-duplex without flow
control.
Returns

rmt_resumeo returns a zero when transmitting is successfully resumed.
Otherwise, it returns a non-zero value.

67-18

67 Remote Port 110

Example

When the INTERVIEW receives an X-ON as a signal to send data. it will
resume transmissions from the remote port.
{

int character;
}
LAYER: 1
ST ATE : resume_output
CONDITIONS: ENTER STATE
ACTIONS:
{

rmUock();
}
TIMEOUT RESTART ok Input 0.001
CONDITIONS: TIMEOUT oheek Input
ACTIONS:
{

character:: rmtJetc(1);
if(character :::: Oxll)

rmt_,esumeo 0;
}
TIMEOUT ok_Input RESTART 0.001

Synopsis
extern int rmt_send_break(wait);
int wait;

Description
This routine causes a break. queued as other transmits, to be transmitted.

If space in the output queue is not available for the break when rmt_send_break

is called, the only parameter determines when the routine will return. A
non-zero value for this parameter means wait for space in the output queue to
become available and return zero when the break is in the queue. If there is
already a request from another task. this request will be queued.

'j"

When the value is zero and. space in the output queue is not available, the
routine will return - L The break will not be in the queue. If another task is
already waiting for access to the output queue, a zero value also causes the
renaOle-communications process to return from the routine without checking for
available space in the output .queue.

i

67-19

__

,-------,--,--------------------_. ._.•._----_.

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

NOTE: More than one test (task) may request to send data to
the output queue. The remote-communications processes queues
these requests as they are made. To ensure that requests to
output data are processed in turn, use this "wait" parameter
consistently across tests. If you set the parameter in a call to
rmt_send_break (rmtyutc, rmtyuts or rmtyutb) in one test, do
the same in all tests.

Returns
If the break is successfully written to the output queue, the routine returns zero.
If no space is available in the output queue and the routine's "wait" parameter
is zero, a -1 will be returned. When the parameter is zero, a -1 also will be
returned if another task is already waiting for access to the output queue.

Example
In this example. a break will be transmitted each time the operator presses the
space bar.
LAYER: 1
STATE: transmit_break
CONDITIONS: KEYBOARD' •
ACTIONS;
{
rmt_send_break(l) ;

}

(C) Configuration Routines
The default configuration for the remote port at boot-up is the following:
Baud rate = 1200
Bitslcharacter = 8
Parity = None
Mode = Full-duplex
Use the first four routines discussed below to change these settings. The
programmer's reconfiguration of the remote port is not affected when the
INTERVIEW exits or re-enters RUn mode.
A call to any of these set routines causes rmtJlushi and rmtJlusho to be
executed automatically before the parameter is set.
Use the remaining four routines to read the current parameter-settings for the
remote port. These get routines have no effect on the input and output queues.

67-20

~.

~

67 Remote Port 110

I

,i

Syncmsis
extern int rmt_set_baudJQte(speed);.
int speed;

Description
This routine sets the baud rate for the remote port. The default value at
boot-up is 1200.
NOTE: A call to rmt_setyaudJate causes rmtJlushi and
rmt Jlusho to be executed automatically before the baud rate is

set.

The only parameter is the desired baud rate. Values that are multiples of 300 in
the range 300 through 19200 are valid.
Returns
If the specified baud rate is valid and successfully set, zero is returned. If the
baud rate is valid. but not successfully set. -1 is returned. For an invalid baud
rate, the routine returns -2.

ExaPJDle
In order for two devices to communicate with each other. they must be using the
same baud rate. When they are not the same. some devices send a break as a
signal for the other to adjust its baud rate. If the following example. the
11\1"fERVIEW will change the baud rate for the remote port whenever a break is
received.

extern ewmt rmt_break.;
int error;
int speed = JOO;
}
LAYER: 1
STATE: adjust_baudJate
CONDITIONS:
{

rmt_break
}

67-21

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

ACTIONS:
{
error = rm t_set_baud_rate (speed) ;
ij(error !: -l}
{
speed *= 2;
ij(speed> 19200)
speed = 300;

else
displayj(" Unable to set the baud rate to %d.". speed);
}

SynAPsis
extern int rmt_set_hits(va/ue);
int value;

Description
This routine sets the number of bits per character for the remote port. The
default setting at boot-up is 8 bits/character.
NOTE: A call to rmt_set_bits causes rmtJlushi and rmtJlusho
to be executed automatically before the number of bits/character
is set.

The only parameter is the number of bits/character. Valid values are five
through eight.

Returns
If the specified number of bits/character is valid and successfully set, zero is
returned. If the number is valid, but not successfully set. -1 is returned. For
an invalid value, the routine returns -2.

Example
In this example, the number of bits/character for the remote port is set to 7 and
displayed on the Display Window screen.
LAYER: 1
STATE: set_parameters
CONDITIONS: ENTER_STATE
ACTIONS:
{
displayj("Bits'" %d ", rmt_set_hits(7));
}

67-22

r~,
I"

67 Remote Port 110

Synopsis
extern int rmt_setyarity(parity);
int parity;

Description
This routine sets the parity for the remote port. The default setting at boot-up
is no parity.
NOTE: A call to rmt_setJarity causes rmtJlushi and
rmtJlusho to be executed· automatically before the parity for the
remote port is set.

The only parameter is a value designating the desired parity. Valid values are
the following: none (0), odd (1). even (2), mark (3), or space (4).

~.
I

Returns
If the specified parity value is valid and successfully set, zero is returned·, If the
value is valid, but not successfully set, -1 is returned. For an invalid parity

value, the routine returns -2.
Example
In this example, the numberofbits/character for the remote port is set to 7 and
parity is even. Both settings are displayed on the Display Window screen.
LAYER: 1
STATE: setJ)srameters
CONDITIONS: ENTER_STATE
ACTIONS:
{
displayf(" Bits %d Parity %d ", rmt_stt_bits(7) , rml_setyarity(2));
}

=

=

67-23

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

rmt- set mode
-"~,

SynQPsis
extern int rmt_set_mode(mode);
int mode;

Description
This routine sets the handshaking mode for the remote port. The default setting
at boot-up is FOX with no flow control.
NOTE: A call to rmt_set_mode causes rmtJlushi and rmtJlusho
to be executed automatically before the mode for the remote port
is set.

The only parameter is a value designating the mode. Valid values are the
following:

o :: Full-duplex with no

flow control (FOX)
1 == Half-duplex (HOX)
2 = Full-duplex with X-ON/X-OFF characters for flow control
3 Full-duplex with OTR and CTS EIA leads for flow control. Use a
special null-modem cable for direct connections. See Figure 67-1.

=

Chassis Ground

1

TO

2

RD

3

RTS

4

CTS

5

Ground

7

---

CO

8

OTR

20

--

..
-,..

1

Challllis Ground

3

RO

2

TO

8

CD

20

-

~

OTR

7

Ground

4

RTS

5

eTS

Figure 67-1 Null-modem cable connections.

Returns
If the specified mode value is valid and successfully set, zero is returned. If the
value is valid, but not successfully set, -1 is returned. For an invalid mode
value, the routine returns -2.

67-24

67 Remote Port 110

Example
In this example. the number of bits/character for the remote port is set to 7,
parity is even, and the mode is set for FDX with X-ON/X-OFF. All three
settings are displayed on the Display Window screen.
LAYER: 1
STATE: set_parameters
CONDITIONS: ENTER_STATE
ACTIONS:
{
display!(" Bits = %d Parity '" %d Mode:: % d ". rmtjet_bits(7).
rmt_setyarity(2) , rmt_set_mode(2));

SYnQPsiS

Description
This routine gets the current baud-rate setting for the remote port.
Returns
The baud rate for the remote port is returned.
Example
As the program begins, the current baud-rate setting for the remote port is
displayed on the Display Window screen.
LAYER: 1
STATE: baudJate
CONDITIONS: ENTER_STATE
ACTIONS:
{
display!("Baud:: %d ", rmtJet_baud_rate();
}

Synopsis

Description

This routine tens how many bits there are per character. Possible values are five
through eight.
Returns
The current number of bits per character for the remote port is returned.
i

67-25

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Example
In this example, the current baud-rate setting and the number of bits/character
for the remote port are displayed on the Display Window screen.
LAYER: 1
STATE; current_parameters
CONDITIONS: ENTER_STATE
ACTIONS:
{
display!("Baud = 'rod Bits;::: 'rod ", rmtJet_boud_rate(), rmtJet_bits();
}

Syn01'sis
extern int rmIJet.yarity();

Description
This routine gets the current parity setting for the remote port.
Returns
The current number of bits per character for the remote port is returned.
Example
In this example. the current baud-rate setting, number of bits/charas:ter, and the
parity for the remote port are displayed on the Display Window screen.
LAYER: 1
ST ATE: current_parameters
CONDITIONS: ENTER_STATE
ACTIONS;
{
dtsplay!("Baud:: %d Bits'" %d Parity;::: %d ", rmtJet_baudJateO.
rmtJet_bitsO, rmtJet.J1arity();

SynQl?sis
extern int rmtJet_mode();

Description
This routine gets the current handshaking mode for the remote port.

67-26

67 Remote Port I/O

Returns
The current handshaking mode for the remote port is returned:

o = Fun-duplex with no flow control

(FDX)
1 = Half-duplex (HDX)
2 = Full-duplex with X-ON/X-OFF characters for flow control
3 = Full-duplex with DTR and CTS EIA leads for flow control Requires
a special null-modem cable for INTERVIEW-to-INTERVIEW direct
connections. Refer to Figure 67-1.

Example
In this example, the current baud-rate setting. number of bits/character. parity,
and handshaking mode for the remote port are displayed on the Display Window
screen.
LAVER: 1
ST ATE: current_parameters
CONDITIONS: ENTER_STATE
ACTIONS:
{
display/("Baud = 'fed Bits'" 'fed Parity:: 'fed Mode. '" 'fed ", rmtJf!t_baudJateO,
rmtJet_bitsO. rmtJttyarlty()' rmtJet_mode 0 );
}

67-27

JNTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

67-28

68 AUX Port 110

68 AUX Port I/O
fT~'
,

68-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Bit Number
Transmitter's
AUX Port Lead
Configuration
Pin Number

14

15

I

0

16

13

11

12

10

9

8

7

6

5

4

3

2

1

0

I I I I I I IlIcl I I I I I I I I
0

0

0

14

12

10

8

6

4

2

15

13

11

0

0

0

9

7

5

3

0

0

Bit will be
used for

C

U

U

U

U

U

U

C

D

D

D

D

D

D

D

D

Bit Number

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

II

~~~;i~~S:~e:d I"C I
Pin Number

16

14

12

10

I

I
8
0
I
IIC
C
D
U

I

I I I I I
0

6

4

2

15

13

11

I I I I I
9

7

Output/Non-control
Input/Non-control
Input/Control
Control
Data
Unassigned

Figure 68-1 Sample AUX port lead configurations for two INTERVIEWs connected by their AUX
interfaces. Assume one-way data transmission (Le., one device is controlling the other).

68-2

5

3

~,

68 AUX Port I/O

i

68 AUX Port I/O
The Auxiliary (AUX) port is a "spare" interface through which the programmer may
communicate with other lab equipment. The AUX port is located at the rear of the
INTERVIEW, between the printer and ROB connectors. It is controlled by a Zilog CIO
(Counter/Timer, Parallel Input/Output Unit) chip. The AUX port may be used as a serial or
parallel interface. When it is operated as a parallel port, up to sixteen bits (one bit on each
of sixteen leads) may be transmitted simultaneously.
A UX -port control must be coded in C regions on the Protocol Spreadsheet. There are no
spreadsheet-token equivalents of the C variables and routines described in this section.
A normal configuration of equipment using the AUX port will involve two INTERVIEWs with
AUX port setups that mirror each other to some extent, as in Figure 68-1. The transmitting
INTERVIEW will use one of its output leads as a "strobe" to signal to the receiving
lI'o.'TERVIEW that an AUX word is available to be read. The receiver will detect this strobe
as an aux_changt event.
The receiving INTERVIEW will use one of its output leads to acknowledge each AUX word
received. The transmitting INTERVIEW will detect this acknowledgment as an aux_change
event.
NOTE: The AUX port is not controlled by the same CPU that
handles the user program. The need for interprocessor
communication without data buffering makes rapid, successive
transmissions difficult to handle. It is recommended. therefore,
that control bits be set aside for flow control-a bit set by the
transmitter as input/control is set by the receiver as
output/non-control, and vice versa-and that every output word
be acknowledged before a succeeding word is output.

68.1

~,

. I

Variables
Table 68-1 lists the variables specific to AUX I/O operations. The fast-event
variable, aux_change, detects a change in a lead that has been configured as a
control lead. Any or all of the sixteen leads in the interface may be designated
control leads. Section 68.2 explains how to configure control leads .

68-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

aux_change does not establish which control lead(s) has changed. Two associated
variables, curr_aux_value and prev_aux_value, indicate the status of aU sixteen leads.
These are two-byte (short) variables. Each lead is represented by a different bit in
the short. If the bit-value of a given lead is zero, the lead is on. If the bit-value is
one. the lead is off.
Whenever a control lead changes, the value in curr_aux_va/ue is written to
prey _Qux_value. Then curr_aux_value is updated.

Table 68..1
AUX Port 110 Variables
Type

Variable

Meaning
True when the status of a lead
designated as control (and
Input) changes. Is automatically
made to come true by the CIO
chip as soon as leads have been
configured via set aux direction
and set aux cU leads routines.
Therefore, condition must be
tested again in a different state.
Una Setup configured for
emulate or monitor mode.
Each bit designates a different
lead. A bit-value of one
Indicates a given lead Is on.
When value of curr aux value Is
exclusive ored
With prev aux value, result indicates
those leads whose status has
changed. Updated when
aux change comes true. Une
Setup configured for emulate or
monitor mode.

extern volatile const unsigned short

n

Value of previous
curr aux value. Updated when
control leads change. but only
after logic has had a chance to
compare ourrent and previous
leads. Line Setup configured
for emulate or monitor mode.

extern volatile const unsigned short

68-4

~\
,
I

68 AUX Port I/O

,

68.2 Routines
In the examples for the following routines, assume that two Il\TTERVIEW's are
connected and that data flows in one direction.

CAUTION: You may damage the AUX interface if the same lead
is designated as output on both units. We suggest that you set
the leads on each unit as input/output and control/non-control
before you connect the AUX interfaces. See Figure 68-1.

set aux direction
Synopsis
extern void set_aux_direction (input_or_output);
unsigned short input_or_output;

~.

Ii

I '
I

DeSCription
This routine designates leads on the AUX port as input or output. Designated output
leads for the transmitter are set as input leads by the receiver.

The only input is a sixteen-bit variable. Each bit in the variable designates one lead
and may be set to zero (output) or one (input).
Example
Both sides of the connection may be transmitter or receiver. But for simplification in
examples, let's designate only one side as the transmitter and the other as the
receiver. In this example, the transmitter sets all 8 bits of the low-order byte as
output bits for data, the low-order bit of the high byte as input (for handshaking),
the next 6 bits of the high byte as input (unused), and the high-order bit as output
(the receiver will designate this bit as input for handshaking).
LAYER: 1
STATE: set Input leads
CONDITIONS: ENTER_STATE
ACTIONS:
{
set_aux_directton (Ox7fOO);
}

68-5

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

The other (receiver) INTERVIEW sets a bit as input (for handshaking). It must be
one that was designated as output by the transmitter, the highest-order bit of the high
byte. The data bits set as output by the transmitter must be set as input by the
receiver. The receiver's set_aux_direction routine would look like this:
LAYER: 1
ST A TE: setJnputJeads
CONDITIONS: ENTER_STATE
ACTIONS:
{
set_aux_direction (Oxlelf);
}

Syno,psis
extern void set_aux_ctl_leads(ctl_or_not);
unsigned short ctl_or_not;

Description
This routine determines whether or not leads will be control leads. Control leads
must also be input leads, but input leads do not necessarily have to be control leads.
Output leads can never be control leads.

The only input is a sixteen-bit variable. Each bit in the variable designates one lead
and may be set to zero (non-control) or one (control).
Example
Assuming the input/output bits set in the previous example, the transmitter sets all 8
data bits (output) as non-control, the low-order input bit of the high byte as control
(for handshaking), the next 6 input bits of the high byte as non-control (unused),
and the high-order output bit as non-control (the receiver will designate this bit as
control for handshaking).
LAYER: 1
STATE: set_controUeads
CONQITIONS: ENTER_STATE
ACTIONS:
{
set_aux_ctl_leads (OxOIOO);
}

68-6

68 AUX Port JlO

The "receiver" INTERVIEW sets one input bit as control for handshaking purposes.
It must be one that was designated as output by the transmitter, the highest-order bit
of the high byte. The receiver's set_aux_ctl_Jeads routine would look like this:
LAYER: 1
STATE: set_controlJeads
CONDITIONS: ENTER_STATE
ACTIONS:
{
set_aux_etl_Ieads (Ox8000);
}

write_aux
Synopsis
extern void write_aux(output_word);
unsigned short output_word;

Description

i~"
I

This routine sends a combination of data, control, and (perhaps) unused bits as
output. Input bits are not transmitted by the CIO.

The only input is a sixteen-bit variable. Each bit designates one lead and may
represent data or control information. or be unused. If a given lead was designated
as a control lead. it is an input lead and the CIO will not transmit the status of the
bit in any case, so its setting of 1 or 0 does not matter, If the lead was designated as
a non-control lead. it might contain data, be unused. or contain an alternating value
to indicate acknowledgment (if the other side designated it as a control lead).
Example
The transmitting Il'.'TERVIEW is going to send data to the receiving INTERVIEW.
Before the next transmission can be sent. an aCknowledgment must be received. The
acknowledgment is detected by the fast-event variable aux_change.

NOTE: The CIO chip automatically generates a true aux_change
condition when the set_aux_ctl.Jeads routine has been executed.
The aux_change condition. therefore. should be placed in a
separate programming state from the set_aux_ctl_leads routine.

68-7

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

The transmitter's program might look like this:
LAYER: 1
{
extern fast_event aux_change;
extern volatile const unsigned short curr_aux_value;
liD/a tile unsigned short curr;
unsigned short mask;
unsigned char data;
}
STATE: configure Jeads
CONDITIONS: ENTER_STATE
ACTIONS:
{
set_aux_direction (Ox7fOO):
set_aux_ctl_leads(OxOJOO) ;
curr = curr_aux_value;
data = OxOl;
mask = curr ~ Ox8000;
displaY"'prompt("Connect cable. Press spacebar to transmit.
pos_cursor(J ,0);
}
NEXT_ STATE : send_data
STATE: send_data
CONDITIONS: KEYBOARD"
ACTIONS:
{
if(data <= 10)
{
write_aux(mask I data);
displayf("Transmission %d waiting for ACK.
}

") ;

\n", data);

}

NEXT_STATE: waiting
STATE: waiting
CONDITIONS: {aux_change}
ACTIONS;
{
datat+;
mask = (mask· OxBOOO);
displayf("ACK received: %04x Press spacebar to transmit.
}
NEXT_STATE : send_data
CONDITIONS: {data> IO}
ACTIONS:
{
display"'prompt("End of test.
}

68-8

\71", curr);

68 AUX Port 110

The receiver's program would look like this:
LAYER: 1
{
extern fast_event aux_change;
extern volatile const unsigned short curr_oux_value;
volatile. unsigned short curr;
unsigned short mask;
int count;
}
STATE: oonflgure_leads
CONDITIONS: ENTER_STATE
ACTIONS:
{
set_ aux_direction (Ox/e/f);
set_aux_ctl_Ieads(Ox8000);
}
CONDITIONS: {aux_change}
ACTIONS:
{
curr:: curr_aux_value;
count = 1;
mask" curr OxOJOO;
displayyrompt("Connect cable. Ready ta receive.
pas_cursar(l,O);
}
NEXT_STATE: reoeive_data
STATE: receive_data
CONDITIONS: {aux_change}
ACTIONS:
{
display/("Transmission %d received: %04x Press spacebar to send ACK.
caunt, curr);
}
NEXT_STATE: send_8ok
CONDITIONS: {count> 1O}
ACTIONS:
{
displayyrampt("Elld of test.
}
STATE: send_8ck
CONDITIONS: KEYBOARD
ACTIONS:
{
if(caunt <= 10;
{
write_aux(mask);
caullt++;
mask = (mask ~ OxOlOO);
}
}
NEXT_ STATE: reoeive_data
A

H

"

68-9

");

\1/",

"):

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

NOTE: If you designate more than one lead as control. you
might need to compare prev _aux_value with curr_aux_value to
determine if the lead you are interested in is the one that
changed. Here, since there is only one input-control lead on
each side. the event aux_change is sufficient to signal and to
acknowledge transmission. The value of prev_aux_value does not
have to be checked.

SynQPsis
extern void set_aux_reg(reg_value_word);
unsigned short reg_value_word;

Description
The CIO chip may be reconfigured by the user via the set_auxJeg routine.
NOTE: At present. the initial configuration of the Master
Interrupt Control Register is (Ox0082). The initial configuration
of the Master Configuration Control Register is (Ox0194).

The only input is a sixteen-bit variable. The high byte is the CIO register number;
the low byte is the value to store in the register number. For register numbers and
their values. consult Appendix B in Zilog's Z8036 Z-CIO/Z8536 CIO Counter/Timer
and Parallel JlO Unit Technical Manual. March 1982.
ExampJe
The Master Configuration Control Register allows for selective enabling/disabling of
the CIO ports. Port A's input/output is reflected in the least-significant byte of
reg_value_word. Port B's input/output is reflected in the most-significant byte of
reg_value_word.
NOTE: Port C of the CIO chip is used internally and is not
available to the user of the I1\7ERVIEW.

68-10

68 AUX Port 110

Suppose you want to disable port B input, output. and interrupts (ports A and C
enabled) in one state, and in another state restore the original configuration (ports A,
B, and C enabled):
LAYER: 1
ST A TE : reconfigure_chip
CONDITIONS: ENTER_STATE
ACTIONS:
{
set_auxJeg(Ox0114};
}
STATE: restore_orIginaLconfig
CONDITIONS: ENTER_STATE
ACTIONS:
{
set_auxJ€g(Ox0194) ;
}

68-11

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

68-12

69 Other Library Toots

69 Other Li,brary Tools
The C structures. variables. and routines in this section provide additional programming tools
not specific to any particular protocol. Most of these tools approximate layer-independent
conditions or actions. Refer to Section 27 for more detailed explanations of the purposes of
specific conditions and actions. Sometimes the name of the variable or routine is sufficient
for identifying its related spreadsheet token. When this is not the case, the information is
provided below.

69.1

Structures
Use the structures tm, cmt_tm, and preY_1m listed in Table 69-1 to monitor the
current and previous date and time. Each minute the values in emt_tm are copied
to prev_tm. Then cmt_tm is updated. These structures are used to produce the
date/time displays at the top of Run-mode screens and the DateJTime Setup screen.
The variables jlag_struct.prev, jlaLstruct.current, and flagjtruct.old (in the
structure) are used each time a flag is incremented, decremented, or set
to a pamcular value. The current. previous, and old values these variables represent
work the same way as their counterparts in the counter structure, discussed fully in
Section 62.1(A).

jlag_stn~ct

NOTE: The purpose of flags is to make it easy for the user to
isolate selected bits in a variable. The translator does most of the
work of flags by taking the user's flag masks and coding them in
C. Flags constructed entirely in C bypass the translator and
require the programmer to create the flag-mask code normally
generated by the translator.

Before using the timeout routines included in this section, declare an instance of the
timeout structure shown in Table 69-1. Refer to the timeout_restart_action and
timeout...,.stop_actio1'l routines for examples of how to use this structure.

~,
Y

I

The keyboard structure stores the value of the most recent ASCII key used. The
structur~ variable keyboard. value is updated only by the fast-event variable
keyboara_new_key.

i

- -.... --.. -

69-1

......

---..----..---- .. --.-----.------.------.---.-----.--------.----

----

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Table 69·1
Structure Fields-Other Library Tools
Type

Variable

Deolared as type extern struct. Declared
automatically If program KEYBOARD condition Is
used. Updated by keyboard new key event
variable. Reference the structure-variable as
follows: keyboard. value.

Structure Name: keyboard

char

Meaning

Value (hex/decimal)

ASCII value of key just executed.

value

Structure Name; tm

Structure of time of day. Declared as type
extern struct. Reference a structure variable as
follows: em. tm _sec.

int

tm_sec

0-3bIO-S9

Seconds after the minute. Not currently
updated; always set to -1.

Int

tm_mln

0-3bJO-S9

Minutes after the hour.

Int

tm_hour

0-1710-23

Hours since midnight.

Int

tm_mday

1-1ff1-31

Day of month.

Int

tm_mon

O-b/O-11

Months since January.

int

tm_year

Int

tm_wday

0-6

Days since Sunday. Not currently updated;
always set to -1 .

Int

tm_yday

0-16d/O-36S

Days since January 1. Not currently updated;
always set to -1 .

Int

tmJsdst

Years since 1900.

Daylight Savings Time flag. Not currently
updated; always set to -1.

Structure Name: crnt_tm

Structure of current time of day. Updated every
minute. Declared as type extern struct tm.

Structure Name: prev_tm

Structure of previous time of day, one minute
ago. Declared as type extern struct tm.

Structure Name: flag_struct

Structure of a flag. Declared as type struct.
Declared automatically If a program flag is used.
Program flags assigned to structure as follows:
struct flag struct flag name. Reference a
structure variable as follows; flag_name. current.

unsigned short

prey

When converting a flag action to C, the translator
compares prey with current to determine
Whether flag has changed, Then prey is updated
to current and flag_name_ohange is signaled,

unsigned short

current

This value of flag Is acted on directly by program
actions.

unsigned short

old

When converting a flag condition to C, the
translator compares old with current to
determine whether true condition Is new
(transitional,. After program logic has examined
flag. old is updated to prevo

69-2

69 Other Ubrary Toofs

Table 69-1 (continued)
Type

Variable

Value (hex/decimal)

Structure Name: timeout

Meaning
Structure of a timeout. Declared as type struct.
Declared automatically If a program timeout Is
used. Program tlmeouts assigned to structure
as follows: struot timeout name. Reference a
structure variable as follows:

tlmeout_name.event_ld.
unsigned long

Four bytes of a S-byte timeout. containing the
segment number and offset.
Timeout_nama_stop routines set this event id to
zero.
Two bytes of a 6-byte timeout which uniquely
Identify (uld) the timeout. 00 not try to assign a
valtle to this varIable.

eventJd

unsigned short

69.2 Variables
All of the variables in Table 69-2 are valid in either emulate or monitor mode.

(A) Monitoring Events
The event variables in Table 69-2 are fevar_time_of_day, Ila8_name_change.
timeout_name_expired, signal_name, keyboard_new_key, and
keyboard_new_any_key.
Event variable levar_time_ol_day comes true once a minute. An example of
how to use this variable is provided in Section S4.1. This event variable is pan
of the spreadsheet TIME condition.
The event variable keyboard_new_key is used by the translator in a spreadsheet
KEVBOARD condition. It comes true when any ASCII key is pressed. The event
keyboard_new_any_key, on the other hand. comes true when an ASCII or other
keyboard key is pressed. The only keys which will not trigger this event are ~,
rmfJ. [ITJ-!§J sonkeys. and [§3.

(8) Status Variables
Status variables are those in Table 69-2 that do not include event in the Type
column. Their associated event variables guarantee that they are updated and
tested.
Time and date variables are updated by levar_time_ol_day. Variables
crnLtime_ol_day, prev_time_oLday, crnt_date_ol_day, and prev_date_of_day
are' older versions of variables that belong to the crnt_tm and prev_tm structures.
The C translator uses these older versions when it construct time-of-day
conditions (e.g., CONDITIONS: TIME 1614).
The status variable keyboard_any_key is updated by the fast-event variable
keyboard_new _any_key.

69-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-10B

Table 69·2
Other L.ibrary Variables

Type

Variable

Value (hex/decimal)

Meaning

extern fa5t_event

True once per minute. linEr
Setup configured for emulate or
monitor mode.

extern event

This event must be signaled by
the program Itself; It Is not
~extemal' to the program. The
translator signals this event as
part of the FLAG Increment,
decrement. or set action. Line
Setup configured for emulate or
monitor mode.

extern event

timeout_name _expired

This event must be signaled by
the program Itself. It is not
"external" to the C program.
The translator signals this event
as part of the
timeout restart action routine.
Line Setup configured for
emulate or monitor mode.

extern event

signaLname

True when the named signal is
the argument In a signal routine.
Spreadsheet-token equivalent Is
ON_SIGNAL name. Line Setup
configured for emulate or
monitor mode.

extern volatile unsigned short

0-937/0-2359

Current time is stored In this
variable. Updated as soon as
time changes. Line Setup
configured for emulate or
monitor mode.

extern volatile unsigned short

0-93710-2359

Current time is stored in this
variable. Updated when time
changes, 'but only after logic
has had a chance to compare
current and previous time. Line
Setup configured for emulate or
monitor mode.

extern volatile const unsigned char

1-1fI1-31

Current date Is stored In this
variable. Updated as soon as
date changes, Line Setup
COnfigured for emulate or
monitor mode.

extern volatile canst unsigned char

1-1fI1-31

Current date Is stored in this
variable. Updated when date
ohanges, but only after logic
has had a chance to compare
current and previous date. Line
Setup configured for emulate or
monitor mode.
True when any ASCII key is
pressed. Line Setup configured
for emulate or monitor mode.

extern fast_event

69-4

69 Other Ubtary Tools

Table 69-2 (continued)
Type

Variable

Value (hex/decimal)

Meaning

True when any key is pressed.
The only exceptions are ~.
£fill, lfiJ-iHJ softkeys. and ~.
Une Setup configured for
emulate or monitor mode.
Identifies last key or
key-combination exeouted. Line
Setup configured for emulate or
monitor mode.

extern volatile unsigned short

0-7f/O-127
eO-17f1

ASCII keys

128-383
180/384
181/385
182/386
183/387
184/388
185/389
186/390
187/391
18a/394
18b/395
18c/396
18d/397
18e/398

18f/399
190/400
191/401
192/402
193/403
194/404
195/405
196/406

10d/269
1aO/416
1a1l417
Editing Keypad Keys:
1a2/418
1a3/419

1a4/420
1a5/421
1a6/422
1a7/423
1a8/424

69-5

mrJ
till
~

•

8-~

E!!J-f&II

8-fIfI

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Table 69-2 (continued)
Type

Variable

Value (hex/decimal)

(keyboard_any_key continued)
1a9/425
1aa/426
lab/427
1ao/428
1ad/429

Meaning

Editing Keypad Keys (oont):

~-~
~-~
~-a
~-Etila
~-mm
Utility Keys:

1bO/432
lbl/433
1b2/434
lb3/435
1b4/436
lb5/437
1b7/439
1b8/440
1ba/442
lbb/443
lbo/444
1bd!445
lbe/446
lbf/447
100/448
101/449
102/450
1c3/451
1c4/452
1c5/453
1c6/454
107/455
108/456
109/457
1ca/458
1cb/459
100/460
10d/461
1ce/462

8

{3

8
8

~

8

IMNTI

~

o

8-0

~-o

8-8
~-8

8-8
S-8

8-8
8-8
8-8

~-8
8-~
~-8

8-8
~-8
8-~
S-~

8-1-1
S-I-I

8-§]
~-§J

Pure Cursor Keys:

ldO/464
ldl/465
ld2/466
1d3/467
1d4/468
ld5/469
ld6/470

69-6

ffl

8-00
~-ffl

8

8-8
S-8
~

,ff~
!

69 Other Ubrary Tools

[

Table 69·2 (continued)
Type

Variable

Value (hex/decimal)

(keyboard_any_key continued)
1d7/471
1d8/412
1d9/473

Meaning

Pure Cursor Keys (cont);

8-8
~-~

8

1da/474
1db/475
1dc/476
ldd/477
1de/478

8-8

180/480

III

S-f3
@
E!!J-@
~-@

Cursor Keypad Keys:

1el/481
1192/482

i"~iII'\

i

8
8-8
!3

1193/483
1194/484
1195/485

{B)

1196/486

mil

8-~

(JIJ
(RJ

1197/487
1198/488
1199/489

§!J-E3

16a/490
1eb/491

8-[B]

~

1eo/492

e(E

1ed/493

8-(Il)

168/494

1ef/495
110/496

1f1l497
112/498
113/499
1f4/5oo

~HID
~H.l
~-tmD

8-fRl

I~HIIl

E!!H)[J

S}-[]I)
Other Keys:

1151501
116/502
1f7/503

1f8/504
1f9/50S
1fa/506
1fb/507
1fe/S08

§!J-0

188/392

8-1!J
S-OO
8-8

189/393
1fd/509

69-7

~-11J
~HID
I~HID
~H§J

~-®

S-Ill

em

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

69.3 Routines

Synopsis
extern yoid timeout_restart_action (timeout_name ...ptr, value, function);
struct • timeout_name...ptr
{

unsigned long event_id;
unsigned short event_id_uid;

};
unsigned short ya[ue;
yoid function ();

DeSCription
This routine starts a named timeout timer running down, starting at a specified value.
When the timer reaches zero, a named function is called. The
timeout_restart_action routine. preceded by a call to the timeout_stop_action routine.
is the equivalent of the softkey TIMEOUT name REST ART action on the Protocol
Spreadsheet.

The first parameter is a pointer to the timeout structure. See Table 69-1 for further
explanation of the timeout structure.
The second parameter is the starting value of the timeout timer in milliseconds.
The third parameter is the name of a routine to be called when the timeout expires.
The routine may include the following statement: timeout_name.event_id = 0;.
Timeout-stop actions set this event ID to zero. This action is not strictly necessary
here. since the timeout has already expired; but the action may make the processing
of subsequent stop actions slightly more efficient.
The body of the routine to be called may also include this statement:
signa/(timeout_name_expired);. In a softkey-entered TIMEOUT RESTART action, both
statements are included in a routine called timeout_name_isp.

NOTE: The routine named in the third parameter is an interrupt
service process (isp) , A long definition for this routine makes the
processing of timeout_restart_action unpredictable.
Example
When a frame is sent, start a timeout timer at 2 seconds. When it expires. sound
the alarm. If another frame is sent before the 2 seconds expires. stop the current
timer and restart the timeout.

69-8

69 Other Library Tools

strutt timeout
unsigned long /!vent_id;
unsigned short event_id_uid;
};
struct timeout timeout_example;
extern event timeout_example_expired;
Mid timeout_example_isp ()
{
timeout_example. event_id ::: 0;
signal (timeout_example_expired);
}
}

~~.

LAVER: 2
STATE: example_of_timeout
CONDITIONS; FRAME_SENT
ACTIONS:
{
timeout_stop _action (&timeout _example);
timeout Jestart _action (&timeout _example. 2000. timeout_example_isp);
}
CONDITIONS:
{
timeout_example_expired
}
ACTIONS: ALARM

I

Here is a version of the program that accomplishes the same result without an action
to signal the timeout event:
{

strutt timeout
unsigned long e'Jent_id;
unsigned short event_id_uid;
};

struct timeout timeout_example;
extern void sound_alarmf);
}
LAVER: 2
STATE: example _of_timeout
CONDITIONS: FRAME_SENT
ACTIONS:
{

timeout_stop_action (&timeout_examplej;
timeout_restart_action(&timeout_example. 2000, sound_alarm);
}

'i~'
I

69-9

S~ri~s

INTERVIEW 7000

Advanced Programming: ATLC-107-951-10B

timeout stop action

-

-

Synopsis
extern void timeout_stop_action(timeoul_nameytr);
struc! • timeout_nameytr
{

unsigned long event_id;
unsigned short ellent_id_uid;
};

Description
This routine stops a named timeout timer, preventing it from expiring. The softkey
equivalent of this routine is the TIMEOUT name STOP action on the Protocol
Spreadsheet. timeout_stop_action also precedes the call to the timeout_restarf_action
in the spreadsheet TIMEOUT name RESTART action,

The only parameter is a pointer to the timeout structure. See Table 69-1 for further
explanation of the timeout structure,

Example
In this example, if the user presses the [ID key, the timeout timer will not expire and
the alarm will not sound (until another frame is sent and the timeout is restarted).

struct timeout
unsigned long event_id;
unsigned short ellent_id_uid;
};
struct timeout timeout_example;
extern void sound_alarm();
}
LAYER; 2
STATE; stop_a_timeout
CONDITIONS: FRAME_SENT
ACTIONS:
{
timeoutjtop_action (&timeout_example);
timeout Jestart_action (&timeout_example, 2000, sound_alarm);
}
CONDITIONS: KEYBOARD ·Ss·
ACTIONS:
{

timeout_stop_action (&:timeout_example);

69-10

69 Other Library Tools

index
Synopsis
extern char * index(string, character);
char * string;
char character;

Description
This routine searches for an instance of a character starting at the beginning of a
specified list. The routine is used by the C translator to conven CONDITIONS:
KEYBOARD softkey entries into C. This routine must be declared.

The first parameter is a list of characters to be searched.
The second parameter is the character to be searched for in the list.
Returns
This routine returns a pointer to the first instance of the specified character, or zero
if it does not occur.
Example
In the example below, the following test is established: when a key is pressed on the
keyboard, search for a match to the keyboard character in the string " abc ". If it is
found, sound the alarm.
extern char * index();
extern fast _event keyboard_new _key;
extern struct keyboard
{

char 1!alue;

};
extern struct keyboard keyboard;
}
LAYER: 1
STATE: Index_example
CONDITIONS:
{

(keyboard_new _key && index (" abc", keyboard. \lalue))
}
ACTIONS: ALARM

Let's suppose that the user presses the space bar. In this case, the returned pointer
will be pointing to the blank preceding the "a." If rindex had been used, the
returned 'pointer would be pointing to the blank following the "c." As long as any
non-null character is returned, the condition is true.

69-11

._--,,--_._--------------------,.--_.-

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-10B

rindex
Synopsis
extern char" rindex(string, character);
char" string;
char character;

Description
This routine searches for an instance of a character starting at the end of a specified
list. This routine must be declared.

See index.
Returns
See index.
ExampJe
See index.

load_program
Synopsis
extern void /ood"program (filename"ptr)
canst char" /ilename..ptr;

Descrtption
The loadyrogram routines allows you to link programs together while the unit is in
Run mode. When a call to loadyrogram is encountered in a spreadsheet program.
the current program is exited. The program named as the argument in the routine is
loaded and run. When you return to Program mode. the program displayed on the
Protocol Spreadsheet will be the one just loaded. If loadyrogram fails. you are
returned to the main menu screen in Program mode.

The only input is the absolute pathname, prefixed by the device name. of the file to
be loaded. Valid device names are "HRD." "FDl." and "FD2."
Example
In the example below. at the successful conclusion of the last of a series of tests in
module 18, a program for module 19 will be loaded and run.

69-12

69 Other Library Toofs

LAYER: 3
STATE: test_26
CONDITIONS: ENTER_STATE
ACTIONS: SEND DIAG
CONDITIONS: RCV CLEAR_CONF
ACTIONS: TRACE "Test 26 passed"

{

-

loadyrogram (" FDllusrlmodule_19");

}

lock
Synopsis
#include 
extern ~oid lock(lock_ .... ariableytr);
int " lock._variableytr;

Description
The lock routine implements a lock using the integer variable pointed to by the
routine parameter. If the lock variable is currently locked, the task goes to sleep.
When an unlock on the same variable occurs (within an independent task). the task
invoking the lock function will attempt to claim the lock. If successful, the task is
executed; otherwise. it goes back to sleep until the next unlock.
NOTE: If locking is used at any place in the program, all related
or possibly concurrent routines must also use the locking
functions.

NOTE: The lock variable should always be defined as a global
integer, never as local to a function. The lock variable should
never be altered by the user program or deadlock can occur.
Deadlock also results if the lock is invoked twice within the same
task without an intervening unlock.

The only parameter is a pointer to the lock variable.
Example
Two tasks concurrently write to their own file streams. (The file streams are local to
the routine writeJox, making them independent of each other even though they have
the same name.) However, during the fe/ose operation (which automatically calls
fflush), both tasks need to write to the same file. The locking routines ensure that
the writes to the file occur sequentially, not concurrently.

69-13

INTERVIEW 7000 Series Advanced Programming: ATLC-107 951-108

{

#include 
canst char data lJ = "((FOX))\n";
int key;
void writeJox()
{

FILE * streamJtr;
size_t n;
lock (&key);
if((streamJtr '" jopen("FD21usrlbujfOl", "a"» == 0)
displaYJrompt("Cannot open jile.
else
display Jrompt (" File opened.
n = jwrite(data, 1, sizeoj(data)-l, streamJtr);
pos_cursor(1,0);
if(n f= (sizeoj(dala)-l)}
displayj("Write error.
else
displayj("Write completed.
ij(fclose(streamJtr) 1= 0)
displayj("Either jile is already closed, or close cannot be executed.

");
");

\n");
\n");

");

elJe

");

displayj(" File closed.
unlock(&key);
}
}
LAYER: 1
TEST: a
STATE: write_and_signal
CONDITIONS: RECEIVE STRING "THE QUICK BROWN FOX"
ACTIONS: SIGNAL xyz
{

writeJox () ;
}
TEST: b
STATE: write_only
CONDITIONS: ON_SIGNAL xyz
ACTIONS:
{

writeJoxO;
}

unlock
Synapsis
#include 
extern '\Ioid unlock (lock_variableJtr) ;
int * lock_variableJtr;

pescri:ption
The unlock routine implements the inverse of the lock routine using the same integer
variable. Sleeping tasks will be woken up to retry their attempt to claim the lock.
One will succeed, and the rest will go back to sleep. See also lock routine.

69-14

69 Other Library Tools

The only parameter is a pointer to the lock variable.
Example
See lock routine.

signal
Symmsis
extern void signaJ(signal_name);

Description
This routine conveys instructions to other tests and layers where conditions are
monitoring the signal by name. The softkey equivalent of this routine is the SIGNAL
action on the Protocol Spreadsheet.

The only parameter is a name descriptive of the event being signaled.
Example
LAYER: 2
STATE: signalJoutlne
CONDITIONS: RCV FRMR
ACTIONS:
{
signal (Signal_link _down);

}
CONDITIONS: ON_SIGNAL link_down
ACTIONS: ALARM

Here is a related example, this time with the signal detection also given in C. Note
that a signal automatically generates an .. event" that can be detected alone in a
waitfor clause.
{
extern el>ent link_down;

}
LAYER: 2
ST ATE: signaLevent
CONDITIONS: RCV FRMR
ACTIONS:
{
signa/(link_down) ;

}
CONDITIONS:

{
~..
't I

}
ACTIONS: ALARM

i

69-15

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

sound_alarm
SynO,psis
extern void sound_alarm();

Descrjption
This routine will sound the alarm. The softkey equivalent of this routine is the
ALARM action on the Protocol Spreadsheet.
Example
When a bad Bee is detected on the DTE side of the link. sound the alarm.
LAYER: 1
ST ATE: example
CONDITIONS: DTE BAD_Bce
ACTIONS:
{
sound_alarm():
}

SynO,psis
extern void startJcrd"'play ();

Description
Depending on the Line Setup configuration. this routine activates data recording or
playback. If the Line Setup menu shows Mode:~itmM9.Nft#'i~?m:t. Source: @?@~, the
routine controls playback. In all other cases, it initiates recording.
Unless your recording source is RAM. make a call to Idose in programs containing
disk I/O routines (Section 65) before you start to record (or resume playback). If
you don't. the file will be closed automatically as soon as recording (or playback)
begins, even if processes on the file have not been completed. (Using the 8 key to
activate recording or resume playback will have the same effect.)
Example
LAYER: 1
STATE: example
CONDITIONS: KEYBOARD· •
ACTIONS:
{
startJcrd"'playO;
}

69-16

69 Other LIbrary Tools

SxnQPsis
extern void suspend_rcrd"'playO;

Description
Depending on the Line Setup configuration. this routine suspends data recording or
playback. If the Line Setup menu shows MOde:f:lm:M~lf1l. Souroe: ~@ifL the
routine controls playback. In all other cases, it suspends recording. Once recording
or playback is suspended, resume it with a call to startJcrdylay.
Unless your recording source is RAM. do not call disk I/O routines (Section 65) until
you suspend recording (or playback). If you do, the disk ItO operation will fail.
NOTE: Although playback is immediately suspended when
suspendJcrdylay is executed. the screen display continues until
the character buffer's contents are fully displayed. (For
bit-image data. the FIFO must empty.) At slower playback
speeds, you may notice a slight delay before the display actually
freezes.
Example
LAYER: 2
STATE: example
CONDITIONS: KEYBOARD· •
ACTIONS:
{
suspendJcrdylayO;
}

send_key
Synopsis
extern !loid send_key(number_of_keys, keysyU);
unsigned char number_Of_k.eys;
unsigned short • k.eysytr;

Description
This routine sends a specific keystroke (or sequence of keys) during Run mode, as
though the operator pressed the key. It also may be used to change the Run-mode
display.

The first parameter specifies the number of keys to be sent.

69-17

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

The second parameter is a pointer to an array of shorts. This array lists the keys to
be sent. To send keyboard keys, use the values listed in Table 69-2 for the
keyboard_any_key variable. To change the Run-mode display, send two keys. The
first "key" always has a value of Oxff75. The second "key" identifies the desired
display-screen. Use the values listed in Table 61-1 for the crnt_display_screen
variable.
Example
For this example, assume you are playing back data from a disk and that the initial
Run-mode screen is the dual-line data display. After a five-second pause, playback
is slowed as though you pressed 0. As soon as a bad Bee is detected on the DTE
side, the data display will change to the Layer 2 Protocol Trace screen.
{
unsigned short keys II = {Ox/f'J5. Ox42};
unsigned short slow_down [] = {Oxldc};

}
LAVER: 2
ST ATE : change_displays
CONDITIONS: ENTER_STATE
ACTIONS: TIMEOUT pause RESTART 5
CONDITIONS: TIMEOUT pause
{
send_key ( 1. slow_down);
}

CONDITIONS: DTE BDBCe
ACTIONS:
{
send_key(2, keys);

}

69-18

70 X.21 Library

70 X.21 Library
'The Test Interface Module (TIM) located in the rear of the INTERVIEW determines the
leads available for monitoring and control (Section 10). The variables and routines in this
section apply to the X.21 interface module. RS-232. V.35, and RS-449 modules are treated
in Section 60.
To use the C variables and routines explained in this section,you must select Suffer Control
Leads:;ii"? on the FEB Setup menu. See Section 7.1(B). If no other source for clock is
provided. use internal clock (Line Setup menu). Finally, load in the X.21 package via the
Layer Setup screen.
The variables and routines approximate X.21 Layer 1 spreadsheet-generated conditions and
actions. Their use on the Protocol Spreadsheet is not limited to any particular layer. though
normally they belong at Layer 1. Refer to Section 32 for more detailed explanations of the
purposes of specific conditions and actions. Sometimes the· name of the variable or routine is
sufficient for identifying its related spreadsheet token. When this is not the case, the
information is provided below.

70.1

Structures
Use the .structure xmit-,ist, shown in Table 70-1. when transmitting line data via the
x21_transmit_caU routine. Refer to x2i_transmit_call in Section 70.3(A) for an
example of how to use this structure.
Table 70-1
X.21 Structures

Type

Variable

Value (hex/decimal)

Meaning

Structure of a transmit list for x21 transmit call

Structure Name: xmit_llst

routine. Oeclared as type struct. -Declared
automatically If Iltroftkey-entered
CAU. seTUP SENOaetion Is taken. Reference
member variables of the structure as follows:

xmIUlst.string_tength
unsigned char *

string

unsigned short

strlngJength

pointer to the location of the transmit string-the
transmit string Is declared separately

O-ffffl0-65535

70-1

length of the transmit string

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

70.2 Variables
With an X.21 TIM installed. you may monitor the T and R data leads, the C and I
control leads. and VA. See Table 70-2.
The fast-event variable levar3ia_changed detects a change in leads. It does not
establish which lead(s) has changed. nor the validity of the lead's status. Two
associated status variables, current_eia_leads and previous_eia_leads, indicate the
condition of the leads. These are two-byte (short) variables. Each lead is
represented by a different bit in the short. Table 70-2 provides the mask that can be
used to isolate each lead.
Other bits in these variables monitor the validity Of lead status. For the status of a
lead to be considered valid in X.21 t the lead must be stable for a minimum of 16
bit-times. Each lead's valid status is indicated by a separate bit in current_eia_Ieads
and prevlous3ia_leads. Again. refer to Table 70-2.
Whenever a lead changes, the value in current_tia_Ieads is written to
previous_eiaJeads. Then current_eia_Ieads is updated.

(A) Masking To Detect a Change in a Given Lead
To test whether or not a given lead changed. I for example, while disregarding
its status. enter the following condition on the Protocol Spreadsheet:
CONDITIONS:
{
/nar_eia_challged etet (..((currertt_eia_,eads
}

A

prnious_eia_'.ads) et Ox40)

== Ox40)

Select a mask value from the list in Table 70-2 to indicate which lead you care
about. Specify multiple leads with a mask derived via hexadecimal addition.
The mask for I is Ox40. In the example, the event levar_eia_changed updated
current_eia_leads. The new current_eia_leads was bitwise-exclusive-ORed with
previous_eia_leads to identify all the leads that changed. Then the result was
bitwlU ANDed with the . I mask to determine if I was among the leads that
changed. If this result was equal to the mask, the lead changed.
following the evaluation of the condition. previous_eta_leads was updated to
match· eN"e,"_eia~leads.

70-2

70 X.21 Ubrary

Table 70-2
X.21 Variables

Type

Variable

Value (hex/decimal)

extern fast_event

Meaning

True when the status changes
for an EIA lead. Line Setup
configured for emulate or
monitor mode.

extern const volatile unsigned short

1
2
4
8
10J16

40/64
80/128
100/256
2001512

40011024

C-valkt
B (RS-232 equivalent is SQ)
I-valid (AI)
R-valid (OSR)
T -valid (OTA)
I (CTS)
C (ATS)

A (AD)

UA
T (TO)
A value In this list Indicates
whlch lead (s) you care about.
When Bnded (&) with
current eis leads. the result
equals zero1t the lead Is on (or
the mask if the lead Is off). For
validity checks. the result of
ending with current_eJa_leads
equals the mask for valid (or
zero for Invalid).
Examples:
STATE: c on and valid
{ if ((current-eia leads & Ox81)
.... 1} sound_alarm(); }
ST ATE: c off and valid
{ if ((current aia leads & Ox81)
=.. Ox8l) sound_alarmO; }

Note: This variable will store EtA
status if (1) Internal or external
otoek is supplied, (2) EIA leads
are enabled on FEB Setup. and
(3) fevar_eia_changed has
updated the leads. Une Setup
configured for emulate or
monitor mode.
extern const volatile unsigned short

previous ela leads

Same values as
current eta leads. Updated
when leads Ohange. but only
after \o9IC has had a ohance to
compare current and previous
leads. Line Setup oonflgured
for emulate or monitor mode.

li'<'
i

70-3

-

- -

------~-------------.--- -.---~---.-,-----,-.--".~--------.

INTERVIEW 7000 Series Advanced Programmlna: ATLC-107-951-108

(8) Masking For the Status or Validity of a Lead
You may also test the current status or validity of a lead, independent of any
change. If a mask testing for status is anded with current_eia_leads, zero will
mean that the lead in. on. If the result equals the mask, the lead is off. If a
mask testing for validity is anded with current_eia_leads, the lead status is valid
when the result equals the mask. If the result is zero, the status is invalid.
To test for both status and validity, derive a mask via hexadecimal addition.
And the mask with current_eia_leads. as in this if statement testing for I "on"
and valid:
STATE: test_forJ_on_and_valid
{
i/((current_eia_'eads cI: Ox44)
}

== 4)

sound_alarm ():

(C) Detect Change and Current Status
The two examples shown above could be combined to test for I changing from
off to valid on:
CONDITIONS:
{

(fnar_eia_changed cI:cI: (((current_eill_Ieads
«current_eia_'ellds & Ox44)
4))

==

A

previous_eill_'ellds) cI: Ox40)

== Ox40) cI:cI:

}

This example approximates the translator's version of the spreadsheet-token
condition LEADS I V-ON when it appears alone in a conditions block. When a
LEADS condition is combined with another condition, in most cases the other·
condition will supply the event variable and only the lead status test will be used.

70.3 Routines
(A) Control and Transmit
Use the following routines in emulate mode only. If you try to call one of these
routines in monitor mode, you may be returned to the main program menu.
When you go to the Protocol Spreadsheet and search for errors, a message like
the following may be displayed: "Error 140: Unresolved reference ctCeia."

Synopsis
extern void ctl_eia(on_mllsk. off_mask);
unsilned short on_mask;
unsilned short off_mask;

70-4

70 X.21 Library

Description
The ctCeia routine allows you to control the status of the two X.21 contro}leads. Which lead you control depends on your emulation mode. When the
Line Setup menu shows Mode: ::~mf@i~::[j. you control 1. AnNi~*lWNp~t
selection gives you control over C. The softkey equivalent of this routine is the
LEADS action on the Protocol Spreadsheet.

The first parameter indicates which lead you want to tum on. One bit in the
parameter controls a given lead: I (01) and C (04). Wherever there is a zero
in the first parameter, the corresponding lead will be turned on. A one in this
parameter will not cause any lead to be turned off. A value of Oxff will mean
don't care (no action).
The second parameter indicates which lead you want in the "off" condition.
One bit in the parameter controls a given lead: I (01) and C (04). Wherever
there is a one in the second parameter. the corresponding lead will be turned
off. Zeroes in this parameter do not turn leads on. A value of 0 will mean
don't care (no action).

NOTE: If both bytes are attempting to control the same lead. the
off parameter will override the on parameter.

Example
Suppose your emulate mode is ~~!ji§~~. As a DCE. you control the I lead.
(An attempt to control the status of C will fail, since the DTE controls this
lead.) When C is raised, you want to turn Ion; when C drops. turn I off.
LAYER: 1
STATE: controlJ
CONDITIONS: LEADS C ON
ACTIONS:
{
ctl_eia(Oxje,OxOO);
}
CONDITIONS: LEADS C OFF
ACTIONS:
{
ctl_eia (OxIj, OxO 1);
}

70-5

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

x21Jdle_actlon
SYDQ,Psis
extern void x21_idle_action(character);
unsigned char character:

Descrjption
Only for format SYNC, the x2I_idle_action routine allows you to change the
idle-line condition applied by the INTERVIEW. A LEADS R BELLS action, for
example. requires the x2I_transmit_call routine in addition to x2I_idle_action.

The only parameter is a character or numeric value representing the idle
character.
Example
To signal an incoming call, you would use the x21_transmit_call routine to send
the sync pattern. Then you would use the x2i _idle_action routine to send an
idle string of bells:
LAYER: 1
{

unsigned char syncs fl = {OxI6,OxI6};
struct xmit_list
{

unsigned char" string;
unsigned short string_length;
};

struct xmit_list send_string {] = {&syncs{OJ. 2};
}

STATE: signaUncomlng_call
CONDITIONS: KEYBOARD • •
ACTIONS:
{

x21_transmit_call(1, &send_string[O}, 0);
x2I_idle_action('s,- ');
}

70-6

70 X.21 Library

x21_transmit_cali
Synopsis
extern void x2] _transmit_call (count. struct_send_strin8..JJtr. xmil_tag);
unsigned short count;
struct xmit_list
char • stl'ing..,ptr;
unsigned. short string_length;
};

struct xmit_lisl .. struct_send_string..,ptr;
unsigned short xmit_tag;

De&cription
The x21_transmit_call routine. sends a specmed data string in call-setup mode.
The softk.ey equivalent of this routine is the CALL_SETUP_SEND action.

The first parameter is the number of

s~rings

to be sent.

The second parameter is a pointer to a structure which in turn identifies the
location and leng$ of each string.
The third parameter is a transmit tag, In other contexts it identifies the type of
BCe to be sent. In X.21. however, no Bee is sent from Layer 1. The value of
this parameter should be zero.
Example

Assume you are emulating a DTE. To send a call request in call-setup mode,
enter the following spreadsheet program:
LAYER: 1
{

unsigned char syncs fJ '" {0x16.0x16};
unsigned char number [] :: .. n34567";
unsigned char end [] :: "+";
struct xmit_list
{

unsigned char"' string;
unsigned short string_length;
};

struc! xmiUist send_string [J = {&Syncs{O). 2. &number[Oj. sizeo!(number) - 1. &end[OJ. l};
}

70-7

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B
STATE: send
CONDITIONS: RECEIVE STRING 1!l++"
ACTIONS:
{

x21_transmit_call(3, &:se"d_stri"g[Oj, 0);
}

Notice in the preceding example that sync characters were sent in the same call
to x21_transmit_call that sent the called number. The equivalent
softkey-generated action is LEADS T DATA CALL_SETUP_SEND ·~~1234567+·.

Syno,psis
at."" void s,t_tcr_b (tcrJ'8ist",:,mtlsl, tcrJ,glster_value);
unsip,d char tcr_register_malJr.;
unsigned char tcr_register_value;

Description
This routine clamps the transmit line to 0 (space) or 1 (mark), or unclamps it so

that transmit routines may be executed. In X.21, steady zero will signal a clear
request/indication or a clear confirm, while steady 1 will indicate one of the
call-ready or call-setup states.
The X.21 softkey actions that are built on this routihe are LEADS R (T) ONE.
LEADS' A (T) ZERO. and LEADS R (T) DAtA. In other contexts, the routine simply
initiates and terminates a break.

The first parameter is the mask that is anded with the current TCR register to
tum the current values of bits 3 and 4 (counting 1-8 from the right) to zero.
This mask is always Oxf3.
The second parameter contains the new values of bits 3 and 4 that will be
written to the register. The three available parameters are Ox08 to clamp the line
to zero, OxOc to clamp the line to 1. and Ox04 to unclamp the line and permit
data transmissions.
Example
Assume you are emulating a. PTE. To indicate a clear confirmation, enter the
following spreadsheet program:

70-8

rt

70 X.21 Library

!

LAYER: 1
STATE:
CONDITIONS: KEYBOARD • •
ACTIONS:
{
set_Icr_b (Oxf3. Ox08);
ctl_eia(Oxff, Ox04};
}

The equivalent softkey-generated action is LEADS T ZERO C OFF.

(B) Phase
The following routines are valid in either emulate or monitor mode.

enter_call_phase
SXUQpsis
extern "aid enter_callyhaseO;

Description
During the call-establishment phase, this routine overrides existing selections on
the Line Setup menu with ASCII code, 7-bit odd parity, .and SYNC format.
Example
When a lead changes. look for these conditions: T and R on (space), C and I
off, and all leads valid. If conditions are true. enter call phase.
extern fast_e1!ent fe1!tlr_eia_changed;
extern canst "ala tile unsigned short current_e.ia_leads;
}
LAYER: 1
STATE: look_for_change_to_ oallJ>hase
CONDITIONS:
{
fe1!ar_eia_changed && ((current_fia_leads & Ox5dd)
}
ACTIONS;
{

== Oxdd)

enter_callyhase () ;
}

- -

enter data phase
SynQPsis
extern "oid enter_datayhaseO:

Description
~c
,
I

I

During the data-transfer phase, this routine implements existing selections on the
Line Setup menu.

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Example
When a lead changes, look for these conditions: T and R off (mark), C and I
on, and all leads valid. If conditions are true, enter data phase.
{

extern fast_event !ellar_eia_changed;
extern const lJolatile unsigned short current_eio_leads;
}
LAYER: 1
STATE: look_for_change_to_data_phase
CONDITIONS:
{
jellar_eio_changed && «(current_eia_leads & Ox5dd) =: Ox51d)
}
ACTIONS:
{

enter_dataJhase();
}

70-10

'1.

71 X.25 Layer 2 Ubrary

71 X.25 Layer 2 Library
When the X.25 Layer 2 package is loaded in via the Layer Setup screen, the following
external routines and variables become available for use by the programmer. Their use on
the Protocol Spreadsheet is not limited to any particular layer, though normally they belong at
Layer 2.
The variables and routines approximate X.2S Layer 2 spreadsheet-generated conditions and
actions. Refer to Section 33 for more detailed explanations of the purposes of specific
conditions and actions. Sometimes the name of the variable or routine is sufficient for
identifying its related spreadsheet token. When this is not the case, the information is
provided below.

71.1

Structures
The structure sendJrame_structure defines the format of transmitted X.2S frames.
See Table 71-1. Use this structure to send frames via the sendJrame routine in
emulate mode. See Section 71.3(B). Each variable in the structure relates to some
softkey selection or user entry in the SEND action.

71.2 Variables
(A) Monitoring Events
1.

Emulate or monitor mode. X.2S Layer 2 events include frames detected,
good or bad BCe's, and aborts. All event variables in Table 71-2 containing
a dte_ or dce_ prefix are valid in either emulate or monitor mode. These
event variables are dteJrame, deeJrame, dteJood_bee, deeJood_bee,
dte_bad_bee, dee_bad_bee, dte_abort, dee_abort. The variable
dce,...aood_bcc. for example, equates to DCE GDBCC.
You can use both dte and dee variables relating to the same event in one
conditions block, Suppose you want to count all bad BeC's from either side
of the line. Enter the following CONDITIONS/ACTIONS block:
CONDITIONS:
{
dte_bad_oee

II

dee_bad_bee

}
ACTIONS: COUNTER bad_bee INC

71-1

_ _ _ _" _ _ _ _ _

. .ul
.....
J!IIIII. . . . . . . . . . . . . . . . . ._

~i!'i_iA_W;\l_!III~_._~J_IiJIIl_ia

INTERVIE~

7000 Series Advanced Programming: ATLC-107-951-10B

Table 71-1
X.2S Layer 2 Structures
Type

Variable

Value (hex/decimal)

Structure Name; send_frame_structure

Structure of a frame In X.2S. Declared as type
struct. Declared automatically If a
softkey-entered SEND action Is taken. Program
frames assigned to structure as foUows: struct
send frame structure name. Reference a
structure variable as· follows: name. bcc type. If
values In the frame structure are not initialized by
the user, they default to O. You may initialize the
values when the structure Is declared:
struct send frame structure name = {1. 1. 1. O.
1.1.3, Oxf'l. 3, OJ;

o

unsigned char

Meaning

eommand
response
other

1

2
unsigned char

(The codes for frame type are the same as for the X.25-varlab/e
rcvdjrame_type.)
-

unsigned char

o
2
3

auto
value
reeeived ns plus 1
last nr sent

o

auto

1

unsigned char

unsigned char

1
2
3

laat nr received
value

o

o

1
2

Ioopback

skip

1

o

unsigned char

default (bad bee)
good bee
bad boe

1
2
3

abort
to DeE
to DTE

1
3

unsigned char
unsigned char

ontrLbyte

(aotual value of the control byte)

unsigned char

nr_value

0-1 (MOD 8)

H nr_type

unsigned char

na_value

0-7 (MOD 8)

H na_type = 3

71-2

=1

71 X.25 Layer 2 Ubrary

Table 71-2
X.25 Layer 2 Variables
Type

Variable

Value (hex/decimal}

extern event

Meaning

True when a DTE frame is
detected. Une Setup
configured for emulate or
monitor mode.
True when a DeE frame Is
detected. Line Setup
configured for emulate or
monitor mode.
True when a good Bee Is
calculated tor a DTE frame.
Line Setup conflgured for
emulate or monitor mode.
True when a good BCe Is
calculated for a DeE frame.
Line Setup configured for
emulate or monitor mode.
True when a bad BeC Is
caloulated for a DTE frame.
Une Setup configured for
emulate or monitor mode.
True when a bad Bee Is
calculated for a Dee frame.
Line Setup configured for
emulate or monitor mode.
True when an abort Is detected
for a DTE frame. Une Setup
oonfigured for emulate or
monitor mode.
True when an abort Is detected
for a DeE frame. Line Setup
configured for emulate or
monitor mode.
True when a frame Is received.
Une Setup configured for
emulate mode only.
True when an invalid frame Is
detected. Line Setup
configured for emulate mode
only.
True when the T1 timeout-timer
has expired. Une Setup
configured for emulate mode
on1y.
True when a Bee error Is
detected. Une Setup
oonfigured for emulate mode
only.
True when an N(R} error Is
detected In a receiv.ed INFO or
supervisory frame. Une Setup
configured for emulate mode

extern event

extern event

extern event

extern event

extern event

extern event

extern event

extern event

extern event

extern event

extern event

extern event

only.

True when an N{S) error Is
detected In a received INFO
frame. LIne Setup oonf\gl.lred
for emulate mode only.

extern event

71-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Table 71·2 (continued)

Type
extern· event

Variable

Value (hex/decimal)

frame_sent

Meaning

True when frame Is passed
down to Layer 1. Une SetuP
configured for emulate mode
only.

extern volatile oonst unsigned char

to DCE
to DTE
Une Setup oonflgured for
emulate or monitor mode.
(same as rcvd frame type-Line Setup
configured lor-emulate or monitor mode)
(actual value of control byte-Line Setup
configured for emu/ate or monitor mode)
o
pf=O
10/16
pf",,1
1

3

extern volatile oonst unsigned ohar
extern volatile const unsigned char
extern volatile const unSigned char

extern volatile oonst unsigned char

extern volatne oonst unsigned ohar

3

Line Setup configured for
emulate or monitor mode.
good
bad
abort

1
3

Line Setup oonflgured for
emulate or monitor mode.
to DCE
to DTE

1
2

rcvd_frame_addr

o

extern volatile oonst unsigned char

1

5
9
d/13
2f/47

6f!111
43/67
f/15
f/15

Line Setup configured for
emulate mode only.
Info
rr
rnr
rej
srej
sabm
sabme
disc
dm

sarm

63/99

ua

87/135

frmr
other
unknown

ffl255
ff1255

Line Setup oonflgured for
emulate mode only.
(actual value of control byte-Line Setup
configured for emulate mode only)

extern volatile oonst unsigned char

o

extern volatlle oonst unsigned char

extern volatile opnst unsigned ohar

10/16

pf=O
pf=1

1
2
3

Line Setup oonfigured for
emulate mode only.
good
bad
abort

0-7 (MOD 8)

extern Yolatile canst un$lgned ohar

71-4

Une Setup oonflgured tor
emulate mode only.
Une Setup configured for
emulate mode only.

71 X.25 Layer 2 Library

Table 71-2 (continued)
Type

Variable

Value (hex/decimal)

extern volatile eonst unsigned char

0-7 (MOD B)

Meaning

Une Setup configured for
emulate mode only.

extern volatile unsigned short

Inter-layer message buffer
number (actually, an IAPX-286
segment number) In a received
frame. This segment number
can be converted to a pointer
by shlttlng It left 16 bits. line
Setup configured for emulate
mode only.

extern volatiie unsigned short

Offset to where the service data
unit begins in an Inter-layer
message buffer in a received
frame. Add to buffer segment
number (converted to pointer)
to point to first byte In frame.
Una Setup configured for
emulate mode only.

extern volatile unsigned short

Size of service data unit in a
received frame. Line Setup
configured for emulate mode
only.

extern volatile unsigned short

When equal to upper edge,
window Is full; when equal to
lower edge, window Is empty:
when not equal to upper edge.
window Is not full; and when not
equal to lower edge, window Is
not empty. Una Setup
configured for emulate mode
only.
see 12_current_window_edge

extern volatile unsigned short

12Jower_window_edge

extern volatile unsigned short

12_upper_ window_edge

see 12_current_window_edge

extern volatile unsigned short

12Jesend_edge

When resend edge Is not equal
to lower window edge. there Is
more to resend; when resend
edge is equal to loWer window
edge. there Is no more to
resend. Line Setup configured
for emulate mode only.

extern unsigned char

12_enhance

o
1
4
5
8

9
12118

o

extern unsigned char

1

71-5

normal
reverse
low
reverse low
blink
reverse blink
blink low
Line Setup conflgured for
emulate or monitor mode.
off
on
Line Setup configured for
emulate or monitor mode.

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

Using spreadsheet tokens. the same test needs two
blocks:-

CONDITIONS/ACTIONS

CONDITIONS: OTe BDBCC
ACTIONS: COUNTER bad_bee INC
CONDITIONS: DCE BDBCC
ACTIONS: COUNTER bad_bee INC

When the user selects DTE or DCE on the first rack of softkeys for Layer 2
conditions. a second rack appears from which he must select a particular
frame type. A OTE INFO condition, for example, when translated. includes
two C variables, one event variable and one status variable:
dteJrame && (mJrame_type == 0)
}

As a C programmer, you do not need to specify a frame type. To include
all frames in a condition. use the event variable only:
CONDITIONS:
{

dteJrame
}

2. Emulate mode only. Some events may be detected in emulate mode only.
The event variables are rcvdJrame. invalidJrame. 12_Tl, bcc_error,
nr_error, ns_error, and frame_sent.
If you try to use one of these variables in monitor mode, you may be
returned to the main program menu. When you go to the Protocol
Spreadsheet and search for errors. a message like the following may be
displayed: "Error 140: Unresolved reference rcvdJrame."

When the user selects RCV on the first rack of softkeys for Layer 2
conditions. a second rack appears from which he must select a particular
frame type. When the translator converts a RCV INFO condition into C, it
will include two C variables. one event variable and one status variable:
rC'JdJrame && (rcvdJrame_type

== 0)

}

The C programmer does not have to specify a frame type. To include aU
received frames in a condition. use the event variable only:
CONDITIONS:
{

rClldJrame
}

Error detecting may be accomplished via bcc_error, nr_error. ns_error, and
invaUdJrame. These variables equate to the softkey tokens bearing similar
names.

71-6

~

F
\'. ·. .

71

I'"

X.25 Layer 2 Library

I

One of the emulate-mode variables monitors an emulate action. The event
variable frame _sent will come true as soon as the frame has been passed to
the layer below. Note that if Layer 1 is an x: 21 protocol in call-setup
phase. a frame that is "sent" at Layer 2 will stop at Layer 1 and will not be
transmitted out onto the line.

(8) Status Variables
Status variables are those in Table 71-2 that do not include event in the Type
column. Their associated event variables guarantee that they are updated and
tested.
The softkey-generated condition for received Info frames is RCV INFO. The C
version of the same condition should look like this:
CONDITIONS:
{
rcvdJramt && (rcvdJrameJJpe "': 0)
}

1.

Frame characteristics. All status variables in Table 71·2 containing an m_
prefix are valid in either emulate or monitor mode: mJrame_addr,
mJrame_type. mJrame_cntrCbyte_l, mJrameJJf. and mJrame_bcc_type.
Use these variables to monitor a particular address, frame type, control byte,
PlF value. or BCC.
All status variables in Table 71-2 containing a rcvd_ prefix are valid in
emulate mode only: rcvdJrame_addr, rcvdJrame_type.

rcvdJrame_cntrl_byte_l, rcvdJrame_bcc_type, rcvdJrameJJf,
rcvdJrame_nr, and rcvdJrame_ns. Use thes~ variables to monitor a
particular address. frame type, control byte, BCC, or P/F, N(R), or N(S)
value.
If you try to use an emulate-mode variable in monitor mode, you may be
returned to the main program menu. When you go to the Protocol
~preadsheet and search for errors. a message like the following may be
displayed: "Error 140: Unresolved reference rcvdJramejype."

2. Frame buffers. As BOP frames are received. they are automatically placed
in IL message buffers to be passed up the layers. Three emulate-mode
variables provide the user with access to the information in the frame that is
located beyond the control byte. These variables are rcvdJrame_bufLseg,
rcvdJrame_sdu_offset• and rcvdJrame_sdujize. See Section 63.1 for a
more detailed discussion of the buffer components to which these variables
refer.

71-7

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Make a pointer to an IL buffer by casting rcvdJrame_buff_seg as a long,
shifting it left sixteen bits. adding rcvdJrame_sdu_offset. and casting the
result to a pointer. Increment the pointer twice (thereby adding two to the
offset).

unsigned char • ptr;
ptr = (lIoid *)(((/ong)rcvdJrame_buff_,eg« 16) + rcvdJrame_sdu_offset);
ptr+=2:
}

It is now pointing at the first byte in the X.2S Layer 3 header. You may
continue to move through the frame for its entire length. indicated in
rcvdJrame _sdu_size.

3. Transmit window. Four related variables test the status of the Layer 2
window. The particular values of these variables at any given time is not
significant. What is significant is how they compare to each other. The
softkey status condition on the left makes the variable comparison on the
right:
WINDOW FUll
WINDOW EMPTY
WINDOW NOT_FULL
WINDOW NOT_EMPTY
MORE_TO_RESEND
NO_MORE_TO_RESEND

12_current_window_,dg, == 12_upper_window_edg,
12_current_wlndow_,dg, == 12_'ower_window_,dge
12_cu",nt_wlndow_edge 1= 12_upper_window_edge
12_cu",nt_window_,dg, 1= '2_'ower_window_edge
12Jesend_,dge /= 12_'ower_window_edge
12JIS,nd_,dg. == 12_1ower_window_edge

(C) Controlling Protocol Trace Display
To enhance or suppress particular frames on the Layer 2 Protocol Trace screen
in emulate or monitor mode, assign a coded value to 12_enhance· or 12_suppress.
The values are listed in Table 71-2. To assign a value to either of these
variables, place the statement in an AcnONS block. For example. display RNR
frames in reverse-video and suppress display of invalid frames:
CONDITIONS: RCV RNR
ACTIONS:

{
12_,nhanCl

=1;

}
CONDITIONS: RCV INVAUD
ACTIONS:
{
12_,upprlS' = 1;
}

71-8

71 X.25 Layer 2 Library

Check the value of these display-control variables in a CONDITIONS block
CONDITIONS: RCV INFO
{
12_enhance =: 1
}

ACTIONS:
{
12_enhance '" 0;
}

or an ACTIONS block:
CONDITIONS: RCV INFO
ACTIONS:
{
if(12_enhance == 1)
12_enhance = 0;

71.3 Routines
Use the following routines in emulate mode only. If you try to call one of these
routines in monitor mode, you may be returned to the main program menu. When
you go to the Protocol Spreadsheet and search for errors. a message like the
following may be displayed: "Error 140: Unresolved reference 12Jive_data."

(A) Receive
12_give_data
Synopsis

Description
The 12Jive_data routine takes an interlayer message buffer associated with a
received INFO frame, changes the SDU offset to point to higher-level data. and
sends a DL_DATA IND primitive up to Layer 3 along with a reference to this
buffer. The softkey equivalent of this routine is the GV_DATA action on the
Protocol Spreadsheet.
Example

~.

~

i,

Layer 3 wants access to the line in order to receive and send data. Assuming
X.2S personality packages are loaded at Layers 2 and 3. enter the fan owing
program:

71-9

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

LAYER: 2
ST ATE: datalink
CONDITIONS: DL_CONNECT REO
ACTIONS: DL_CONNECT CONF
CONDITIONS: DL_DATA REO
ACTIONS: SEND INFO M(DL_DATA))'
CONDITIONS: RCV INFO
ACTIONS:
{
12Jive_data();
}

(8) Transmit
resend_frame
SynQPsis
extern void resendJrame(pf. first_or_next);
unsigned char pf;
unsigned char first_or_next;

Description
The resendJrame routine will set the P/F bit to a specified value and resend
either the first or next frame in the window. The softkey equivalent of this
routine is the (PROTOCL) RESEND action on the Protocol Spreadsheet.

The first parameter is the value of the P/F bit in the frame. It may be set to
either 0, 1. or 2 (for loopback).
The second parameter indicates whether the first frame in the window will be
sent, or whether the next frame in the window will be sent. The first res end
action will send the first frame in the window regardless of whether first or next
has been selected. Legal entries are 0 (first) or 1 (next).
Example
Suppose you want to resend the entire transmit window if you receive a REJ
frame.
LAYER: 2
STATE: xfer
Whatever conditions and actions send data precede the following condition. * l

'*

CONDITIONS: RCV REJ RESP
ACTIONS:
{
resendJrame(l,O);
}
NEXT_ STATE: recover

71-10

71

X.25 Layer 2 Library

STATE: recover
CONDITIONS: FRAME_SENT
MORE_TO_RESEND
ACTIONS:
{
resend Jrame (] ,1);
}
CONDITIONS: FRAME_SENT
NO_MORE_TO_RESEND
NEXT_ STATE: xfer

Synopsis
extern

~Qjd

reset_nr();

This routine resets the N(R) field in information and supervisory frames to zero.
The softkey equivalent of this routine is the (PROTOCL) RSET_NR action on the
Protocol Spreadsheet.

i~\

I

Example
When a link is established, reset N (R) .
LAVER: 2
ST ATE: reset
CONDITIONS: ENTER_STATE
ACTIONS: SEND SABM
CONDITIONS: RCV UA
ACTIONS:
{
reset_l'Ir O;
}

SynQpsis
extern void reset_nsf};

r~

The N(S) field in information and supervisory frames is reset to zero and the
transmit window is cleared. The sonkey equivalent of this routine is the
(PROTOCL) RSET_NS action on the Protocol Spreadsheet.

I

71-11

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

Example
When a link is established, reset N(S).
LAYER: 2
STATE: reset
CONDITIONS: ENTER_STATE
ACTIONS: SEND SABM
CONDITIONS: RCV UA
ACTIONS:
{

reset_ns() ;
}

Syno.psis
extern \loid sendJrame(il_buffer_number, relay_baton, data _start_offset. transmitJrame"ptr);
unsigned short ii_buffer_number;
unsigned short relay_baton;
unsigned short data_start_offset;
struct sendJrame _structure
{

unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned

char addr_type;
char frame_type;
char nT_type;
char ns_type;
char pJ_type;
char bcc_type;
char addr_value;
char cntrl_byte;
char nT_lIalue;
char nS_lIalue;

};
struct sendJrame_structure • transmitJrame"ptr;

Description
The sendJrame routine adds a frame-level header to an interlayer message
buffer and passes the buffer to Layer 1. The softkey equivalent of this routine is
the SEND action on the Protocol Spreadsheet.

The first parameter is the interlayer message buffer number. See Section
63.3(A), Layer-Independent OS1 routines.
The second parameter is the maintain bit used to hold the buffer while the send
operation is being performed. See Section 63.3(A).
The third parameter is the offset from the beginning of the buffer to the start of
the service data unit. See Section 63.3(A).

71-12

11\

71 X.25 Layer 2 Library

:

The founh parameter is a pointer to the frame structure to be sent. For a
description of sendJrame_structure, see Table 71-1.
Example
Send an Info frame containing a canned fox message and a good Bee onto the
line.
{

static
static
static
struct

unsigned short ii_buffer_number;
unsigned short relay_baton;
unsigned short data_start_offset;
sendJrame _structure

{

n\
I

unsigned char addr_type;
unsigned char frame_type;
unsigned char nr_type;
unsigned char ns_type;
unsigned char pJ_type;
unsigned char bcc_type;
unsigned char addr_wIlue .
unsigned char cntrl_byte;
unsigned char nr_value;
unsigned char ns_value;
};

struct sendJrame_structure transmitJrame;
static char transmit_srring [] :: "((FOX)) ";
}
LAYER: 2
STATE: send_a_frame
CONDITIONS: KEYBOARD· •
ACTIONS:
{

Jet_il_msLbuff(&il_buffer_number, &relay_baton);
_start_il_bufLlist(il_buffer_number. &data_start_offset);
transmitJrame. bcc_type = 1;
_insert_il_bufLlist_cnt (ii_buffer_number, data jtart_offset, &transmit_string/O i.
(sizeof(transmit_string) - 1)};
sendJrame(il_buffer_number, relay_baton, data_start_offset, &transmitJrame);
}

#~
I
71-13

__

~

__________w_,__
..._,_.__._._.___________

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

71-14

72 X.25 Layer 3 Library "

72 X.25 Layer 3 Library
When the X.25 Layer 3 package is loaded in via the Layer Setup screen, the following
external routines and variables become available for use by the programmer. Their use on
the Protocol Spreadsheet is not limited to any particular layer, though normally they belong at
Layer 3.
The variables and routines approximate X.25 Layer 3 spreadsheet-generated conditions and
actions. Refer to Section 34 for more detailed explanations of the purposes of specific
conditions and actions. Sometimes the name of the variable or routine is sufficient for
identifying its related spreadsheet token. When this is not the case, the information is
provided below.

72.1

Structures
The sendyacket_structure defines the format of transmitted X.2S packets. See
Table 72-1. Use this structure to send packets via the sendyacket routine in
emulate mode. See Section 72.3(B). Each variable in the structure relates to some
softkey selection or user entry in the SEND action.

72.2 Variables
(A) Monitoring Events
1.

Emulate or monitor mode. Two X.2S Layer 3 event variables are valid in
either emulate or monitor mode. These event variables are dteyacket and
dee yacket.
When the user selects DTE or DeE on the first rack of softkeys for Layer 3
conditions, a second rack appears from which he must select a particular
packet type. A OTE DATA condition. for example. when translated, includes
.two C variables, one event variable and one status variable:
{
dteytZcket &:& (mytZcket_type == 0)
}

72-1

--------

.-----~.-----,----~,-,

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Table 72-1
X.2S Layer 3 Structures
Type

Variable

Structure Name; send_packet_structure

unsigned char

path_num

Meaning

Value (hex/decimal)

Structure of a packet In X. 25. Declared .. type
struct. Declared automatically If a
softkey-entered SEND action Is taken. Program
packets assigned to structure as follows: struct
send-packet_structure name. Reference a
structure variable as follows: name.CLblt. If
values In the frame structure are not initialized by
the u88r. they default to O. You may initialize the
values when the structure Is declared:
struct send_packet_structure name = {2. Ox13.
Ox13. O. O. O. 1. O. O. O. 1. 1. O. O. 2.
&laclllt/es_strlng[O]. O. OJ;
path number
use path number of last received packet

0-8
le/254

unsigned char

packet_type

(The codes for packe,-type are the same as for the X.25-varlab/e
m..packeUype. )

unsigned char

packet_type_byte

(actual value of the packet type byte)

unsigned char

m_blt

o

unsigned char
unsigned char
unsigned char

m =0

1

m =1

o

d=O

40/64

d =1

CLblt

o

q=O
q=1

pr_type

o

auto
value
received ps plus 1
last pr sent

d_blt

80/128
1

2
3

o

unsigned char

2
3

auto
skip
received pr
value

1

=1
=3

unsigned char

pr value

0-7 (MOD 8)

If pr_type

unsigned char

ps value

0-7 (MOD 8)

If ps_type

unsigned char

cause

(value of cause byte-see Figure 36-15)

unsigned char

d1ag_flag

o

unsigned char

dlag

(value of diagnostiC byte-consult CCITT Recommendation X.25,
pp.237-8)

unsigned char

spare

o

unsigned char

facllltiftJen

O-fflO-255

char

*

.

diagnostic field not present
diagnostic field Is present

1

faclltles

reserved s~e
length of the (.olllties field
pointer to the ~tlon of the facilities field-the
facilities field Is declared separately

unsigned short

dataJen

reserved for future use

char •

data

reserved for future use

72-2

72 X ..25 Layer 3 Ubrary

Table 72 ..2
X.2S Layer 3 Variables
Type

Value (hex/decimal)

Variable

True when a OTE packet Is
detected. Line Setup
configured for emulate or
monitor mode.
True when a DeE packet Is
detected. Line setup
oonfigured for emulate or
monitor mode.
True when a packet Is received
from Layer 2. Line Setup
configured for emulate mode

extern event

extern event

extern event

rcvd..packet

extern event

invalid_paoket

Meaning

only.

True when an Invalid packet Is
detected. Une Setup
configured for emulate mode
only.
True when an PtR) error is
detected In a data or
supervisory packet. Line Setup
configured for emulate mode
only.

extern event

extern event

extern event

True when an P(S) error Is
detected In a data packet. Line
Setup configured for emulate
mode only.
True when a packet has been
passed down to Layer 2. Line
Setup configured for emulate
mode only.
LQgicai channel number. Line
Setup configured for emulate or
monitor mode.

extern volatile unsigned shor;t

O-fffI0-4095

extern volatile unsigned char

0-flO-15

LOgical channel group number.
LIne Setup configured for
emulate or monitor mOde.

extern volatite canst unsigned char

o

q=O
q=1

80/128

o

extern volatile const unsigned char

40/64

Une Setup configured for
emulate or monitor mode.
d;:O
d=l
Une Setup configured for
emulate or monitor mode.

extern volatile const unsigned char

o

m=O

10/16

extern volatile const unlilign~d char

0-7 (MOD 8)

extern volatile canst unsigned char

0-7 (MOD 8)

m=1
Line Setup configured for
emulate or monitor mode.
line Setup configured for
emulate or monitor mode.
Line Setup configured for
emulate or monitor mode.

72-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Table 72..2 (continued)
Type

Value (hex/decimal)

Variable

Meaning

extern volatile const unsigned char

(same as rovdykt_oause-Llne Setup
configured for emulate or monitor mode)

extern volatile const unsigned char

(same as rcvdykt_diagn-Llne Setup
configured for emulate or monitor mode)

extern volatile const unsigned char

(actual value of packet type byte-Line Setup
configured for emulate or monitor mode)

extern volatne const unsigned char

b/11
f/15
13/19

17/23

o

23/35
27/39

1
5
9
1b/27

H/31
fb/2S1
ff!255
f11241
f3/243
171247
11/17
11 ! 17

extern volatlte unsigned short

extern volatile const unsigned char

call
call acc
clear
olear conf
data
lnt
Int oonf

rr
mr
rej
reset
reset oonf
restart
restart cont
diag
reg
reg cont
other pkt
unknown pkt
Line Setup oonfigured for
emulate or monitor mode.

O-ffflO-4095

Logical channel number In a
received packet. Line Setup
configured for emulate mode
only.

o

q=O
q=1

80/128

Une Setup configured for
emUlate mode only.
extern volatile const unsigned char

extern vOlatHe const unsigned char

o

d=O

40/64

d=1
Une Setup configured for
emulate mode only.

o

m=O
m=1
Line Setup configured for
emulate mode only.

10/16

extern volatile canst unsigned char

0-7 (MOD 8)

Une Setup configured for
emulate mode only.

extern volatile const unsigned char

0-7 (MOD 8)

Line Setup configured for
emulate mode only.

extern volatile canst unsigned char

(see Figure 36-15-Llne Setup configured for
emulate mode only)

extern volatile const unsigned char

(consult CCITT Recommendation X.25,
pp.237-8-Une Setup configured for emulate
mode only)

72-4

~.
f

72 X.25 Layer 3 Library

!

Table 72·2 (continued)
Type

Value (hex/decimal)

Variable

Meaning

(actual value of packet type byte-Line Setup
configured for emulate mode onfy)

extern volatUe oonst unsigned, char
extern volatile const unsigned char

b/11

fIlS
13/19
17123

o

23/35
27/39
1

5
9
1b/27
1fI31
fb/251
ff/255
f1/241
f3/243

17/247
11117
11/17

call
call ace
clear
olear oonf
data
Int
Int cenf
rr
rnr
reJ
reset
reset cont
restart
restart cont
diag
reg
reg cont
other pkt
unknown pkt
Une Setup configured for
emulate mode only.
Inter-layer message buffer

extern volatile unsigned short

number (actually, an IAPX-286
segment number). This
segment number can be
converted to a pointer by
shifting It left 16 bits. Une
Setup oonflgured for emulate or
monitor mode.
extern volatile unsigned short

m_packeUnfo_ seg

Same as myacket_buff_seg.

extern volatile unsigned short

m_packet_sdu_offset

Offset to where the service data
unit begins In an Inter-layer
mesHge buffer. Add to
mykt_buff_s8g (converted to
pointer) to point to first
packet-header byte. Line Setup
configured for emulate or
monitor mode.

extern voiatHe unsigned short

myacketJnfo_offset

Offset to where the packet
Information begins, excluding
the header. Add to
mykt_buff_seg (converted to
pointer) to point to paoket data.
Une Setup oonflgured for
emulate or monitor mode.

extern volatile unsigned short

Length of the packet, Including
header. Une Setup configured
for emulate or mo\'lltor mode.

extern volatile unsigned short

Length of the packet
Information, excluding the
header. Line Setup configured
for emulate or monitor mode.

72-5

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Table 72-2 (continued)

Type

Variable

Value (hex/decimal)

Meaning

Inter-layer message Duffer
number (aotually. an IAPX-286
segment number) In a received
paoket. This segment number
oan be oonverted to a pointer
by shifting it left 16 bits. Une
Setup oonfigured for emulate
mode only.

extern volatile unsigned short

extern volatile unsigned short

rcvd_pkt-,nfo_seg

Same as rcvd_pkt_buff_seg.

extern unsigned short

rcvd _pkt_sdu_offset

Offset to where the servloe data
unit begins In an Inter-layer
message buffer in a paoket
received. Add to
rcvdykt_buff_seg (oonverted to
pointer) to point to first
packet-header byte. Une Setup
configured for emulate mode
only.

extern volatile unsigned short

Offset to where the paoket
Information begins, exoludlng
the header. Add to
rcvdykCbuff_seg (oonverted to
pointer) to point to paoket data.
Line Setup oonflgured for
emulate mode only.

extern unsigned short

Length of a reoeived packet,
including header information.
Line Setup configured for
emulate mode only.

extern volatile unsigned short

Length of the information In a
received packet, excluding the
header. Line Setup configured
for emulate mode only.

extern volatile unsigned char ..

Pointer to the packet, beginning
at the first byte in the header.
Une Setup oonflgured for
emulate or monitor mode.

extern volatile unsigned char ..

Pointer to the information in a
packet. Initially points to the
byte Immediately following the
packet-type byte. Une Setup
configured for emulate or
monitor mode.

extern volatile unsigned char •

Pointer to the packet, beginning
at the first byte In the header.
Une Setup configured for
emulate mode only.

extern volatile unsigned ohar •

Pointer to the packet
Information, Initially loeated at
the byte immediately following
the packet header. Une Setup
configured tor emulate mode
only.

72-6

72 X.25 Layar 3 Library

Table 72·2 (continued)
Type

Variable

Value (hex/decimal)

extern volatile const unsigned char

o

extern unsigned char

1
4

5

8

9
12/18

extern unsigned ohar

o

13..;suppress

1

~.

('

I'

!

Meaning

Path number oonnecting
reoeived packet to partioular
LCN and particular set of oali
parameters on the X.2S Packet
Level Setup screen. Line Setup
configured for emulate mode
only.
.normal
reverse
low
reverse low
blink
reverse blink
blink low
Line Setup oonflgured for
emulate or monitor mode.
off
on
Une Setup configured for
emulate or monitor mode.

A C programmer does not have to specify a packet type. To include all
packets in a condition. use the event variable only:
CONDITIONS:
{
dttJtZcktt
}

2. Emulate mode only. Some events may be detected in emulate mode only.
These are rcvdyacket, invalldyacket, pr_error, ps_error, and packet_sent.
If you try to use one of these variables in monitor mode, you may be

returned to the main program menu. When you go to the Protocol
Spreadsheet and search for errors, a message like the following may be
displayed: "Error 140: Unresolved reference rcvdyacket. "
When the user selectsRCV on the first rack of softkeys for Layer 3
conditions, a second rack appears from which he must select a particular
packet type. When the translator converts a ReV DATA condition into C. it
will include two C variables, one event variable and one status variable:
{

rClIdJocket &&(rcvdJocIceLtype

== 0)

)

As a C programmer, you do not have to specify a packet type. To include
all received packets in a condition, use the event variable only:
CONDITIONS:
{
rcvdJocket
}

72-7

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Error detecting may be accomplished via pr_error. ps_error, and
invalid....Packet. These variables equate to the softkey tokens bearing similar
names.
One of the emulate-mode variables monitors an emulate action. "SEND"ing
a packet means queuing a packet to be passed down to Layer 2. If the
Layer 2 link is not established. for example, the packet will be held at Layer
3 pending link establishment. The event variable packet3ent will not come
true until the packet actually has been passed to the layer below. Use this
condition to start accurate response-time measurements at the packet level
rather than at the line level.

(8) Status Variables
Status variables are those in Table 72-2 that do not include event in the Type
column. Their associated event variables guarantee that they are updated and
tested.
The softkey-generated condition for received Data packets is RCV DATA. The C
version of the same condition should look like this:
CONDITIONS:
{
rC'IIdJQcket && (rClldJQcket_t'Jpe

== OJ

}

1.

Packet characteristics. All status variables in Table 72-2 containing an m_
prefix are valid in either emulate or monitor mode: m....packet_lcn,
m....packet_lcnJrp, myacket_q, m""packet_d, m....packet_m, m....Packetyr.
m....packetys, myacket3ause, myacket_diag_code, myacket_type, and
m""packet_type_byte.
All status variables in Table 72-2 containing a rcvd_ prefix are valid in
emulate mode only: rcvdykt_Jcn, rcvdykt_q, rcvd""pkt_d, rcvd....Pkt_m.
rcvd""pktyr, rcvd""pktys, rcvdykt_cause, rcvd""pkt_diagn, rcvdykt_type,
and rcvd....Pkt_type_byte.
If you try to use an emulate-mode variable in monitor mode. you may be
returned to the main program menu. When you go to the Protocol
Spreadsheet and search for errors, a message like the following may be
displayed: "Error 140: Unresolved reference rcvd....Packet_type."

2. Packet buffers. Packets are passed up to Layer 3 from Layer 2 in IL
message buffers. Several variables provide the user with access to the
information in the packet that is located beyond the packet-type byte.
These variables are rcvdykt_bufLseg, m""packet_buff_seg,
rcvdyktjdu_of!set, m....packet_sdu_of!set, rcvd""pkt_length, and
myacket_Iength. See Section 63.1 for a more detailed discussion of the
buffer components to which these variables refer.

3. Pointers. Two variables. rcvd""pkt_info""ptr and m....packet_inf0....ptr, point to
the first byte beyond the packet header. You may move these pointers to

72-8

72 X.25 Layer 3 Ubrary

access data throughout the length of the packet. The length is indicated by
rcvd"pkt_info_length (or m"packet_info_length).
4. Path. An IL buffer that is sent down the layers or received up the layers is
provided with a "path" number that ties it. at X.2S Layer 3, to a particular
LCN as well as to a particular set of Call Request parameters on the X.2S
Packet Level Setup screen.
When a call request is sent or received by the I1",j'TERVIEW, the caU
parameters are correlated to the Packet Level Setup screen. If the
INTERVIEW sends a call request that specifies a path number, or if the
INTERVIEW receives a call request that matches one of the path entries on
the setup screen, the LCN of the call request is tied to the path number
(path #3, for example), and any subsequent packets with the same LCN will
satisfy rcvd_devict"path
S conditions.

=

(C) ControlUng Protocol Trace Display
To enhance or suppress particular packets on the Layer:; Protocol Trace screen
in emulate or monitor mode, assign a coded value to IS_enhance or 13Juppress.
The values are listed in Table 72-2. To assign a value to either of these
variables, place the statement in an ACTIONS block. For example. display RNR
~

~.

I .
I

packets in reverse-video and suppress display of invalid packets:
CONDITIONS: RCV RNR
ACTIONS:
{
13_enhance == J;

}
CONDITIONS: RCV INVALID
ACTIONS:
{
13 _suppress :: 1:
}

Check the value of these display-control variables in a
CONDITIONS: RCV DATA
{
13_enhance == 1
}

ACTIONS:
{
l3 enhance = 0;

}

-

or an

ACTIONS

block:

CONDITIONS: Rev DATA
ACtiONS:
{

==

if(13_enhance
1)
13_enhance == 0;

}

72-9

CONDITIONS

block

INTERVIEW 7000 Series Advanced Proarammlna: ATLC-107-951-10B

72.3 Routines
Use the following routines in emulate mode only. If you try to call one of these
routines in monitor mode, you may be returned to the main program menu. When
you go to the Protocol Spreadsheet and search for errors, a message like the
following may be displayed: "Error 140: Unresolved reference 13.Jive_data."

(A) Receive

13_give_data
Synopsis
extern \loid 13Jf\l,_data():

Description
The 13.Jive_data routine takes an interlayer message buffer associated with a
received data packet, chanaes the SOU offset to point to higher-level data. and
sends an N_DATA IND primitive up to Layer 4 along with a reference to this
buffer. The softkey equivalent of this routine is the GV_DATA action on the
Protocol Spreadsheet.
Example
Layer 4 wants access to the line in order to receive and send data. Assuming
X.2S personality packages are loaded at Layers :2 and 3. enter the following

program:
LAVER: 2
STATE: dataUnk
CONDITIONS: DL_CONNECT REO
ACTIONS: DL_CONNECT CONF
CONDITIONS: DL_DATA REO
ACTIONS: SEND INFO "CCDL_DATA»·
CONDITIONS: RCV INFO
ACTIONS: GIVE_DATA
LAVER: 3
STATE: pass data up
CONDITIONS: N_CONNECT REO
ACTIONS: SEND CALL
CONDITIONS: RCV CALL_CONF
ACTIONS: N_CONNECT IND
CONDITIONS: N_DATA REO
ACTIONS: SEND DATA °CCN_DATA»·
CONDITIONS: Rev DATA
ACTIONS:
{

13Ji\l,_data():
}
LAVER: 4
STATE: establish_link
CONDITIONS: ENTER.-STATE
ACTIONS: N_CONNECT REO

72-10

72 X .25 Layer 3 Library

(8) Transmit

-

13 clear path

-

Synopsis
extern void 13_clear"'path (path_number);
unsigned char path_number;

Description
The i3_clear"path routine resets P(R)- and P(S)-related variables. clears the
transmit window, and resets the LeN and address fields to void (unless
permanently assigned on the Layer 3 X.2S Packet Level Setup screen) on a
designated path.

The only parameter is the path number which is to be cleared. The value may
be 0 - 8, or Oxfe if you want the path number to be that of the last received
packet.
Example
When a Clear packet is received, clear the path.
LAYER: 3
ST ATE: clearing
CONDITIONS: RCV CLEAR
ACTIONS: SEND CLEAFLCONF
{
l3_cleor...poth(Oxje);
}

Synopsis
extern unsigned char 13_more_to_resend(path_number);
unsigned thar path_number;

De§Crjptioo
The 13 more_toJesend routine determines whether or not there are any more
packets in the transmit window to resend. It is used in combination with a
transitional condition such as packecsent as a condition on the Protocol
Spreadsheet. The softkey equivalent is PACKET_SENT MORE_TO_RESEND or
PACKET_SENT NO_MORE_TO_RESEND.

72-11

n_._________

_,,_, _ _ _ _ ~___~_.__m_.___

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

The only parameter is the path number associated with the transmit window.
The value may be 0 - 8. or Oxfe if you want the path number to be that of the
last received packet.
Returns
If there is more to resend, the returned value is non-zero. If there is no more
to resend, or if the given path is invalid, the returned value is O.

Example

In this example, the entire transmit window will be resent.
{
extern ellent packet_sent:
}
LAYER: 3
STATE: xfer
Whatever conditions and actions send data precede the following condition.

'*

*'

CONDITIONS: RCV REJ
ACTIONS: RESEND_FIRST
NEXT_ STATE: recover
STATE: recover
CONDITIONS: ENTER_STATE
{
packet~sent 4ul(13_more_to_resend(Ox/e) /= 0)
}
ACTIONS: RESEND_NEXT
CONDITIONS:
{
packet_sent 4ul(13_more_to_Tesend(Oxfe) == 0)
}
NEXT_STATE: xfer

Synqpsis
extern unsigned char 13_windowJull(path_number):
unsigned char path_number;

DescriPtion
This routine determines whether the Layer 3 window for a specified path is full
or not full. .When the window is full. no additional packets will be buffered until
some acknowledgment is received. It is used in combination with a transitional
eondition·such as ,eceiveyaclcet as a condition on the ·Firotocol Spreadsheet,
The softkey equivalent is RCV RR (PROTOCL) WINDOW NOT_FULL or RCV RR
(PROTOCL) WINDOW FULL.

72-12

72 X.25 Layer 3 Ubrary

The only parameter is the path number whose window is to be checked. The
value may be 0 - 8, or Oxfe if you want the path number to be that of the last
received packet.
Returns
If the window is full, or if the given path is invalid, the returned value is
non-zero. If the window is not full. the returned value is O.

Example
Transmit data packets until the transmit window is fulL
{
extern event packet_unt;
}

LAYER: 3
STATE: check_~ndow
CONDITIONS:
{
packet_sent && (IJ_windowJull(Oxje) /= 0)
}
ACTIONS: SEND DATA "((FOX))"

Synyte;
ullsigned char nr_value;
u1isig1led char 1IS_Vlllue;

};
strltet sendJrame_structure rransmttJrame;
statk char transmitjtring lJ ,. "((FOX)";
}

LAyeR: 2
STATE: send_8_frame
CONDITIONS: KEYBOARD ••
ACTIONS:
{

Jet_il_msLbuff(&,UjnJjfer...Jlumber. &relay_baton);
_start_ll_buf/jist (iI_puffer-"umber. &data_start_of/set);
transmitJrQme.bcc_type .. 1;
_insert_iCbUff_list3tU(Il_buffer_number. data_stoTt_of/set, &transmit_stringfOJ.
(sizeof(tran$(nit_string) - Ij);
sendJrame(iCbuffer_number, relay_baton, data_start_of/ser, &,transmitJrame);
}

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

73-14

.Whenth.e&NA~ackage is loaded in via the Layer Setup screen. the following external
variables become; available for use by the: progammer .. ]beiruse on the Protocol Spreadsheet
i8I1ot~jt~4 tp itny particular layer. thQ~.SNAtl"apsmission headers. request/rewonse headers. and request/response units.
Thesevarlab1es ltave no spreadsheet-token equivalents .
Th~ varntl>le$.~t

. 74 ..1 Structures
.

Use the ,SDLC sendJrame _structure shQ!\1min. Table 73-1.

Variables
,
'I1le variables discussed below apply when the Line Setup menu shows either emulate
or mQnitor mode. Emulate mode. however. is not supported by emulate-only
and actions on the ProtocoLSpreaQsheet.

condi~Q~s

,(A)' M~nitoring Events

uJthe

SDLe event variables discussed in Section 73.2(A).

(e) Stit'usVariabtes
,.
Alt;SNA variables in Table 74-1 are staws variables. Also refer to the SDLC
listed in Table 73·2.

. statUs variables
";.,

T1t,.r~

are no st>ftkey tokens on thespteadsbeet tbatare equivalent to the SNA

~bles listed in Table 74-1. To search for Info frames with a FID2

ma~sion header. for example. use C variables. The condition should look
lilt. this:
. CO~OITIONS:
{
dteJram.e .lei: (mJI'llm,;...ty{Je:a;:< 0).£"'. (m-PtZe]utJid_f1.pe
}

!

14-1

='" 2)

INTERVIEW 7000 Series Advanced Programming: ATLC-1 07-951-1 Q8

Table 74·1
SNA Varlablest
Variable

Type

Value (hex/decimal)

Meaning
'i

extern volatile unsigned short

"0'"

L~ngth otth~S:Ulck.tlncluding

mj)8cketJength

the transmission and
request/response headers. Una
Setup configured for emulate or
monitor· mode.
extern volatile canst unsigned char

Tr@,nsmlssi90 Header:
m_packet_tid_type

o
1

2
3
4
f/15

Format Idsntlflcatlgn Type;
FIOO; TH 10 bytes
FID1; TH 10 bytH
FID2; TH 6 bytes
FI03; TH 2 bytes
FID4; TH 26 bytes
FIOF; TH 26 bytes
LIn~SetUp cOl'lfigured for
arnulate" or monitor mode.

extern volatile const unsigned short

o-ffff10-65535

Destination address fleld-2
bytes In .FIDO aJldFlD1: 1 byte
in'FlD2. Une Setup configured
for emulate or monitor mode.

extern volatile const unsigned short

O~fffflo-65535

Destination element field-2
bytes; FID4 only. Line Setup
configured for emulate or
monltor.m~de .

extern volatile const unsigned long

O-ffffffffI
0-4294967295

Destination subarea address
fleld-4 bytes; FI04 only.
UneSetup configured for
el'ntdate or" monitor mode.

extern volatile const unsigned char

(actual value

of byte)

Lgoal sesSIon Identlficatl.on;
FIDa only
ssqP-PlI session
SSCP-LUsession
Reserved
LU~LU session
Line Setup configured for
emulatE! ()f" monitor mode.
)

extern volatile const unsigned short

00-1f10-255

Orlgln address fleld-2 bytes in
FIDOand FID1; 1 byte In FID2.
LIn$ Setup configured for
emulate or monitor mocle.

extern volatile cOl'!st unaigned short

00-fIIO-2oS

origin element field-2 bytes:
fl04 only. I.lne Setup
cOliflgured for emulate or
monitor mode.

extern volatile const unsigned long

O-ffffffff I

0t1QIn subarea address fleld-4
bytes; FID4only. Line Setup
c~gured for emulate or
monitor mode.

t

0-4294967295

Refer to Table 73-2 for SDl.e variables.

74-2

Table 74..1 (continued)

Type

Meaning
Tr~¥jll~l~tI",_fRl2D\_l ;
th_ptr .

Pointer for the transmlsslon
.header; begins at the byte
oontainlng FlO type. Line Setup
configured for emulate or
monl~or mode.

Bgquewa~e11t.r:;
extern volatile

OOMt·lJn$~ ~har

m_paCket..;.N;':'Celtegory
(}

aOl.32
40164
60/96

extern VOlatile donlrt

Llnsi~

¢har

o
8

extern volatile oonst unsigntifd char

M_paoke.t_rrI
0
80/128

extern volatile unsigne.d ohar

m_paCketJtl
()

10/16

. BiQ!.lUt/BesQQllH VOlt;
Fum:tton Management Data
(FMO)
NetwQtt Control (NO)
DataFlow Control (OFC)
Sesiion Control (SC)
L.lr1$ SetUP oonfigured for
emulate or monitor mode.

Emmit Indlea.tor:
User ·data without header In RV
In LV-L.V frame, Indicates
header fOIIow& the RH. In SC,
NC. or DFC RU, indicates a
formatted RU beginning wlth III
request code .
. .One Setup configured for
emulate or monitor mode.
FlCQUIttjReSl90H IQdicator:
request
re$pi)nse
LIn$ Setup oonflgured for
emulate or monitor mode.

Bi\_90S. IY" fndIcator:
~lve

response

neoatIve response

LIne Setup eonflglJred for
emulate or monitor mode.
extern volatile unsigned chat

m~aeket_sdl

0

4

extern yolatlle unalOOtld. char •

rh_ptr

exte.m volatile ~d

N~tr

~ Pit, lodlqltQ(i
SeI\ge data not Included

sense data included
Lln$Set~ oonfigured for
emulate or monitor mode.
Pointer for the request/response
header; begins at the byte
oontalnlng the request/response
indicator. Line Setup oonfigured
for' emulate or monitor mode.

BeQYutlBtwoostlJOlt:

chat •

Pointer for Ute request/response
unit: .begins at the first byte in
the unit. LIne Setup configured
for emulate or monitor mode.

74-3

INTERVIt;W 7000 Series Advanced Programming; ATI,,e-107-9S1-108

1.

Info frame characteristics. Most Status variables in Table 74-1 contain an
m_ prefix, indicating that they are valid in emulate or monitor mode; Some
variables are associated with the transmission header: myacket.Jid_type,
myacket_daf, myacket_def, myQcket_dsaj', mYQcIGet:..;,lsid, myacket_oaf,
myacket_oej, and myacket_osaj. Other variables are associated with the
request/response header: myacket_ru_category, myacket.Ji, myacketJri,
myacketJti, and myacket_sdi.

2. Pointers. There are three pointers to SNA fields. thytr points to first byte
of the transmission header, rhytr points to the first byte of request/response
header. and ruytr points to the stan of the request/response unit.

(C) Controlling Protocol Trace Display
To enhance or suppress particular packets on the Layer 2 Protocol Trace screen
in emulate or monitor mode. assign a coded value to 12_enhanceor 12_suppress.
The values are listed in Table 73-2. To assign a value to either of these
variables. place the statement in an ACTIONS block. For example. display only
Info frames with FID2 transmission headers. Of these, display frames with sense
data in reverse-video.
CONDITIONS:
{

dteJrame && (mJrameJype

== 0)

&& (mJacketJid_type 1= 2}

== 0)

&& (mJaclcetJid_type

}
ACTIONS:
{

12_suppress = 1;
}
CONDITIONS:
{

dteJrame && (mJrame_type

== 2)

&& (mJack.et_sdi

== 4)

}

ACTIONS;

{
12_enhance = 1;
}

Check the value of these display-control variables in a CONDITIONS block
CONDITIONS:
{

dteJrame && (mJrame_type == 0)&& (m"paclr.etJid_type != 2) .&& (l2_supp~ess == 0)
}
ACTIONS:
{

12_suppress '" 1:
}

74-4

or an

ACTIONS

block:

CONDITIONS:
{
dteJrame && (mJrame_type
}
ACTIONS:
{

;= 0) && (mJacketJid_type

1:: 2)

ijO'l_suppress "'''' 0)
12_suppress '" 1;
}

74.3 Routines
There are no routines associated exclusively with SNA. Use the SDLe routines
discussed in Section 73.3. To send a frame including SNA protocol, for example.
include a transmit_string of SNA data in the sendJrame routine.

INTEBVI/iW7000 Series Advanced Programming: AUO...,f.07-951-1CS

74-6

When

th~

Dn<:MP package is loaded in via the Layer Setup screen. the following external
for use by the.progra:mmer. Their use on the Protocol Spreadsheet
is not limited to ~ny particular layer, though normally they belong at Layer 1.
1,fa$bl~.~omeJavailable

Thel;~.$ie no extern structures associated exclusively with DDCMP.

r~e. onlY'.

variables exclusive to DDCMP relate to block checking. When the
PPCMP'package is loaded in. the resl.ll:ts of b~th header and data bl()¢ck dleeks ace
disP~~Gi on the data screen. If you want your program to detect good or bad
BCE.'.1s. you may use the BeC selections on the trigger menus and at Layer 1 of the
Protocol;Spreadsheet to interrogate the header block check only .

.

If you ~nt to detect a good or bad data block check, you must use one of the C
;e~entv,a#ables listed in Table 75-1.
H~re is .~ program that counts bad DTEBCC*s for both header and data:
{

t

LAVeR; 1

STATe; count aU bad cite bees
CONDtTIONS: -OTE-SADBCC
ACTiONS: COUNTER tjidbcc INC
CONOITfONS:
{ .

75.3 RouUnes
There are no routines associated exclusively with DDCMP.

INTERVlEW]OOO Series Advanced Programming: ATLC-107...,951-108

Table 75-1
OOCMP Variables
Type

Variable

Value (hex/decimal)

Meaning

T~ rmfm. agoJd,;~~d8crabe

extern fast_event

Is reeelVed'on RD. Une Setup
configured for emulate or
monitor mode.
extern fast_event

True when a good header Bee
Is receIVed on TO. Une Setup
configured for emulate or
monitor mode.

extern fast_event

True when a bad header Bee Is
received on RD. Line Setup
•oQrlfl9ured~or em~e or
monitor mode.

extern fast_event

True when a bad header ace is
received on TO. LIne Setup
oonflgured for emulate or
monitor mode.

extern fast_event

True When a goOdoata Bee is
received on TO. Una Setup
configured for emulate or
monitor mode.
True when a good data Bee is
received on RD. Une Setup
conflgU:red for emulate or
monitor mode.

extern fast_event

True when a bad data Bee Is
reoelVEKI on TO. Une Setup
configured for emulate or
monitor· mode.

extern fast_event

True when a bad data Bee Is
received on RD. Une Setup
configured for emulate or
monitor mode.

75-2

76ISDND' Channel library
To ~~ th~ C s~ctures.• variaples. atld Z;Q:UJ;i~~s expl~ec:iin_ section, your INTERVIEW
·ltulaU .thelSJ;)NTest tn,te;,l'{flce Module (TIM) in the rear
of the INTERVI;EW. as explained in Secti:op,.aQ.AJ,soinstaU~;tSDN mux board according
to the directions: in Appendix J4. Load in the ISDNJ) Layer 1 package via the Layer Setup
ser.eeo. 'The .1SlpN_D .pac.kage contains ,thevarlables' and '~'·ofthe routines documented
'. be;low. Finally., iJielectone of the :Bcftaooeis in the eheM~tfitld on the ISDN Interface .
~.tup. screen. See Section 48.S.

must, beequi~d with Option 15,

.

.

The Configur8tionOf the INTERVIEWf:ie~rlU:~d above. suppofi.s~al-channel monitoring.
Dual-channel mhnitoring means tra,*ingo~ 'otthe ,B channelsan,d the D channel. All
menu selections :(with the possible eXception of s~a:k8r on 'the ISDN Interface Setup menu),
triggers. and spreadsheet conditions.~ ~ apply to the It channel selected. Use the C
structures. varial?les, and routines .m.thi&,:.se~()nto monitor the D channel.
NOTE: When thelSD~~g.~erface Setup screen shows Channel:
' •• _':'
' fi"
'..11 4:
•
t_
h
1
..

*~"~«:!f''f.<~'"''

~~;&":~:~:i~j~. ~our~~~~~, c;9n~re? '(Jr, sms:~;",c.atltlelrl~ltot:ma.
Menu selections. ttiggers•. ~.~~. the. Protocol Spreadsheet apply. to

the D channel. Do not load in the lSDN_D Layer 1 package.
You may develop your own program to mOnitor the D channel. or simply load and run the
Fqgnml contain~d in the ISDN trace application package (available as OPT-951-3S).

,76i.. 1 StrueJures
Use the. structure xmit_lisl. shown in Table 76-1. when transmitting on the 0 channel
Viailie~end_dJrame routine. Refer to send_dJrame in Section 76.3 for an
exampl~

of how to use this .strUcture.
Table 76-1
ISDNStructuret

",,-,

,

- ,-

Variable
S:tfll~tyreNamei

Strvcture <:ita trarnltrlft: !lst for send d frame
routine. ~~d.$~& $truer. ReffJrenoe
memberv~"ct ihe'ittucturG as follow$;

xmit.;..Iist

xmltjl$t.• Wlngjetlgth.
t.II'I$~~

ol;1¥ ..

u~dshort

th,e

P.Qinter tQ
~at~n.Of the traMmit string-the
Vamlntftstrtno l$~artad separately

strJrtg.
#tring..~h

~ttffi~"6

length of~tt~ string

INTERVIEW 7000 Serips Advanced Programming: ATLC-1Q7-9S1:-108

76.2 Variables
There are three event variables associated with the ISDN_D personality package.
They are d_dteJrame. d_dceJrame. and d••lcvJrame. See Table~6-2.

(A) Monitoring Events
1. In monitor mode. When a frame is detected on the D channel. one monitor
event; d_dceJrame or d_dteJrame, is signaled. Use both event variables to

conStruct an ISDN trace,
emu~(Jte mode. In emulate mode. the receive event dJcvJrame and one
of .the monitor events are signaled when a frame is received on the D
channel. The INTERVIEW's transmissions on the D channel may not be
monitored when the unit is in dual-channel mode. The implica~on of this
difference is that ISDN trace programs written in monitor mode may not be
placed intact in an emulation program.

2. In

Table 7&·2
ISDN Variables
Type

Value (hex/decimal)

Variable

Meaning

extern event

True when a DTE frame is
deteoted on the D ohannel.
Line Setup oonfigured for
emulate or monitor mode.

extern event

True when a DCE frame Is
detected on the D channal.
Une Setup conflgur.d for
emulate or monitor ·mode.
True when a frame Is reoeived
on the 0 channel. Une Setup
oonfigured for emulate mode
only.

extern event

76.3 Routines
There are twtrroutines associated with the ISDN_D pl1ckage!send.:..dJrameand

send_dJrame_il. Another ISDN routine, set_isdn_speaker_chan, controls the
speaker for either of the B channels. This routine is supplied by the ISDNTe'St
lnterface Module.

(A). Transmit
Use the following routines in emulate mode only. If you try to call one of these
r~utines in mon~tor mode, you may be returned to the main program menu.

When you go to the Protocol Spreadsheet and searCh for errors. a message like
the following may be displayed: "Error 140: Unresolved reference

send_dJrame_il. "

76-2

76

ISDN D Channel Ubrary

Synopsis
extern void send_dJrame(count, struct3end_sfringJtr, xmit_tag);
unsigned short count;
struet xmit_list
unsigned char" stringJtr;
unsigned short strinLlength;

}:
struet xmit_tist ,. struct_send_stringJtr;
unsigned short xmit_tag;

DescriPtion

The send_dJrame routine sends a specified string on the D channel 'with a
user-determined BCC.

;~\
I.

The first parameter is the number of strings to be sent.
The second parameter is a pointer to a structure which in turn identifies the
location and length of each string.
The third parameter is a transmit tag which includes a BCe in bits 0-2: good
(001). bad (010). or abort (011). Bits 3-7 are reserved for future use.
Integers may be used to indicate the value of the transmit tag: good (1). bad
(2). and abort (3).
Example
Assume you want to send on channel D a fox message inside of an X.2S data
packet with a good block check. You might have 2 strings. one with the Layers
2 and 3 header information. and one with the fox message. You would send
these strings as follows:
{

unsigned char headers {}:< {oxO!, OxOO, OxlO. OX04, OxOO};
unsigned char message [J "" "(FOX)) ";
{

unsigned char" string;
unsigned short string_length;

};

struet xmit_tist send_string 11 "" {&headers[O}. S, &message[O}, sizeo!(message) - I};
}

76-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

LAYER: 1
STATE: send_message
CONDITIONS: KEYBOARD • •
ACTIONS:
{
send_dJrame(2, &send_stringED]. 1);
}

Syno.psis
extern void send_ dJrame _il (ii_buffer_number, relay_baton, data_starr_offset , transmit_tag);
unsigned short ii_buffer_number;
unsigned short relay _baton:
unsigned short data_start_offset;
unsigned short transmit_tag;

Description
This routine sends a designated interlayer message buffer out on the D channel.

The first parameter is the interlayer message buffer number.
The second parameter is the maintain bit used to hold the buffer while the send
operation is performed at Layer 1.
The third parameter is the offset from the beginning of the buffer to the service
data unit (SDU).
The fourth parameter is a transmit tag which includes a Bee in bits 0-2: good
(001), bad (010). or abort (011). Bits 3-7 are reserved for future use.
Integers may be used to indicate the value of the transmit tag: good (1). bad
(2). and abort (3).
:example
Send the same text as in the example for send_dJrame . Refer to Section
63.3(A) for a description of the ,Jet_iCms8_bu//. Jtart_iCbu/Llist, and
_insert_il_bu//_lisl_cnt routines.
{

unsigned
unsigned
unsigned
unsigned

short ii_buffer_number;
short relay_baton;
short data_start_offset;
char message (] '" "Ol\xOOOlo0~\xOOO((FOX)) ";

}

76-4

76

ISDN D Channel Library

LAYER: 1
STATE: senctmessage
CONDITIONS: KEYBOARD ••
ACTIONS:
{
Jet_il_msLbuff(&il_buffer_lIumber, &relay_baton);
_starUI_bufLlist(il_buffer_number, &datajtart_offset);
_insert_il_buff_list_cnt(il_buffer_number. data_stort_offset, &message{O],
(sizeof(message) - 1));
send_dJrame_il(il_buff"_lIumber, relay_baton, data_start_offset, 1);
}

(8) Speaker Control

Synopsis
extern void set_Isdn _speaker_chan (selection);
unsigned short selection;

Description
The set_isdnjpeaker_chan routine allows the programmer to control the speaker
located on the ISDN mux board. Option 15. The programmer may enable the
speaker for one of the B channels. This selection is independent of the channel
selected for monitor or emulation on the ISDN Interface Setup screen.

The only parameter is the channel selection. A value of one means tum the
speaker on for channel Bt. Enable the speaker for channel B2 with two. Tum
the speaker off by setting the value to zero.
Example
Suppose you want to know whether data or voice is being transmitted over
channel B1. Use the set_isdnjpeaker_chan routine to enable the speaker for
B 1. Even if you are otherwise using the INTERVIEW to monitor B2. you will
hear the Bl transmissions.
LAYER: 1
STATE: enable_b1
CONDITIONS: KEYBOARD
ACTIONS:
{
set_isdn_speaker_chan ( 1) ;
}

·sS~

76-5

INTERVIEW 7000 Series Advanced ProQramming: ATLC-107-951-108

76-6

77 LAPD Library

77 LAPD Library
When the LAPD package is loaded in via the Layer Setup screen, the following external
routines and variables become available for use by the programmer. Their use on the
Protocol Spreadsheet is not limited to any particular layer, though normally they belong at
Layer 2.
The variables and routines approximate LAPD Layer 2 spreadsheet-generated conditions and
actions. Refer to Section 39 for more detailed explanations of the purposes of specific
conditions and actions. Sometimes the name of the variable or routine is sufficient for
identifying its related spreadsheet token. When this is not the case, the information is
provided below.

77.1
.r.~\
,'- t
i

Structures
The structure sendJramejtructure defines the format of transmitted LAPD frames .
See Table 77-1. Use this structure to send frames via the sendJrame routine in
emulate mode. See Section 77.3(B). Each variable in the structure relates to some
softkey selection or user entry in the SEND action.

77.2 Variables
(A) Monitoring Events
1. Emulate or monitor mode. LAPD events include frames detected, good or
bad Bee's, and aborts. All event variables in Table 77-2 containing a dle_
or dee_ prefix are valid in either emulate or monitor mode. These event
variables are dteJrame, deeJrame, dteJood_bcc. dceJood_bce,
dte_bad_bec, dee_bad_bee, dte_abort, dee_abort. The variable
dceJood_bce, for example, equates to DCE GDBCC.
You can use both dte and dee variables relating to the same event in one
conditions block. Suppose you want to count all bad Bee's from either side
of the line. Enter the following CONDITIONS/ACTIONS block:

~l·\

'f'

CONDITIONS:
{
die_had_bee II dee_had_bee
}
ACTIONS: COUNTER bad_bCc INC

1

77-1

INTERVIEW 7000 Series Advanced ProgrammIng: ATLC-107-951-10B

Table 77-1
LAPO Structures
Type

Variable

Value (hex/decimal)

Meaning

Structure Name; send_frame_structure

Structure of a frame in LAPD. Declared as type
struct. Declared automatically if a
softkey-entered SEND action Is taken. Program
frames assigned to structure as follows: struct
send frame structure name. Reference a
structure variable as foRows: name.bcc type. If
values In the frame structure are not Initialized by
the user, they default to O. You may Initialize the
values when the structure Is declared:
struct send_trame_structure name = {1. 1, 2. 0,
0,0,1.1,1,0,0,O};

unsigned char

sapLtype

no other value valid-Indicates a value Is given

unsigned char

teUype

no other value valid-Indicates a value Is given

unsigned char

or_type

o

o

1

1

2

loopback

unsigned char

frame_type

(The codes for frame type are the same as for the LAPD-varlable
rcvdjrame_type.j
-

unsigned char

nr_type

o

,

auto
value
received ns plus 1
last nr sent

2
3

o

unsigned char

2
3

auto
skip
last nr received
value

o

o

1

1
loopbaek

1

unsigned char

2
unsigned ehar

boo_type

o

default (bad bee)
good bee
bad bcc

1

2
3

abort

unsigned char

sapLvalue

00-3"0-63

unsigned char

tel_value

OO-7flO-127

unsigned ehar

ontrLbyte

(actual value of the control byte)

unsIgned ohar

nr_value

0-7 (MOD 8)

If nr_type ,. 1

unsigned char

ns_value

0-7 (MOD 8)

if ns_type :: 3

77-2

77 LAPD Ubrary

Table 77-2
LAPD Variables
Type

Value (hex/decimal)

Variable

extern event

Meaning

True when a OTE frame Is
detected. Une Setup
configured tor emulate or
monitor mode.
True when a OCE frame Is
detected. Une Setup
configured for emulate or
monitor mode.
True When a good Bee is
calculated for a OTE frame.
Line Setup configured for
emulate or monitor mode.
True When a good Bee is
calculated for a OCE frame.
Une Setup configured for
emulate or monitor mode.
True When a bad Bee Is
calculated for a OTE frame.
Une Setup configured for
emulate or monitor mode.
True When a bad Bee Is
calculated for a DeE frame.
Une Setup configured for
emulate or monitor mode.
True When an abort Is detected
for a OTE frame. line Setup
configured for emulate or
monitor mode.
True when an abort Is detected
for a DeE frame. L.1ne Setup
cOnfigured for emulate or
monitor mode.
True When a frame Is reoeived.
Line Setup configured for
emulate mode only.
True when an invalid frame is
detected. Line Setup
configured for emulate mode
only.
True when the T1 timeout-timer
has expired. Une Setup
oonfigured for emulate mode
only.
True when a Bee error is
detected. Line Setup
configured tor emulate mode
only.
True when an N (Rl error Is
detected in a received INFO or
supervisory frame. Une Setup
configured for emulate mode

extern event

extern event

extern event

extern event

extern event

extern event

extern event

extern event
extern event

extern event

extern event

extern event

only.

True When an N(SI error Is
detected in a received INFO
frame. Line Setup configured
10r emulate mode only.

extern event

77-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Table 77·2 (continued)
Type

Value (hex/decimal)

Variable

extern event

Meaning

True when frame Is passed
down to Layer 1. Line Setup
configured for emulate mode
only.
LIne Setup configured for
emulate or monitor mode.
Une Setup configured for
emulate or monitor mode.

extern volatile const unsigned char

00-3f10-63

extern volatile const unsigned char

00-7f/0-127

extern volatile const unsigned char

o

o

1

1

Une Setup configured for
emulate or monitor mode.
(same as rcvd frame type-Une Setup
configured for-emulate or monitor mode)
(actual value of control byte-Line Setup
configured for emulate or monitor mode)

extern volatile oonst unsigned char
extern volatile const unsigned char

o

extern volatile oonst unsigned char

10/16

extern volatile const unsigned ohar

1
2
3

extern volatile const unsigned char

0-7 (MOD 8)

extern volatile const unsigned char

0-7 (MOD 8)

extern volatile const unsIgned char

rcvd_frame_addr_sapl

00-3f10-63

extern volatile const unsigned char

rcvd_frame_addr_tel

00-7f/O-127

o

extern volatile const unsigned char

1

2

o

extern volatile const unsigned char

1

'3
5
9
2f/37
6f/111
43/67
f/15
1/15
63/99
67/103
87/135

e7l224
ff/255
ff/255

77-4

pf=O
pf=1
Line Setup configured for
emulate or monitor mode.
good.
bad
abort
Line Setup configured for
emulate or monitor mode.
Une Setup oonflgured for
emulate or monitor mode.
Line Setup configured for
emulate or monitor mode.
Line Setup configured for
emulate mode only.
Line Setup configured for
emulate mode only.

o

1
Ioopback
Line Setup configured for
emulate mode only.
Info
rr
ul
mr
raj
sabm
sabme
disc
dm
sarm
ua
slo
frmr
sl1
other
unknown
Line Setup configured for
emulate mode only.

77 LAPD Library

Table 71-2 (continued)

Type

Variable

Value (hex/decimal)

Meaning

extern volatile const unsigned char

(aoWal value of control byte-Une Setup
configured for emulate mode only)

extern volatile const unsigned char

o
10/16

pf=O

pf=l
Line Setup configured for
emulate mode only.

1

extern volatile const unsigned 'char

2
3

good
bad
abort
Line Setup configured for
emulate mode only.

extern volatile const unsigned char

0-7 (MOD 8)

Une Setup configured for
emUlate mode only.

extern volatUe const unsigned char

0-7 (MOD B)

Line Setup configured for
emulate mode only.

extern volatile unsigned short

Inter-layer message buffer
number (actually. an IAPX-286
segment number) in a received
frame. This segment number
can be converted to a pointer
by shifting It left 16 bits. Line
Setup configured for emulate
mode only.

extern volatile unsigned short

Offset to where the service data
unit begins In an Inter-layer
message buffer In a received
frame. Add to buffer segment
number (converted to pointer)
to point to first byte in frame.
Line Setup configured for
emUlate mode only.

extern volatile unsigned short

Size of service data unit In a
received frame. Line Setup
configured for emulate mode
only.

extern volatile unsigned short

When equal to upper edge.
window Is full; when equal to
lower edge. window Is empty;
when not equal to upper edge.
window Is not full; and when not
equal to lower edge, window Is
not empty. Line Setup
oonfigured for emulate mode
only.
see 12_current_window_edge

extern volatile unsigned short

12Jower_window_edge

extern volatile unsigned short

12_upper_window_edge

see 12_current_window_edge

extern volatile unsigned short

12Jesend_edge

When resend edge Is not equal
to lower window edge. there Is
more to resend; when resend
edge Is equal to lower window
edge. there Is no more to
re.end. Une Setup configured
for emulate mode only.

77-5

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

Table 77-2 (continued)

Type

Variable

Value (hex/decimal)

o

extern unsigned ehar

1

4
5
8
9
12118

o

extern unsigned char

1

Meaning

normal
reverse
low
reverse low
blink
reverse blink
blink low
Una Setup configured for
emulate or monitor mode.
off
on
Line Setup configured for
emulate or monitor mode.

Using spreadsheet tokens. the same test needs two CONDITIONS/ACTIONS
blocks:
CONDITIONS: DTE BDBCC
ACTIONS: COUNTER bad_bee INC
CONDITIONS: DCE BDBCC
ACTIONS: COUNTER bad_bee INC

When the user selects DTE or DCE on the first rack of softkeys for Layer 2
conditions. a second rack appears from which he must select a particular
frame type. A DTE INFO condition. for example. when translated. includes
two C variables. one event variable and one status variable:
dteJrame && (mJrame_fype == 0)
)

In C, the programmer does not need to specify a frame type. To include all
frames in a condition, use the event variable only:
CONDITIONS:
{

dteJrame
}

2. Emulate mode only. Some events may be detected in emulate mode only.
The event variables are rcvdJrame. invalidJrame. 12_T1. bee_error.
nr_error. ns_error. and frame_sent.
If you try to use one of these variables in monitor mode. you may be

returned to the main program menu. When you go to the Protocol
Spreadsheet and search for errors. a message like the following may be
displayed: "Error 140: Unresolved reference rcvdJrame."
When the user selects RCV on the first rack of softkeys for Layer 2
conditions, a second rack appears from which he must select a particular

77-6

77 LAPD Library

frame type. When the translator converts a Rev INFO condition into C. it
will incltide two C variables, one event variable and one status variable:
rcvdJrame && (rcvdJrame_type

== O)

}

The C programmer does not have to specify a frame type. To include all
received frames in a condition, use the event variable only:
CONDITIONS:
{

rcvdJrame
}

Error detecting may be accomplished via bec_error, nr_error, ns_error, and
invalidJrame. These variables equate to the softkey tokens bearing similar
names.
One of the emulate-mode variables monitors an emulate action. The event
variable frame _sent will not come true until the frame actually has been
passed to the layer below.

(8) Status Variables
Status variables are those in Table 77·2 that do not include event in the Type
column. Their associated event variables guarantee that they are updated and
tested.
The softkey-generated condition for received Info frames is ReV INFO. The C
versi.on of the same condition should look like this:
CONDITIONS:
{

rcvdJrame && (rcvdJrame_type == 0)
}

1. Frame characteristics. All status variables in. Table 77-2 containing an m_
prefix are valid in either emulate or monitor mode: mJrame_addr_sapi,

mJrame_addr_tei, mJrame_addr_cr, mJramejype, mJrame_cntrl_byte_l,
mJrameYf, mJrame_bcc_type, mJrame_nr, and mJrame_ns.
All status variables in Table 77-2 containing a rcvd_ prefix are valid in
emulate mode only: rcvdJrame_addr_sapi, rcvdJrame_addr_tei,

rcvdJrame_addr_cr, revdJrame,-type, rcVdJranfe_cntrl:,..byte_l,
rcvdJrameYf, rcvdJrame_bccjype, rcvdJrame_nr, and rcvdJrame_ns.
If you try to use an emulate-mode variable in monitor mode. you may be
returned to the main· program menu. When you go to the Protocol

Spreadsheet and search for errol'S, a messa.e like the following may be
;displayed: "Error 140; Unresolved reference rcvdJrame_lype."

77-7

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

2. Frame buffers. As BOP frames are received. they are automatically placed
in IL message buffers to be passed up the layers. Three emulate-mode
variables provide the user with access to the information in the frame that is
located beyond the control byte. These variables are rcvdJrame_buff_se8,
rcvdJrame_sdu_offset. and rcvdJrame_sdu_size. See Section 63.1 for a
more detailed discussion of the buffer components to which these variables
refer.
Make a pointer to an IL buffer by casting rcvdJrame_buff_seg as a long,
shifting it left sixteen bits, adding rcvdJrame_sdu_offset, and casting the
result to a pointer. Increment the pointer twice (thereby adding two to the
offset) .

unsigned char .. ptr;
ptr = ('\loid *)(((/ong)rcvdJrame_bufLseg« 16) + rcvdJrame_sdu_offset);
ptr+=2;
}

It is now pointing at the first byte in the information field. You may

continue to move through the frame for its entire length. indicated in
rcvdJrame_sdu_size.

3.

Transmit window. Four related variables test the status of the Layer 2
window. The particular values of these variables at any given time is not
significant. What is significant is how they compare to each other. The
softkey status condition on the left makes the variable comparison on the
right:
WINDOW FULL

12_current_window_edge =:: 12_upper_window_edge

WINDOW EMPTY

12_current_window _edge == 12_lower_window _edge
12_current_window_edge != 12_upper_window_edge

WINDOW NOT_FULL
MORE_TO_RESEND

12_current_window_edge != 12_'ower_window _edge
12Jesend_edge != l2_1ower_window _edge

NO_MORE_TO_RESEND

12_rtsend_edge

WINDOW NOT_EMPTY

== 12_1ower_window _edge

(C) ContrOlling Protocol Trace Display
To enhance or suppress particular frames on the Layer 2 Protocol Trace screen
in emulate or monitor mode. assign a coded value to 12_enhance or l2_suppress.
The possible values are listed in Table 77-2. To assign a value to either of these
variables. place the statement in an ACTIONS block. For example. display RNR
frames in reverse-video and suppress display of in,valid frames:

77-8

77 LAPD Ubrary
CONDITIONS; RCV RNR
ACTIONS:
{
12_enhallce ::: 1;
}

CONDITIONS: RCV INVALID
ACTIONS:
{
12_suppress'" 1;
}

Check the value of these display-control variables in a

CONDITIONS

block

CONDITIONS: RCV INFO
{
l2_enhallce =::: 1
}
ACTIONS:
{
12_enhance = 0;
}

or an

~fi"
,

I

;

ACTIONS

block:

CONDITIONS: Rev INFO
ACTIONS:
{
if(12_enhance =: 1)
12_enhance ::: 0;
}

77.3 Routines
Use the following routines in emulate mode only. If you try to call one of these
routines in monitor mode. you will be returned to the main program menu. When
you go to the Protocol Spreadsheet and search for errors. a message like the
following will be displayed: Error 140: Unresolved reference 12Jive_data. "
II

(A) Receive
12_give_data
Synopsis

DeSl;rjption
The 12.Jive_data routine takes an interlayer message buffer associated with a
received INFO frame, changes the SDU offset to point to higher-level data, and
sends a DL_DATA IND primitive up to Layer 3 along with a reference to this
buffer. The softkey equivalent of this routine is the GIVE_DATA action on the
Protocol Spreadsheet.

77-9

INTERVIEW 7000 Series Advanced Programming: ATLC 107-951 108

Example
Layer 3 wants access to the line in order to receive and send data. Assuming
the LAPD personality package is loaded at Layer 2. enter the following program:

LAYER: 2
ST ATE: datalink
CONDITIONS: DL_CONNECT REO
ACTIONS: DL_CONNECT CONF
CONDITIONS: DL_DATA REO
ACTIONS: SEND INFO "(OL_DATA))'
CONDITIONS: RCV INFO
ACTIONS:
{

l2Jive_data();
}

(8) Transmit

Synopsis
extern Mid resendJrame(pf, first_or_next);
unsigned char pf;
unsigned char first_or _next;

Description
The resendJrame routine will resend either the first or next frame in the
window with the P/F bit set to a specified value. The softkey equivalent of this
routine is the (PROTOCL) RESEND action on the Protocol Spreadsheet.

The first parameter is the value of the P/F bit in the frame. It may be set to
either O. 1. or 2 (for loopback).
The second parameter indicates whether the first frame in the window will be
sent, or whether the next frame in the window will be sent. The first resend
action will send the first frame in the window regardless of whether first or next
has been selected. Legal entries are 0 (first) or 1 (next).

77-10

77 LAPD Ubrary

Example
Suppose you want to resend the entire transmit window if you receive a REJ
frame.
LAYER: 2
STATE: xfer
,. Whatever oonQltlons and actions send data precede the following condition. .,
CONDITIONS: RCV REJ RESP
ACTIONS:
{

resendJrame(1. 0);
}
NEXT_STATE: recover
STATE: recover
CONDITIONS: FRAME_SENT
MORE_TO_RESEND
ACTIONS:
{

resell dJra me (1 ,J};
}
CONDITIONS: FRAME_SENT
NO_MORE_TO_RESEND
NEXT_STATE: )(fer

SynQPsis

Desctiption

This routine resets the N(R) field in information and supervisory frames to zero.
The softkey equivalent of this routine is the (PROTOCL) RSET_NR action on the
Protocol Spreadsheet.
Example
When a link is established, reset N (R) .
LAYER: 2
STATE: reset
CONDITIONS: ENTER_STATE
ACTIONS: SEND SABM
CONDITIONS: RCV UA
ACTIONS:
{

reset_nrO;
}

77-11

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

reset ns
Synopsis
extern lIoid reset_ns();

DescJjption
The N(S) field in information and supervisory frames is reset to zero and the
transmit window is cleared. The softkey equivalent of this routine is the
(PROTOCL) RSET_NS action on the Protocol Spreadsheet.
Example
When a link is established, reset N(S).
LAYER: 2
STATE: reset
CONDITIONS: ENTER_STATE
ACTIONS: SEND SABM
CONDITIONS; RCV UA
ACTIONS:
{

reset _ ns () ;
}

send frame
SynQPsis
extern void sendJrame (ii_buffer_number, relay_baton. data _start_offset, transmit Jrame""plr);
unsigned short il_buffer_number;
unsigned short relay_baton;
unsigned short data_start_offset;
struct sendJrame_structure
{

unsigned char sapi_type;
unsigned char tei_type;
unsigned char crjype;
unsigned char frame_type;
unsigned char nr_type;
unsigned char ns_type;
unSigned char pJ_type;
unsigned char bcc_type;
unsigned char sapi_lIa/ue;
unSigned char tei_lIalue;
unsigned char cntrl_byte;
unsigned char I'Ir_value;
unsigned char nS_lJalue;

};
struct sendJrame_structure "' transmitJrameJtr;

Description
The sendJrame routine adds a frame-level header to an interlayer message
buffer and passes the buffer to Layer 1. The softkey equivalent of this routine is
the SEND action on the Protocol Spreadsheet.

77-12

77 LAPD Ubrary

The first parameter is the interlayer message buffer number.
63.3(A). Layer-Independent OSI routines.

See Section

The second parameter is the maintain bit used to hold the buffer while the send
operation is being performed. See Section 63.3(A).
The third parameter is the offset from the beginning of the buffer to the start of
the service data unit. See Section 63.3(A).
The fourth parameter is a pointer to the frame structure to be sent. For a
description of sendJrame_structure see Table 77-1.
Example
Send an Info frame containing a canned fox message and a good BeC onto the

line.
static unsigned short it_buffer_number;
static unsigned short relay_baton;
static unsigned short data_start_offset;
struct sendJrame_structure
{

unsigned char sapi_type;
unsigned char teCtype;
unsigned char cr_type;
unsigned char Jrame_type;
unsigned char nr_type;
unsigned char ns_type;
unsigned char pJ_type;
unsigned char bcc_type;
unsigned char sapi_yalue;
unsigned char tei_value;
unsigned char cntrl_byte;
unsigned char nr_yalue;
unsigned char ns_value;
};

struct sendJrame_structure transmitJrame;
static char transmit_string [J :: "(FOX) ";
}
LAYER: 2
STATE: &end a frame
CONDITIONS: KEYBOARD' •
ACTIONS:
{

Jet_il_msg3)uf/( &iI_buf/er_number, .!trelay_baton);
_startjCbuff_list (ii_buffer_number, &data_start_of/set);
transmit Jrllme. bee_type :: 1;
_insert_il_buf/_list_cnt(il_buJJer_lIumber, data_starr_offset, &transmit_string[Oj,
(sizeof(transmit_string) - 1»;
sen dJrame (ii_buffer_number, relay_baton, data_start_of/set, &transmitJrame);
}

77-13

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

77-14

78 Q.931 Library

78Q.931 Library
When the Q.931 package is loaded in via the Layer Setup screen, the following external
variables become available for use by the programmer. Their use on the Protocol Spreadsheet
is not limited to any particular layer. though normally they belong at Layer 3.
The variables approximate Q.931 Layer 3 spreadsheet-generated conditions and actions.
Refer to Section 38 for more detailed explanations of the purposes of specific conditions and
actions. Sometimes the name of the variable is sufficient for identifying its related spreadsheet
token. When this is not the case, the information is provided below.

78.1

Structures
There are no extern structures associated exclusively with Q.931.

~
fl···

78.2 Variables
The variables discussed below apply when the Line Setup menu shows either emulate
or monitor mode. Emulate mode, however. is not supported by emulate-only
conditions and actions on the Protocol Spreadsheet.

(A) Monitoring Events
Q.931 Layer 3 event variables detect packets on either side of the line. See
Table 78-1. They are valid in either emulate or monitor mode. The event
variables are dt€....packet and dce....Packet.
When the user selects DTE or DCE on the first rack of softkeys for Layer :3
conditions. a second rack appears from which he must select a particular
message type. A DTE INFO condition. for example. when translated, includes two
C variables, one event variable and one status variable:
{

dteYQCktt && (m_messageJype == O.x7b)
}

Asa C programmer, you do not need to specify a message type. To include all
DTn messages in a condition, use the event variable only:
CONDITIONS:
{
dtl!Jacket
}

78-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Table 78-1
0.931 Variables
Type

Variable

Value (hex/decimal)

Meaning

extern event

True when a OTE packet Is
detected. Line Setup
configured for emulate or
monitor mode.

extern event

True when a DeE packet is
detected. Line Setup
configured for emulate or
monitor mode.

extern volatile const unsigned char

m_packet_bcc_type

1
2
3

good
bad
abort
Une Setup configured for
emulate or monitor mode.
Actual value of protocol
discriminator-should be 6. Line
Setup configured for emulate or
monitor mode.

extern volatile const unsigned char

extern volatile const unsigned char

m_caIIJef_lIag

0
1

origination side
destination side
Une Setup configured for
emulate or monitor mode.
Actual value received is not a
defined value for a LAPD
message type.

extern volatile const unsigned char

Aotual value received Is one of
the following valid values for a
LAPD message type:

1
2
5
7
d/13
f 115
20/32
21/33

22/34
25/37
26/38
2d/45
2e/46

40/64
45/69
48/72

4d/77
5a/90
60/96
62/98
6411 00
68/104
6a/106
6e/l06

78-2

alerting
call proceeding
setup
connect
setup ack
connect ack
user Info
suspend rej
resume rej
suspend
resume
suspend ack
resume aok
detach
disconnect
detach ack
release
release complete
cancel
facility
register
cancel aek
facility ack
register ack

78 0.931 Library
Table 78·1 (continued)

Type

Variable

Value (hex/decimal)

Meaning

70/112
72/114
741116
79/121
7b/123
7d/125

cancel rej
facUlty raj
raglster rej
congestion control
Info
status

Une Setup configured for
emulate or monitor mode.
extern volatile const unsigned char

OO-fflO-255

Actual value of the
message-type byte. Una Satup
configured for emulate or
monitor mode.

extern volatile const unsigned char

0-15

Length of the call-reference
value field. Une Setup
configured for emulate or
monitor mOde.

extern volatile const unSigned char

Length of Information element
field. The total includes all
information elements. Une
Setup configured for emulate or
monitor mode,

extern volatile const unsigned char *

Pointer to the call-reference
valUe field. Begins at the first
byte, oontalning the call
reference length, Line Setup
configured for emulate or
monitor mode.

extern volatHe const unsigned char *

Pointer to the Information
element field, Begins at the
first byte after the
message-type byte. Line Setup
configured for emulate or
monitor mode.

f'"~
i

o

extern unsigned char

1

4

5
8
9
12/18

normal
reverse
low
reverse low
blink

reverse blink
blink low
Une Setup configured for
emulate or monitor mode,

extern unsigned char

o

13_suppress

1

off
on
Une Setup configured for
emulate or monitor mode.

78-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

(8) Status Variables
Status variables are those in Table 78-1 that do not include event in the Type
column. Their associated event variables guarantee that they are updated and
tested.
The softkey-generated condition for DTE Info frames is DTE INFO. The C
version of the same condition should look like this:
CONDITIONS:
{
dteyacket &d'< (m_messag'_type
}

1.

== Ox7b)

Packet characteristics. All status variables in Table 78-1 containing an m_
prefix are valid in either emulate or monitor mode: myacket_bccjype,
myrot_disc, m_callJef_len, m_calCrefJlag, m_message_type,
m_message_type_defined, and m_info_element_len.

2. Pointers. Two pointers provide access to variable-length fields.
mytr_to_callJef is the pointer to the call-reference field.
mytr_to_info_element is the pointer to the information-element field.

(C) Controlling Protocol Trace Display
To enhance or suppress particular packets on the Layer 3 Protocol Trace screen
in emulate or monitor mode, assign a coded value to 13_enhance or I3_suppress.
The values are listed in Table 78-1. To assign a value to either of these
variables. place the statement in an ACTIONS block. For example, display
Suspend messages in reverse-video and suppress display of Status messages:
CONDITIONS: DTE SUSPEND
ACTIONS:
{
lJ_,nhance= 1;
}
CONDITIONS: DTE STATUS
ACTIONS:
{
13juppress = 1;
}

Check the value of these display-control variables in a CONDITIONS block
CONDITIONS: DTE INFO
{

is_enhance

== 1

}
ACtiONS:
{
l3 _enhance'" 0;
}

78-4

.f"t'.
I

78 9.931 Ubrary
or an

ACTIONS

block:

CONDITIONS: DTE INFO
ACTIONS:
{
if(13_enhance
1)
I3_enhance:= 0;
}

==

78.3 Routines

----.-~--------

There are no routines associated exclusively with Q.931.

78-5

-----.----.-.-------...-.-.

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

78-6

#~f"'\

79 SS#7 Layer 2 Ubrary

" !
;

79 SS#7 Layer 2 Library
When the SS#7 Layer 2 package is loaded in via the Layer Setup screen, most of the
foHowing external variables become available for use by the programmer. Their use on the
Protocol Spreadsheet is not limited to any particular layer, though normally they belong at
Layer 2.
The SS#7 Layer 1 variables shown in Table 79~2 are accessible only when the Layer 1
SS7_CMPRESN package is loaded in via the Layer Setup screen. They do not have related
spreadsheet tokens. These Layer 1 variables are included in this section since they are
associated with the Layer 2 event variables in Table 79~ 1.
The Layer 2 variables approximate 5S#7 Layer 2 spreadsheet-generated conditions and
actions. Refer to Section 42 for more detailed explanations of the purposes of specific
conditions and actions. Sometimes the name of the variable is sufficient for identifying its
related spreadsheet token. When this is not the case, the information. is provided below.

79.1

Structures
There are no extern structures associated exclusively with SS#7.

79.2 Variables
The variables discussed below apply when the Line Setup menu shows either emulate
or monitor mode. Emulate mode, however, is not supported by emulate-only
conditiohs and actions on the Protocol Spreadsheet.

(A) Monitoring Events
88#7 Layer 2 events include frames detected. good or bad BCC's, and aborts.
All event variables in Table 79*1 containing a dtt_ or dee_ prefix are valid in

either emulate or monitor mode. These event variables are dteJrame.
dteJood_bee. deeJood_bce. dte_bad_bee, dee_bad_bee, dte_abort.
dee,-abort.

de~Jrame,

You can use both dte and dee variables relating to the same event in one
conditions block. Suppose you want to count all bad BeC's from either side of
the line. Enter the following CONDITIONS/ACTIONS block:
CONDITIONS:
{
dte_bad_bee II dee_had_bee
}
ACtiONS: COUNTER bad_bee INC

79-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Table 79-1
SS#7 Layer 2 Variables
Type

Variable

Value (hex/decimal)

Meaning

extern event

True when a non-suppressed
OTE frame Is detected. Line
Setup configured for emulate or
monitor mode.

extern event

True when a non-suppressed
DeE frame Is detected. Line
Setup configured for emulate or
monitor mode.

extern event

True when a non-suppressed
good Bee is calculated for a
OTE frame, Line Setup
oonfigured for emulate or
monitor mode.

extern event

True when a non-suppressed
good Bee Is calculated for a
DeE frame. Une Setup
configured for emulate or
monitor mode.

extern event

True when a bad Bee Is
oalculated for Ii OTE frame.
Line Setup configured for
emulate or monitor mode,

extern event

True when a bad Bee Is
calculated for a DeE frame,
Line Setup configured for
emulate or monitor mode,

extern event

True when an abort Is detected
for a OTE frame. Line Setup
configured for emulate or
monitor mode.

extern event

True when an abort Is detected
for a DeE frame. Line Setup
oonflgured for emulate or
monitor mode.
1

extern volatile const unsigned char

2
3

Fill-In Signal Unit (FI)
Link Status Signal Unit I LSU)
Message Signal Unit (MSU)
Line Setup configured for
emulate or monitor mode.

extern volatile const unsigned char

o

o

extern volatile canst unsigned char

o

o

non-zero

1

79-2

1
Line Setup oonfigured for
emulate or monitor mode.
1
Line Setup configured for
emulate or monitor mode.

79 SS#7 Layer 2 Ubrary
Table 79-1 (continued)
Type

Variable

extern volatile const unsigned char

Value (hex/decimal)

o

mJI

1-2
3-3f/63

o

extern volatile const unsigned char

Meaning

FI
LSU
MSU
Une Setup configured for
emulate or monitor mode.

1
2
3
4

out of alignment
normal
emergency
out of service
processor out

5

busy
Une Setup configured for
emulate or monitor mode.

extern volatile const unsigned char

2

good bcc
bad boe

3

abort

1

Une Setup oonflgured for
emulate or monttor mode.

o

12_enhance

extern unsigned char

1
4

5
8
9
12/18

o

extern unsigned char

1

normal
reverse
low
reverse low
blink

reverse blink
blink low
Une Setup configured for
emulate or monitor mode.

off
on
Line Setup configured for
emulate or monitor mode.

When the user selects DTE or DCE on the first rack of softkeys for Layer 2
conditions, a second rack appears from which he must select a particular frame
type. A DTE FILL_IN condition, for example, when translated. includes two C
variables, one event variable and one status variable:
dteJrame && (m_unit_type =: 1)
}

The C programmer does not need to specify a frame type. To include all
frames in a condition, use the event variable only:
CONDITIONS:
{

dteJrame
}

79-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

(8) Status Variables
Status variables are those in Table 79-1 that do not include event in the Type
column. Their associated event variables guarantee that they are updated and
tested.
The softkey-generated condition for DTE Busy Link Status Signal Unit is DTE
STATUS= B. The C version of the same condition should look like this:
CONDITIONS:
{
dteJrame && (m_unit_type == 2) && (mJoO
}

==

5)

Status variables in Table 79-1 containing an m_ prefix are valid in either emulate
or monitor mode: m_unit_type, m_bib, mJib, m_li, m_soO, and
mJrame_bcc_type.
The Layer 1 variables listed in Table 79-2 are also status variables. valid in
either emulate or monitor mode. Any of the Layer 2 event variables in
Table 79-1 guarantee that they are updated and tested.
NOTE: The SS#7 Layer 1 variables are updated frequently. If
you want to track these variables for statistical purposes, we
recommend that you copy their values into temporary variables.

(C) ContrOlling Protocol Trace Display
To enhance or suppress particular frames on the Layer 2 Protocol Trace screen
in emulate or monitor mode. assign a coded value to 12_enhance or 12_suppress.
The values are listed in Table 79-1. To assign a value to either of these
variables. place the statement in an ACTIONS block. For example. display only
Link Signal Units. Of these, display Emergency LSU's in reverse-video.
CONDITIONS;
{

dteJrame &:& (m_unit_type 1= 2)
}
ACTIONS:
{

12_suppress:;: 1;
}
CONDITIONS:
{
dteJrame && (m_unit_type
}
ACTIONS:
{
12_enhance::: 1;
}

:::=

2) && (m_soO

79-4

== 2}

79 SS#7 Layer 2 Library
Table 19-2
SS#7 Layer 1 Variables
Type

Variable

Value (hex/decimal)

Meaning

extern unsigned short

Number of DTE Fill-In or Link
Status Signal Units suppressed
since the last nan-suppressed
frame. Una Setup configured
for emulate or monitor mode.

extern unsigned shart

Number of DCE Fill-In or Unk
Status Signal Units suppressed
since the last non-suppressed
frame. Une Setup configured
for emulate ar monItor mode.

extern unsigned short

Number of DTE flags received
since the last non-suppressed
frame. Une Setup configured
for emulate or monitor mode.

extern unsigned short

Number of DCE flags received
since the last non-suppressed
frame. Une Setup configured
for emulate or monitor mode.

.~"
i .
I

Check the value of these display-control variables in a

CONDITIONS

CONDITIONS:
{
dteJrame && (m_unitJype == 2) && (m_soO "':: 2) && (12_enhance == OJ
}
ACTIONS:
{
12_enhance::: 1;
}

or an

ACTIONS

block:

CONDITIONS:
{
dteJrame && (m_unit_type
}
ACTIONS:
{
if(12_enhance == 0,
l2 _enhance::: 1;
}

== 2)

&& (m_saO

== 2)

79.3 Routines
There are no routines associated exclusively with SS#7.

19-5

block

INTERVIEW 7000 Series Advanced Proaramming: ATLC-107-9S1-10B

79-6

80 S$#7 Laysr 3 Library

80 S5#7 Layer 3 Library
When the SS#7 Layer 3 package is loaded in via the Layer Setup screen, the following
external variables become available for use by the programmer. Their use on the Protocol
Spreadsheet is not limited to any particular layer, though normally they belong at Layer 3.
The variables approximate 55#7 Layer 3 spreadsheet-generated conditions and actions. Refer
to Section 43 for more detailed explanations of the purposes of specific conditions and
actions. Someilines the name of the variable is sufficient for identifying its related spreadsheet
token. When this is not the case, the information is provided below.

80.1

Structures
There are no extern structures associated ex.clusively with SS#7.

80.2 Variables
The variables discussed below apply when the Line Setup menu shows either emulate
or monitor mode. Emulate mode, however, is not supported by emulate-only
conditions and actions on the Protocol Spreadsheet.

(A) Monitoring Events
SS#7 Layer 3 event variables detect Message Signal Units on either side of the
line. See Table 80-1. They are valid in either emulate or monitor mode. The
event variables are dteyacket and dceyacket.
When the user selects OTE or DeE on the first rack of softkeys for Layer 3
conditions, a second rack appears from which he must select a particular MSU
type. A DTE NETM condition, for example. when translated. includes two C
variables. one event variable and one status variable:
{
dttYQcket &-eft (m_sio_si

==

0)

}

As a C programmer, you do not have to specify an MSU type. To include all
DTE Message Signal Urtits in a condition. use the event variable only:
CONDITIONS:
{
dttYQclut

}

80-1

INTERVIEW 7000 Series

Advance~d

Programming: ATLC-107-951-10B

Table 80-1
SS#7 Layer 3 Variables
Type

Variable

Value (hex/decimal)

Meaning

extern event

dee-packet

True when a DeE packet Is
detected. Line Setup
configured for emulate or
monitor mode.

extern event

dte_packet

True when a OTe packet Is
detected. Line Setup
configured for emulate or
monitor mode.

o

extern volatile const unsigned char

40/64
60/128
cO/192

o

extern volatile canst unsigned char

20/32
30/48

prlorlty=O
prlorlty=1
prlorlty=2
prlorlty=3
Line Setup configured for
emulate or monitor mode.

0-7

User part:

o

netm

10/16

extern volatile canst unsigned char

International 0
International 1
national 0
national 1
Line Setup configured for
emulate or monitor mode.

1
2
3
4

5
6
7
8-fl8-15

ntr
nts

seep
tup
Isdn
dupO
dup1
spare
Une Setup configured for
emulate or monitor mode.

lest headers:t

extern volatile canst unsigned char

(high 4 bits not defined)
1

2

ltm
Ita

t The high four bits In test headers are not defined. To check the value of m_cod8_type for test headers, and
m _code_type with OxOf:

For LIM's, header equals 1; for LTA's, header equals 2.

80-2

80 SSlf7 Layer 3 Library
Table 80-1 (continued)
Type'

Variable

Value (hex/decimal)

Meaning

SCCp beaders:
1

2
3
4

5
6
1
8
9
a/10

bIll

0/12
d/13
e/14

f/15
10/16

or
oe
oref
rlad
ric

dt1
dt2
ak
udt
Udts

ed
ea
rsr
rso
err
it
NETM headers:

11117
12/18

coo
eoo

13/19
14/20

ret
tfp

15/21

rap (US format only)
rst (CCITT format only)
lin
dle
eoa
eea
tfo
top (US format only)
rar (US format only)
rst (CCITT format only. national
option)
Ion

15/21
16/22
18/24
21/33

22/34
23/35
24/36
25i37
25/37
26138
28/40

34/52
35/53
36/54

38156

44/68
45/69
46/70

48/72
51/81
54/84
56/86
61/96
641100
661102

tr\
I

80-3

css
tfr
rep (US format only}
lia
ens
tor (US format only)
rer {US format only I
lua
cnp
obd
Ua

lid
cba
tca (US format only)
Ifu

76/118

HI

86/134

In

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

Table 80-1 (continued)

Type

Variable

Meaning

Value (hex/decimal)

IUe
6
10
11/17
12/18
13/19
14120
15/21
16/22
17123
18/24
19/25
21/33
24/36
25/37
26/38
27/39
28/40
29/41
31/49
32/50
35/53
36/54
37/55
38/56
39/57
41/65

42/66
45/69
46/70
47/71

48/72
49/73
55/85
56/86
57/87
58/88
59/89
65/101
66/102
67/103
68/104
69/105
75/117
76/118
77/119
76/120
79/121
85/133
88/136

80-4

!:u~ag~l:i:

anu
reserved
lam
gsm

grq
acm
see
ane
rig
mgb
efm
lal
chg
cge
ann
blo
mba
cpm
sam
cot
nne
cbk
bla
mgu
cpa
sao
cef
adi
elf
ubi
mua
esv
efl
ran
uba
hgb
evm
ssb
fot
eer
hba
erm
unn
ecl
rsc
hgu
ell
los
hua

80 SS#7 Layer 3 Library

Table 80·1 (continued)
Type

Variable

Value (hex/decimal)

Meaning

{TUP headers continued)
951149
98/152
a5/165

a8/168
b5/181

be/184
051197
08/200

da1216
88/232
f5/245
161246

sst
grs
aob
gra
dpn
sgb
mpr
sba
sgu
sua
eum
earn
ISDN beaders:

1

2
3

4
5
6
8
9
a/10
bIll
d/12
e/14
f/15

10116
11/17

12/18
13119
14120
15/21

16/22
17123
18/24
19/25

1a/26
lb/27
10/28
1d/29
1e/30
1fI31
20/32
21133

22/34
23/35

25/37
26/38
27/39
28/40
29/41

tam
sam
Inr
Inf
oot
aom
fot
anm
ubm
rei
pau
res
rlad
rio
oor
rse
blo
ubi
bla
uba
grs
cgb
ogu
ogba
agua
emr
erne
rem
far

faa
frj
fad
tal
cavr
esvs
drs
pam
gra
Une Setup oonfigured for
emulate or monitor mode.

~,
i

80-5

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Table 80·1 (continued)
Type

Variable

extern volatile unsigned long

Value (hex/decimal)
0-31ft{
0-16383
O-ffffffl
0-16777215

mJabel_dpc

extern volatile unsigned iong

0-3ftfl
0-16383
O-ffffffl
D-16777215

Meaning

CCITT format (2 bytes)
ANSI format (3 bytes)
LIne Setup configured for
emulate or monitor mode.
CCrTT format 12 bytes)
ANSI format (3 bytes)
Line Setup configured for
emulate or monitor mode.

0-flO-15
D-1f/O-31

CCITT format
ANSI format
LIne Setup configured for
emulate or monitor mode.

extern volatile unsigned short

0-ffflO-4095
O-ffft10-65535

TUP MSUs
ISDN MSUs
Line .Setup configured for
emulate or monitor mode.

extern unsigned char

0
1
4
5
8
9

normal
reverse
low
reverse low
blink
reverse blink
blink low
Line Setup configured for
emulate or monitor mode.

extern volatile canst unsigned char

mJabeLsls

12/18

0
1

extern unsigned char

off
on
Line Setup configured for
emulate or monitor mode.

(8) Status Variables
Status variables are those in Table 80-1 that do not include event in the Type
column. Their associated event variables guarantee that they are updated and
tested.
The softkey-generated condition for NETM Message Signal Units on the DTE
side of the line is DTE NETM. The C version of the same condition should look
like this:
CONDITIONS:
{
dte....packtt cleft (m_sio_si
}

=::

0)

80-6

60 SS#7 Layer 3 Ubrary
Most status variables in Table 80-1 contain an m_ prefix: m_sio_ni,
mjioyriority, m_sio_si, m_codejype, m_labeCdpc, m_labeCopc, m_Iabel_sls,
and m_cic.

(C) Controlling Protocol Trace Display
To enhance or suppress particular packets on the Layer 3 Protocol Trace screen
in emulate or monitor mode, assign a coded value to 13 _enhance or 13 _suppress.
The values are listed in Table 80-1. To assign a value to either of these
variables, place the statement in an ACTIONS block. For example. display only
messages with NETM headers. Of these, display Transfer Restricted headers in
reverse-video.
CONDITIONS:
{

dteJacket && (m_sio_si 1= 0)
}

ACTIONS:
{

l3_suppress = 1:
}
CONDITIONS:
{
dteJacket && (m_sio_si
}
ACTIONS:
{
13_enhance = 1;
}

== 0)

&& (m_code_lJpe

== Ox34)

Check the value of these display-control variables in a
CONDITIONS:
{

dteJacket && (m_sio_si 1= 0) && (l2_suppress

CONDITIONS

block

== 0)

}
ACTIONS:
{

12_suppress = I;
}

or an

ACTIONS

block:

CONDITIONS:
{

dteJacket && (m_sio_si != 0)
}
ACTIONS:
{

~.

I

if(12_suppress =::: OJ
12_suppress = 1;
}

80-7

..........

_______

~m

"~,_

,_I!!u....
? _......
'

.. jI£_ _ _ _
•

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

80.3 Routines ....
There are no routines associated exclusively with 88#7.

80-8

Appendix A Operator Messages

Appendix A: Operator Messages
Il',
{ I
I

,~
i
A-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

A-2

,I'i",

Appendix A1 Interactive Messages

Appendix A 1: Interactive Messages
The following messages are displayed on the second line of the screen. normally during execution of
menu-screen functions.
MESSAGE

MEANING

Attempt to transfer source to itself

Source selections in the From and To fields on the
Data Transfer screen are the same. Change one
selection. To use one drive to perform data transfer
involving two disks. change To selection to ~ .

Attempted to mount uninitialized
disk

Check disk. It may require formatting.

Attempting to initialize link

Physical link being established prior to transfer.

BNDX message request failed

Message should not normally appear. If it recurs,
contact Customer Service.

Backup complete. no errors

Duplication process is successful.

Bad object file format

Data is not recognized in format of object file. Try
again to save the source file as an object file.

Can't load object file - Incompatible
FEB installed

Current hardware is different from hardware of unit on
which object file was saved. Save the source file as an
object file on the unit on which it will be loaded and

run.

Can't load object file - Incompatible
MPM addressing

Current hardware is different from hardware of unit on
which object file was saved. Save the source file as an
object file on the unit on which it will be loaded and

run.

A1-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Can't load object file - Incompatible
mux installed

Current hardware is different from hardware of unit on
which object file was saved. Save the source file as an
object file on the urnt on which it will be loaded and
run.

Can't load object file - Insufficient
MPMs

Current hardware is different from hardware of unit on
which object file was saved. Save the source file as an
object file on the unit on which it win be loaded and
run.

Can't load object file - No mux installed

Current hardware is different from hardware of unit on
which object file was saved. Save the source file as an
object file on the unit on which it will be loaded and
run.

Can't read disk

Make sure disk is correctly inserted. If message
recurs, disk may be bad.

Cannot append to a wrapped OAT

Record Setup menu shows Stop at: :~li¢$.~~:'99f:L End
of data acquisition tracks was reached, so wrapping
occurred. Then, Data Transfer command attempted
to append data from source to the end of OAT on
destination disk. Select Start At: ::;'-t{~'ifu~i: on Data
Transfer screen.

Cannot copy a file to itself

Be certain that name of destination file on File
Maintenance screen differs from name of
source file.

Cannot copy directory tree into itself

Attempt to copy a directory into one of its
subdirectories. For example, a command to copy lusr
into lusr/programs will fail.

Cannot delete a non-empty directory

File named for deletion is directory containing files.
Before deleting directory, delete or move files.

Cannot open file

In attempt to load or save a file, the file could not
be opened. Check the write-protect window. It
should be closed to write to the disk.

Cannot open redirect file

Printer Setup menu shows that output will be
redirected to a file. Check to make sure that the disk
is properly inserted in the correct drive and is not
write-protected.

A1-2

Appendix A1 Interact/ve Messages

Cannot move file across disk boundaries

Attempt to rename a file from one disk to another.
Make sure only one drive is specified on File
Maintenance screen.

Cannot remove an open file

Attempt was made to copy a directory into itself.
Files being copied also need to be deleted. but cannot
be since they are open. Copy the directory to another
source. In general. close files before attempting to
delete them.

Cannot unmount disk. files open

Attempt was made to remove disk before operation
was completed.

Cannot write to redirect file

Printer Setup menu shows that output will be
redirected to a file. Error in trying to write to the file.
Check disk.

Change floppy disk 1

During multi-disk recording operation. disk in drive 1
has been filled. Remove old disk and insert
new one.

Change floppy disk 2

During multi-disk recording operation. disk in drive 2
has been ruled. Remove old disk and insert
new one.

Character buffer not yet allocated

From field on the Data
~~, but unless

Compilation aborted

to arrest the
User has pressed ABORT softkey or S
Compile operation (from the File Maintenance menu).
Destination file may have been partially overwritten if
compile was to an existing file.

Compilation completed

The Compile command (from the File Maintenance
menu) has been executed.

Compilation failed - Errors detected

The Compile command (from the File Maintenance
menu) has been aborted because of errors. Go to the
Protocol Spreadsheet and press S. @ to display the
first error message.

Compilation is in progress

The Compile command (from the File Maintenance
menu) is being executed to compile and save a file of
standard C code as object code.

~,

[ I,

Transfer screen shows
Run has been executed. there
is no character buffer. Press S, and then try the
transfer operation again.

A1-3

""..

~=~n""""""'_

...."_ _ _ _ _ _ """ _ _ ""''' _ _ _ _ _ _ _

'''''·~·~

___

·_'·'_·_~~

___

~_~---->~,----.--.----"----

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Copy completed

Selected file(s) has (have) been copied successfully.

Copy is in progress

Selected file(s) is (are) being copied.

Could not load a layer personality
package

Attempt to load a protocol package from the Layer
Setup screen has failed. Make sure that correct
disk is installed in drive indicated on menu. If
attempt still fails, package may have been corrupted.

Current test invalidated

Changes have been made to the menu screens or
Protocol Spreadsheet which invalidate a loaded object
file.

Data transfer source and destination are
the same

Source selections in the From and To fields on the
Data Transfer screen are the same. Change one
selection. To use one drive to perform data transfer
involving two disks. change To selection to ~W: .

Destination disk does not contain
user file system

Check file contents on File Maintenance screen. If
disk is intended for user files. you may need to
allocate disk space to the filing system. Use Disk
Utilities screen to check disk allocation.

Destination file is a directory

Copy or save operation not complete because file
named to receive copy is a directory. Change
destination filename and re-execute.

Destination file is write protected

Change destination filename or write-enable file.
Then repeat save or copy operation.

Directory file expected

Check directory named in Change Directory
command. Use only names labeled DIR in file
listings.

Directory is empty

Attempted to copy the contents of an empty directory.

Directory is not empty

Directory cannot be deleted until all of the files it
contains have been deleted.

Disk corrupted

Disk is worn out or damaged and should not be used
for future operations.

Disk duplication aborted

Operator has· aborted disk duplication. Data on
destination disk may have been panially overwritten.

A1-4

Appendi)( A 1 Interactive Messages

Disk duplication in progress

Disk is being duplicated. Do not remove disks from
active drives.

Disk formatted

Formatting operation is complete.

Disk full

No space left on disk to perform operation. Use a
new disk. or remove unneeded data from disk.

Disk not mounted

Re-insert disk and attempt operation again. Also try
to power-up again. If message recurs, the disk may
be bad.

Disk record error (controller error)
-- Aborted

Disk may be write protected or recording too
fast. Also may be an internal error or bad disk. Try
again with a new disk. Contact Customer Service if it
recurs.

Disk record error (timeout) -- Aborted

May be an internal error or bad disk. Try again with
a new disk. Disk may be write protected or recording
too fast.

Display screen command failed

Message should not normally appear. Contact
Customer Service if it recurs.

Entering testprep

First status message entering Run mode. Test
preparation mode precedes compilation of program.

Error during load of code file

Check code files. Message indicates code file is not
found. or code file has been modified.

Error trying to print file

Try printing again. If attempt fails. disk file is
probably corrupted.

Error trying to print screen

Try printing again. If problem recurs. contact
Customer Service.

Errors occurred during load

Try loading again. If attempt fails, disk file is
probably corrupted.

Errors occurred during save

Try saving again. If attempt fails, disk is probably
corrupted.

Errors occurred during testprep

Attempt to perform Save command as a object file
before the program had ever been compiled. An error
was detected as compilation was attempted. Go to the
Protocol Spreaclsheet and search for errors. The Line
Setup menu. for example, may show Mode:
:@;~Qa?i% and Source: :~:, but no disk is present
in the selected drive.

Al-5

.---.--------.-----~

..

--

,

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Fatal Hardware Error

Invalid hardware setup. Contact Customer Service.

Fatal Software Error

Message should not normally appear. If it recurs,
contact Customer Service.

FE buffer overflowed - Incoming data
halted

Data is coming in faster than it can be received.

File access error

File named cannot be accessed. Check disk.

File copy aborted

User has pressed ABORT softkey to arrest copy
operation. Destination file may have been partially
overwritten if copy was to an existing file.

File is a directory

Operation. View for example. could not be performed
on a directory. Select or enter the name of a file.
See listings -on File Maintenance screen for entry NOT
labeled DIR.

File is write-protected

File named cannot be deleted or saved. Check name.
To perform operation on named file, write-enable it
from the File Maintenance screen.

File loaded

File has been loaded successfully as a Program. Setup,
or Object file.

File name not found

Filename (or directory) as entered does not appear in
listings. Check spelling of entry. Make sure you are
operating in correct directory.

File name already exists

Attempt to use the Make Directory command. naming
a directory that already exists.

File saved

File has been saved successfully as a Program, Setup,
or Object file.

File size can't be increased,
index block full

File is larger than the file system can handle.

Formatting disk - max floppy disk
DAT allowed = 1422K bytes

Too much space specified for data acquisition
tracks. Maximum space has been allocated.

Formatting disk - max hard disk DAT
allowed = 20774K bytes

Too much space specified for data acquisition
tracks. Maximum space has been allocated.

A1-6

APpendix A 1 Interactive Messages

Formatting disk

Formatting in progress. Do not remove disk from
active drive.

Formatting will destroy data
- Depress F1 key to continue.

Message appears when a formatted disk has been
inserted for reformatting. Press ABORT to avoid
overwriting data. Press F1 to format the disk.

Function failed -- Check media

Attempt operation again. If operation still fails. disk
may be bad. Try new disk.

Function(s) not yet implemented

Operation attempted is not available with the software
version installed.

II buffer services error

Error in using OSI variables or routines. May occur,
for example, if operation is attempted on buffer which
no longer exists. Set maintain bits at each layer that
needs to reserve the buffer for subsequent operations.

Illegal device name

Message should not normally appear. If it recurs,
contact Customer Service.

Illegal expansion unit. not 1-255

Message should not normally appear. If it recurs.
contact Customer Service.

Illegal file number passed to open

Message should not normally appear. If it recurs.
contact Customer Service.

Illegal major device number given

Message should not normally appear. If it recurs,
contact Customer Service.

Illegal parameter to volume iniL function

Message should not normally appear. If it recurs,
contact Customer Service.

Illegal pathname

Pathname provided is incomplete or invalid. Check
entry.

Illegal position parameter, not 0-2

Message should not normally appear. If it recurs.
contact Customer Service.

illegal synchronization mode, not 0-2

Message should not normally appear. If it recurs.
contact Customer Service.

Indirect stat update msg received

Message should not normally appear. If it recurs,
contact Customer Service.

A1-7

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Insert next disk -- Depress F 1 key
to continue

More than one disk required to perform duplication.

Insert destination disk, depress F 1 key to
continue

Operation involving more than one disk being
performed using one drive.

Insert source disk, depress Fi key to
continue

Operation involving more than one disk being
performed using one drive.

Internal disk sub-system error

Message should not normally appear. If it recurs,
contact Customer Service.

Inter-processor communication overrun

Communication from MPM to CPM occurring too fast
for CPM. Available buffer space exceeded.

Invalid contents in field

Entry made in menu field is illegal.

Invalid DAT block version number

Each block in DAT has a version number. If it is
wrong. the disk may be corrupted.

Invalid DAT version number

Header in OAT has a version number. If it is wrong,
the disk may be corrupted.

Invalid data type

During attempted playback, INTERVIEW did not
recognize type of data. Be certain recoKled data
rather than program data is being accessed.

Invalid destination

Destination file in a Copy command is a relative
pathname on a drive which is not the current drive.

Invalid disk sub-system function
number

Message should not normally appear. If it
recurs. contact Customer Service.

Invalid file identifier, no such
open file

Message should not normally appear. If it
recurs, contact Customer Service.

Invalid file identifier. out of range

Message should not normally appear. If it recurs.
contact Customer Service.

Invalid filetype

Command cannot be used on file type indicated. A
Load command. for example. is not valid for SYS
files.

A1-8

Appendix A 1 Interactive Messages

Invalid filetype for viewing

View command cannot be used for data in file
indicated. Files with type SYS, for example. cannot
be viewed.

Invalid layer number

User has entered layer number out of valid range.

Invalid object code version

Object file was saved under a different version than
current software. Save the source file as an object file
using the same software with which is will be loaded
and run.

Invalid section name

Message should not normally appear. If it recurs,
contact Customer Service.

Invalid stat update msg received

Message should not normally appear. If it recurs,
contact Customer Service.

Load aborted

Operator has aborted Load operation. Program
already residing in INTERVIEW may have been
altered.

Load is in progress

Selected Program, Setup, or Object file is being
loaded.

Loaded package and configuration screen
don't match

Message should not normally appear. If it recurs.
contact Customer Service.

Marked entry not copied

Too many items have been marked for single
operation. Not all files marked have been copied.
Check listings on the File Maintenance screen. Files
still marked are not yet copied. Repeat copy
operation on remaining files.

Marked entry not deleted

Too many items have been marked for single
operation. Not all files marked have been deleted.
Check listings on the File Maintenance screen. Files
still marked are not yet deleted. Repeat delete
operation on remaining files.

Marked entry not printed

Too many items have been marked for single
operation. Not all mes marked have been printed.
Check listings on the File Maintenance screen. Files
still marked are not yet printed. Repeat print
operation on remaining files.

A1-9

INTERVIEW 7000 Series Advanced Programming: ATLC-l07-9S1-10B

Maximum number of entries exceeded

Error on Tabular Statistics screen. Maximum number
of entries is 100.

Maximum disks already mounted

Message should not normally appear. If it recurs.
contact Customer Service.

Memory has not been unlocked yet

Message should not normally appear. If it recurs,
contact Customer Service.

Message exchange full

Message should not normally appear. If it recurs.
contact Customer Service.

Message ID too big

Message should not normally appear. If it recurs.
contact Customer Service.

Move would destroy directory tree
structure

Attempt to rename a directory the same as one of its
subdirectories.

MPM -- Bus error

May indicate a hardware problem, but check program
for logic errors relating to storage allocation. May
have attempted to access something that doesn't exist.

. MPM -- Divide fault

Program may include an attempt to divide by zero.
Check for other logic errors in program.

MPM -- Processor fault

May indicate a hardware problem, but check program
for logic errors relating to storage allocation. May
have attempted to access something that doesn't exist.

MPM -- Memory fault

Logic error in program, typically relating to storage
allocation. May have attempted to access something
that doesn't exist, accessing an array outside of its
range, for example. May also indicate type
mismatches.

MPM -- Stack fault

Logic error in program, typically relating to storage
allocation. May have attempted to access something
that doesn't exist, accessing an array outside of its
range, for example. May also indicate type
mismatches.

NEWDISK illegal with source of hard disk

When To field for a Copy command isN.$W, it means
that the same drive will be used to perform a copy
involving two disks. Change From field to ~~~( or

:R: ..

A1-10

ARpenrlixA1 Interactive Messages
NEWDISK illegal with source of RAM or
hard disk

When To field for a Data Transfer command is

~,

it means that the same drive will be used to perform a
transfer involving two disks. Change From field to
~~ff or :~ffl#1 .

No DAT RAM currently allocated

Attempt to transfer data from RAM without it having
been recorded previously to RAM.

No default directory set

Message should not normally appear. If it recurs,
contact Customer Service.

No file name specified

Enter or indicate file on which operation attempted is
to be performed.

No package loaded for this layer

Selection has been made on the Layer Setup screen,
but no protocol package has been loaded. Return to
Layer Setup, check selection, and press §].

No packages loaded

Selections have been made on the Layer Setup screen.
but no protocol packages have been loaded. Return to
Layer Setup, check selections. and press §J.

No RAM recording memory available

Program is too large to be recorded into available
RAM.

No start of section indicator

Operation on file cannot be performed because (1) file
is not a program or setup, (2) format of the file is
invalid. or (3) file has been corrupted.

No message entered in message
buffer

Check BERT screen. Configured menu indicated a
message would be sent, but none was entered.

Obsolete object program - Source must
be recompiled

Object file is incompatible with current software.

Out of memory

Insufficient memory to perfonn operation. (Program is
too large to run.)

Operation not allowed

on specified

file

Parent directory must be write-enabled before you
can modify or delete this file.

Parent directory of fueis
write-protected
Parent directory of
exist

targ~t

Selected command cannot be used on file indicated.

fUe does not

Check spelling of directory.

Al-11

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-10B

Play underrun

Data could not be output at speed requested.

Premature end of section

Operation on file cannot be performed because (1) file
is not a program or setup, (2) format of the file is
invalid. or (3) file has been corrupted.

Previous lock user has died

Message should not normally appear. If it recurs,
contact Customer Service.

Print queue is full

Maximum number of print jobs has been requested.
Wait for some requests to be completed. Then repeat
print operation.

Printing is done

Print jobs requested are completed.

Record overrun

Data being received too rapidly for capture to RAM.

Remove screen command failed

Message should not normally appear. If it recurs,
contact Customer Service.

Replace screen command failed

Message should not normally appear. If it recurs,
contact Customer Service.

Resetting compiled test

Program being run again without recompiling. Menus
can be viewed and selected changes can be made to
menus without forcing a recompile.

Routine calling save""pr0L,setup is
unknown

Message should not normally appear. If it recurs,
contact Customer Service.

Save aborted

Operator has aboned save operation. If save was to
an existing file, the file may have been partially
overwritten.

Save is in progress

Selected Program, Setup, or Object file is being saved.

Seek attempted before beginning of DAT

Data Transfer screen shows transfer from disk with
Start At Block entry that precedes the block number at
which data actuaUy begins. DAT may begin at block
20, for example. If yoU enter Start At Block: 2, this
error message will be displayed. To guarantee that
data transfer starts from the beginning of DAT. enter
zero in the Start At Block field. Zero is a special
entry. It references the beginning of DAT, regardless
of what the actual block number may be. Any other
entry is interpreted as a literal block number.

A1-12

ARBt.ndix A 1 InteraCt/vI Messages

~,
ilH
I
:

, !

Seek attempted past end of DAT

Data Transfer screen shows transfer from disk with
Start At Block entry that exceeds the block number at
which data actually ends. DAT may end at block
100. for example. If you enter Start At Block: t01,
this error message will be displayed. To guarantee that
data transfer stans from the beginning of DAT. enter
zero in the Start At Block field. Zero is a special
entry. It references the beginning of DAT, regardless
of what the actual block number may be. Any other
entry is interpreted as a literal block number.

Seek attempted past end of file

Message should not normally appear. If it recurs.
contact Customer Service.

Source & destination can't be the
same disk

Error in entries made for disk duplication. Check
disks selected.

Source disk does not contain user
file system

Check disk contents on the Disk Utility screen.
If disk is intended for user files. you may need
to allocate space to the filing.system.

Source file not found

In Interview 10/15/20 file transfer. the source file
which was specified does not exist.

Stopped at end of DAT

During playback. stopped at end of recorded data.
During recording. stopped at end of data acquisition
tracks.

TEST PREPARATION Phase 1

Program is being compiled.

TEST PREPARATION Phase 2

Program is being compiled.

TEST PREPARATION Phase 3

Program is being compiled.

TEST PREPARATION Phase 4

Program is being compiled.

TEST PREPARATION Phase 5

Program is being compiled.

TEST PREPARATION Phase 6

Program is being compiled.

TEST PREPARATION' Phase 7

Program is being compiled.

There are no free locks left

Message should not normally appear. If it recurs,
contact Customer Service.

A1-13

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Token in load file is invalid

Operation on file cannot be performed because (1)
file is not a program, setup, or object, (2) format of
the file is invalid, or (3) file has been corrupted.

Token is incomplete

Operation on file cannot be performed because (1) file
is not a program, setup, or object, (2) format of the
file is invalid, or (3) file has been corrupted.

Too many files in directory

Maximum number of files that can be displayed is
200. If the current directory contains more than 200
files, this message is displayed.

Too many files on disk, FLIST full

Directory area on disk is full, although there may be
more space available for recording. Delete
unnecessary filenames to gain access to free space
remaining on disk.

Too many open files for process

Each process is limited to a maximum of ten files open
at one time.

Too many open files for system

There is a system-wide limit of 20 files open at one
time.

Too many processes using disk sub-system

There can be no more than twelve processes using file
1/0 simultaneously.

Too many source files selected

Operator has used E3 to select multiple source files
for executing the Compile command (from the File
Maintenance menu). Select only one source file to
compile and save as a linkable-object (LOBJ) file.

Transfer aborted

Data transfer operation has been aborted. Partial
transfer of data may have occurred, overwriting storage
medium at destination.

Transfer complete

Data transfer has been completed successfully.

Transfer in progress

Data transfer being executed.

Transmit overrun

Attempt to transmit data faster than unit can transmit.

Unable to access disk

No file named in a Data Transfer to a file, disk not in
drive, disk is write-protected. or disk is unformatted.

A1-14

Apoendlx A 1 Interactive Messages

~,

",

,I

Unable to access disk in selected drive.

During multi-disk recording, the next drive in
sequence does not contain a disk, contains a
write-protected disk. or contains an unformatted disk.
During file maintenance operations or disk duplication,
source disk is not present in selected drive, is
write-protected, or is unformatted.

Unable to access m_list

Disk error. Check disk and try operation again. If
message recurs, disk may need reformatting.

Unable to execute XEQ key

Attempt to execute a File Maintenance command
before the current directory is displayed.

Unable to open OAT

There are no data acquisition tracks on the disk being
accessed.

Unable to open file

Disk error. Check disk and try operation again. If
message recurs. disk may need reformatting.

Unable to open next disk

Recording using more than one disk. Next disk may
not be installed.

Unable to read DAT info block

DAT block not where indicated. Disk may be
corrupted.

Unable to read file

Check disk.

Unable to read from DAT

Check disk.

Unable to write to DAT

1) May have attempted to transfer more data to
destination disk than the space allocated for data
during disk formatting. A Summary of the disk may
show no free space remaining for data acquisition. 2)
Disk may be write-protected.

Unhandled CPM interrupt

Message should not normally appear. If it recurs,
contact Customer Service.

Unhandled MPM interrupt

Press S to recover from this error. Message should
not normally appear, however. If it recurs, contact
Customer Service.

Unknown DAT type

Data acquisition tracks may have been recorded on a
unit with more recent software than is installed in the
unit being used to playback the data.

l

Al-15

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Unknown filetype

Check entry in file listing. Check disk. Try operation
again. If message recurs, delete and recreate file (if
possible). Some file types may not be known for
certain operations. A Print command on a SYS file,
for example, generates this error message.

Unprintable screen

Screen requested cannot be printed. Refer
on printing for printable screens.

Unrecoverable error during format

Format operation failed. Make sure disk is inserted
properly in selected drive. Check disk type. One
Mbyte disks are not supported. If disk type is correct,
re-attempt formatting. If second attempt fails, disk
may be bad.

A1-16

to

section

ApQflndix A2 Error Mess'mls Issued by C Trans/ator

AppendixA2: Error Messages Issued by
C Translator
If a spreadsheet program contains any of the fonowing errors, the compilation will be interrupted and
you win be returned to the Protocol Spreadsheet. A diagnostic message about the first error will be

displayed at the top (second line) of the screen. To search for additional error messages, press
MESSAGE

£rn.

MEANING

AR "C" conditions text too long

A C region in a
characters.

Bad format in object file

Unsuccessful attempt to access linkable-object file via
the OBJECT block identifier. Use the Compile
command on the File Maintenance screen to recreate
the LOBJ file. and try again.

BIB value out of range

An 5S#7 condition at Layer 2 specifies a
that is not zero or one.

Bit mask exceeds maximum length

A FLAG condition or FLAG name SET action includes a
bit mask that exceeds 16 bits. In other uses, bit mask
is typically eight bits. '

Cannot find object file

Attempt to access a linkable-object file via the OBJECT
block identifier. Either the file does not exist, or it
resides in a directory not included in the search path.

Constant reference stack overflow

1) Attempt to nest constants more than eight deep, or
2) constants are defined circularly.

Constant value too long

Context in which constant is used determines what
value is too long. A constant in a Layer 1 receive
string condition, for example, when expanded. cannot
exceed 32 characters.

Duplicate state name

Attempt to use state name twice in the same test.

A2-1

CONDITIONS

block is more than 300

BIB=

value

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Duplicate test name

Attempt to use test name twice in the same task
(layer) .

Edit buffer full

Spreadsheet program is too large. Use include files.

Empty conditions section

There is no entry for a CONDITIONS block.

FIB value out of range

An SS#7 condition at Layer 2 specifies an FIB:: value
that is not zero or one.

Identifier exceeds maximum length

Message should not normally appear. It means,
however, that an identifier is too long for the context
in which it is being used.

Idle string must contain exactly one
character

Layer 1 IDLE action includes a string with more than
one character.

Illegal bit value

Bit has been assigned a value other than zero or one.
In X.2S protocol, for example. the user supplies a
value for the Q, D, or M bit at Layer 3.

Illegal cause value

An X.2S condition at Layer 3 specifies a numeric
value for the CAUSE= selection which is outside the
valid range. Select a value between hexadecimal 0
and FF.

Illegal eIe type for ISDN

An 5S#7 condition at Layer 3 specifies a CIC:: value
for an ISDN header which is outside the valid range.
Select a value between hexadecimal 0 and FFFF.

Illegal eIe type for TUP

An SS#7 condition at Layer 3 specifies a CtC= value
for a TUP header which is outside the valid range.
Select a value between hexadecimal 0 and FFF.

Illegal control byte

An X.2S. LAPD, SDLe, or SNA condition at Layer 2
(as in the example which fonows) specifies a value for
the frame type which is outside the valid range:
CONDITIONS: DTE OTHER 1FF. Select a value between
hexadecimal 0 and FF.

Illegal diag value

An X.2S condition at Layer 3 specifies a value for the
DIAG= selection which is outside the valid range.
Select a value between hexadecimal 0 and FF.

A2-2

Appendix A2 Error MesUflts Jss.y&d by C Translator

Illegal OPC type

An SS#7 condition at Layer 3 specifies a value for the
DPC= selection which is outside the valid range. For
CCITT format, select a value between hexadecimal 0
and 3FFF. For ANSI format. select a value between
hexadecimal 0 and FFFFFF.

Illegal frame address

An X.2S, SOLC. or SNA condition at Layer 2 (as in
the example which follows) specifies a value for the
frame address which is outside the valid range:
CONDITIONS: OTE INFO ADOR= 1FF. Select a value
between hexadecimal 0 and FF.

Illegal LCN value

An X.2S condition at Layer 3 specifies a value for the
LCN:::: selection which is outside the valid range. Select
a value between hexadecimal 0 and FFF.

Illegal OPC type

An SS#7 condition at Layer 3 specifies a value for the
selection which is outside the valid range. For
CCIIT format, select a value between hexadecimal 0
and 3FFF. For ANSI format, select a value between
hexadecimal 0 and FFFFFF. .

OPC",

Illegal path number

An X.2S condition or action at Layer 3 specifies a
value for the PATH", selection which is outside the valid
range. Select a value between zero and eight.

Illegal P/F bit

An X.2St SOLC. or SNA condition or SEND action at
Layer 2 specifies a value for the P/F= selection that is
not zero or one.

Illegal PR value

An X.2S SEND action at Layer 3 specifies a value for
the PR= selection which is outside the valid range.
Select a value between zero and 127.

Illegal PS value

An X.25 SEND action at Layer 3 specifies a value for
the PS= selection which is outside the valid range.
Select a value between zero and 127.

Illegal receive count

In an X.2S, SDLC. LAPO. or SNA Layer 2 SEND
action. the value specified for N(R) is out of range.
Select a value between zero and 127.

Illegal SAPI value

A LAPD condition or SEND action at Layer 2 specifies
a value for the SAPI: selection which is outside the
valid range. Select a value between hexadecimal 0
and 3F.

A2-3

.----.-~-----

..- - - - - - -.....-.

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Illegal send count

In an X.2S. SDLC, LAPD. or SNA Layer 2 SEND
action, the value specified for N (S) is out of range.
Select a value between zero and 127.

Illegal SI type

In an SS#7 Layer 3 OTHER condition, the value
specified for Service Information is out of range.
Select a value between hexadecimal 0 and FF.

Illegal SLS type

An SS#7 condition at Layer 3 specifies a value for the
selection which is outside the valid range. For
CCIrr format. select a value between hexadecimal 0
and F. For ANSI format, select a value between
hexadecimal 0 and iF.

SLS=

Illegal TEl value

A LAPD condition or SEND action at Layer 2 specifies
a value for the TEI= selection which is outside the valid
range. Select a value between hexadecimal 0 and 7F.

Incomplete EIA action

Required number of softkey selections have not been
made for a Layer 1 EIA action.

Invalid constant reference

Valid characters for a constant name include 0-9,
upper- and lower-case letters. and underscores.
Name cannot begin with a number. The message also
may indicate that a special "constant" of the form
(!name/45j») has been used, but the string using it is
missing the enclosing quotation marks.

Invalid counter arguments

In a SEND action. the string to be sent contains a
reference of the form ((counterln]). The value of n is
out of range. Select a value between zero and three.

Invalid counter value

COUNTER condition or a COUNTER name SET action
specifies a value for the counter which is outside the
valid range. Select a value between zero and
4.294.967,295.

Invalid day of month

TIME condition specifies a day of the month which is
outside the valid range. Select a value between one
and thirty-one.

Invalid flag arguments

In a SEND action, the string to be sent contains a
reference of the form «Jlag{nj)). The value of n is out
of range. Select either zero or one.

A2-4

Ape,9'1dix A2 Error Messatns Issued by C Translator

Invalid time value

TIME

Invalid time of day

TIME

Invalid timeout value

name RESTART action specifies a value which
is outside the valid range. Select a value between
0.001 and 65.535. Do not begin entry with decimal
point.

Invalid trigger (lacks transitional)

Condition does not contain an event. At Layer 3 in
X.25 for example. the status-only condition
MORE_TO_RESEND is not combined with an event.
Add an event such as PACKET_SENT to the condition.

Invalid trigger (multiple transitional-only)

Condition contains more than one event. Since no
two events can come true at the Same time. move one
of the events to a separate CONDITIONS block.

Invalid character in constant name

Valid characters include 0-9, upper- and lower-case
letters, and underscores. Name cannot begin with a
number.

No closing )

Double parentheses delimit constants.

No closing

J

condition specifies a time which is outside the
valid range for the 24-hour format.
condition specifies a time which is outside the
valid range for the 24-hour format.

TIMEOUT

In a SEND action, the string contains a reference to a
flag or counter which includes additional information
inside brackets. The closing bracket is missing.

No more errors

There are no more errors to be displayed via
GO_ERR. The next time you press @, the last error
message will be displayed.

Not an object file

Attempt to access a file via the OBJECT block identifier
that has a type other than LOBJ (linkable-object).
Use the Compile command on the File Maintenance
screen to create a linkable-object file from a source
file containing standard C code.

Obsolete object file version

Attempt to access a linkable-object file via the OBJECT
block identifier. Use the Compile command on the
File Maintenance screen to recompile the source file.
and try again.

A2-5

INTERVIEW 7000 Series Advanced Programming: ATLG-107-951-10B

Obsolete package loaded

A layer personality package is loaded which came from
an older version of the software. The package is
attempting to use facilities which are not provided in
the current version of the software.

Out of buffer space

The translator has run out of memory.

Out of memory

The translator has run out of memory.

Premature end of file

1) Required softkey selections for a condition have not
been made. To send a string at Layer 1, for example,
you must make a BCC selection. or 2) string does not
contain closing quotation mark.

Receive string cannot be longer than
32 characters

RECEIVE STRING condition at Layer 1 contains more
than 32 characters. Note that constants are expanded
before they are counted.

Reference to undefined constant

Attempt to use a constant that has not been defined.

Reference to undefined state

State name referenced in

Syntax error

Program may contain punctuation errors or incomplete
softkey selections. This message often accompanies
other errors messages.

There is no next state

Included

Unclosed AR"C" region

1) Unequal number of opening and closing curly
braces. 2) unclosed quotation marks, or 3) unclosed
parentheses.

Unclosed quoted string

Insert closing quotation marks at end of string.

Undefined name

The string in a SEND action contains a constant
reference which does not refer to any defined flag,
counter, constant. or special inter-layer data constant.

Unexpected character in constant name

Valid characters include 0-9. upper- and lower-case
letters, and underscores. Name cannot begin with a
number.

Unknown object file version

Should not normally appear. May be attempting to
use version of a linkable-object file which is
incompatible with older versions of software.

NEXT_STATE

NEXT_STATE: NEXT,

does not exist.

but no state follows.

A trigger condition has both ENTER_STATE and a line
condition including the WAIT_EOF option. This error is
a special case of the "Invalid trigger (multiple
transition-only)" error.

A2-6

App,ndix A3 Error MeSS8Q'f!S Issued by C Complier

Appendix A3: Error Messages Issued by C
Compiler
Most of the following messages report errors that interrupt the compilation of a spreadsheet program
and return you to the Protocol Spreadsheet. A diagnostic message about the first error will be
displayed at the top (second line) of the screen. Some messages also serve as warnings. Warnings do
not cause compilation to be aborted, but they are displayed on the Protocol Spreadsheet with error
messages. Suppress warning messages using the following #pragma:
#pTagma

nOWQm

Table A3·1
Numbered Error Messages Returned for C Codingt

~'

001

Only integral values may be added to pointers.

002

Within constant expressions, the operand of the unary '&' operator must be an
object of static storage class.

003

Only integers and pointers may be converted to pointers.

004

Attempt to create more than one instance of a task which waits for fast_event
variable-task instance '(identifier)'.

005

Only numeric values may be converted to float.

006

Illegal operation on relocatable value in constant expcession.

007

Illegal conversion from a structure or union type.

008

Operands of binary operator have incompatible types.

009

Illegal indirection through a non-pointer value.

010

An integral constant expression is required.

011

A scalar expression is required.

012

Bitfield values are not allowed in constant expressions.

013

Operands of .... '/'. and ''YO' must be numeric.

tErrors 001 - 699 are returned by the compiler. Errors 700 and higher are returned by the pre-processor.

t

A3-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

Table A3-1 (Continued)

014

Operands of logical operators must be integers.

015

Pointer values being compared or subtracted in constant expressions must pointJo
the same aggregate.

016

Assignment operators are invalid in constant expressions.

017

Operands of % operator may not be floating point.

018

The ++ and -- operators are invalid in constant expressions.

019

A non-relocatable constant expression is expected.

020

Relocatable quantities cannot be converted to float in constant expressions.

021

Void expressions are not permitted in constant expressions.

022

A structure or union is required for membership operators.

023

Attempt to apply a subscript to something other than an array or pointer.

024

Only integral values and pointers may be subtracted from pointers.

025

Pointers may only be subtracted from pointers of the same type.

026

Undeclared variable •(identifier)' .

027

Constant expressions may not have type 'void'.

028

Illegal implicit pointer-to-floating conversion.

029

Illegal implicit pointer-ta-integer conversion.

030

Illegal implicit pointer-to-pointer conversion.

031

Illegal implicit integer-to-pointer conversion.

032

Illegal implicit floating-to-pointer conversion.

033

Illegal conversion.

034

Attempt to use an event variable in an arithmetic expression.

A3-2

APRf,ndix A3 Error M!ssaaes Issued by C Compiler

Table A3-1 (Continued)

~,
I

,

,

035

Parameter declarations are invalid with function prototypes.

036

Functions may not be initialized.

037

Task instances may not be initialized.

038

Typedefs may not be initialized.

039

Invalid initializer on function or task.

040

Array or structure initializers must be a list of constant expressions.

041

Attempt to initialize a bitfield with a relocatable value.

042

String is too long to fit into array.

043

Too many levels of braces in initializer.

044

Too many initializers.

045

Union (identifier) undefined.

046

Struct (identifier) undefined.

047

Task has more than one entrypoint.

048

File has more than one entrypoint.

049

A function exceeds 64K bytes in size.

050

Integral type expected.

051

Incompatible types.

052

Pointers must be of the same type.

053

Integral expression expected.

054

Illegal operands of minus.

055

Arithmetic types required.

I
I

A3-3

INTERVIEW 7000 Series Advanced Proaramming: ATLC-107-9S1-108

Table A3-1 (Continued)

056

Division by zero.

057

Division by zero prohibited.

058

Illegal types.

059

Arithmetic types expected.

060

Integral types expected.

061

The operands of the (symbol) operator have incompatible types.

062

Operands of incompatible type to '(symbol)' operator.

063

Branch condition must have scalar type.

064

Value of void function used.

065

Value of task invocation used.

066

Attempt to invoke an object which is not a function or task.

067

Argument must not be void.

068

Not enough arguments supplied in function call.

069

Too many arguments supplied in function call.

070

Unknown size.

071

Attempt to call bad function.

072

Extensive use of fast_event variables has caused a code segment to overflow it's
64K byte limit.

073

(Identifier) undeclared.

074

The left operand of the DOT operator must be of structure or union type.

075

The left operand of the -> operator must be either a pointer to a structure, or a
pointer to a union.

A3-4

~"
I '

i'

ApRendix A3 Error Messages Issued by C Compiler

,

Table A3-1 (Continued)

'I.

/

>

•••

076

(Identifier) is an unknown member.

077

Illegal indirection or illegal subscript.

078

Illegal L-value.

079

Operand of prefix (symbol ++ or --) operator must be scalar.

080

Operand of postfix (symbol ++ or --) operator must be scalar.

081

Unary PLUS operator requires scalar operand.

082

Unary minus operator requires arithmetic operand.

083

Bitwise NOT operator requires integral operand.

084

DEFAULT not inside SWITCH.

085

Multiple DEFAULT's in switch.

086

Label •(identifier)' multiply defined.

087

BREAK outside of loop or switch.

088

CONTINUE outside of loop.

089

RETURN is invalid inside WAITFOR.

090

Void functions must not return a value.

095

Conflicting tag: (struct, union, enum, or task) (identifier) and (struct. union,
enum, or task) (identifier).

091

Expression must have type 'label'.

092

Controlling expression must be integral.

093

CASE expression must be integral.

094

Duplicate CASE. value = (number).

A3-5

INTERVIEW 7000 Series Advanced Proarammlng: ATLC-107-9S1-108

Table A3-1 (Continued)

096

WAITFOR is invalid within another WAITFOR.

097

Attempt to wait for non-event variable.

098

Invalid L-value.

099

Attempt to modify CONST L-value.

100

Attempt to use an event value in an expression.

101

Attempt to use a label value in an expression.

102

Attempt to use a void value.

103

Arrays of functions or tasks are invalid.

104

Illegal storage class for function.

lOS

Illegal storage class for task instance.

106

Invalid storage class.

107

Extern variables may not be initialized within a function.

108

Function (identifier) redeclared.

109

Function (identifier) redefmed.

110

(Identifier) redec1ared.

111

(Identifier) redefined.

112

Typedef redefined.

113

Label '(identifier)' is undefined.

114

(1) Unknown size for (identifier).

115

(2) Unknown size for (identifier).

116

Enum (tag identifier) redeclared.

A3-6

Agpendix A3 Error Messs!l!s Issued by C Compiler

Table 1\3-1 (Continued)

·1"1\
I

117

Newline in character constant.

118

Newline in string constant.

119

Unknown character.

120

Unexpected character.

121

Token type missing.

122

Wrong type of declarator for function definition.

123

Parameter # (number) has no identifier.

124

(Named item) is declared in the parameter declarations. but is not listed in the
parameter list of the function.

125

Extra ; in function definition.

126

Syntax error in attribute.

127

Syntax error in declarator or initializer.

128

Syntax error in initializer.

129

Syntax error in parameter definition.

130

Attempt to initialize a formal parameter.

131

Syntax error in parameter.

132

Syntax error in struct/union declaration.

133

Syntax error in type specifier.

134

Syntax error in strUcture member.

135

Syntax error in enumerator list.

136

Syntax error in enumerator.

A3-7

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Table A3-1 (Continued)

137

Syntax error in task specifier.

138

Syntax error in array subscript.

139

Syntax error in parameter list.

140

Unresolved reference (identifier).

141

Syntax error in statement.

142

Syntax error in conditional expression.

143

Syntax error in DO statement.

144

Syntax error in condition.

145

Syntax error in BREAK statement.

146

Syntax error in CONTINUE statement.

147

Syntax error in RETURN statement.

148

Syntax error in GOTO expression.

149

Syntax error in TASK list.

150

Syntax error in FOR statement.

151

Syntax error in FOR initialization.

152

Syntax error in FOR condition.

153

Syntax error in FOR increment.

154

Syntax error in SWITCH condition.

155

Syntax error in CASE expression.

156

Syntax error in compound statement.

A3-8

&:»2endix A3 ErrQr MQssagss Issued by C Compl/er

Table A3-1 (Continued)

.. . I '
~.

157

Syntax error in sizeof type name.

158

Syntax error in subscript.

159

Syntax error in function caU.

160

Syntax, error in expression.

161

Type clash.

162

More than one storage class.

163

Array of unknown size.

164

Cannot take size of function.

165

Structure or union of unknown size.

166

Circular definition of enumerated type.

167

Cannot take size of task.

168

Srruct (identifier) redeclared.

169

Functions and tasks may not be structure members.

170

Zero-width bitfields may not be named.

171

Structure member (identifier) multiply defined.

172

Invalid negative bit-field width.

173

(Struct, union, enum, or task) (identifier) multiply defined.

174

Task (identifier) redeclared.

175

Union (identifier) redeclared.

176

Functions and tasks may not be union members.

A3-9

INTERVIEW 7000 Series Advanoed Programming: ATLC-107-951-108

Table A3·1 (Continued)

177

Invalid zero-bit member.

178

Union member (identifier) multiply defined.

179

No main routine supplied.

180

Arrow operator given structure, not a pointer.

181

DOT operator given a pointer to a structure. not a structure.

182

Address of array.

183

Address of function.

184

Address of register variable.

185

Address of bit-field.

186

Address of non-L-value.

187

Attempt to use a LABEL value in an expression.

188

Attempt to use an EVENT value in an expression.

189

Invalid zero or negative array dimension,

190

Only canst or volatile allowed.

191

Maximum bit-field width is 16.

192

Illegal storage class for formal parameter.

193

Function parameters may not be functions.

194

Function parameters may not be tasks.

195

Bad parameter storage class.

196

Event expression required in waitfor clause,

A3-10

Appendix A3 Erro( Messages Issued by C Compiler

Table A3-1 (Continued)

197

Scalars must be initialized with a single expression. optionally in braces.

198

Label undeclared.

199

Syntax error in declarator or initializer.

200

Pointers to different objects shouldn't be subtraCted.

201

Duplicate formal parameters of a function.

202

External variables may not be initialized inside of a function.

203

Formal parameters of functions may not be initialized.

204

Attempt to use labels outside a function.

205

Variable (identifier) undeclared.

206

Attempt to take the value of a typedef.

207

Function's stack frame is too large.

208

Floating point has not yet been implemented.

209

Invalid conversion of relocatable quantity in constant expression.

210

Attempt to redefine the reserved name '(identifier)'.

211

CASE outside of switch statement.

212

Returned values of this size are not implemented.

213

Unrecoverable syntax error.

214

Parsing stack overflow.

215

Too many errors have been encountered during compilation.

216

Compiler aborted.

A3-11

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

Table A3-1 (Continued)

217

Register variable •(identifier)' declared with non-scalar type.

218

Implicit declaration of function •(identifier) , .

219

Out of memory during compilation-program too big.

220

Internal software error in compiler (error number). Compilation aborted.

221

No T1 Mux Installed.

222

A waitfor statement has one or more condition clauses, none of which names an
event variable. This is often caused by either misspelling an event variable, or by
failing to declare an event variable.

223

The variable '(identifier)' has been declared inside of a task with the "extern"
attribute. but has never been defined within that task. In this context, the
keyword "extern" may only be used to forward-declare an identifier which is fully
defined later in the task body.

226

Invalid or Incompatible Data Acquisition Tracks on selected playback device.

227

No ISDN Mux Installed.

230

Object file (name) is in obsolete format. Fix by recompiling it.

231

Symbol (identifier) multiply defined by object file.

232

The symbol (identifier) has been used as an event variable in one module and as a
. function or variable in another.

233

The symbol (identifier) has type event in one module. but has type fast_event in
another.

234

Different modules have used the symbol (identifier) inconsistently as code, data, or
read-only data.

235

Bad format in object file (name).

236

Cannot find object file (name).

A3-12

.>7~.
!

A()pendix A3 Error Messages Issued by C Compiler

<

I

Table A3·1 (Continued)

700

HeIse inside of #else clause.

701

#elif inside of #else clause.

702

Too many nested #if's.

703

Extra tokens at end of line.

704

Unexpected end of file.

705

Identifier missing from#ifdef directive.

706

Identifier missing from #Undef directive.

707

#elif without matching #if.

708

#else without matching #if.

709

#endif without matching #if.

710

Syntax error.

711

Syntax error in constant expression.

712

String constant in constant expression.

713

Invalid character in collstant expression.

714

Error in hex number.

715

End of file in char constant.

716

Newline in char constant.

717

End of file in string.

718

Newline inside string.

719

Attempt to divide by zero.

720

Unknown preprocessor command.

A3-13

••

_O< _ _ _ _ _ • _ _ ~ _ _ _ • • • _ _ • _ _ _ . _ . _ _ _ _ ~. _ _ _ _ _ _ _ _•

_ _ _ _ _ _ _ _ _ _
• •_

••
_.
-

-

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

Table A3-1 (Continued)

721

Syntax error in formal parameters of macro.

722

Duplication of formal parameter (identifier) in macro definition.

723

No macro name given.

724

Macro. redefined.

725

Syntax error in #line directive.

726

Unterminated string literal.

727

Cannot open include file (identifier).

728

Cannot find include file (identifier).

729

Identifier does not exist.

730

Syntax error in #include directive.

731

Include identifier is not defined.

732

Unterminated character constant.

733

End of file inside char constant.

734

End of file inside string.

735

End of file inside comment.

736

Argument list required.

737

Attempt to close bracket [ or { with ).

738

Attempt to close arg list with}.

739

Attempt to close bracket [ or ( with }.

740

Attempt to close arg list with].

A3-14

AppendlxA3 . .Error MHsgs Issued by

Table A3-1 (Continued)

741

Attempt to close bracket ( or { with ].

742

Incomplete argument list.

743

No parameter after a # char.

744

(User-generated error message.)

745

File ends with \ \.

746

Number of arguments does not match number of parameters.

749

Identifier missing from #undef.

A3-15

C Compiler

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-10B

A3-16

AppendIx B Glossary

Appendix B: Glossary of Acronyms,
Abbreviations and Mnemonics
ACK
ACTLU
ADR
AK
ANSI
ASCII
~,

~

~

!

ASYNC
AUX
BAUDOT
BBI
BCC
BCN
BDLC
BEL
BERT
BIB
BISYNC
BITIM
BL
BLI
BM
BNC
BOP
bps
BS
BSC

Acknowledgment
Activate Logical Unit (SNA)
Address
ACK: Acknowledgment
American National Standards Institute
American Standard Code for Information Interchange. standard code for
digital communications
Asynchronous format (indicates START and STOP bits)
Auxiliary
Five bit code for data transmission using one start and one stop element; used
in some teletypewriter machines
Begin Bracket Indicator. (SNA)
Block Check Calculation
Beacon (SDLC)
Burroughs Data Link Control
Bell
Bit Error Rate Testing
Backward Indicator Bit (SS#7 Layer 2)
Binary Synchronous Communications Protocol (IBM); also BSC
Bit image
BEL: Bell
Blink (CRT enhancement)
Bit Mask
A highly reliable twist-lock connector used to carry wide-band video/digital
signals: used with coaxial cable (G.703)
Bit-Oriented Protocol. e.g., SDLC
l:lits per second
Backspace
BISYNC

r
B-1

INTERVIEW 7000 SerIes Advanced Programming: ATLC-107-951-10B

C
CAN
CAS
CCITI
CCS
CCSS#7
CD
CDr
CEDI
CF
CHAR
CHDAT
CIC
CLR
CN
CONF
const
CPM
CR
CRC
CSI
CSN
CTS

Control (X.21 signal)
Cancel
Channel Associated Signaling (G.703)
Consultative Committee, International Telephone and Telegraph
Clear Channel Signaling (G.703)
Common Channel Signaling System #7
Carrier Detect (RS-232/V.24 and V.35 signal); same as RLSD
Change Direction Indicator (SNA)
Conditional End Bracket Indicator (SNA)
Command Format (SNA)
Character
Character data
Circuit Identifier Code (SS#7 Layer 3)
Clear
CAN: Cancel
Confirm
Constant. modifier to a declaration in C language
Central Processing Module
Carriage Return
Cyclic Redundancy Check
Code Selection Indicator (SNA)
Command Sequence Number (SNA)
Clear To Send (RS-232N.24 and V.35 signal)

D
DAF'
DAT
DB-25
DCl
DC3
DCE

D bit (Bit 7 in first octet of packet-level X.2S)
Destination Address Field (SNA)
Data Acquisition Tracks
25-Pin D connector (standard for RS-232N.24)
Device Control 1
Device Control 3
Data Circuit-terminating Equipment (or Data Communications
Equipment). typically a modem
Data Count Field (SNA)
Digital Data Communications Message Protocol
Decrement
Destination Element Field (SNA)
Preprocessor directive, C language
Delete
Data Flow Control (SNA)
Diagnostic (X.25 Layer 3)
Directory
Disconnect (SDLC, LAPD. X.2S Layer 2)
DLE: Data Link Escape; also Data Link layer (OSI primitive)
Data Link Control
Data Link Escape (used principally in transparent BISYNC)

DCF
DDCMP
DEC
DEF
#define
DEL
DFC
DIAG
DIR
DISC
DL
DLC
DLE

B-2

Appendix B Glossary

DM
DMA
DPC
DRAM
DRI
DSAF
DSK
DSR
DTE
DTR
DUP
EB
EBCD
EBCDIC
EBI
EC
EIA
#elif
EM
#endif
ENQ
enum
EOB
EOF
EOM
EOT
EPROM
EQ
EQ
ERI
ESC
ET
ETB
ETX
evar
EX
extern

ETB. EOB: End of Transmission Block
Extended Binary Coded Decimal
Extended Binary Coded Decimal Interchange Code
End Bracket Indicator (SNA)
ESC: Escape
Electronic Industries Association
Else if, preprocessor directive, C language
EOM: End of Message
Preprocessor directive, C language
Enquiry
Enumeration. set of integer constants, C language
End of Transmission Block
End of Frame
End of Message
End of Transmission
PROM containing power-up software and initialization routines
Equal
ENQ: Enquiry
Exception Respoo.se Indicator
Explicit Route Number
Escape
EOT: End of Transmission
End of Transmission Block
End of Text
Event variable, pre-declared identifier, ARD extension to C language
ETX: End of Text
External, storage class specifier, C language

FAC
FAS
FCS
FD1

Facilities (X.25 Layer 3)
Frame Alignment Signal (0.703)
Frame Check Sequence (used in BOP)
Floppy-disk Drive 1-

ERN

~.,."

Disconnected Mode (SDLC. LAPD. X.25 Layer 2)
I)irect Memory Access
Destination Point Code (SS#7 Layer 2)
Dynamic Random Access Memory; one Mbyte of memory space of each
MPM. dedicated to storage or receive data
Direct Response Indicator (SNA)
Destination Subarea Address Field (SNA)
Disk
Data Set Ready (RS-232N.24 and V.35 control lead)
Data Terminal Equipment
Data Terminal Ready (RS-2321V.24 and V.35 control lead)
Duplicate

I

~: ,
.•.

B-3

JNTI;RVIEW 7()Q() Series Advanced Programming: ATLC-107-9S1-108

FD2
FDX
FEB
fevar
FF
FI
FIB
FID
fifo
FMD
FRMR
FS
FSN

Floppy-disk Drive 2
Full duplex (permits simultaneous data in both directions)
Front End Buffer
Fast event variable, pre-declared identifier, ARD extension to C language
Form Feed
Format Indicator (SNA)
Forward Indicator Bit (SS#7 Layer 2)
Format Identifier (SNA)
First in. first out; memory queue on boards
Function Management Data (SNA)
Frame Reject (SDLC. LAPD, X.25 Layer 2)
Field Separator
Forward Sequence Number (S8#7 Layer 2)

GBM
GE
GFI
goto
GS

Global Bus Module
Greater than or equal to
Group Format Indicator (X.25 Layer 3)
Jump statement, C language
Group Separator
Greater than

GT

HEX
HRD
Hz

High Level Data Link Control procedure
Half duplex (data cannot be transmitted in both directions
simultaneously)
Hexadecimal number; also the hex key
Hard disk
Hertz

I
I
iAPX 286
IERN
#if
#ifdef
#ifndef
IL
INC
#include
IND
INFO
init
int
INT
I/O
IPARS

Indication (X.21 signal)
Information (SDLC, LAPD, X.25 Layer 2)
Pan number for Intel 80286 processor
Initial Explicit Route Number (SNA)
Preprocessor directive, C language
If defined ... , preprocessor directive, C language
If not defined ... , preprocessor directive, C language
Interlayer (message buffer)
Increment
Preprocessor directive, C language
Indication
Information (SDLC. LAPD, X.25 Layer 2)
Initialize
Integer data type. C language
Interrupt (X.25 Layer 3)
Input/Output
International Passenger Airlines Reservation System

HDLC
HDX

8-4

Appendix B Glossary

ISDN
ISO
ISOC

Integrated Services Digital Network
International Standards Organization
Isochronous

JIS

J;apanese Industrial Standard

kana
Kbits
Kbps
Kbyte

Japanese syllabic alphabet
Kilobits
Kilobits per second
Kilobyte

LAF
LAPD
LCG
LCN
LE
LED
LF
LI
LOBJ
LRC
LSD
LT
LTA
LTM
LU

Local Address Field (SNA)
Link Access Procedure on the D-channel
Logical Channel Group (X.25 Layer 3)
Logical Channel Number (X.2S Layer 3)
Less than or equal to
Light Emitting Diode
Line Feed
Length Indicator (SS#7 Layer 2)
Linkable-object
Longitudinal Redundancy Check
Link Status Unit (85#7 Layer 2)
Less than
Link Test Acknowledge
Link Test Message
Logical Unit (SNA)

M
macro

M bit (X.2S Layer 3. Bit 4 ·0£ first octet)
Macro replacement of text initiated by define pre-processor directive. C
language
Megabyte
Modulus; maximum. window size for frames or packets. 8 or 128
Main Processing Module
Millisecond
Message Signal Unit (S5#7 Layer 2)
Multiplexer

Mbyte
MOD
MPM
msec
MSU
mux
N

NAK
NC
NE
NETM
NI
NK
NP

Network layer (OSI primitive)
Negative Acknowled.JIllent
Network Control (SNA)
Not equal to
Network Management (SS#7 Layer 3)
Network Indicator
NAK: Negative Acknowledgment
Network Priority (SNA)

e-5

INTERVIEW 7000. SerIes Advanced Programming: ATLC-107-9S1-10B

Nr
NRZI
Ns

NT
NTR
NTS
NU
NUL
OBJ

Number (next) receive frame (SDLC, LAPD. X.2S Layer 2); also NR and
NCR)
Non-Return to Zero Inverted (used with SDLC and ASYNC modemssometimes with clocked modems)
Number (frame) sent (SDLC. LAPD. X.2S Layer 2); also NS and N(S)
Network Termination (ISDN)
Network Test Regular (SS#7 Layer 3)
Network Test Special (SS#7 Layer 3)
NUL: Null
Null

OEF
OPC
OSAF
OSI
OUTSYNC

Object code
Origin Element Field (SNA)
Originating Point Code (SS#7 Layer 3)
Origin Subarea Address Field (SNA)
Open Systems Interconnection
Out of synchronization

pad
pal
parens
PCM
PDU
PERC
PIF
PH
PI
PIU
PLU
pos
Pr
#pragma
PRGM
PROGTR
PROM
Ps
PU

DEL or idle line character
Programmable array logic
Parentheses
Peripheral Control Module
Primitive Data Unit
Percentage
PolllFinal bit used in control byte at frame level (SDLe. X.2S)
Physical layer (OSI primitive)
Pacing Indicator (SNA)
Path Information Unit (SNA)
Primary Logical Unit (SNA)
Position
Packet (next) receive sequence number (X.2S Layer 3); also PR and peR)
Preprocessor directive. C language
Program
Program Trace Run-mode screen
Programmable Read-Only Memory
Packet send sequence number (X.2S Layer 3); also PS and peS)
Physical Unit (SNA)

Q

Q bit (Bit 8 of first octet in packet-level X.2S)
Queued Response Indicator (SNA)

QRI
R

RAM
RD

REG

Receive (X.21 signal)
Random Access Memory
Received Data (RS-232N.24 andV.35 signal)
Registration (X.2S Layer 3)

B-6

Appendix B Glossary

REJ
REQ
RESP
Rev
RGB
RH
RJ-llC
RLSD

RNR
ROM

RR
RS
RS-232N.24
RS-449
RTI
RTS
RU
SABM
SABME
SAPI
SB
SC
SCCP
SCR
SCT
SCTE
SDI
SDLC
SDU
SELECTRIC
SFO
SH
SI
S10

SI1
SIG
SIO
SLS
SLU

Reject (SDLC, LAPD, X.25 Layer 2)
Request
Response
Reverse
Red Green Blue (connector. forcolortnonitor)
Request/Response Header (SNA)
Standard for common telephone jack
Received Line Signal Detect (RS-232N.24 signal); same as CD: Carrier
Detect
Receive Not-Ready (SDLC. LAPD, X.25 Layer 2, X.2S Layer 3)
Read-Only Memory (firtnw8r:e/sofiware storage)
Receive Ready (SOLe. LAPD. X.2S Layer 2, JC25 Layer 3)
Record Separator
List of definitions for interchange circuit between data terminal equipment and
data circuit termination equipment established by EtA
EIA Standard for 37-pin and 9-pin DTE-DCEinteriace
Response Type Indicator (SNA)
Request To Send (RS'!"'232N.24 and V.35 signal)
Request/Response Unit (SNA)
Set Asynchronous Balanced Mode (LAPD.X.2S Layer 2)
Set Asynchronous Balanced Mode Extended (LAPD. X.25 Layer 2)
Service Access Point Identifier (LAPD)
SUB: Substitute
Sessi9nControl (SNA)
Signalling Connection Control,Part (85#7 Layer. 3)
Signal Clock Receive (RS-2321V.24.and V.35 signal), used when DCE clock
drives PTE
Signal ClockTran~nUt{~S-232/V.24 and V.35 sianal). used when DCE clock
drives· DTE .
Signal Clock Transmit·Bxtemal (R8... 232/V.24 and·V.35 signal). used when
DTE clock drives DCE
Sense Data Indicator (SNA)
Synchronous Data Link Control (IBM)
Service Data Unit
IBM typewriter Iprintercode
Status Field Octet (SS#1Layer 2)
SOH: Start of Header
Shift In
S~q~enced Information.· fra~e.. 0 (LAPD)
Sequenced Information F'fame 1 (LAPD)
Signal
Service In~ormation Octet (SSI7Layer 3)
Signalling Link Selection (55117 Layer 3)
S~condary Logical Unit (SNA)

B-7

INTERVIEW 7000 Series Advanced Programming:. ATLC-107-951-108

SMP
SNA
SNAI
SNF
SNRM
SO
SOH
SRC
SREJ
SSCP
SS#7
struet
STR
STX
SUB
SX
SY
SYN
SYS
sys

T
T

TD
TE
TEl
TGNFI
TGSI
TGSNF

TH
TIM
TPF
TS

TTL
TUP
typedef

UA
UI
UL
#Undef
US
usec

Sample
System Network Architecture (IBM)
SNA Indicator (SNA)
Sequence Number Field (SNA)
Set Normal Response Mode (SDLC)
Shift Out
Start of Header
Source
Selective Reject (SDLC)
System Services Control Point (SNA)
CCSS#7: Common Channel Signaling System #7
Structure,data type which consists of a group of variables referenced under
the same name, C language
String
Start of Text
Substitute
STX: Start of Text
SYN: Synchronization character
Synchronization character
System file
System directory
Transmit (X. 21 signal)
Transport layer (OSI primitive)
Transmitted Data (RS-232N.24 and V.3S signal)
Terminal Equipment (ISDN)
Terminal Endpoint Identifiet(LAPD)
Transmission Group Non-Fifo Indicator (SNA)
Transmission Group Sweep Indicator (SNA)
Transmission Group Sequence Number Field (SNA)
Transmission Header
Test Interface Module
Transmission Priority Field (SNA)
Transmission Services (SNA)
Transistor-to-Transistor Logic
Telephone User Part (SS#7 Layer 3)
Type definition. data type which creates new name for existing data type, C
language
Unnumbered Acknowledgment (SDLC, LAPD, X~2S Layer 2)
Unnumbered Information (SDLe)
Underwriters' Laboratory
Undefine. preprocessor directive. C language
Unit Separator
Microsecond

9-8

Append/I( B Glossary

USER TR
usr

Run-mode User Trace screen
User directory

VRCWI
VRCWRI

Virtual Route
Virtual Route
Virtual Route
Virtual Route
Virtual Route
Virtual Route
Virtual Route
Virtual Route
Virtual Route
Virtual Route
Virtual Route
Vertical Tab

VRID
VRN

VRPCI
VRPRQ
VRPRS
VRRWI

VRSI
VRSSN
VRSTI
VT
X.21
X.25
XDRAM
XEQ
XFER
XID
XMIT

Change Window Indicator (SNA)
Change Window Reply Indicator (SNA)
Identifier (SNA)
Number (SNA)
Pacing Count Indicator (SNA)
Pacing Request (SNA)
Pacing Response (SNA)
Reset Window Indicator (SNA)
Suppon Indicator (SNA)
Send Sequence Number (SNA)
Sequen.ce and Type Indicator (SNA)

CCIT! recommendation governing synchronous DTE-DCE operation on
public data networks
CCIT! recommendation governing the packet mode link connecting the user
site with a public data network
Extended Dynamic Random. Access Memory
Execute
Transfer
Exchange Identification (SDLC)
Transmit. transmission

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

8-10

~,
, l

Appe;ndix C: Selectable DataS;peeds
There are four clock crystalsinstaUed in the INTERVIEW. These clocks provide the
bits-per-second rates listed on the following pages. (An optional crystal is also available that
may be factory-configured for speeds not li~ted here.)
These baud rates apply to all clock and data format selections. with one exception. If you
are operating in Emulate DeE mode using internal clock and the data format is anything
other than Async, you may enter clock speeds 16 times higher than thosellsted. The
follOwing formula allows you to.detennme whether a higher data speed is selectable in this
special case.
The frequency of each standard clock crystal is first divided by 2 to derive four values of X:
Xl

= 3686400/2

X2 :: 4096000/2
X3 :: 4608000/2

X4 :: 5376000/2

Divide the desired bps rate into each of the values of Xto produce result Y.
Yl :: Xl/bps
Y2 :: X2/bps
Y3 :: X3/bps

Y4 :: X4/bps
Round each of the Y values to the nearest whole number.
Next. divide each Y value into the corresponding X value.Ut produce four possible speeds:
XIIY1 ;. SPEED1
X2/Y2 :: SPEED2

X31Y3 ... SPEED3
X4/Y4 == SPEED4

The values resultJng from this. calculation are the data speeds which may be selected for the
desired bits-per..:5econd rate .. Select the closest speed and use this as your entry on the Line
Setup Screen as the Intemal Clock speed.

0-1

INTERVIEW'?,m

ifC!!I A~ Programming:

ATI.C-107-951-10B

Table C-1
Line Setup Clock Speeds
168000.0
144000.0
128000.0
115200.0
84000.0
76800.0
72000.0
64000.0
57600.0
56000.0
48000.0
46080.0
42666.67
42000;0
38400.0
36000.0
33600.6
32914.3
32000.0
28800.0
28000.0
25600.0.
24000.0
23040.0
21333.33
21000.0
20945.5
20571.43
19200.0
18666.67
18285.71
18000.0
17723.1
16800.0
16457.14
16000.0
15360.0
15272.73
14400.0
14222.22
140QO.0
13552.9
. ;
13090.91

12923.08
12800.0
12126.3
.. ~2q.O'
"11636.36
11520.0
11200.0
11076.92
10971.4
10666.67
10500.0
10472.73
10285;71
10017.4
9882.35
9846.15
9600.0
9333.33
9216.0
9142.86
9000.0
8861.54
8842.11
8533.33
8470.59
8400.0
8228.57
8000.0
7944.8
7680.0
7636.36
7578.95
7529.41
7432.3
7304.35
7200.0
7111.11
7000.0
6981.8
6857.14
6776.47
..
6736.84
},;, ',:
L
6720.0

6582.9
6545.45
6461.54
6400.t)
621S0.A7
6227.0
6222.22
6095.24
6063.16
6000.0
5907.7
5818.18
5793.10
5760.0
5619.5
5600.0
5565.22
5538.46
5485.71
5419.35
5358.1
5333.33
5250.0
5236;36
5142.86
5120.0
5090.91
5008.610
4965.52
4941.18
4923.08
4902.1
·liI800.0
4740.74
4702.0
4666.67
4645.16
4608.0
4571.43
4540.54
4517.6
t,?
4500.0
.... I:
4430.77

4421.05
4413.79
4363.64

3339.1
3294.12
3291.43

.4347.2
4307.69
4266.67
4235.29
4200.0
4189.1
4129.03
4114.29
4097.56
4042.1
4000.0
3972.41
3906.98
3905.1
3891.89
3878.79
3840.0
3818.18
3789.47
3777.0
3764.71
3733.33
3716.13
3692.31
3657.14
3652.17
3600.0
3574.47
3555.56
3544.6
3512.110
3500.0
3490.·91
3459.46
3438.8
3428.57
3388.24
3368.42
. 3360.0

Sla~05
·ti

3348.84

C-2

3272.73
3245.1
3230.77
3200.0
3169.81
3156.2
3130.43
3121.95
311.3.51
3111.11
3072.0
3063.83
3054.55
3047.62 .
3031.58
3000.0
2992.2
2976.74
2953.85
2947.37
2938.78
2916.5
2909.09
2896.55
2880.0
2847.46
2844.~4

2823.53
2809.76
2800.0
2782.61
2775.9
2769.23
2754.010
2742.86.,
2723.40
2716.98
.

~110.6

2679.07
2666.67
2648.3

2215.38
2210.53
2206. 81 0"

. 262';0.
A'·,. f
2618.18
2612.24
2588,8
258;4.62
2571.43
2560.0
2545.45
2526:32
2509.80
2507.46
2504.35
2482.76
2477.4
2470.59
2461.54
2451.06
2440.68
2434.78
2425.3
2415.09
2400.0
2375.3
. 2370.37

. &·;114';
0;("~ "''"?~ ',If,,:i' ,:.',

1;V',

'

W""'''fr

2366.110
2360.66
2351.02
2333.33
2327.27
23:12.58
2304.0
2301.37
2285.71
2281.~

2270'.2"
22S8.12
2250.0
, 2245.61
2i~0.0

".;.

Z;lQ9.68

,..2236.9

21g1.B2
2173.58
2169.49
2153.85
2149.25
2133.33
2126.58
2117.65
2113.8
2100.0
2098.36
2094.55
2086.96
2075.7
2074.07
2064.52
2057.14
2048.78
2038.9
2031.75
2028.17
2024.010
2021.05
2003.5
2000.0
1986.21
U!76.47
1972.60
1969.23
1953.49
1952.54
1945.95
1939.39
1931.03
1920.0
1910.45
1909.09
1904.1
1a94.74

tt,
.

gell;f:iix .Q..~J§rs.le.OlAta SQ"dS

~

TabfeC-1 (continued)
IS88.52
1887.64
1882.35

1655.17

1473.68

1331.8

1210 ..0.8

1647.06
1645.71

1471.26
1469.39

1324.14
1322.83

1208.63
1207.55

1813.2

164] .03

1467.5

1321.10

1206.3

1636.36

1460.87

1l19.59

1200.0

1634.0
1631.07

1316.6
1312.:50

1196.20
1193.8
1191.49
1190.08
1187.63
1185.19
1183.010
1181.5
1180.33
1175.51
1114.83
1174.31
1170.73
1169.5
1166.67
1163.64
1161.29
1158.62
1157.8
1153.15
1152.0
1150.68
1146.3
1142.86
1140.59
1135.14
1135.0
1133.86
1132.74

1870.13
1866.67
1855.07

1622.54

1458.23
1454.55
1449.1

1846.15
1843.2
1828.57
1826.09

1448.28
1440.0
143lqo
1435.810
1431.1
1425.7.

130ti.lZ
1302.33

1814.2

1620.25
1617.98
1615.38
1611.2
1600.0
1589.0

1806.45
1802.82

1$84.91
1582.42

1292.31
1287.2

1800.0
1787.23
1786.0

IS80.25
1578.08
1570.09
1567.3
1565.22
1560.98
1556.76

1423.13
1422.22
1413.5
1411.76
1406.59
1404.88
1400.0
1398.06
1396.0

1555.56
1548.39
1546.3
1542.17

1391.30
1388.43
1388.0
1387.95

1541.28

1384.62
1379.6

1858.06

1822.78

1777.78
1772.31
1768.42
1758.8
1756.010
1753.42
1750.0
1745.45
1734.94

~.
i,S

I.

1309.09

1301.7
1297.210
1294.38

1292.93

1285.71
1282.44
1280.0
1274.34
12n.9
1272.73
1267.33
1265.93
1263.16
1259.0
1254.90

1732.3
1731.96

1536.0
1531.91

1729.73

1527.27

1377.05
1376.34

1253.73
1252.17
1Z45.4
1244.44

1719.40
1714.29

1525.8
1523.81

1371.43
1365.85

1242.72
1241.38

1706.67

1515.79

1363.3

1238.11

1696.97

1513.51

1361. 70

1694.12
1684.21

1505.88
1500.0

1358.49
1355.29

1235.2.9
1232.1
1230.71

1681.8
1680.0
1674.42

1496.10
1488.37

1669.S7

1663;37

1486.S
1484.54

1662.34

1476.92

1354.84
1347.37
1345.79
1344.0
1339.53
1333.33

1226.28
1225.53
1220.34
1219.05
1217.39
1212.63

1486.7.3

0-3

1129.41
1127.52
1125.0
1123.9
1122.81
1120.0
1118.45
1116.28
1113.04

1112.S8
1107.69

1105.26
1103.45
1102.4
1099.24
109S.G4
1097.14
1094.02
1091.9
1090.91
1086.79
1084.75
1083.87
1082.71
1081.7
1016.92
1076.64
1075.63
1074.63
1071.6
1070.06
1066.67
1063.19
1061.8
1058.82
lOS7.8S
1056.88
1056.60
1052.1
1051.09
1050.0
1049.18
1047.27
1043.48
1042.5
1040.65
1037.84
1037.04
1035.97
1033.2
1032.1~

1030.67

1028.57

1024.39
1024.0
1021.28
1019.47
1018.18
1015.81
1015.0
1014.08
1012.0S
1010.53
1007.81
1006.99
1006.1
1005.99
1001.74
1000.0
997.4
994.08
993.10
992.25
988.8
988.24
986.30
984.62
982.46
980.4
979.59
977.010
916.74
976.27
972.97

972.2
971.010
969.610
968.07
966.44
965.52
964.0
962.41
960.0
956.0
955.22

INTERVIEW 7000 Series Advanced Programming: ATLC-:1 07-9S 1...,108
Table C-1 (continued)
954.55
953.64
952.07

893.02
889.6
888.89

835.82
834.78
832.37

786.89
786.3

743.23
742.27

785.28

949.15

886.15
884.21

831.8

785.05

740.8
740.(}9

700.0

665.9

831.68

783.67

739.88

699.45

665.810

883.44

831.17

882.76
879.58

828.78
827.59

782.61
781.310
781.0

738.46
736.84

699.03
698.18

879.39
878.05

825.81
823.53

876.71
876.0
875.0
872.73
870.75

822.86
820.51
819.9
819.51
818.18

932.8
929.03
928.18

810.41

811.02

774.19
773.15
771.08
710.64

869.4
867.47

815.53
815.29

770.05
768.0

927.54
925.3
923.08
921.60

866.17
865.98
864.86
862.9

814.1

767.12
766.47
765.96
765.4

920.86
918.03
917.9
917 .110

862.28
861.54
859.70
859.06

914.29

8S7.14

948.15
947.37
944.26
943.82
941.18
940.4

938.55
936.59
935.06
934.31
933.33

813.56
811.59
811.27
810.13
808.99
808.4
807.69
805.59

780.49
778.38
777.78
775.76

763.64
762.91
761.90
760.4
760.18

913.04
911.39
910.7

856.5
853.33
852.79

805.03

908.11

852.01

907.80
907.09

850.2
848.48

802.8
800.0

757.89
757.310
756.76
755.4
753.93

797.2
796.21

753.36
752.94

795.58
795.03
794.48
792.45
791.8
791.21
790.12
789.04
188.73

750.5
750.0
748.54
748.05
746.67
746.11
745.6

905.66
903.5

847.68
847.06

903.23
901.41
900.0
898.310

844.22
844.0
842.11
840.88
840.6
837.8
837.21
836.60

896.'895.10
894.41
893.62

804.47
803.83

744.19
743.36

0-4

702.93
702.44
700.3

669.32
667.8
666.67

736.1

697.010

664.03
663.59
663.21

73'.63
734.69
133.76
733.62
731.43
730.96
730.43
129.11

696.1
695.65

662.07
661.42

691.36

660.2
659.79
658.82
658.29
657.53

727.27
726.8
724.53
724.14
723.62
723.16

689.82
688.910

656.41
656.25

688'.52
688.17
687.8
685.71
684.49
683.7
682.93
682,46

654.55
653.610

681.66

649.0
648.65

722.3
721.03
720.0
719.10
717.95
717.8
716.42
715.53
715.08

714.89
713.3
712.87
711.86
711.11
709.36

708.86
707.18
706.75
705.88
704.6
703.210

694.21
694.0
693.98
692.31
691.89

680.S5
680.16
679.6
679.25
677.65
677.42
677.25
676.06
675.7
674.610
673.68
672.810
672.0
671.7
670.16
669.77

660.55

653.06
652.7
651.58
651.16
650.85
649.75

647.19
646.46
646.15
645.74
645.4
643.68
643.58
643.22
642.86
641.8
641.22
640.0
638.78
638.2
637.17

~'T>4"
,

ADDeng.lx· C§jiectable Dafa Sr>eeds

TabteQ.-1 (continued)

ft1!

636.82
636.46
636.36
634.7

608.610

634.36
633.96
633.66
633.0
632.97

538.32

517.8

498.52

537.82
537.31

516.92
516.59

498.27
498.05

557.9

537.1

516.13

556.52
556.29

536.74

515.4

497.6
497.04

535.81
535.56

515.34

581.82
581. 31
580.65

606.64

580.4

606.410

579.31

606.32
605.04

579.19
578.89

604.7

578.31
577.4

631.58

604.32
603.77

555.2
554.46

577.32

631.2

603.14

576.5S

630.54

602.51

629.51
629.21

555.98

514.29

496.55
496.6

535.32

514.06
513.76

496.12
495.58

554.11

535.03
534.6

513.1

495.5

553.85

533.33

512.46

494.85

576.0

552.63

532.1

512.110

494.42

602.15
601.6

575.34
574.6

55Z.5
551.72

531.65
531.37

494.21
494.12

628.82

600.94

573.99

551.2

531.12

512.0
510.9
510.64

627.8

600.0

573.71

551.110

530.88

509.96

493.4
493.15

627.45
626.87

598.4
598.13

573.38
573.13

550.82
549.9

529.97
529.7

509.73
509.09

492.67
492.31

626.09

597.86

571.7

549.oZ

597.51

571.43

549.36

508.83
508.6

491.47

624.54
624.39

529.41
528.93

570.3

528.30

507.94
507.55

491.23

570.210

549.02
548.57

528.44

623.38

596.89
595.74

622.70

595.35

569.49

547.53

622.22

595.04

569.17

547.3

527.47
527.2

507.49
507.04

621.36

593.81

568.89

621.0

593.64

526.75
526.65

506.4
506.02

620.69

592.59

567.57
567.49

547.23
547.01
546.0

526.03

505.93

619.93

592.3

566.93

545.97

525.55-

505.26

619.35
617.7

591.55
590.77

566.37
566.1

545.45
544.68

504.50
504.2

618.36

590.16

565.66

543.6!l

525.0
524.8
524.59

618.03
617.65

S89.86
589.47

543.4
543.310

523.64
523.36

616.04

589.3

564.71
563.8&
563.76

542.37

615.38
614.4

587.76
587.41
587.16

563.3
562.50
562.0

542.1
541.94

522.45
521.74
521.27
520.33

613.14
612.77
612.44

'lc;

559.22
558.95
55S.14

607.9
607.59

611.1
610.91
610.17
609.52

586.3
585.37

561.95

584.47

561.87
561.40
560.31

583.33
582.910

560.6
560.0

584.77

541.35

503.94
503.410
503.1
503.06
502.99
502.0
501.96

540.85.
S40.19
540.08
539.6

520.12
519.86
518.92

539.33

518.22

501.74
501.49
500.87
500.0
499.8

538.46

517.99

498.70

0-5

SIS.52

491.3
490.42
490.21
489.710
489.2
488.55
488.37
488.14
486.96
486.69
486.49
486.08
4&5.55
484.85
484.15
484.03
483.22
483.02
482.76
482.01
481.61
481.3S
481.20

INTERVIEW ~§frI!s Act:wPrJ~Proar8mmlna: ATLC7107~951-10B

Tabl. C-1 (conttnued)
481.0
480.0
479.40
479.0
478.63
478.41
478.01
477.61
477.27
477.0
476.82
476.03
475.92
475.84
475.25
475.1
474.58
474.07
473.68
473.24
473.1
472.32
472.13
471.91
471.2
470.59
470.20
469.27
469.2
469.06
468.86
468.29
467.97
467.53
467.15
466.67
466.4
466.310
466.02
465.5
465.45
465.37
464.52

464.09
463.77
463.6
463.02
462.81
462.7
462.65
462.09
461.7
461.54
460.80
460.43
460.27
460.06
459.9
459.02
458.96
458.78
458.510
458.1
457.77
457.14
456.52
456.2 i
455.610
455.52
455.34
455.28
454.4
454.26
454.05
453.90
453.54
452.83
452.7
452.210
451.76
451.61'
451.41
450.9
450.70
450.40
450.0

449.12
449.110
448.510
448.25
448.2
448.0
447.55
447.4
447.20
446.81
446.51
445.99
445.82
445.62
444.79
444.44
443.9
443.27
443.08
442.91
442.2
442.11
441.72
441.38
440.94
440.5
440.37
439.86
439.79
439.69
439.02
438.9
438.64
438.36
438.02
438.0
437.69
437.50
437.2 '
436.86
436.36 .'
435.5
435.37

435.23
435.05
434.72
434.11
433.9
433.810
433.73
433.08
432.99
432.43
432.3
431.88
431.46
431.14
430.98
430.77
430.7
429.9
429.85
429.67
429.53
429.1
428.57
428.3
428.25
428.09
427.48
427.210
426.67
426.310
426.04
425.9
425.32
425.25
425.09
424.78
424.3
424.24
423.84
423.53
423.17
422.8
422.44

C-6

422.29 "
422.11
422.0
421.98
421.2
421.05
420.44
420.0
419.83
419.67
418.95
418.91
418.9
418.60
418.30
418.1
417.91
417.39
416.94
416.87
416.18
415.88
415.84
415.58
414.99
414.81
414.39
414.24
413.79
412.90
412.78
412.61
411.76
411.58
411.43
410.76
410.26
409.96
409.76
409.09
408.95
408.76
408.51

407.93
407.77
407.64
407.07
406.78
406.35'
405.710
405.63
405.06
404.82
404.49
404.21
403.85
403.79
403.36
402.88
402.710
402.52
402.23
401.91
401.39
401.25
401.11
400.95
400.0
399.05
398.89
398.75
398.62
398.10
397.79
397.52
397.24
397.16
396.69
396.28
396.23
395.88
395.60
395.29
395.06
394.52
394.31

393.85
393.44 .

-

393.17
392.64
392.52
392.37
391.84
391.61
391.44
391.30
390.610
390.51
390.24
389.79
389.19
389.06
388.89
388.14
387.99
387.88
387.010
386.71
386.58
386.21
386.06
385.54
385.32
385.28
385.03
384.44
384.38
384.0
383.56
383.23
382.98
382.72
382.69
382.09
381.96
381.82
381.46
380.95
380.110

ARefJlirlix .c. .8rlttBtfbllil?!l.ta

Smds

TabU.. e,..1 i(cont1nued)
1(.•

380.09

367.61

355.93

344.91

334.2D

324.3~

315.110

379.95

367.35

355.56

334.11

324.05

319.82

366.88

355.18

344.410
344,26

333.91

323.610

315.010
314.75

379.23

366.81

354.68

344.09

333.33

323.510

314.61

378.95

366.76

354.57

343.88

332.95

323.23

314.410

378.610

366.41

354.46

332.67

323.08

314.02

378.38

366.01

354.43

343.68
343.56

332.56

322.87

313.810

377.95

365.71

353.81

343.16

332.47

322.69

313.73

377.70

365.48

353.68

342.86

322.46

313.43

377.58

365.22

353.59

342.25

332.02
331.99

322.42

313.04

377.53

364.67

353.37

342.16

331. 710

322.15

312.96

376.96

364.56

352.94

342.04

331.61

321.84

312.85

376.68
376.47

364.43

341.84
341.46

331.36

321.79

312.36

363.64

352.62
352.29·

331.03

3Z1:61

312.27

330.15
330.71

321.43

312.110

321.22

311.69

320.89

311.44

375.98

363.41

352.20

341.33

375.84

362.85

352.08

341.23

375.37

362.72

351.65

340.83

375.24

362.61

351.46

340.77

330.28
330.09

320.80

311.35

375.0

362.26

351.22

340.43

330.06

320.71

311.11

374.27

362.07

350.73

340.08

329.810

,320.61

311.02

374.16
374.03

361.81
361.58

350.68
350.36

339.82
339.62

329.52
329.41

320.0
319.39

310.68
310.54

373.33

361.29

350.15

339.52

329.14

319.29

310.51

373.18
373.06

361.13
360.90

350.0

339.39

329.05

319.20

310.34

338.82

319.11
3U.79

309.96
·309.93

372.82

360.56

349.73
349.51

338.71

328.77
328.21

372.51

360.52

349.27

338.62

328.13

318.58

309.68

372.09

360.0

349.09

338.03

328.02

3HI.41

309.39

327.49

309.18

359.74

348.77

337.83

371.61

359.55

348.67

337.73

327.37

SUU3
318.18

371.13

359.10

348.55

337.35

327.27

317.88

308.85

371.01

358.97

337.24

370.86

358.88

348.04
347.83

336.84

326.85
326.53

317.62
317.58

308.82
308.43

370.42

358.54

347.11

336.67

326.35

317.36

308.35

370.18

358.21

346.99

336.45

326.21

317.18

370.04

357.76

346.88

336.0

325.79

369.94

357.54

346.39

335.96

325.610

316.98
316.83

308.26
308.02
307.69

369.23

357.45

346.15

335.86

325.58

368.88

357.32

345.95

335.66

3%5.42

368.42
368.29

356.69
356.66

345.68
345.32

335.33
335.08

316.05
315.79

368.05

356.55

345.01

334.88

325.06
324.95
324.87

315.62

306.57

367.82

356.44

344.97

334.66

324.51

315.27

306.38

371.68

0-7

316.48
316.38

309.01

307.20
307.13
307.04
306.95

INTERVIEW 70QO Series Advanqep, Programming: ATLC-1 07-951-108

Table C-1 (continued)
306.22

303.710

301.18

306.01
305.73
305.57

303.32
303.25
303.16

301.08
300.0
288.0

150.0
144.0
140.0
134.5

305.49
305.45
305.08
304.90
304.76
304.44

302.70
302.60
302.52
302.36
302.16
301.89

304.35
304.04
303.96

301.62
301.57
301.26

280.0
256.0
210.0
200.0
192.0
180.0.
175.0
168.0
160.0

128.0
125.0
120.0
250.0
240.0
225.0
224.0
112.0
105.0

100.0
96.0
90.0
84.0
80.0
75.0
72.0
70.0
64.0
60.0

56.0
50.0
48.0

C-8

45.0
42.0
40.0
36.0
35.0
32.0
.30.0
28.0
25.0
24.0
21.0
20.0
18.0

16.0
15.0
14.0
12.0
10.0
9.0

S.O
7.0
6.0
5.0
4.0
3.0
2.0

Appendix 0: Code Charts

0-1

INTERVIEW 7000 §erJes Advanced Programming: ATI,.C-107-951-108

0-2

Appenclix;Jj)1: Keyboard-to-Hex Translation

.~.
t
~_v

i

01-1

.~.INT€RVIEW70Q.Q§!!1u .Advanced PfOfII'8mmlngr·· ·AlLO:: 107~951-10B

Table 01·1
Keyboard-to-EBCDIC

UNSHIFTED

SHIFTED

CONTROL

KEY

CHAR'

HEX'

CHAR'

HEX'

CHAR'

HEX'

A
B
C
D
E
F

a

81
82
83

A
B
C
D
E
F
G
H

C1
C2
C3

SOH
STX
ETX
EOT
ENQ
ACK
BEL
BS
HT
LF
VT
FF
CR

01
02
03
37
2D
2E
2F
16
05
25
OB
OC
00
OE
OF
10
11
12
13
3C
30
32
26
18
19
3F

G

H
I
K
L
M
N
0
p
Q
R
S
T
U
V

J

W

X

Y
Z

0
1
2
3
4
5
6
7
8
9

dish

=

\3

b

c

d

•f

84

tI

85
86
87
88
89
91
92
93

n

95

g
h
I

m

0

P

q

r

8

t

u
v
w

x

Y

z

0
1
2
3
4
5
6
7

94

98

97
98
99
A2
A3
A4
AS
A6
A7
A8
A9
FO
F1
F2
F3
F4
F5
F6
F7

8

F8

9

F9
80
7E
EO

dish

=
\

I
I

I

space

Space

5E
70
8B
4B
61
40

I
J

K
L
M
N
0
P
Q

R
S
T
U
V
W
X
Y
Z

I

@

#
$
%

C4

C5
C6
C7
C8
C9
01
02
03

D4

~5

~

08
D9
E2
E3
E4
E5
E6
E7
E8
E9
50
SA
7C
7B
5B
6C

&

50
5C

(

40
60
4E
6A
CO
00
7A
7F
4C
6E
8F
40

•

u~II'"

+,

,

f

.
<
>
?

Space

. (i
!t

OCl
OC2
DC3
OC4
NAK
SYN
ETB
CAN
EM
SUB
Same

as
Unshlfted

DEL
ESC
NUL
GS
RS
US
FS
Space

A1
79
07
27
00
10
35
1F
22
40

Untranslatable characters ("-" in the above table) that are entered in transmit strings
will be replaced by NULL (hex 00) during transmission.
1 CHAR displayed in Run mode
2HBX byte trapped/transmitted
:tEnter the hex value for the \ character.

01-2

l'abJe,D1-2
K.y&l••,-d,."t....ASCIl

UNSHIFTED
KEY

CHAR'

A
B
C

b

0
E

F

G
H
I
J
K
L

M
N

0
p
Q

R

S

T
U

V
W
X

a

c

d

e
f
9

h

1

kI
m
n
0

v
w
x

1

1

7

8
9
. dash

=

z

2
3
4

5

{5

7
8
9
dish
:::

Vi

\

{

[1

I

/
Space

I
Space

SHIFTED
CHAR'

41

E

45

0

F
G
H

$B
60
SO

K

SA

SE
SF
71
72

14

I
J
l

M
N

0
P
Q

33

34

35
36

4A
4B
4C
40
4E
4F

Z

tDC1

54

OC3
004

)

!
@

#
$

10

11
12
13

29

14

15
16

17

18
19

EM
SUB

1A

21
40
23

Same

25

as

2A
28
SF

Ul'Isnifted

24

%

39
20

~rU!'!8

*
{

+I
I

5B
50
3B

SA

OA
OB
OC
00
OE
OF

OLE

50
51

57

05

06
07
08
09

OR
SO
SI

58
59

&

20

49

04

X

38

21
2C
2E
2F

41
48

EOT
ENG
ACK
BEL
as
HT
LF
VT
FF

02
03

ETX

V

U

37

30
50

46

(11

.NAK
SYN
ETB
CAN

Y

S2

44

$OH
srx

55
56

79

30
31

43

HEX2

DCl

S
T

W

7A

42

CONTROL
CHAR'

52
53

R

75
76
77
78

HeX2

A
C

a

'6
67
68
69

73

(I

4
5
6

63
64
65

r
s
t
u

q

(I

:3

62

70

Y

2

61

P

Y

Z

HeX;!'

f
*

<
>
?

Space

'CHAR displayed in Run mode
2HEXbytetrappei1lttansmitte4 (space.p1U!ty)
3Enter the hex value for the " character.

Dl-3

56
2S

2B

70
7B
70

SA
22

30
3E

3F
20

DEL
ESC
NUL

GS

7E
60

7F

1B
00

10

AS

1E

FS

10
20

US

SpaDe

1F

INTERVIEW 7000 Sarles Advanced Programming: ATLC-107-951-108

Table 01·3
Keyboard-to-EBCD

UNSHIFTED
KEY

A

8

C
0
E
F
G

H
I

J
K

L.OWER!\}!

a

b

UF>PEFWI 'l

A

8

73
08

e

E

68
58

~

I
j
k

F
G

H

J
K

51

I

0

0

0

Q
R

P
q
r

Q

S
T

U
V

W
X

Y

s

t

u

v
w
x
y

Z

z

1
2

1

0

3
4
5
6
7

8
9

dash

=

\5

0

2
3
4

5

6
7
8
9
dash
1
\

(

J

:3
6

I
Spaoe

Space

3B

07
67
61

L

P

13

C
0

I
m
n

N

23

c

M

L

HEX3

d
f

M

N

P

R
S
T
U
V

W
X

Y
Z
)

=
<

.

%

>
*
(
dish
::

\

.,

31

49
29
19
79
45
25
52
32
4A

2A
lA
7A
46
26
54
20
10
70
08
68
58
38
04
64
01
20

L.OWER(\) 1

UPP!!FW)'l

HEXS

CHAR4

HEX3

SOH

3E

EOT

7C

a

A

23

c

8

C
0

13

73
08

E
F
G

68

b

d

e
f

g
h
I

H
I

J

J

I
m
n

M

k

0

p

q
r

s
t

u

v
w
x

K

L

N
0

P

Q
R

S
T
U
V

W
X

y

Y

0
$

>

z

Z

I

02

58

3B
07
67
61

BS
HT

LF

2F

49

CR

60

OC2

4C

OC4

4F

SYN
ETB

5E

51
31

29
19
79
45
25
52
32
4A

2A
1A
7A
46
26

5

%

&

+

•

43
04
64

+

43

&

1F

76
37
?

62

4
#
2
7
I

40

Space

·
<
Space

>
?

08
34
10
38

62

40

Untranslatable characters ("-" in the above table) that are entered n transmit strings
will be replaced by SPACE (hex 40) during transmission.
'CHAR displayed in Run mode if latest case-control character was lower
.2CHAR displayed in Run mode if latest case-control character was upper
3HEX byte trapped/transmitted (odd parity)
.cCHAR displayed in Run mode
IIEnter the hex value for the \ character.

D1-4

6E

3D

54

·,

8
9

50

75
02
34
75
68
1C

#
$

@

70
58
76
37

Space

CONTROL

SHIFTED

Same

as
Unshifted

DEL

7F

RS

2C

· !ie!rtrijx·p1 Qost!. Charts: ·J

SE
3E

Space

40

<
?

13

.$paQe

40

Untranslatable <::baracters (U_" in the above tables) tha.t are en1ered in tr~mi.t strings
wUl be replaced by NULL (hex 00) during transmission.
ICHAR displa~d in Run mode
llHEX byte trapped/transmitted (odd parity)
SHnter the hex value for the \. charaeter.

01-5

INTERVIEW 70eO Series Advanced PrQ{Jfammlna: ATLC-1 07....951-1 DB

Table D1-5
Keyboard-to-IPARS

UNSHIFTED
KEY

OHARI

A
B

A

C
0
E

B
C
'0
E

G
H
I

G
H
I
J

F

J

K
L
M
N

F

K
L
M
N

0

0

Q

Q

R
S

R
S

U
V

U
V

P
T

W

X
Y

P

T

W

X
Y

HEX!!

31

32
33
34

35
36
37
38
39
21

22

23
24
25
26
27
28
29
12

13
14
15

16

17
16
19

SHIFTED
CHARI

HEX!

A

31

C

32
33

E
F

35

B
0

G
H
I
J

K

L

M
N

0
P

0
R

S

T

18
19
2E

02

03

It

4

2
3

4

5

05

$
%

7

6
7
8

9

08
09
1A

3

5
6
8
9

dish

=

\

dash

=

01

04

06
07

OE

)

15

20
18
30

Same

3C

as

•

08
2F

Unshifted

+

2C

@

1E

{

J

2A

I
space

13

Y

OA

1

24

25
26
27
28
29
12

16
17

Z

OC

38

39
21
22
23

W

Z
0

CR

36

37

14

Z
0
1
2

HEX!!

34

U
V
X

CONTROL
CHAR!

Space

3E

IF
38

<

28

?

3A

1C

Space

ICHAR displayed in Run mode
2HEX byte trapped/transmitted

01-6

1C

Space

1C

T8I)le01.&
Keyb_d.:.to~RE\lERSS,·ESCO
.j

UNSHIFTED

CONTROL

SHIFTED

KEY

A

a

a

b

D
E
F

d

c

G
H
I

J
K

L

M
N

0
P

Q
R

S

A

a

c

C

e

E
F

f

~

I
j

k

I

m

n
0

P
q
r

s

0

G
H
I

J

K

L
M
.N
0
P
Q

R
S

31

32
73
34

a

A

b
0

75
16
37
38
79

e

61

62

j

23

k
I

32

E
F
G
H
I
J
K

75
76

0

d
f

~
I

L

64
25

m
n

26

0

68

P
q
r

Q

t

T

67

29
62

M
N
0

P

R

s

S

1

1

2

2
3

<

13
54
15
16
57
58
19
4A
01
02

5

%
,

45

5

%

7
8
9

>

01

&

+

T
U
V
W

x
y
Z
0

3

4
5

6
7

8
9
dash
::

\4

I
I
Space

t
u

v

w

x
y
z
0

T

U
V
W
X

y
Z

..
)

04

4
6

' dish

1
\
{

!6

*
(

~sh
:;

\

I
5B
3B
?

Space

43

Space

46

,08

49

20
01

3E

4C
4C
43
46
58
38

51
40

u

U
V
W
X

v
w
x

y

y

z

Z

$



I

?

as

45

+

It

Same

68

&

9

5D

25

•

8

CR

30

.26
67

OE
10
OS

~

HT

Unmilled

49

7C
7C

DEL

DEL

7F

Space

Space

40

OB

02
07
51

40

Untranslatable charaeter$ ("-" in the above table),lha,t·,.~.ptlm~dm 1ranstnit $tru)gs
will be replaced by SPJ\CE (hex 40J,~1;t.tmni$SiQlh
'CHAR displayed in Run mode if late$1.~",qo.1;t(!1 ctIafMter.waS lower
'CHAR displayed in Run: mode if latest eue-control character was lipper
lIHEX byte trapped/transmitted (odd parity)
4Enter the hex value for the \ character.

.CH-7

. - - - . --_.- -------_._--_.'----,.,----_._------

INTERVlgW 7000 Serle§. Advanoed Programming: ATLC-107-951-10B

Table D1-7
Keyboard-to-SElECTRIC

UNSHIFTEO
KEY

LOWER(\'),

UPPER!')2

A

a

A

C

c

C

B

0

E

F

G
H
I

J

K
L
M

N
0
P
Q

R
S
T

u

V
W
X
Y

Z
0
1

2
3

b

B

d

0

f
9

E
F
G
H
I

e

h
i
j
k
I

m
n
0

P

q
r

s

t

u
v

w

x

Y

z
0
1
2

3

J
K
L
M
N

0
P

Q

R
S
T
U
V
W
X
y

Z

l

@

4

4

#
$

6

6
7

58

5

7
6
9

5

8
9

%

&

•
(

dish

dash

u'!Qerline

'"

'"\

+

I

1

\&

SHIFTED
HEX3

79
76
7A
2A
4A
73

LOWER(\),

UPPER (I'J 2

a

A

c

C

b

B

e

0
E

~

43
1A

G
H
I

J

J

61

m
n

23
26
19

46

52
45
08

58

29

25
02
32
31

d
f

I

k
I
0

P
q
r

s
t

u
v

w

F

K

L
M
N
0

P

Q

R
S
T
U
V
W
X

75
62
67
54

x
Y
z

20
10
70

I
2

@

5

%

64

04

08
58
68

38
34
37
13

0

3
4

20

*

49

Z
)

01

it
$

HEX3

2A

61

CR

60

Space

?
Space

07
40

52
45

25
02
32

31
75
62
67
54

Same

70
04
08
lC

37

as

68

Unshifted

34

13

66
49

01

40

Untranslatable characters ("-" in the above table) that are entered in transmit strings
will be replaced by SPACE (hex 40) during transmission.
'CHAR displayed in Run mode if latest case-control character Was lower
2CHAR displayed in Run mode if latest ease-control character was upper
3HEX byte trapped/transmitted (odd parity)
·CHAR displayed in Run mode
5Enter the hex value for the \ character.

01-8

5E

ETB

01
10

+

?

' ;.,-.-,~

64

Uf!Ierline

SPAce

6E

OB

:::

I

50

58
29

dash

Space

as

1A
46

38
51

Space

7C

2F

38

68

EOT

HT
LF

*
(

HEX3

4A
73
23
26
19
43

&

9

CHAR"

79

76
7A

7
8

1F

\
[

Y

CONTROL

DEL

7F

RS

2C

Space

40

Appendix D1 COde Charts: Keyboard-to-Hex-Translation

Table 01·8
Keyboal'd-to...sAUDOT

UNSHIFTEO

CONTROL

SHIFTED

KEY

A
B
C
0
E

F
G
H
I
J
K

L

M
N
0
P
Q
R

A
B

duh

03

$
3
I
&
#
8

09
01

?

C

0
E

F
G
H
I
J
K

L
M
N
0
P
Q
R

9
0

4
5
6
7

a
9

dish

E
R

T
y
U
I
0
A

I
6

0
1
2

3

4
5
6
7
8
9

\4

I
Space

~.
t

~

\.

&

#
8

L

15

11
16
17

13
01

OA

oe

14

06

oe
18
16
17

BEL

05

5
7

2
I

Y
Z

oc

0

6
II

L

S

BEL

05

LF

LF

02

CR

CR

08

OA
10

07

1E

13
10
15

11
12

00

F

0

#
$

G

&

H

15

18

1A

12

10

07
06

00

1C

M
N

S
T
U
V
W
X

lE

19

OE

OF

K

05

1E

Space

E

1
4

1F

Space

0

Q
R

\

I

09
01

9

03

V
J
N
M
X

$
3
!

0
P

dish

::

03

18
16
17

13
10

II

3

oc

2

Z
Q

06

OB
OF

5
7

Z

W

14

10
07

Y
1
2

F
G
H
I
J

1A

OA

BEL

P

00

dilh

?

B

C

1
4

S
T
U
V
W
X
y

A

OE

12
1C

S
T
U
V
W
X

0

19

14

09

1B
lA

K

OF

C

OE

z

NUL

NUL

00

11

OC

1C

10
04

e

?

Space

Spaoe

19

04

Untranslatable character$ ("-" in the above table) that are entered in transmit strings
will be replaced by NULL (hex 00) 

t!

3E

US

US

1F

?

')

3F

FS

FS

1C

Space

Space

20

Space

Space

20

!!I
Space

SA

..,

4

8

J.,.

Z

Space

2F
20

lCHAR displayed in Run mode if latest case-control character was Shift In (~).
2CHAR displayed in Run mode if latest case-control character was Shift Out (\l).
3HEX byte trapped/transmitted (space panty)
"Enter the hex value for the 'it and IJ characters.

01-11

Unshifted

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Table 01-10
Keyboard-to-JISa (space parity)1

UNSHIFTED

CONTROL

SHIFTED

KEY

A
B
C
0

a

E
F
G

e

61
62
63
64
65

f

66

H

9

h
I

67
68
69
SA
68
6C
60

I
J

K
L

b

c
d

J

N

k
I
m
n

0
P

p

M

Q

R
S
T
U
V
W
X
y

0

q
r

s

t

u

v
w
x
Y

Z
0
1

z

2
3
4

7
8
9

2
3
4
5
6
7
8
9

dish

dash

:::

=

5

6

,4
[

J

0
1

¥

r

]

SE
SF
70
71
72
73
74
75
76
77

78
79
7A
30
31
32
33
34
35
36
37
38
39
20
30
5C
58
50
3B

A
B
C
0
E
F
G

H
I
J

K
L
M
N
0

P
Q
R
S
T
U
V
W
X
Y
Z
)
!
@

I
Space

Space

52

53
54
55
56
57

58
59
5A
29

u!'Lderline

+

28

%
~

&

•
(

I

I

{
}

<
>

?
Space

lHex data-entry will override parity
llCHAR displayed in Run mode
3HEX byte trapped/transmitted
"'Enter the hex value for the ¥ character.

D1-12

SOH
STX
ETX
EOT
ENQ
ACK
BEL
BS
HT
LF
VT
FF
CR
SO

01

.02
03
04
05
06
07
08
09
OA
08
OC
00
OE
OF

51

10
11

OLE
OCl
DC2
DC3
DC4
NAK
SYN
ET8
CAN
EM
SUB

21
40

23
24
25
5E
26
2A
28
5F

#
$

27

2C
2E
2F
20

41
42
43
44
45
46
47
48
49
4A
48
4C
40
4E
4F
50
51

12
13

14
15
16
17
18
19
1A
Same

as
Unshlfted

7E
60

7C
78

DEL

70
SA

ESC
NUL

22

G5

SC
3E
SF
20

RS
US
FS
Space

7F
18

00
10
1E

1F
1C
20

fi'~

Apeendix D1 COde Charts: KeYbQard-to-Hex-Trans/ation

Tabla 01-11
Kayboard-to-JIS8 (mark parity)1

UNSHIFTEO
KEY

CHAR2

HEX3

A
B
C
0
E

E1
E2
E3
E4
E5

E1
E2
E3
E4
E5

F

Ea

Ea

G
H
I
J
K
L
M
N

E7

E7

E8

E8

Ea
EA
fB
EC
ED
EE
EF
FO

E9
fA
fB
EC
ED
EE
EF
FO
F1
F2
F3
F4
F5
F6
F7

0
P
Q
R

S
T
U
V
W
X
Y

Z
0

F1

F2
F3
F4
F5
Fe
F7
Fa
F9
FA

J'

1
2
3
4
5

?

6
7
8

::f

-r

F8

F9
FA
80
B1
82
B3

I

54

;t
1)

85
8S
B7
B8

9

~

B9

dash

.::1

AD

1J

CONTROL

SHIFTEO
CHAR:!

f

HE~

CHAR2

HEX3

81

81

82

"f

C1
C2
C3

~

C4

84

82
83
84

1

C5
C6
C7
C8
C9
CA
CB

85

')I

-~~
)

J\
C:

"J
.....
iI:

cc

83

85

as

86
87
88
89
SA
88
8C
80
8E
8F

67
86
89
SA
8B
6C
80
SE
SF
90

;:

CD
CE
CF
DO
01
02
D3

."

D4

94

94

2

05
06
07
08
09
OA
AS
A1

95

95
96
97
98

-:(

~

I:,.
j.

3
5

IJ
JV
L-

.,

•
51
J

\\

co

AS
A4
AS
DE

3

AS

I

AA
A8
OF

-f

•

'Hex data-entl(Y will override parity
2CHAR displayed in Run mode
3HEX byte trapped/transmitted

01 .... 13

90

91

91

92

92
93

93

96

97
98

99
9A

99

9A
Same

as
Unshifted

ATLo-107~951-108

INTERytEW 7000 Se'1!8 Advanced .Pro(Irammfna.·

Table D1-11 (continued)

UNSHIFTED
KEY

=
\.4
[

J

HEX

CHAR

HEX

CHAR

HEX

.<

BO
DC
DB
DO
BB
A7
AC
AE
AF
AD

'"

AB
FC
FB
FO
BA
A2
BC
BE
BF
AO

FE
EO
FF
9B

FE
EO
FF
9B

80

80

90
9E
9F
9C
AD

90
9E
9F

IJ
0
:J

,.

+j

...

31

I
Space

CONTROL

SHIFTED

CHAR

!!.I

AD

FC
FB
FO
:J
r

:,t

1:!
'J

AD

4Enter the hex value for the IJ character.

01-14

9C

AD

Appendix D2 Code Charts: Hex-to-Display Trans/ation

Appendix 02: Hex-to-Display Translation
The left-hand column in the following table (labeled "INPUT HEX") is the hex value
presented on the Run-mode data screen when HEX display is turned on.
The remaining columns show the character that is presented for each hex value in each of the
available code sets when hex display is turned off. Where no character in the code set
corresponds to the hex value received. hex display is always used.
The bit in the "input hex" value that was received first by the INTERVIEW's receivers will
vary with the code. In the column heading for each code we have placed a small arrow next
to the rightmost or leftmost bit to indicate which was the first bit received. In IPARS, for
example, the leftmost bit is the first bit received.
We have tried also to indicate the significance of each bit. In EBen, the third bit from the
left in the hex value is the least significant (:1) bit. while the rightmost bit is the most
significant (=32). This means that the first ten hex values in this code set are not really 00
through 09. Rather they are 00, 20, 10, 30, 08, 28, 18. 38, 04 and 24-corresponding to the
characters SPACE, 1, 2. 3, 4, 5, 6, 7. 8, and 9, and corresponding also to the following
binary series, which increments from left to right:

00000000
00100000
00010000
00110000
00001000
00101000
00011000
00111000
00000100
00100100
etc.

02-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

02-2

Table 02-1
Hex-to-Oisplay Translation

INPUT
HEX

NU

NU

SH

02

SX

SH
SX

03
04

ET

07

08
09

OA

oa

0

(..)

EBCDIC'
.....\\84211

00
01

05
06

N
I

ASCII'
{I"f\~"84211

OC
00

OE
OF

10
11
12
13
14
15

16
17
18
19

1A
1B
1C

10
1E

1F

ex

EBCO'
(1')1248\.\1
LOWER UPPER

XS-3 '

IPARS!

REve8co3

BAUDOT'

(IWll84211

1l.!\.8421

f1248'f~("

'e8421t

LOWER UPPER

LETTERS FIGURES

space space

space

hex

}

1
2
3
4
5
6
7
8
9
0

dash

di"sh

@

hex
t

EX

&

hex
HT
hex
pad
hex
hex
hex
VT
FF
CR
SO

8

•

q
y
h
4

0

m
u

M
U

d

0

02

P2

hex
hex

hex
hex

SI

D4

D4

OL

oL

2.

<;

01
02
03
04

01
02
03

k

K

$

S
B

EO

AI<
BL

as

HT
LF
VT
FF
CR
SO
SI

NK
BY

Ee

hex
hex

as

EC
FS

hex
CN
EM
hex
hex
hex

AS
US

hex
US

CN
EM

sa

as

as

b
0

hex
hex

Y

H

)

hex
hex
hex

6

dash

0
1
2
3
4
5
6

7
8
9
\

CR
hex

?

A
B
C

space
S

hex
hex

4

J

J
$

0

0

I

U
CR

8
7

I
I

L

5

%

(

0

CR
$
4

e

E

%

>

9
0
#

)

.

R

(

J

N
F
C

?

P

J

p

K

hex
hex
hex
hex

hex
hex
hex
hex

2

@

5

Z

S

s

S

hex

L

)

n

N

t

T

W

u

U
V

H
Y

2
#

""

+
Z

hex
hex
hex

hex
hex
hex
hex

T
U
V

Y
dash

f

F

H

/I

space
hex
(

'Select Bit Order/Polarity; NORMAL

T

T

a

2S e l ect Bil Order/Polarity: REV-INVERT
3S e l ec t Bit Order/Polarity: REVERSE-NORM

t

?

W

#

LF

hex

w

\

SP

hex

@
I

Z

\

SP

3

hex
hex

0

<;

hex

ET

0

BS

E
LF
A

ET

E
F

EB

6
7
8

hex

hex

0

BS
EB

3
4
5

'"
<;

FF

W
X

I
=

1
2

FF

=

+

space space

SELECTRIC'
(1')1248\\1
LOWER UPPER

v

6

w
x
Y

W

p

X
Y

0

Z

hex

.

hex
hex

B

0
1
9
?

G

&

}

{

LF
SB

LF

M
X

z

hex

EB

hex

0

z

6
I
k
q

V
\

I

I<
0

~

BS

;
\

BS

Ea

EB

\

\

JIS7'

JISS'

{I"f\\~8421•

\\\\.84211

LOWER UPPER

NU

NU

NU

SH

SH

SX
EX

SX
EX
ST

SH
SX

ET
EO

AK
aL

as

HT
LF
VT
FF
CR
SO
SI

EX
ST

EO

EO

AI<
BL
BS
HT
LF
VT
FF
CR
SO
SI

AI<

Bt

as

HT
LF
VT
FF
CR

so
SI

oL

oL

oL

01
02
03
04

01
02
03
04

NK
SY
SB
CN
EM
SB
EC
FS

01
02
03
04

NI<
SY
EB
CN
EM

NI<
SY
EB
CN

RS
US

RS

as

se

EC
FS

as
US

EM

SB
EC
FS

as
RS
US

Table 02·1 (continued)

INPUT
HEX

20
21
22

23
24

25

26

AseD

,

space
#
$
%
&

27

28
29

2A
2B
2C
0I\)

1..

20
2E
2F

t

EBCDIC

hex
hex
FS
hex
hex
LF
EB
EC
hex
hex
hex
hex
hex
EO

I

AK
Bl

hex
hex
SY
hex
hex
RS
hex
ET
hex
hex
hex
hex

30
31
32
33
34

0
1
2

35

5

36

6

37
38
39
3A
3B
3C
3D
3E

7
8

<

04

>

3F

?

NK
hex
S8

3
4

9

..

'SYNC " even parity S (35 11,),

EeCD
LOWER UPPER

XS-3

IPARS

REV EBCD
LOWER UPPER

BAUDOT
LETTERS FIGURES

a

A

!

L

9

G

J

m

M

hex

r

R

K

M
N

n

z

Z
I
%

L
M

0
P

0

I

N
0
P

N
0

Q

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

1
j
I

5

n
v

::

J
?

N

RS

V
E
RS

CR
LF
HT

CR
LF
HT

e

t

@

dash

dash

J

J

$

K

j
k

L
T
C

#
$

hex
hex

R

P
q
r

hex

Q

hex

0

<

$

I

R

+
hex
)
(

hex
CR
BS
hex

hex
CR
BS
hex

P

%

&
I

S'
T
U
V
W
X

$

&

+

A

a

A

B

b

B

C

c

C

0
E
F

d

D

e

E

f

F
G

G

H

7

>

p

p

x

X

g
ET

G

y

Z

%

SY
SH

ET
SY
SH

)

hex

pad

pad

I
?

>

hex

g
h
I

hex

hex
hex

K
L

R
hex

underline

3

c

@
*

H
hex
hex

HT

HT

\

\

pad

pad

hex

SELECTRIC
LOWERU~R

1

[

m

M
X
G

x
g
0

s
h
'I
7

r
d

J
S
H
y

JlS7
LOWER UPPER

JlS8

space space

space

I

0

RS
CR
LF
HT

RS
CR
LF
HT

3

J

/I

$

$

%
&

3

%
&

l'

..,.f

•

I

•

+

;t

t

l'
dash

.::l
~

/I
V

0
1

l'

u
f
9

U

w

W

b

B

2
3
4
5
6
7
8
9

F
(

dash

:3

I

v

I

•

/I

&

R

•

r

8

-•

a
c

A
C

ET
hex
hex

ET
hex
hex

<
=
>

pad

pad

?

.,
.(

I
;;t

I

0
1
2
3
4
5

1;

6

*1)

7

;-

8
9

:J

+J

:,.

<

;:(

=
>

~
')

?

Table 02-1 (continued)

INPUT

ASCII

EBCDIC

HEX

40
41

@

~?

8
C

43
44

E

46

F

47

G

4a

H
1

48

J,

0

45

49
4A
·0
N)

A

4C
40
4E
4F
50
51
52
53
54
55
56

space space

space

-

@
&

-

dish

+

0

0

2

y
H

3

4

N

+

hex
hex

0

hex

D4

Oil

P

&

Q

hex
hex
hex
hex
hex
hex
hex
hex
hex

2
Ie

IJ
V

58

X

59
SA
58

Y
Z
[

SC

\

50

1

s

M
U

<

9
\

+

b
0

B

?

)

A

hex
hex
hex

hex
hex
hex

a*

w

$

f

F

0

C
0
E

6

,

=even parity B (55 u,,).

6
7
8

I<
S

0
W

hex

4
5

hex
hex

T

t

*

q
y

<

R
S

)

8

h

IPARS

REV EBCD
LOWER UPPER

hex

0
02

J
K
L
M

W

"EOM

XS-3

m
u
d
04

57

SE
SF

space
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

EBCD
LOWER UPPER

F
G
H

8S

BS

Ea

EB

<

\

\

#

'"

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

space space
1

=

2

<

3

4
5

%

6
7

>

8

*

9
0
II
[

FF

J
FF

ET

ET

@

hex

I

?

s

S
T

t
u

U

v

V

w
x
y

W
X
y

z

Z

hex

hex

}

hex
{

LF

LF

EB

Ea

hex

hex

BAUDOT
LETTERS FIGURES

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

SELECTRIC
LOWER UPPER

SP

JIS7
LOWER UPPER

SP
hex
T

@

JlSS

51
f

@

8

1)1

8

C

"f

4

J
$

D

~

C
0

0

0

E

'7

E

I

l
?
%

F
~
~
)

G

!
t

J

I

5

e

E

p

P

hex
hex
hex
hex

hex
hex
hex
hex

2

@

A

G
H
I
J

K
L
M

N
0

J\
!::
J

"t
"":.l

P

~

Q

/:,.

A

~

H
I
J
K
L
M

N
0
P
Q
R

n
=

N

R

;f-

+

S

s

l

Z

T

hex
hex
hex

hex
hex
hex
hex

t
P

IJ

.,

U
V

W

JIJ

X
y

6

I
K

I
k
q

Q

as
fB

as
EB

\

\

V
W
X
y
Z
(

2

3

IJ

T

Z

0

[

¥

"

IJ

¥

J

:J

J

It

underline

-

underline

Table 02-1 (continued)

INPUT

ASe"

EBCDIC

HEX

60

I\l

I

en

XS-3

IPARS

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

dash

dash

j

J

k
I

K
l
M
N
0
P

$

I

hex

hex
CR

hex
CR

dash

1

:::

@

61

a

I

j

62
63

b

I

*

a

A

64

d

e

9
r

(

65
66
67
68
69
6A

hex
hex
hex
hex
hex
hex
hex
hex

J
?

68

Ie
I

6C
0

EBCD
LOWER UPPER

c
f
9
h

I

J

.

z

A

I

Z
I
%

N

v

V

0
P

e

%

RS

E
RS

Q
A

CR

CR

%

LF

n

->

6F

0

?

HT

LF
HT

70
71

p
q
r

hex
hex
hex
hex
hex
hex
hex
hex
hex

3
I

l

75
76
77

18
19
7A
18

7C
70
1E
1F

t

u

v

w
x
V

z

,{
I

pad

M
N

5

m

s

L

n

60
6E

72
13
14

$
I
J
K

t

"#
$

=

T
C
I

hex
hex

{

.

&
I
S

T

1

>

P

P
X
G

U
V
W
X
y

x

#
@

;

9

ET
SY
SH

ET

Z

SY
SH

>

pad

pad

)

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

REV EBCD
LOWER UPPER

m
n
0

p
q

r

Q
A

hex

hex

BS

BS

hex

hex

&

+

a
b

A
B

c

C

d

0

e

E

F

f
9
h

G

I

I

hex

hex
hex

H

HT

HT

\

\

pad

pad

BAUDOT
LEITERS FIGURES

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

SELECTRIC
LOWER UPPER

m
x

[
M

JIS7
LOWER UPPER

a

X
G

b

)

d

8

S

e

h

H

y
&
RI

f
9
h
I

0

J

9
0

y

7
r
d

c

k

RS
CR

m

HT

0

#
V
U
F

P
q

q

(

w

W

t
u

AS

CR

LF
HT
3

v
u
f

IF

I
n

r

s

b

B

v

dash

un~rllne

W

8

•

a

A

y

c

C

z

.
ET

.
ET

hex
hex

hex
hex

pad

pad

x
{

pad

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

JISS

a
b

c
d

e
f
9
h

I

J

k

I

m
n
0

p

q
r

s
t

u

v

w
x
y

z
{

,,

pad

Table 02-1 (continued)

INPUT

ASCII

EBCDIC

HEX

80
81
82
63
84

85
86

87

88
89
8A

hex

SX

b

EX
ET
EO
AK
Bt
85
HT

0

a
d

e
f

g
h
I

8a

VT
FF

80
SF

CR
SO
81

hex
/rex
hex
hex
hex
hex

8C

2...,,

NU
SH

SE

LF

90

Ol

hex

91
92
93
94

01
02
03
04

1

95
96

NK
SY
EB
CN
EM
SB
EC

97

98
99

SA
9B
9C
90
9E

9F

FS

as
RS

US

k

I

m
n
0

p

q
r

hex
hex
hex
hex
hex
hex

EBCD
LOWER UPPER

XS-3

IPARS

REV EeCD
LOWER UPPER

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex

BAUDOT
LETTERS FIGURES

SELECTRIC
LOWER UPPER

JlS7

JIS8

LOWER UPPER

NU
SH
SX
EX

NU
SH
SX
EX

ET

ET

EO
AK
Bl

EO
AK
Bl
BS
HT

as

HT
IF

VT
FF
CR
SO
SI
OL
01
02
03
04

NK
Sy
EB
CN
EM

sa

EC
FS

as

LF

VT

FF

CR
SO
SI
OL
01

02
03
04

NK
Sy
EB
CN
EM
SB
EC
FS

GS

RS

RS

US

US

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
/rex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

Table 02-1 (continued)

INPUT
HEX

AO
At
A2
A3
A4

A5

,

AS

I

A7
A8
A9

I
t

I
!

0

I\)

I

0)

ASC"

space

IPARS

hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex

*

s

#
$

u

%
&

v
w

t

x
Y

•

AB
AC
AD
AE
AF

+
dash

I

85

0
1
2
3
4
5

B6
B7

6
7

88

8
9

89
BA
BB
Be
BD
BE
BF

XS-3

I

AA

BO
Bt
B2
B3
84

EBCDtC

<
=

>
?

z

EBCD
LOWER UPPER

REV EBeD
LOWER UPPER

BAUDOT
LETTERS FIGURES

SELECTRIC
LOWER UPPER

JIS7
LOWER UPPER

space space
I
#
$
%
&

+

JlSS

hex

•r

•r

J

J

3

3

,

l'

l'

..(

.,

.,

I

I

?t

:t

..(

1>

1>

dash

:l.

:l.

::lI

:3

I

!.If

!.If

0
1
2
3
4
5
6

1J

7
8
9

-p

-p

,(

,(

?

?

I

I

;;t

:t

1J

1J
".

'*

'1J".*

:J

:J

fj

fj

<

:,t

:,t

::<

=

::<

>

t?

t?

?

')

')

Table 02-1 (continued)

INPUT

ASCII

EBCDIC

HEX

CO
C1
C2
C3
C4
C5

2I
to

@

{

A

A

B

B

C

C

0
E

0

C6

F

C1
C8
C9

G
H
I
J
K

CA
CB
CC

L

E
F
G
H

hex
hex
hex
hex
hex
hex

co

M

CE
CF

N
0

00
01
02

p

}

Q

J

R
S

K
L
M
N
0
P
Q
R

03
04
05
06
07
08
09
OA
DB

DC
DO
DE
OF

EeCD

XS-3

IPARS

LOWER UPPER

T
U

V
W
X
Y
Z
[
\
)

hex
hex
hex
hex

hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

REV EeCD

BAUDOT

SELECTRIC

JIS7

LOWER UPPER

LETTERS FIGURES

LOWER UPPER

LOWER UPPER

JIBS

9

9

B

\}I

'}I

C

T
~

T

0

E
F

1"

f.
1"

G
H
I

X

X

@

A

J
K
L
M
N
0

P
Q

f

f

~

*
J\

J\

I::

I:::

")

")

)

"-

)

"-

t

it

'71

'71

~

S

R
S

j.

""
61-

1:

't:

T
U

:2

,

V
W
X
Y
Z
[

¥
1

6-p

3

:;,
IJ
Jb
It
0
IJ
::J
II

underline

-p

:2

3

IJ

JIJ

It
0
IJ
::J
)j

+

Table 02-1 (continued)

INPUT

ASCII

EBCDIC

I

EBCD

XS-3

IPARS

REV ESCD
LOWER UPPER

LOWER UPPER

HEX

BAUOOT
LETTERS FIGURES

SELECTRIC
LOWER UPPER

JIS7
LOWER UPPER

JlS8

I
II

il

EO

l',I;

E1

a

I

E2

b

S

E3
E4
E5
E6

0

d

T
U

e

V

!

f

W

E7

g

X

E6
E9

h
I

Y
Z

ES
EC
EO
EE

k
I
m
n

I
......

EF

0

0

FO

p

F1
F2
F3

q

I
1i

~

I
I

~I

!

{

hex

EA

0

I'>.)

I

hex
hex
hex
hex
hex
hex

r

0
1
2

F4

s
t

3
4

F5

u

FB

v
w

5
6
7
8
9

F7
F8
F9

FA
FB
FC
FD

x
y

z
{

,
I

FE

FF

pad

hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

a
b

c
d

e
f
g
h
I

J
k

I
m
n
0

p
q

r

s
t

u

v
w
x
y

z
{

•
I

pad

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex
hex

Appenr:l1x .03 Code Charts: User-Defined Codes

Appendix 03: User-Defined Codes
The character set shown in Table D3·1 can be used to adapt existing code sets or to create
customized codes. Follow the steps in the example below to create a new code set.
As an example. we'll change the standard ASCII code set to one which includes the ¥ (yen)
symbol.
L l)etermine hex values.F~,wewill detetminewbich hexadecimal value or values we want
to have generate the ¥ symbol. one for space parity and one for mark parity. In our
example. the values will be hexadecimal SC and DC.
2. Read existing code file to spreadsheet. Whether adapting an existing code set or creating a
new one, use an existing code file as a template. (Some files include shifted and unshifted
coding.) Go to the Protocol Spreadsheet and press [!E], BLOCK (1fIJ), IN/OUT (lEI).
READ/U (trn). Enter the name of the fUe when prompted. The absolute pathname of the
standard ASCn code file is HRDlsyslcodeslASCll. Press~. Do not use the Load
command on the File Maintenance screen to access the file.

The ASCII code set will be displayed on the Protocol Spreadsheet, as in Figure D3,.L
Initially, the file is highlighted on the Protocol Spreadsheet in reverse video. ~You may
clear the highlighting by pressing E3. lEID. Since you will be writing your revised code set
back to a file, however. you may want to retain the highlighting. Then you will not have
to identify the block again before writing.
3. Locate position. Positions in the code proceed sequentially, beginning with hexadecimal 00
and ending with FF. Each row in the code table contains eight elements. The first two
rows. for example. correspond to hex 00 through OF. The next two rows contain elements
in positions 10 through 1F, and so on. Move the cursor to position 5C.

03-1

---.--.-~--------

-----..-.-..----..- -

...---.-...

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

eet

Name of file:

**

/

/

Code for ASCII

/

Version:

3;

Name: "ASCII";
To Graphic:
nu
bs
dl
en
, ,

sh sx
ht If
dl d2
l!"m
sb
, I ,
lUI

,. ( ,. , ). ,.

'*'

l!"X
vt
d3
l!"C
'#'
'+'

l!"t
ff
d4
fs
'$'
, ,

,

l!"q
cr
nk
~~,

'-'

ak
so
s~

rs

bl
si
l!"b
us
,,,

,'&'
. , '/'

Figure D3-1 When the standard ASCII code file is written to the Protocol Spreadsheet, a code
table appears with 32 rows of eight elements per row, corresponding to 256 possible hex values.

Replace the entry with a new value. Refer to Table D3-1. All values
under " Code-Table Entry" are three-digit hexadecimals. A leading zero identifies an
entry as a numerical value and guarantees accurate translation. Notice in Figure D3-1 that
there is special notation for ASCII control characters. A dl entry. for example. translates
as the ASCII control character D1 • Entered as Od] (or ODl). the meaning is ilL Values
which begin with a digit in the range 0-9. 80 for example, do not strictly require the
leading zero. Also notice in Figure D3-1 and Figure D3-2 that alphanumerics may be
entered as character constants. A set of single quotation marks surrounds a character
constant. an alternative way of entering ASCII keyboard characters.

4. Enter new code.

In our example, replace '\' with 080. Figure D3-2 shows the set after the first
replacement. Next, locate and edit position DC.

03-2

Appendix 03 Code Charts; User-Defined COdes

Name of f i 1e:
Name: "ASCII" ;

**

otoco

HRD/s~s/codes/ASCI

eet

**

To Graphic:
nu
s
dl
en
,

.

sh sx
ht
if
dl
d2
em
sb
, I I'

.

ex
vt

d3
ec

et
ff

d4

fs

eO(

cr

nk
9S

ak
so
s~

rs

,'&'
'+' , ,
.
'*'
'0 ' , l' '2' '3'
'4'
'6'
"5'
'8 ' '9' ..... . ,. , , <' , =' . ) .
'@ , 'A' , B' , C' 'D" 'E' 'F'
'H" , I ' 'J' 'K' 'L' 'M' 'N'

,(

,

)

,

H

,

":1j:"

'$'

J1

'%'
, _ 1

.

'p' 'Q" 'R' '5' JlT'
"X I' 'y' 'Z' I' ( , 080

'u'
J'
I

bl
si

eb
us
,,,

'/'
'7'
'?'

'G'
"0 '
'V' ,'

03e

?

03f

Z

05a

@

040

[

OSb

A

041

"-

05c

B

042

]

05d

C

043

A

05e

D

044

E

045

F

046

G

047

H

048

I

049

J

04a

K

04b

L

05f

060

a

061

b

062

c

063

d

064

e

065

04e

f

066

M

04d

9

067

N

O4e

h

068

0

O4f

069

03-5

-----------_._--'

INTERVIEW 7000 Series Advanced Proaramming: ATLC-107-951-108

Table 03·1 (continued)

Character

Code-Table Entry

Character

Code-Table Entry

j

06a

3

086

k

06b

l'

087

..

06c

088

.,

089

1:

08a

;:t-

08b

1>

08e

::l

08d

:a

08e

!!J

08f

m

06d

n

06e

0

OSf

p

070

q

071

r

072

s

073

t

074

u

075

v

076

'Y

091

1IJ

077

-r

x

078

.,

092

~

079

I

094

z

07a

;:t-

095

1;

096

'*

097

1)

098

7

099

::l

09a

4j

09b

:,.

0ge

083

::<

09d

084

t;

0ge

085

')

09f

090

07b

093

07e
07d

)

07e
%

07f

¥

080

a

081

r

082

J

D3-6

Appendix 03

CodeCh~rts:

User-Defined Codes

Tabl.03-1 (continued)
Character

Code-Table Entry

Character

Code-Table Entry

51

OaO

0

Obb

1-

Oa1

'J

Obe

\}1

Oa2

:J

Obd

T

Oa3

....

Obe

~

Oa4

-;

Oa5

--

OaS

X

Oa7

:i

Oa8

)

Oa9

J\

Oaa

t::

Oab

")

Oae

a
a
a
a.

'"

Oad

C

007

1l

Oae

e

008

~

Oaf

e

Oe9

~

ObO

E-

Oca

b

Ob1

'i

Oob

j.

Ob2

i

Oee

;:

Ob3

i

Oed

1:>

Ob4

A

Oce

:2.

ObS

3

ObS

A

Ocf

'.5

Ob7

It

OdO

IJ

Ob8

ce

Od1

JIJ

Ob9

IE

Od2

I"

Oba

6

OdS

Obf

03-7

<;

OeO

U

Oe1

e

002
Oe3
004
005
006

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Table D3-1 (continued)

Character

t

Code-Table Entry

Character

Code-Table Entry

0

Od4

U

Oe3

6

OdS

Pi

0&4

U.

Od6

N

Oe5

U

Od7

g

Oe6

9

OdS

Q

Oe7

(:)

Od9

6

Oe8

U

Oda

,..

Oe9

ct

Odb

.....

Oea

£

Ode

~

Oeb

B

Odd

~

Oee

R

Ode

Oed

j

Odt

Gee

a

OeO

i

Oe1

6

Oe2

§

..

Values Of1-Off are undefined.

03-8

Oet
Of0 t

ADDENDUM
Appendix E OgmmunlAAtions with the AR Divis/on Factory

Appendix E: Communications with the
AR Division Factory
All communications with the factory of the AR Division of Telenex Corporation begin with a
call to Customer Service:
Customers outside theWashlngton D.C.
Greater Metropolitan Area and Virgiriia

1-800-368-3261

In Virginia

1-703-644-9190

Local customers

644-9190

If necessary. Customer Service will direct your call to the appropriate department.

E.1

Returning an INTERVIEW or Subassemblies for Repair
(Al Authorization
1. The first step is always to call AR Division Customer Service in Springfield.
Virginia.

2. Customer Service will issue a RETURN AUTHORIZATION (RA) number.
This number shoWd be posted on the outside of the package of all
equipment returned for repair. The RA number, as wen as a description of
the problem. should be cited in all documentation. written correspondence,
or telephone conversations concerning the specific repair.

WARNING: Special RA numbers are issued for customers who
have purchased a Maintenance Agreement plan (or plans) from
AR Division. Since these numbers identify equipment under
maintenance, you lJ:1UI:t. posl this RA number on the outside of the
package in order for AR DJvisi()n .to Mnor the terms of the
Maintenance Agreement.

MAY 1990

PAGEE-1

ADDENDUM

INTERYlEW7000 Series Adv.rgq froqrammlna: ATLC-107-951-108

3. Turnaround time for repairs is usually two weeks in addition to
transportation time. Customer Service can arrange to furnish a rental unit if
it is not practical for you to be without the equipment for that length of
time. We can either include the rental fee on the repair bill or bill the
rental fee separately.
NOTE: AR Division offers expedited service Maintenance
Agreement plans. Under these plans. the customer chooses
between expedited .repair (72-hour factory turnaround) or a
loaner unit for the duration of the repair. Contact Customer
Service for complete details.

(8) Shipping
1. Always include with the shipment a detailed description of the problem to be
corrected. Put the assigned RA number on this document.
2. If the item is out of warranty, you should either

a. provide a purchase order for the repair. or
b. request an estimate of the amount of the repair.
3. Select suitable packing materials for electronic equipment containing a
cathode ray tube. and packtheINTmtVIBWWlth care. If possible. the

. carton and foam packing material in which you received the equipment
should be used for returning it for repairs.
4. Write the .return authorization number on the outside of the shipment:
.. A TIN RA number."

S. International customers should address the shipment to

Teleriex Corporation, AR Division
AITN RA number
clo Bmery Customs Brokers
101A Bxecutive Drive
Sterling, Virginia 22170
U.S.A.
NOTE: Por .customs purposes, international customers MUST
identify the cOuntry of orip (usually the U.S.A.) for returned
equipment· on· the· prD /orrn.tJ .invoice. When returning an
individual part, use the country of. orip listed on the part.

MAY 1990

PAGE E-2

ADDENDUM
Appendix E CommunICatIons .with the .Aft Division Factory

6. Domestic customers should address the shipment to
Customer Service
Telenex Corporation
AR Division
ATIN RA number
7401 Boston Boulevard
Springfield. Virginia 22153
U.S.A.
7.

Ship PREPAID even if you have a Maintenance Agreement with AR Division.
No collect shipments will be accepted unless previously authorized by
Customer Service.

8. Most repairs will be completed within two weeks. not including transportation
.
tune.
~

E.2

Ordering Replacement Parts or Assemblies
To obtain price quotations or to order spare or replacement parts. contact Customer
Service. Customer Service will need to know the model deSignation of the unit. its
serial number and software version, and what options are installed.

E.3

PC Board or Subassembly Exchanges
The AR Division's repair replacement policy applies to the exchange of PC Boards or
Subassemblies that need repair. Please contact Customer Service.

E.4

For Analysis of Problems
For applications, troubleshooting. or repair problems requiring technical assistance,
call Customer Service.

E.S

Warranties
There is a standard warranty on all AR Division equipment. This warranty is for 12
months.
Extended andlor Expedited Service Agreements are available for INTERVIEW 7000
Series equipment. Operating system software maintenance is also offered. Please
contact Customer Service.

E.6

Loaner Units
Loaner units are available under some hardware Maintenance Agreement plans.
ContaCt Customer Service for additional information.

MAV 1990

PAGE E-3

ADDENDUM

INTERVIEW 70QO S,rles Advanc§d Proarammlng: ATLC-107-951-108

MAY 1990

PAGE E-4

Appendix F Packing and Shipping

Appendix F: Packing and Shipping
Instructions
The INTERVIEW is usually shipped either as baggage or as freight. The basic difference, of
course, is in quantity and quality of handling to which the unit is subjected. It follows that
different packing methods are called for.
When a unit is shipped as baggage, it will probably be subjected to much less severe treatment
than when it is shipped by freight. The AR Division of Telenex Corporation offers its
INTERVIEW Soft Pack Travel Bag. Option No. OPT-9S1-99-1. for this purpose. This bag
has two inches of high-density foam protecting all surfaces of the INTERVIEW. It is yellow
for easy identification among other luggage. An identification card case, FRAGILE
markings, and leather appointments are standard features. On the oUtside is a large pocket
for carrying notes, manuals, and so forth.
Before packing the INTERVIEW in the carrying bag. remove any diskettes from the
micro diskette drives. To protect the heads during transit, insert the two yellow plastic shipping
diskettes that were delivered with the unit, one in each drive. The manual should go in the
front (center) pocket of the travel bag. There is an inside pocket for the power cord and
other cables.
Put the INTERVIEW in the bag with its handle up (as in Figure F-l). Then close and
secure the bag cover with its velcro closing.

CAUTION: The bag is considered to be reasonable protection for
the INTERVIEW when it is shipped as baggage. However, it
should never be used for freight shipment. The AR Division of
Telenex Corporation can assume no liability for damage to units
shipped this way, owing to circumstances beyond our control.

For freight shipment, the INTERVIEW should be packed in molded polyurethane foam and a
heavy-duty outer cardboard carton, as delivered by AR Division. An manuals and accessories
should be packe41 in a separate box within the carton. This packing system has been designed
to give maximum reasonable protection to the INTERVIEW and ensure its safe arrival.
However, damages due to mishandling must be the responsibility of the carrier.

F-l

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

Figure F-l Soft Pack Travel Bag, Option 99.

F-2

~,

Appendix F Packing and Shipping

;. I
i

Figure F-2 Hard Shell Travel Case. Option 95.

For freight shipment. we also recommend the hard-shell travel case (OPT-951-95-1). See
Figure F-2. This is a wheeled suitcase made of high-impact plastic, steel and rubber. It is
designed for use with all AR test equipment. Because it has built-in wheels and an extension
handle, the hard-shell travel case is especially useful for frequent hand-toting of the
instrument.

NOTE: Please do not return any unit to the AR Division without
prior authorization (see Appendix E).

F-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

F-4

App!ndlx G Rack Mount

AppendlxG:

Ra$kcc·JVtount (OPT-951-98-1)

G-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Figure G-1 Rack mount for INTERVIEW 700017 500.

G-2

~,

Appendix G Rack Mount

i

Appendix G: Rack Mount (OPT-951-98-1)
A Rack Mount Kit (OPT-9S1-98-1) allows the INTERVIEW to be installed in a standard
19-inch wide equipment rack.

G.1

General Description
The Kit will fit either standard vertical high-boy or sloped front-panel. low-boy
racks. Please note that. for proper installation. the rack must be equipped with a
horizontal writing shelf.
The Rack Mount Kit offers the user slide-in/out mounting with a sloped keyboard
position.
Physical specifications are as follows:
Height:
Width:
Depth:
Weight:

G.2

10.5 inches
19 inches
18 inches
approximately 5.5 pounds

Installation
1. Install the rack mount into the front of the cabinet directly above the writing
shelf. Secure the rack mount with the eight sets of included black panel screws
(ARD #33689) and nut clips (ARD #33686).
2. Slide the INTERVIEW about three-quarters of the way into the opening. DO
NOT SLIDE THE UNIT IN FURTHER AT THIS TIME.
3. Open the front pane} and rest the keyboard on the writing shelf by sliding back
the top two blue latches. At this point the hooks of the latches are exposed out
the front of the unit. Press down slightly on the recessed circle of these latches
and continue to slide the latches inside the unit until they stop. The indented
circle should be almost centered in the sliding area and the hooks of the latches
are no longer visible from the front of the unit. These latches must be properly
placed or they will/ock the keyboard shut if it is accidentally closed.
4.

Car~fully

slide the unit into the rack mount, with the keyboard lying open. until
the front blue rubber bumpers on the right side of the unit are behind the face of
the rack mount. You will have approximately one inch of the unit exposed out
the front of the cabinet. The INTERVIEW is now in proper position for
operation.

G-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-10B

5. Notice the rack mount has two electrical wires connecting to a switch mounted on
the right front of the rack. Plug the female connector of the top wire into the
power connector. located at the bottom left of the rear panel of the unit. It is a
standard three-wire grounded male connector.
6. The bottom wire of the rack mount is now the power connector for your unit._
Plug this male connector into a standard outlet. Check the voltage selection; see
Section l.S(B). Turn on the power switch. located on the left side of the rear
panel of the unit. This permits the ON/OFF switch on the rack mount to
become the power switch for your unit.
7. To complete the connections on your unit, refer to Section 1, Hardware.

G-4

ARPfIDdiX

H Optional Codes J/S71J/S8

Appendix H: Optional Codes JIS7/JIS8
TIS7. and J1S8 Katakana character sets are contained in files named JIS7 and 11S8 in the
/syslcodes directory of DSK-9S1-02S-1. the floppy diskette that comprises software option
OPT-951-22-1.The files should be copied into the /syslcodes directory on the boot-up disk.
When the unit is rebooted. the new codes will be available as Code selections on the Line
Setup menu.

H.1

Accessing the Directory Containing JIS7 and JIS8 Flies
Insert the disk containing the optional codes into Floppy Drive 1 (FD 1). With the
unit powered on and booted, pressS, FMAINT to access the File Maintenance
screen. Press CHNGOIR and FLOPPY1, then enter the following 'pathname in the Name
field: IsysJcodes. The first two lines of your File Maintenance should look like the
screen in Figure H-1.
Press §) to access the directory containing the 1lS7 and lIS8 files.

**

ntenance

**

12/17/88

112

•
Figure 8-1 To see tbe JIS7 and JIS8 files in the File Maintenance listings.
you must change to the FDJlsyslcodes direclory.

H-1

09:21

INTERVIEW 7000 Series Advanced Proarammlng: ATLC-107-951-.10B

H.2

Copying JIS7 and JIS8 Files into /sys/codes Directory
Press COPY. Leave the source pathname on the From line blank: we will make the
From selections via the 8 key in the body of the current directory listings
themselves. Press the ill key to move the cursor to the To field.
On the To line. select the boot disk-drive. This may be the hard (HRD) drive; or
you may install the boot-up diskette in Floppy Drive 2 (FD2). If your unit has only a
single disk drive, you will use Floppy Drive 1 (FD1) to house first the source disk
and then the destination (boot-up) diskette. In that case, select To: MiW,
In the Name data-entry field, type Isyslcodes. Be sure to type a slash (I) both before
and after the sys entry.
Now move the cursor into the directory listings. With the blinking cursor positioned
over the filename lIS7. press 8. Move the cursor down over lIS8 and mark this file
as weiL
Your screen should resemble the screen drawn in Figure H-2. Press
lIS7 and JIS8 files to the Isyslcodes directory on the boot disk.

~

to copy the

If you are using a single-drive unit. prompts will "walk" you through the exchange of

disks in the single drive.

-

=

•

Aa

M.M

Figure H-2 You may usa the MARK key t(} select bothnS mes for cocpyingmto the
tsyslcodes directory on the boot disk.

H-2

rff""
!

Ap~ndix

,

H.3

Selecting

~!S7

H Optional COdes JIS71JISB

or JIS8 Code

Once me JIS files are copied into the Isys/codes directory, reboot the unit as follows:
tum the unit off. wait ten seconds. then turn the power switch on again.

Figure B-3 Files loaded into the Isys/codes directory are selectable
in the Code field on the Une Setup menu.

After bootup, press Sf SETUP, LINE. to access the Line Setup menu. Move the
cursor down to the Cod. field. Press {Ill or IIID to rotate the selections in this field
until you have verified that _WtJtrt~~i; and.m~*¥~t are available as new code
selections. Figure H-3 shows a line setup with ~%jtt;lf; selected in the Code field.

H.4

Testing with JIS7/JIS8
In your line setup, be sure to change Mode: i;@~t!,i; to l:;:@M~~;~%: or to one
of the emulate modes. The Automonitor sequence will not configure the unit to run
with JIS7/JIS8 code. and it will usually change th.e code selection to ~1::::::ltL
Figure H-4 shows a screen display for JIS7. a shifted code. Note that the messages
with Katakana text begin with Shift Out (\l, hex °E).
When you type monitor/receive strings or transmit strings into your program, the
characters displayed on the trigger menus or on the Protocol Spreadsheet will always
be ASCII. Use the JIS7 and JISS charts in Appendix E to correlate your ASCII
data-entries with the actual JIS7/JIS8 characters that will be searched for or
transmitted.

H-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

*MON/DISK/FD1* .
J IS7/8/NONE/BOp·
\: ..

-::@lr:.;,';';.:~::'t.~\}IlbJ\O..., •.. :Jv j\"

GSs:Jt-.:J'il5 ~ ?:fll?") .. 1::3-, T':< t-j'

i~~:~~~'~;'~~::~:~:~~:~:~:~~:;~:~~~;~~~~~~;:~:~:~~~~~:B~.i;~~~i:tt~
0,- ~D~J\O-a:J

0.,

II J\, I):.s:n,::JIJ5"

'"'*

s,",") "I:J- ~.T;Z kr";(. tR "'@.".~:.

.th isisaoI'"

'l

...

w
_ _ _......_ _...

:.:_ _ _ _ _

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

1-22

Appendix J Field Service

Appendix J: Field Service on the
INTERVIEW 7000 Series
This appendix is to guide you in proper removal, handling. and installation of logic boards
and other components in the INTERVIEW 7000 Series.
•

J 1 alerts you to the problem of static electricity.

•

J2 covers the removal of logic cards.

•

J3 discusses the installation of logic cards.

•

J4 covers the installation of the optional multiplexer boards.

•

J5 discusses the replacement of firmware on the CPM board.

•

J6 covers the installation of a hard disk drive in the INTERVIEW 7000 and 7200
TURBO, option OPT-9S1-01-1.

•

J7 covers other components requiring attention.

J-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

J-2

e,~
f

, I

Appendix J1 Field Service: Eliminating Static Electricity

i

ApPflDdix Jl: ElIminating Static Electricity
tf',
,

:

,.·.~I

'\

I

J1-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

1 Meg Ohm Resister

Figure Jl-1 Illustration of grounded workstation.

J1-2

Note grounded wrist strap and table mat.

Appendix J1 FigldSlJrvice.: EliminatingStatfc Electricity

Appendix J1: Eliminating Static Electricity
STATIC ELECTRICITY CAN DAMAGE THE UNIT WHEN THE COVER IS REMOVED.
Before you begin to remove the cover, be certain you have taken appropriate anti-static
precautions.

J1.1 Take Precautions
As a minimum precaution, a grounded wrist strap should be used in conjunction with
an anti-static work surface mat. Without these precautions. walking {or just shifting
your feet) on a carpet or tile floor. shifting your position in a chair. or simply rolling
a chair as little as a foot or two can generate sufficient static electricity to damage
circuitry. See Figure J1-1 for an example of a static-free workstation for working
with sensitive parts and assemblies.
Place unit on anti-static mat with power OFF. Then put on a grounded wrist strap
and proceed.

J1.2 Use of Anti-Static Packing
When returning any boards to the AR Division factory, reuse any bags and anti-static
packaging from boards sent by the AR Division previously. Pack the parts tightly to
prevent motion which could generate static. If you did not save the packaging, you
must obtain special anti-static packing before you begin or you will damage the
components on the board .

.fT'
•

f

I

J1-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

J1-4

t,..'\

Appendix J2 Fie'" SeMce: Removing Logic Boards

!

Appendix J2: Removing Logic Boards

J2-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107 951-108

Mechanical
Fan
(DANGER)

Slot 2: GBM Board
Slot 3: CPM Board
Slot 4: PCM Board
Slot 5: FEB Board
Slots 7,8 & 9: MPM Boards

Hard
Disk --~.H~--~~
Drive

Area behind
LED Display
(DANGER)

Figure J2-1 Viewing interior components of the INTERVIEW 7000 Series.

J2-2

Appendix J2 Field Sgrvice: Removing Logic Boards

Appendix J2: R,emoving Logic Boards
CAUTION: STATIC ELECTRICITY CAN DAMAGE THE UNIT
WHEN THE COVER IS REMOVED. Before you begin this
section, you nw.tt take. the proper anti-static precautions given in
Appendix J 1.

J2.1 Remove the Cover
To remove the cover of your unit. first unplug all connecting cords on the back of
the INTERVIEW. Place the unit on its back and remove the six long screws
recessed in the base.
Place the unit in its working position. tying on its base. Open the front panel, sliding
the top two blue latches back. At this point the hooks of the latches are exposed
out the front of the unit. Press down slightly on the recessed circle of these latches
and continue to slide the latches inside the unit until they stop. The indented circle
should be almost centered in the sliding area and the hooks of the latches are no
longer visible from the front of th.e unit. These latches must be properly placed or
they will break when you remove the cover.
Keeping an eye on the position of the latches. grasp the sides of the cover and
remove it. The handle on the left side and rubber bumper feet on the right side can
help to give you some leverage. You may have to rock the cover slightly back and
forth to free it. Replace the handle in its slot on the base.

J2.2 View the Interior Layout
(A) Anticipate Potential Hazards·
The ins~de of your INTERVIEW reveals three. potentially hazardous areas. DO
NOTTOUCH
THESE AR.EAS OR INJURY MAY R.ESULT! These three
I
danger. areas include the mechanical fan at the center back of the unit (physical
ha~rdh the power supply-at the back right side of the unit (230V shock
ha2lard). and the area directlybebind the LED display (190V shock hazard).
See Figure 12-1 for their locations.

J2-3

._----------_.-

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-10B

Take care as you remove the boards not to make contact with any of these
three areas:'

(8) View Interior Components of the INTERVIEW 7000 and 7200 TURBO
In addition to these three potentially hazardous components, on the left near the
front of your unit is a bracket for a Winchester hard disk drive. The standard
INTERVIEW 7000 does not have a hard drive. but the bracket to hold it is in
position for the option of adding a hard drive. If your INTERVIEW 7000 has
been upgraded with this option, you will have two cables running up the side of
your hard drive and over it. connecting it to the PCM board.
Immediately behind the hard disk drive is the TIM (Test Interface Module)
holder. The dual floppy disk drives are on the right near the front. with a cable
connecting them to the PCM board. In the center of the unit are the nine slots
which house your boards.
Reading from left to right. the slots contain the following boards:
•

slot I-empty (unless upgraded with optional multiplexer board)

•

slot 2-GBM, Global Bus Module Board

•

slot 3-CPM. 68K Processor Board

•

slot 4-PCM. 68K Peripheral Board

•

slot 5-FEB, Front End Buffer Board

•

slot 6-reserved for XDRAM board (OPT-951-23-1)

•

slot 7-empty (unless upgraded with optional MPM board)

•

slot 8-empty (unless upgraded with optional MPM board)

•

slot 9-MPM. 286 Processor Board

There is one cable connecting the LED display to the GBM board.
Additionally. there are two jumper cables; one connecting the FEB and GBM
boards and a smaller one connecting the CPM and PCM boards.

(C) View Interior Components of the INTERVIEW 7500 and nOD TURBO
In addition to these three potentially hazardous components, on the left near the
front of your unit is the Winchester hard disk drive. It has two cables running
up its side and over it, connecting it to the PCM board.
Immediately behind the hard disk drive is the TIM (Test Interface Module)
holder. The dual floppy disk drives are on the right near the front. with a cable
connecting them to thePCM board. . In the center of the unit are the nine slots
which house your boards.

J2-4

Appendix J2 Field Service: Removing Logic Boards

Reading

fr~m

left to right. the slots contain the following boards:

•

slot 1-empty (unless upgraded with optional multiplexer board)

•

slot 2-GBM. Global Bus Module Board

•

slot 3-CPM, 68K Processor Board

•

slot 4-PCM. 68K Peripheral Board

•

slot 5-FEB, Front End Buffer Board

•

slot 6-reserved for XDRAM board (OPT-951-23-1)

•

slot 7-MPM. 286 Processor Board

•

slot 8-MPM, 286 Processor Board

•

slot 9-MPM. 286 Processor Board

There is one cable connecting fueLED display to the GBM board.
Additionally. there are two jumper cables; one connecting the FEB and GBM
boards and a smaller one connecting the CPM and PCM boards.

J2.3 Remove the Boards
As stated previously in Section J1.2. if you have bags and packaging from boards sent
by the AR Division previously. reuse those anti-static materials for packing. If you
did not,s8ve the packaging. you must obtain a special anti-static packing before you
begin or you will damage the components on the board.

(A) Disconnect the Cables
Make certain the unit is on an anti-static mat and you are wearing your
grounded wrist strap.
You may wish to record where each cable was attached for reference when your
replacement boards arrive. Refer back to Figure 12·1. Your upgraded
replacement boards will be sent as soon as possible.
Notice that several of the connectors are "keyed" for easy, correct alignment.
Those that are not "keyed" need to have special care taken to line up the pins
with the· proper connecting holes when they are reconnected.
Disconnect the cables carefully. They may be easily removed with an IC clip
holder. Lift the connector straight up. holding onto its edges. DO NOT PULL
ON THE CABLE; you could break it or damage the connectors. If you do not
have an IC clip holder, a blade screwdriver will also work.

CAUTION: If you use a screwdriver, use the top of the black
mounting rack (which secures the ends of the boards) as your
leverage point. Avoid using the edges of the boards or other
components to pry the connector loose.

J2-5

INTERVIEW 7000 $sr/es Advanced Prgarammfna: ATLC-l07-951-108

(B) Remove the Boards
CAUTION: Do not hold any board by its gold edge connector.
Hold it by the sidel, NEVER touching the components.
It is probably easiest to remove the boards from left to right. To do so, grasp
the board by its top comer edges, and gently pull it straight up and out. Then,
holding the board by its side edges, place it immediately into an anti-static bag
and close the bag. Repeat the process with each board to be removed.

J2.4 Replace the Cover
If you are not going to replace any boards at this time, continue with this section to
replace the cover to protect the remaining components. If you are ready to replace

boards, proceed down to Section 12.5, Package the Boards, and then on to Section
J3. Installing Logic Boards.
Grasp the cover with the latch area to the front facing you. Make certain the latches
are recessed as far as they can go into the cover and their hooks are not beyond the
edge of the cover. Slide the cover down. For the INTERVIEW 7500 and 7700
TURBO-and those INTERVIEW 7000s and 7200 TURBOs having the optional hard
drive-take care that the two cables to the Winchester hard disk drive (on your left,
directly behind the handle) are not being pinched or damaged by the cover. (Some
models may contain a small. removable. protective plastic sheet to help shield the
cables from the cover.)
Place the unit on its back once again and replace the six screws to hold the cover
secure.

J2.S Package the Boards
In preparation for storage or shipping. package each board removed from the
INTERVIEW in its own anti-static bag. If shipping, wrap it further in anti-static
packing material and place it securely in a shipping box. You may package several
boards in a single box. as long as each board is wrapped individually in an
anti-static bag. When returning a board. please reference the return authorization
number from your original packing list. For shipping information, see Appendix E,
Communications with the AR Division ·Factory.

J2-6

~~,

,

I

1PBem:lix J3 FieJa Servioe: Installing Logic. SaBras

i

Appendix J3: Installing Logic Boards

J3-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Figure J3-1 Some connectors are Ukeyed" for correct alignment.

J3-2

Appendix J3 Field Service: Installing Logic Boards

Appendix J3: Installing Logic Boards
Observe the properhandiing of the boards: refer to Appendix 11 and 12 for using proper
anti-static precautions and removing the boards.
Figure J2-1 gave you visual locations of the components in the INTERVIEW 7000 Series.
For a detailed lisdngof board placement in the slots. see Section J2.2. Each board is labeled
in its upper left cprner. The motherboard (on the floor of the unit) is labeled with the
corresponding na~e of the board by the slot into which that particular board is set.

J3.1

INTERVIEW 7000 Series Hardware Architecture
In troubleshooting any malfunction. it is important to know which board contains the
compone:nt that controls the particular function.
The INTERVIEW contains six types of board which are connected to the
motherbqard and which can be easily removed and replaced. (See Appendix J2 and
J4 for board removal information.) These boards are:
•

MUX

Multiplexer Board (if upgraded with option)

•

GBM

Global Bus Modt.de

•

CPM

Control Processor Module

•

PCM

Peripheral Control Module

•

FEB

Front-End Buffer

•

MPM Main Processor Module

A seventh type of board is installed in the Test Interface Module.
Figure J3-2 is a block diagram showing the components on aU of these boards. The
figure aI$O shows how the components are interconnected in the unit. Following the
figure is a descriptive listing of the components.

NOTE:
The symbol
hi-directional buffer.

IB

J3-3

in the diagram represents a

I Ill:

L ____ _

-Gl08Al_

r------------. ----

Figure H-2 Block diagram of INTERVIEW
7000 Series hardware architecture.

Artpe,ndlx J3 Field Seodee: Installing Logic Boards

(A) MUX (Multiplexer Board)
This board provides whatever additional processing is needed for special data
formats such as Tl. G.703, ISDN. etc.
The mux board clocks-in data from transmitter channel A on the GBM. Once
at ~e mux board, the data is processed as required and then sent back to the
GBM to be transmitted over the line.

(B) GBM (Global Bus Module)
1. Mux.

The muxes multiplex various signals to be transmitted. received, or
monitored depending upon which mode of operation is being used.

2. Transmitter channel A. The transmitter generates the data stream to be sent
out when the lNTERVIEWis in emulate DTE mode. The data can either be
sent out directly to the TIM or sent to the mux board for further processing.
3. Beep control. The beep control does just that-it controls the beep. There
are two types of beeps defined by their length-one second and one-half
second. Only the half-second beep is currently in use.
4.

Baud rate generator. The baud rate generator generates the clock for the
transmit data when in emulate DTE mode.

S.Gbus arbitor ·control. This arbitrates requests by the GBM to obtain the
.gl(>bal bus. When the bus is idle and the GBM has top priority over all other
requests. this logic will enable the GBM to access the global bus.
6. Power on reset. This circuitry generates the proper timing for reset signals
:ror the INTERVIEW unit from a power-up situation.

7. 10 MHz clock generator. This generates the global bus clock.
8. Lead control port. The INTERVIEW writes to this port in order to send out
the proper control signals for the data interface. These control signals are
c;iependent upon the emulate mode for which the unit is configured.
9. Lead sensor port. The INTBRVIEWreads the lead sensor port in order to
monitor incoming control signals from the data interface.

10. TIM control port. The INTERVIEW writes to this port in order to setup the
TIM to the desired mode of operation.
11. Real time clock. This circuitry keeps track of current time and date. This
information can be displayed on the screen for the user and can also be

. used to

~mp

the. incoming data.

12, Transmitter channel B. This is a second transmit channel used to send data
out into the data stream through the mux board.

J3-5

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

13. Mux control port. The INTERVIEW software writes to this port to set up
the muxes for the proper data flow through the GBM, depending upon the
mode of operation.

14.2 channel DMA. In order for the INTERVIEW to transmit data in emulate
mode. the DMA controller requests a byte of data from memory on an
MPM. When this byte is obtained, the DMA controller then sends it out
through one of the transmitter channels.

(C) CPM (Control Processor Module)
The CPM board controls most of the operations of the INTERVIEW unit.
1. Disk control circuitry. The disk controller is the 9580B. In record mode,
the disk controller sends a block of data through the PCM to one of the
disk drives. When in playback, the disk controller reads one of the drives
through the PCM so that the CPM can send recorded receive data to the
FEB. The 9580 controls up to three disk drives-one Winchester hard drive
and two floppy drives.

2. 8 MHz clock generator. This circuitry generates the clock that is used by
the 68010 CPU and the peripherals on the CPM.

3. Global bus interrupt port. This port can be written to by any board that has
access to the global bus. There are four global interrupts that can be set,
each of which-will cause an interrupt of the 68010 processor. Thus, any
board that is connected to the global bus has the ability to interrupt the
68010.

4. Global bus arbitor.

This circuitry queues requests by the CPM for access
to the global bus and waits until priority is obtained before enabling the CPM
onto the global bus. Control bits are set to determine the mode of operation
of the arbitor. One mode causes the CPM to always release the bus after an
access. Another mode causes the CPM to hold onto the global bus until it is
requested by another board.

5. 4 channel DMA. The CPM currently uses only two of the available four
DMA channels. Channel zero is used for recording data and channel one is
used for playback of data. When recording data, the FEB interrupts the
CPM to signify that a byte of receive data is available. The DMA then reads
the byte from the FEB into memory on the CPM. When enough bytes have
been accumulated to form a block. the disk controller will send the block to
the specified disk drive. When in playback mode, the DMA sends out bytes
of receive data to the FEB. This is data that has been moved into CPM
memory by the disk controller. In addition. the DMA circuitry allows for any
memory-to-memory transfers necessary between the CPM and other boards.

6. Software reset logiC. The CPM board contains logic which enables the
68010 to generate a software reset to the rest of the unit. The reset signal is

J3-6

Appendix J3 Field Service: Installing Loalc Boards

generated by executing a RESET instruction in the 68010. This will cause
the software reset to be generated without disturbing any of the registers
within the 68010.

7. Interrupt controUers. The three interrupt controllers monitor interrupts from
the disk controller. time-out logic, and global bus. These interrupt
controllers generate the appropriate vectors for the CPU's interrupt vector
table.
8. Channel timer. This function is carried out by the 9513A. a chip used to
generate output signals that are used as CPU interrupts. The time intervals
for these interrupts are user-programmable.
.

9. 32 bit counter. This circuitry counts a 1 MHz clock. The CPU can latch
this value at any time and then read the lower 16 bits of the count. as well
QS the upper 16 bits if they are needed. The 32 (or less) -bit count is used
by the software to determine specific time intervals necessary for execution
'Of certain routines.

10. ltPROM. The EPROM contains the power-up software and initialization
routines. When the power is turned on, the 68010 processor begins
execution by fetching from the EPROM.
11. Wait/timer logic. This logic generates an error interrupt to the CPU if an
instruction causes the board to hang up. If the processor does not receive an
acknowledgment within approximately .33 milliseconds after it has begun a
cycle. an interrupt will be generated.
12. P bus arbitor. The P bus (CPM bus on block diagram) connects the CPM
directly to the PCMand the FEB. Thus. the CPM can directly read and
write to ports on any of these boards without acceSsing the global bus. The
arbitor is simply a pair of pals which decode the address from the CPU. If
the address is one of .the ports on the PCM or FEB. and an

;acknowledgment has been received from the appropriate board. the data
.buffers are enabled.
13. 'DRAM. The DRAM is 2 Mbyte of memory space that contains the
operating software for the INTERVIEW unit. At power up. this software is
loaded into the DRAM from either the hard or floppy disks. In addition,
any programs that are compiled for run mode are stored in the DRAM.

14.68010 processor. This processor is the brain of the INTERVIEW unit. It
;controls virtually every operation of the box. The 68010 processor operates
:using the software stored in the DRAM on the CPM.

J3-7

INTERVIEW 7000 Series Advanced Proarammlng: ATLC-107-951-10B

(D) PCM (Peripheral Control Module)
The PCM board provides the interface to all the major peripherals in the
INTERVIEW unit. as well as external peripherals attached to the unit.

1. Dotclock generator. The dotclock is generated by buffering a 23.9114 MHz
oscillator and then dividing it by two. This gives a dotclock frequency of
11.9557 MHz.
2. Aux controller. The aux control function is performed by the 8536 chip on
the PCM. (This chip is also known as a CIO.) This pan enables the unit to
read or write to other nodes through a DB-25 connector located on the
back of the unit. The 8536 has two 8-bit ports, and each line may be
configured as an input or an output. When configured as an input, the 8536
can be programmed to look for a specific condition on one bit or search for
an entire word, and then generate an interrupt.

3. Remote/printer controller. The control functions for the remote port and
the printer port are performed by the 8530A chip on the PCM. (TIris chip is
also known as the SIO.) The SIO provides a serial interface between the
INTERVIEW unit and other nodes. It receives serial data from external
sources, strips off any flags or block-check characters. and causes an
interrupt when it has an 8-bit word of data to be read out of it. On the
transmit side. the SIO takes a word of data from the processor on the CPM.
adds the necessary flags and block-check characters, and sends out the data
over the serial interface.
The SIO has two available ports on the PCM-one is used for the printer
interface and the other is used for the remote interface. For the printer
interface. the SIO acts as a DeE. It accepts TO as an input an~ generates
RD as an output. It also generates the appropriate RS-232 handshake
control signals. For the remote interface, the SIO acts as a DTE, sending out
TO data to the remote port and receiving RD data from the remote port.
The remote port is used to control the INTERVIEW unit from a remote
terminal instead of from the keyboard.
4.

Display timing controlJer. The display timing control functions are
performed by the Signetics 2674 chip. During initialization, the CPM
programs this chip with information about the display device, _including the
size of each character in dots. the number of characters per line, the
number of lines per screen, and the size of the horizontal and vertical
blanking intervals and sync pulses. Also programmed into the chip is the
initial location and block size of the character data block in RAM. When
the 2674 runs, it automatically generates the proper timing of character data,
blanking intervals. and sync pulses. In addition, it also generates control
signals which allow for overline. underline. and strikethrough.

5. Attribute RAM and mux. The attn'bute RAM takes a 12 bit address and
generates 16 bits of output which define all attributes of a particular

J3-8

ApP!ncllx J3 Field S'$rvice: Installing Logic Boards

character. The 12 bit address can come from two possible sources. When
the display is scanning. data is being read from the attribute RAM and the
address comes from a buffer attached to the output of the display controller.
When writing to the display, data is being written into the attribute RAM
and the address comes from a latch which stores the desired write location
as output from the processor on the CPM. Attributes of a character include
underline. overline. strikethrough. reverse image, blinking, blanking. low
intensity (monochrome only). background color, foreground color. and data
type (hex or ASCII).

6. Data RAM. The data RAM takes the same 12 bit address as the attribute
RAM and generates 12 bits of output which provide character mapping
information. The address is multiplexed from either the display controller
(read) or the address latch (write) as described for the attribute RAM. One
bit of each output word is dedicated as a flag to designate that a particular
character may not be displayed in hex format. (These are usually flags.
block-check, or control characters.) Three bits of the output represent 8
possible character formats (i.e, ASCII. EBCDIC, hex, etc,) The other eight
bits represent 256 posSlble characters within each character format.

7. Mapping RAM and mux. The mapping RAM takes a 10 bit address and
generates 10 bits of output which provide the location of a specific character
dot pattern in the font RAM. The 10 bit address is multiplexed from two
sources. When the display is scanning (read). the address comes from the
outpUt of the data RAM. When writing mapping information to the mapping
RAM. the address comes from a latch which stores the desired write address
!rom the processor on the CPM. The address input defines a specific
character and a specific data format. The mapping RAM takes this
information and generates an output which points to the location in font
RAM where the actual dot pattern is stored.

8. Font RAM and mux. The font RAM takes a 14 bit address and generates 9
bits of actual display dot information. The 14 bit address is multiplexed from
two sources. When the display is scanning (read), the lower 4 address bits
come from a latch connected to the display controller chip and the upper 10
bits come from the mapping RAM. When writing font information to the
font RAM. the address comes from a latch which stores the desired write
address from the processor on the CPM. Each character on the screen is 9
dots wide by 12 dots high. The lower 4 address bits decode the specific row
.within the character and the upper 10 bits decode to a possible 1024 actual
character dot patterns. The. output is a 9-bit word which gives the actual
,on-off pattern of dots. in a particular row of a given character.

9. Overline, strikethrough and latch. This circuitry actually generates the
.strikethrough and overline attributes by overriding dot information from the
·font RAM in specific rows of a character. Finally t the resulting dot data is

J3-9

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

latched and processed by the video attribute controllers. (Underline is done
internally by the attribute controller.)

10. Monochrome attributes controller. This function is performed by a 2675
that has been programmed to operate in monochrome mode. The 2675
creates a character clock from the dot clock. such that one character clock
is generated for every nine dot clocks. (Each character is nine dots wide.)
For each character to be output to the video monitor, the 2675 takes the
nine bits of processed dot data. along with control signals for blanking.
blinking. underlining. cursor position, and reverse imaging, and creates the
serial stream of dot data called monochrome video. This data stream is then
sent on through a buffer to the plasma display or through driving transistors
to the RS-170 port that can be connected to a CRT.
11. Color attributes controller. This function is performed by a 2675 that has
been programmed to operate in color mode. For each character to be output
to a color monitor. the 2675 takes the nine bits of processed dot data-along
with control signals for blanking. blinking, underlining, cursor position.
foreground color. and background color-and creates four serial streams of
data which will generate the color video. The four different data streams
represent red. blue. green, and luminescence. This data passes through a
buffer before being sent out to the color monitor through a port in the rear
of the unit.

12. Keyboard controller. The keyboard controller is an 8051 microcontroller
programmed to function like an INTEL 8278. (The 8278 is a keyboard
controller that was used until it was obsoleted by the manufacturer.) The
controller continually writes out a sequence of addresses that are decoded to
represent rows and columns of the main keyboard and function keyboard.
The scanning process continues until the controller finds a key depress or
key release condition. The controller then interrupts the 68010 processor on
the CPM which reads the key value out of the controller.

13. Key encoder. The key encoder is simply a combination of buffers and
decoders which take the scan address from the keyboard controller and
convert it into row and column select signals that go directly to the main
keyboard and function keyboard. Each scan address decodes to a unique
row and column combination on one of the keyboards.

14. Interrupt control. The interrupt control10gic combines interrupts from
several sources into one interrupt signal that is sent to the CPM board. The
CPM then reads a 3-bit code generated by the interrupt logic to determine
the source of the interrupt on the PCM. Interrupts from the PCM are
caused by key press, key release. break detect on receive data. or interrupts
from the 8536 chip (aux controller).

15. Phase locked loop/disk control logic. The disk control logic simply takes the
disk control signals from the CPM and sends them out to the selected drive.

J3-10

Apeendlx J3F/,/tJ Service,' Installing LogJc Boards

:either floppy or hard. It also buff~rs control signals from the disk drives and
sends them back to the dislt controller on. the CPM. The 9582 data disk
separator recovers clock from a stream of data coming from a disk drive and
sends it back to the CPM. The 9582 separator has a built-in phase-locked
loop that is used for this clock recovery.
16. Mode CQntfol. This is simply a latch that is loaded from the CPM. The
various bits of this latch control certain aspects of the display. By

programming certain bits ofthis latch. one can force the display to hex
format. control the cursor. choose half or full duplex, or program the display
controller for operation from. a SO Hz. power . supply.

(E) FE.· (Front-End Buffer)'
The Front End 13uffer.· provides the. necessary. pre-processing for data in the
rec~ive path. There are thr~patbs that the data may take through the FEB. In
run mode. raw data passes through the FEB to the receiver and gets read by an
MPM. The data can also be stored in~f.'l form on one of the disk drives
by the disk controller on the. CP~. In playback mode. data does not come from
an external device. but from a selected disk drive. In this mode. data from the
disk controller is multiplexed into· the receive path.
1. Idle suppress. When selected. this circuitry removes the idle characters from

the receive data stream.

2. Data encoder. This circuitry takes the receive data and encodes it in a
format that enables easy storale. The encOded format includes data and
control lead information along with time ticks.
3.

10248 fifo (small). The small fifo ("jirst in. first out") stores the encoded
da~ until it can be read by the DMA controller on the CPM board. This
path is used when the INTERVIEW is in record mode.

4.

Ftjolmux

control~ Th;e~p~.writes to this port to set the appropriate control
bits for the fifos and to configure the mux for the proper mode of operation.

5. Mux. The mux multiplexes
receive path.

b~ween

real-time data and playback data in the

fifo acts as a "rubber band" between the FEB and
;the MPM-it "stretches or .shrinks" with the amount of data received and
.sends it out at the proper l'J~. The PEBputs data into the fifo as it receives
'it and waits for the receiver on the FEB to request a byte.

6.64K fifo {big);. The bi~

7. .Data decoder. The data decoder puts the data back into raw form as it
.appeared before entering the data encoder. The raw data is then passed on
to the receiver to be sent out to the MPM. Control lead information is also
.output from the d~oder and sent to the lead port.

J3-11

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

8. Lead port. The MPM reads this port on the GBM to obtain information on
the status of the control leads.
9. Encoder/decoder control. The MPM writes to this port on the GBM to set
the control bits for the data encoder and data decoder on the board.
10. Receiver. When a byte of data has been processed through the decoder, it
passes on to the receiver circuitry. The MPM continuously polls the receiver
to check, for the presence of a byte of data. and if there is data present, the
MPM reads it from the receiver into its memory.

(F) MPM (Main Processor Module)
The MPM does all the higher level processing of the receive data. This board'
also generates the transmit data to be sent out when in emulate mode. If the
XDRAM board is present, see Table J3-1 for propet switch settings for switch S 1
on the MPM's for specific allocations of memory space.
1.

Clock generator. This circuitry generates the clock that runs the 80286 CPU
and peripherals on this board.

2. Global bus arbitor control. This circuitry queues requests for the global bus.
It then grants access to the global bus when the global bus is idle and this
board has the highest priority of all requesting boards. This function is
performed by the bus arbitor chip.
3. Bank. address register. The CPU writes to this register to set the upper
address bits for the 80286 when it is operating in real mode. In real mode,
the CPU does not drive address bits 19 through 23, so these bits must be set
in this register if the CPU is running in real mode.
4. Address buffer latch. This circuitry simply latches the address bits from the
processor in order to guarantee that the address is stable throughout the
entire CPU cycle.
S. Mux. This multiplexer simply chooses whether to take the upper address
bits directly from the processor or from the bank address register described
above. The register is used when the CPU is in real mode. because the CPU
will only drive these bits in protected mode.
t

6. 80286 CPU. This processor controls the operation of the MPM. The

processor operates on software located in the DRAM on the MPM. This
software is compiled by the CPM and loaded into the MPM. The software
'Will tell the MPM how to process the data. and what trigger conditions to
look for in the data stream. The CPMcontinually polls the MPM to see if
data is available to be sent to any of the user interfaces: printer, plasma
display. and remote port.
7.

DRAM. The DRAM on each MPM is dedicated to storage of receive data.

In addition, the DRAM contains the operating software for the MPM. This

J3-12

Agefrn"Jix

J3

Fillcf SSJ\1lq!:. Instelli'!fJ LogiC Boards

memory is dual-ported~ this means that the DRAM can be accessed by
~ither the local MPM bus from the 80286 processor or by the global bus.
Operation of the DRAM and arbitration of requests from the two ports is
controlled by the DRAM controller ehip. This chip also generates refreshes
for the DRAM at the proper intervals.

8. Wait/timer logic. This circuitry generates the proper amount of wait states
for some local cycles. It also monitors the operation of the MPM to check
for a condition where the CPU gets hung up. The timer logic will generate a
non:"maskable interrupt to the 80286 processor if a cycle begins and no
acknowledge is received \\fithln approximately 7 milliseconds.

9. Reset controllogic. The MPM can be reset in several ways. A global
software reset will cause me MPM to go into a reset state. The CPM may
also cause a reset on the MPMby writing to a specific global port. Once the
MPM has been reliet. it will remain in the reset state until the reset is
released by the CPMwriq."g to another dedicated global pon. Thus, when
the unit is first powered up. the CPM can execute its initialization routines,
and load the MPM software into the MPM DRAM while the MPM is still in
the reset state.
10. 32 bit counter. The 32 bit c()tlDter.is made up of four 74LS590's in series
which count a 1 MHz clock. These counters are used to determine elapsed
time between certain events in the data stream. The count is latched by
writing to a dedicated local port. The count is read 16 bits at a time. by
reading one of two local ~. The count may be cleared to zero by writing
to another d~ted local port.

11. 5 channel timer. The 5 channel timer is the 9S13A. a chip that uses six
¢lock sources as inputs. The user programs the chip to count one of the
clock sources and aenerate an output when the tetminal count is reached.
The outpUt can be a high .orlowpulse. or simply a tOggle of the output line.
Each condition may beelteeute

','

,,'

,

,,'

,"~'

"

•

~f~r.,to. Fi~.J4-t;J€lh~';t~, ~.•. cable~tcton to be 4etacbed....two
froriteables~~ f~~·.~i:~~~e~ 01\e from. a.uble aua.ched
to the· ba~ of 'tije•. ~'~~l'~ ,'1)etwo ~;the .hant disk. drive' are. attached
to ~e PCM bOatdm:~';4i '~.~; eab1eiila.ttache~to the GUM board in
slot 2. Removetllese ~:~_~aAdfQltitbec.bles back. out of the way.

CAUTION: Do .."thold any bOlJrd by its gold edge connector.
Hold it by the sides. NEVER touching the components.

Refer to Figure J4-1. If yware replacing the mux board, locate it in slot 1.
Remove the board bYlfasping the top comer edges. Gently pull it straight up
and out, and holding the board by ~ side edges. ~ce it on the anti-static mat.
If requeste,d to do 801
Di\Ilsion. InstructiOns

p~age, and

ret\lm the old m\lX board.to the AR

fO'fproper packing andshippfug may be found in

Ap;endixSeWon J2..5.

.J4-3

INTERVIEW 7000 Series Advanced Programming: ATI..C-107-951-108

Microprocessor with internal PROM
Single large chip

T1 Transoeivers

Filure J4-l All PROMs are factory installed on the Tl mux board, represented above by the most
prominent components.

J4.2

Replace the Board
(A) Install the Board In the Appropriate Slot
Install the mux board (Tl mux board represented in Figure 14-2) in slot 1. in
the same manner in which you removed it. Take care to hold it only by the
edges. Gently slide it into its connector.

(8) Reconnect the Cables
The cables should be reconnected in the reverse order in which you
disconnected them.
First, replace the jumper cable running from the back of the LED display to the
GBM board (in slot 2). Then reconnect the two cables from the hard disk drive
to the PCM board (in slot 4).

J4-4

J4.3

Test the Unit
Before r~lacing the cover, review your work to be certain you have followed all the
instructions correctly. Follow proc~dures in Section J3.4 to replace the cover (as a
safety measure before you test the unit) as well as to test the new firmware in a
power-up before you secure the cover ..
The mux board option should be listed on the power-up screen in the OPTIONS:
field. If there are any errors listed on the SELF TEST eAROFlS~ line. repeat the
procedures from the beginning of this section and try reseating the mux board.
Replace the cover and power up the unit again so it can perform the self test once
more. If self test errors persist. contact Customer Service.

J4.4

Secure the Cover
When the SELF TEST ERRORS: line shows NONE. place the unit on its back and
replace the six screws to hold the cover secure.

J4-5

INTERVIEW 7000S.rjesAdva!?ged fZoarammlna: ATLC-107-951-108

J4-6

Appendix J5: Replacing Firmware on the
CPM:Boa1rd
,

'

S1'A1'it;~~CTJUClTt C;;''tJ~'f:JB.

CAUTION:
tHE UNIT
," WHaN THECO,~.i:~~»~.(}~,,~~/tJ~''1(>u hegin ·this
section, y~_t~':'~fi"eFqfX!t'-tt4(trt~ti:pre¢"tlons given in
ApperJdix J1.
"

From timetc):;~~~may beaP{tQ~,c~~ to.up~e the boards in the INTERVIEW.
Correct proe~~s1<)f ellcanging a 'Pa()~aT~~ted ift,'thi$ section.

J5.1
Wheal reptoving or installing PRO¥s, ~e car~' to~~Oid .generating static electricity.
bending,.,r breaking pins. and making impr~.~Meetions.

~e~ntingstatieelectrieity is.~ntial

~~~r precautioosgiven, in

and is covered in Appendix J1. Taking

dmt section will protect the sensitive components.

fll):_ftt,~8rQ" Pil1_

.s..•

In~Yid.t.d.pins .qn~r~r or PROM can easily bend or break. Attaching
or.tacmg.~·•
~canY as possible and aligning them properly will
a.lp: p~Wht ~P t.6th;e·pins.

CC) Improper

ConneoI,,.$

Improper connections can,cause system self-test errors as well as damage to the
components. You can avoid improper connections with proper alignment of the
pinsl Be certain each indiYidual pin is secure in its corresponding socket.
Always align the PROM with its notched end above the notched end of the

sodiet. See Figure 35-2.

J5-1

INTERVIEW 7000 Ssr/esAdvanoed Programming: ATLC-107-951-108

Mechanioal
Fan
(DANGER)

Slot 2: GBM Board

Slot 3: CPM SOard
Slot 4: PCM ~rd
Slot 5: FEB Board
Slots 7.8 & 9: MPM Boards

Area behind
LED Display
(DANGER)

Hard
Disk
Drive

Figure J5-1 Four cable connections are detached 10 remOVe the CPM board from slot 3.

J5-2

J5.2 Remove the CPM ,Board
(A) Locate the Board
Read ~dix J2 for instructions on removing the cover and for information on
the.4tterior ~yout of ~e, INTERVIEW. Refer to Figure lS-1. The CPM board
is , . the,tllkd $lot from~,Jeft.
,

in;

(8)

,

~

'

.,'

,

",~•. ~rourJ~t~"~
~:. ~lUin
the,' umti&O~!:"'\~~t,ie
mat .and you are wearing a grounded
...
'"
....>.
~mjp

Tot.~vetbe cpM.l'~~ij:~~t1love(he caJl~.~"'oun,dingit and attached
toitl:pisco~·tlle\~~:: ·'i.~:~/~:~tl~;~~·;rQY .beeasUy removed
Withl;~ .Ie clip hol.i:~~ . ..~l\ .
' ,.t/~diu, onto its. edges.
fJQN0'J7PULLi~N~,:;~~~~~~~ ............ < jt~~ the
<»Il~r&,;lf ~d()~.~.~,~lCc;iiP
:also
·worK.·
' . . " ',.,'" '" .... hGld~.·al)~$creW~wUl
"
.

CArnION:. l/",,~~~~~~rl~('t~ ,t~:t.f)f tkeblatk
mo"nting.I:f!~k .'~'~~~ut"k ,the ~~. (j!!~l!;~q(I~fb) as your

leveragepimt. .A,~:fJifw~'r.ae~.$qJtli,,;f!p'f,fF(Jsot other

components to pry'i'lie.'C#rileClf8S i.e;

" .

Refer to Figure J5-1 to locate the four connectors to be detached-two from
cables extending from the hard disk drive and one each from two small jumper
cabl,s~ The two Uosn·tbeJw:d disk dri'ie ar~Ulttach.cto the PCM board in slot
4. One jumper cable if attacbed to the GBM board in slot 2 and the other is
attaC::hed to the CPM board in slot 3. Remove these four connectors and fold
the cables back out of the way.

(e) Remove the Board
C.AflTION; .Ilo. notltold 4Ilyboar4by its.golde4ge connector.
Hold it by the sI~:s, N~VBR,tqqching the components.
'.

,

".,

"

'/'

f'

bf~ningto PijureJS-l.loeatetbe.,CPM boardw.slot :; and remove it by

crasPtnl me .top~\e~..<(t'ftlJypu1lit straigllt up and out. and holding
the board by itS side ed&~. pla~ it on the aaU-static mat.

J5-3

IryTERVJEW 7000 Series Advanced Programming: ATLC-107-951-10B

Fiaure J5-2 PROM GA and PROM OB are located on the upper left side of the CPM
board.

JS.3 Exchange the PROMs on the CPM Board
(A) Locate the PROMs
The PROMs to be changed are located in the upper left-hand comer of the
CPM board. one above the other. Refer to Figure J5-2. In the INTERVIEW
7000 and 7200 TUkBO, they are identified as 9,SiGA-IOIX and 951GB-102X;
in the INTERVIEW 7500 and 7700 TURBO. they are identified as 9S1GA-IIIX
and 95JGB-112X. (The X refers to the present release level and this last letter
will change for each new PROM~) Note that the PROM with GA in its
identification number is always in the upper soeket and the PROM with GB in its
num~r is always in the lower one.

J5-4

(B) Remove the PROMs
The ,PROMs may be removed with an IC clil' holder. grasping the ends of the
PROM and liftlngitas ittaight up as possible. If an Ie clip is unavailable. a
blade screwdriver may be used. Do not use any component on the board to pry
up the PROM with the screwdriver. Place the screwdriver under the smaller
edge, of the PROM and gently maneuver the blade in a rocking. semi-circular
motion to loosen the PROM pins as evenly as possible.
Place the old PROM in the packing material in which the replacement PROM
was sent for its retUrn to the AR. Division. (See Appendix F. Packing and
Shipping Instructions.)

(C) Install the New PROMs
To ~stall each replacement PROM. refer to Figure J5-2. After examining the
PROMs to make sure the two rows of PROM pins are parallel. notice that one
end of each PROM has a notch in it. Bach notch has a corresponding one in
that ,PROM's socket on the board. Align the notches as well as the pin.s and
their corresponding holes. Again. the PROM with OA in its identification
number goes into the upper socket and the PROM with OB in its number goes
into the lower one.

JS.4 Replaoe the Board
(A) InstFlIl the Board In the Appropriate Slot
Replace the board in slot 3 in the same manner in which you removed it. Take
care to hold it ooly by the edges. Gently slide it into its connector.

(8) Reconnect the Cables
The cables should bereconneeted in the reverse order in which you
disconnected them.. First. replace the smallest jumper cable from the PCM
board to the CPM board. Next. replace· the larger jumper cable from the FEB
board to the OBM board (in slot 2). Finally, reconnect the two cables from the
hard disk drive to the PCMboard (in slot 4).

JS.S Test tbe UnH
Before replacing the cover. review your work to be certain you have followed all the
instructions correctly- Follow procedures in Section J3.4 to replace the cover (as a
safety m.sure before you test the unit) as well as to test the new firmware in a
power-up belere you secure the cover.
If the seU! TEST ERRORS: tine shows anything other than NONE and you are installing
the CPM: board. try reinstalling the PROMs. 00 to the beginning of this section
(AppencI.bc. J5) and carelully follow the same precautions and instructions given.
Replace the cover and power up the unit again so it can perform the self test once
more. If'the self test still gives errors, call Customer Service.

JQ;..5

INTERVIEW 7000 Series Advanc.d Programmlna: ATLG-1Q7...951 ... 108

JS.6 Secure the Cover
When the SELF TEST ERRORS: line shows NONE, place the unit on its back and
replace the six screws to hold the cover secure.

J5-B

~1
, I··

A.ppandix J6: Installin:g Hard Disk Drive
(OPT-951-91-1)
,-

-,

CAUfION: STATIC ELECTRICITY CAN DAMAGE THE UNIT
WH~N THE COV1EJ(.1S RBMOYED~ Bt/ore you begin this
sectiM. you lDMM take the proper anti-siatic precautions 8iven in
C

Appendix J 1.

Refer to AppendiX Section 12.1 for wvetremovaI information and to Appendix Section J2.2
for a description of the interlorlayout.

NOTE: Your unit will not. have the. e~les.a~oss the top of the
hard drive bracket~we win ~ the.si~later ~Nor will it nave
MPM boards in slots 7 and S. as ~.J2~1 indicates, unleSs
you have the optio~~~M boards fDstaned.
OPT-9S 1-0 1-1.i Wmoaestrer.:2(f·;Me.~,~~ ~f' tsfbtlNTmtVIEW 7000 ana 7200
TURBO units. Installation consists of four ~eps: remoVing. the empty hard disk bracket.
securjns the. hardr'dfiy,tto the hard .$ive.

J6.1 Remove the Har4 DiSkDri". Bracket
LOQat:.e ·~e bard disk drive:brack.eultthe front of the 1eftsicle of the unit,

~s

shown

inFisur~12*1.

There is an unattached power cable with a four pin female connector behind this
bracket. This cable wiD &lye power to the hard drive once it is installed. For now.
move it ~owards the back and outside of your unit. clear of the bracket.
There ar, five screws holding this bracket in the unit-two small Phillips screws
toward tlie front outside of the bracket and three standard-head captive screws
holding, ~e bracket to the bottom of the unit. as shown in Figure J6~1. Remove the

. •1

. INTERVIEW 7000'$!,/8$ Advanced ProgrammIng; ATLC-107-951-108

two small screws and loosen the three captive screws on the base of the bracket-one
is in the front and the other two are in the back. Then lift the bracket straight up
and out of the unit.

Phllllps..n.ad
Screws
Captive

Screw
(front)

./

0 - - .. .....-

~

.

'

, .. '

.. ' '~
.
......, .. ""

,

,

Captive

Sorews--(bade)

Figure J6-1 Hard disk drive bracket. Note placement of serews.

J6.2Secure the Hard Disk Drive in the Bracket
Remove. the .Winchester 20 Megabyte Hard Disk Drive from its packing material.
Notice one side of the drive has exposed components. This side will remain exposed
when you place it in the bracket. Slide the drive into the bracket with the
component side of the drive facing out on the open side of the bracket, as shown in
Figure J6-2. ..
.'
,
'Use the ··four Phillips-head screws included.in your installation kit ,to mount your hard
drive into the bracket. Insert and secure two of these mto. the top of the bracket
and the other two into the bottom of the bracket.

J6-2

Appendix J6 Field Service: Installing Hard Disk Drive

WInchester
Hard Disk Drive
(component side)

~

Phillips-head
Sorews

Power
Supply
connector

\~

Wlnohester B
PL-951-44-1-A
oonnector

t-...

- .1\&

Winohester A
PL-951-43-1
oonnector

t-...

Phlll'lps-nead
Screws
(top and bottom)

Figure J'*2 Slide the Winchester hard disk dtive into the bracket with the
component side exposed and secure the drive in the bracket with the four
Phillips-head screws provided.

J6.3 Replace the Bracket with the Hard Drive into the Unit
Place the hard drive and its bracket in the INTERVIEW 7000 or 7200 TURBO by
sliding it down vertically in the same position that the empty bracket had occupied.
The exposed side of the bracket and hard drive should face into the unit. Secure
the same· five screws you released in removing the bracket: three captive screws to
the base ·of the unit and two Phi1Ups screws on the outside of the bracket.

J6.4 Connect the Cables
There are three cables to be connected: the power cable already in your unit and
the two qables provided in the installation kit. See Figure J6-2 for the locations of
the male connectors on the back of the hard drive.

J6-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

Locate the power cable (with the four pin female connector) behind the hard drive.
With the white wire on top and the red wire toward the bottom, plug the connector
into the back near the top of the hard drive.
The two cables provided in the installation kit will connect the hard drive with the
PCM board in slot 4 as shown in Figure J2-1. First. note the cables are folded for a
proper fit. Next. examine the connections on the cables. In each case the end near
the fold is a female slot connector (which connects to the back of the hard drive)
and the other end is a female pin connector (which connects to the PCM board).
Attach the smaller of the two cables. labeled "WINCHESTER B. PL-951-44-1," to
the smaller male slot connector on the top of the back of the hard drive. Connect
the other end of this cable to the smaller male pin connector on the top of the PCM
board, taking care the align the pins in their proper holes. In the same manner,
attach the other cable. labeled "WINCHESTER A, PL-951-43-1," to the larger
male slot connector on the lower back of the hard drive. Connect the other end of
this cable to the larger male pin connector on the top of the PCM board.
Your installation of OPT-9S1-01-1 is complete. It is recommended that you test
your unit after installing your hard disk before you begin operations again.

J6.5 Test the Unit
Before you completely secure the cover. it is suggested that you test your unit to
make certain that it functions after this installation of the hard disk drive. First,
replace the cover.
Grasp the cover with the latch area to the front facing you. Make certain the la~ches
are recessed as far as they can go into the cover and their hooks are not beyond the
edge of the cover. Slide the cover down. Take care that the two cables to the hard
disk drive are not being pinched or damaged by the cover. (Some models may
contain a small. removable, protective plastic sheet to help shield the cables from the
cover.)
Now you can safely test the unit. For this test you must power the unit. Reconnect
your power cable. tum on the unit. and check for the system self-tests.
The words "System RAM test now accessing all RAM :CPMaMOMIM21" appear on
your screen. indicating that the first self test for the system is being performed.
Following this frrst test are the tests for the rest of the system. The INTERVIEW
prompts the user as each test is passed: RAM. timer. DMA. all MPMs, and 32-bit
timer.

J6-4

Apoendix J6 Field Service: Installing Hard Disk Drive

The statement "The unit has passed ALL system tests" should appear after these
tests. The screen repaints as illustrated in Figure J6-3.
The

line should show NONE and the OPTIONS: line should display
If the self test produces an error, try reinstalling the
hard drive. Go to the beginning of this section and carefully follow the same
precautions and instructions given. Replace the cover and power up the unit again so
it can perform the self test once more. If the self test still gives errors, call Customer
Service.
SELF TEST ERRORS:

01-1 as shown in the figure.

If the start-up screen is blank or the front-panel LEDs are not red or green (except

for the REMOTE and FREEZE LEDs), the connectors may not be attached
properly. Try reconnecting them again.

**

INTERVIEW

7000

**

DISKS:
PROCESSORS:

I

SELF TEST ERRORS: . . . .
Press:
[PROGRAM) to enter the menu page
[RUN]
to run the default program
Software
Firmware

Version:
Version:

7.00
5.00

OPTIONS: 01-1
TIM: RS-232/V.24
Copyright (e) 1987, 1989
Telenex Cor oration
Figure J'-3 INTBRVIBW 7000 (with OPT-951-01-l) screen after self test.

J6.6 Secure the Cover
Place the unit on its back once again and replace the six screws to hold the cover

secure.

J6-5

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

J6-6

Aependix J7 Field Service: Servicing Other Components

Appendix J7: Servicing Other
Components
Other components of the INTERVIEW 7000 Series may require changing or modifying.
Those changes an~ modifications will be documented in this section.

J7.1 Changing the Dual Floppy Disk Drive Bracket
If either ~jection button of your floppy disk drives tends to stick when you operate

the drive, you can eliminate the problem by changing the bracket for the dual floppy
disk drives. While this is a simple operation, there are certain steps you must follow
to insure proper installation.
First you must prepare the drives for the exchange. Then. you will disconnect the
power source from the drives and lift out the present bracket holding the drives.
Next you will remove the cables, exchange brackets. and replace the cables. Finally.
you will replace the disk drives into the unit and reconnect the power source cables.

(A) Prepare the Drives
To prepare the dual floppy disk drives for removal, remove any disks they
contain. This secures the eject button inside the drive so it won't dislodge upon
removal of the unit. Locate the cable which attaches the dual floppy disk drives
to the PCM board. Detach the connector from the board.

(B) Disconnect the Power Source from the Drives
Locate the small round cables which connect each drive to the power supply.
They are found at the lower back of the floppy disk drives. Disconnect them
from the drives.

(e) Lift. out the Present Bracket

,.~~.
I .

To prepare the present bracket for removal, locate the four captive screws which
secutethe bracket to the chassis. Using a common blade screwdriver. loosen
the~ four screws from their bosses. These screws will not come out; loosen
them sufficiently to release the bracket from the chassis.

i

J7-1

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

Grasp the sides of the bracket and slide it towards the back of the chassis.
freeing the eject buttons and the drives from the front panel slots. Then lift the
drive assembly up and out of the unit.

(D) Remove the Cables
The dual floppy disk drives have a common cable which you previously detached
from the PCM board. Remove the cable from the back of the disk drives.
taking care not to damage the cable. Lift the connectors straight off the
connecting pins. For reference, this cable is labeled "PL-951-42-1-A."

(E) Exchange the Brackets
In this next step, mark the disk drives so that you are certain to keep them in
the same positions in the new bracket as they presently sit in the old bracket.
U sing a common blade screwdriver, unscrew the four small screws on the top of
the bracket and the four small screws on the bottom of the bracket. Place both
brackets upright next to each other. Slide out one disk drive and place it the
same position in the new bracket. Similarly. place the second disk drive in the
new bracket.
At this pOint, you will replace the four top screws. turning them just enough to
catch the drive in the bracket. One or two turns will suffice on each screw.
Tum the assembly over and attach the four bottom screws in the same manner.
Place the assembly upright once again. aligning it with the eject buttons to your
right. The drives should still be moveable in the bracket. Grasp the drive
closest to you and move it as far to the left and away from you as it will go.
Tighten the top two mounting screws for that drive. Follow the same procedure
for the drive farthest from you.
Tum the assembly over, keeping the eject buttons on your right. Grasp the
drive closest to you and pull it towards you. Tighten the bottom two mounting
screws for this drive. Follow the same procedure for the drive farthest from
you.

(F) Replace the Cables
Attach the cable to the back of the disk drives. Notice that these cables are
"keyed." (Use Figure J3~1 as a reference.) With the eject buttons faCing you,
wrap the cable around the drive so the cable fold is on the right side of the
drive.

(G) Replace the Dual Floppy Disk Drives into the Unit
Check the four bosses which hold the captive screws securing the bracket. If
the threaded insert is not· flush with or lower than the top of the boss, push it
down inside the boss with the tip of a hot soldering iron.

J7-2

.~!.~
. ,

APDe,ndix J7 Field Service: ServiCing Other Components

~~

,

;

Making sure the power cables you first disconnected are pushed out of the way.
place the floppy drive assembly into the unit. Slide it forward. positioning the
eject buttons and drive openings into the front panel slots. Tighten down the
four captive screws and test the mechanical operation of each disk drive by
inserting a floppy disk and then ejecting it.

(H) Reconnect the Power Source Cables
Locate the connecting pins for the power supply cables on the bottom of the
rear of each floppy disk drive. Attach these cables to their connectors.

J7.2 Secure the Cover
Grasp the cover with the latch area to the front facing you. Make certain the latches
are recessed as far as they can go into the cover and their hooks are not beyond the
edge of the cover. Slide the cover down. For the INTERVIEW 7500 and 7700
TURBO-and those INTERVIEW 7000s and 7200 TURBOs with the optional hard
drive-take care that the two cables to the Winchester hard disk drive (on your left.
directly behind the handle) are not being pinched or damaged by the cover. (Some
models may contain a small, removable, protective plastic sheet to help shield the
cables from the cover.)
Place the unit on its back once again and replace the six screws to hold the cover
secure.

J7.3 Return Parts to AR Division Factory
Any parts which need to be returned to the AR Division should be properly

packaged. Contact Customer Service for a RETURN AUTHORIZATION (RA)
number.

Customers outside the Washington D.C.
Greater Metropolitan Area

1-800-368-3261

Local customers

644-9190

The RAnumber should be posted on the outside of the package of all equipment
returned. for repair. The RA number, as wen as a description of the problem, should
be cited in all documentation, written correspondence, or telephone conversations
concerning the specific repair.

J7-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

International customers should address the shipment to
Telenex Corporation, AR Division
A TIN RA number

clo Emery Customs Brokers
lOlA Executive Drive
Sterling. Virginia 22170
U.S.A.

NOTE: For customs purposes, international customers MUST
identify the country of origin for returned equipment on the pro
forma invoice. When returning an individual part. use the
country of origin listed on the part.

Domestic customers should address the shipment to
Customer Service
Telenex Corporation
AR Division ATIN RA number
7401 Boston Boulevard
Springfield, Virginia 22153
U.S.A.
Consult Appendix E for additional information on returning parts to the AR Division
Factory.

J7-4

Appendix K C Language Summary

Appendix ·K-- C Language Summary
,

[The following material is adapted from the appendixes of the Proposed C Standard (ANSI
document X3111/86-098) with certain additions to describe the INTERVIEW implementation
of C. The appendixes are not a part of the American National Standard. Information
presented is collected from the Standard but is not necessarily complete.]
[For more information on C language and syntax. consult Section C of the Proposed
Standard.]

K.1

LANGUAGE SYNTAX
[Editorial comments which appear in this section but are not part of the proposed
standard ·are enclosed in non-italicized square brackets.]
In the syntax notation used in this section. syntactic categories (non-terminals) are
indicated by italic type. and literal words and characters (terminals) by bold type.
[These items have no sub-categories.] A colon following a non-terminal introduces
its definition. Alternative definitions are listed on separate lines. except when
prefaced by the words "one of." An optional symbol is indicated by the subscript
opt [here, represented as [opt1 J. so that
{ expression {opt] }

indicates an optional expression enclosed in braces.

K.1.1

Lexical Grammar

K.l.1.1 Tokens

A token is a minimal lexical element of the language. [Categories of tokens
are given below. Each of these categories is further described in a separate
sub-section. ]
token:

{~,
i'

keyword
identifier
constant
string-literal

K-1

INTERVIEW 7000 Series Advanced ProgramminQ: ATLC-107-951-10B

operator
punctuator
K.l.l.2 Keywords

[These words (entirely in lower-case) are reserved due to their special
meanings.]

keyword: one of
auto
break
case
char
const
continue
default
do

double
else
enum
extern
float *
for
goto
if

int
long
register
return
short
signed
sizeof
static

struct
switch
typedef
union
unsigned
void
volatile
while

[* The reserved word float is not used in the INTERVIEW implementation
of C.]
[The following two words are reserved in the INTERVIEW implementation.1
waitfor-

task
K.l.1.3 Identifiers

An identifier is a sequence of nondigit characters (including the underscore
and upper-case letters) and digits. An identifier may not consist of the
same sequence of characters as a keyword. [An identifier should also be
distinct from user functions or library functions.]
[Essentially. identifiers refer to variables, functions, labels, and various
user-defined objects. J

identifier:
nondigit
identifier nondigit
identifier digit
nondigit: one of
abcdefghijklm
nopqrstuvwxyz
ABCDEFGHIJKLM

N 0 P Q R STU V W X Y Z
digit: one of
o 123 4 S 678 9

K-2

AppendIx K C Language Summary

K.1.1.4 Constants
[Constants may be any of the basic allowable data types. Floating point
constants are not supported.]

constant:
integer-constant
enumeration-constant
character-constant
fractional-constant :
digit-sequence [opt] . digit-sequence
digit-sequence .
exponent-part:
e sign [opt] digit-sequence
E sign [opt] digit-sequence
sign: one of
+ digit-sequence .digit
digit-sequence digit
integer-constant:
decimal-constant integer-suffix [optJ
octal-constant integer-suffIX (opt)
hexadecimal-constant integer-suffix [opt]
decimal-constant:
nonzero-digit
decimal-constant digit
octal-constant:

o
octal-constant octal-digit
hexadecimal-constant:
Ox hexadecimal-digit
OX hexadecimal-digit
hexadecimal-constant hexadecimal-digit
nonzero-digit: one of
123456789
octal-digit: one of

o

123 4 5 6 7

K-3

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

hexadecimal-digit: one of
o 123 4 5 6 7 8 9
abc d e f

ABC D E F
integer-suffix:
unsigned-suffix long-suffix [opt}
long-suffix unsigned-suffix [opt]
unsigned-suffix: one of
u

U

long-suffix: one of
1 L

enumeration-constant:
identifier
character-constant:
'c-char-sequence'
c-char-sequence:
c-char
c-char-sequence c-char
c-char:
any character in the source character set except
the single-quote '. backslash \, or new-line character
escape-sequence

escape-sequence: one of
\' \" \? \\
\0

\00

\000

xh \xhh \xhhh
\a \b \f \n \r \t \v

K.1.1.S String literals

A string literal is a sequence of zero or more characters enclosed in double
quotes. as in "xyz".
A double quote within a string literal is represented by the escape sequence
\".

string-literal:
«s-char-sequence [opt)"
s-char-sequence:
s-char
s-char-sequence s-char

K-4

~,

.

N'P,endlx K C Language Summary

I

l

s-char:
any character in the source character set except
the double-quote ", backslash \, or new-line character
escape-sequence
K.1.1. 6 Operators
An operator specifies an operation to be performed that yields a value.
[An operator is a symbol that tells the compiler to perform specific
mathematical or lOgical manipulations. J

operator: one of
[ ] ( ) .->

++ -I "A> «

&

...

»

+ ... - ! sizeof
< > <= >= ==

1=

A

I

&&

II

?

= *= 1= %= += -= «= »=

&=

A=

1=

, # ##

K.1.1. 7 Punctuators
A punctuator is a symbol that has independent syntactic and semantic
significance but does not speclfy an operation ... that yields a value.
Depending on context. the same symbol may also represent an operator or
part of an operator.

punctuator: one of
[1 () {} til.: =; ..• 1

K.1.2

Phrase structure grammar

K.1. 2.1 Expressions
An expression is a sequence of operators and operands [variables and
constants1 that specifies how to compute a value or (in the case of a void
expression) how to generate side effects.

primary-expression:
identifier
constant
string-Uteral
( expression )
post/ix-expressJon:
primary-expression
postfIX-expression [expression J
postfix-expression (argument-expression-list [opt])

K-5

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

postfix-expression . identifier
postfix-expression -> identifier
postfix-expression ++
postfix-expression
argument-expression-!ist:
assignment-expression
argument-expression-Jist , assignment-expression
unary-expression:
postfix-expression
++ unary-expression
-- unary-expression
unary-operator cast-expression
sizeof unary-expression
sizeof ( type-name )
unary-operator: one of
&

•

+

cast-expression:
unary-expression
( type-name) cast-expression
multiplicative-expression:
cast-expression
multiplicative-expression * cast-expression
multiplicative-expression I cast-expression
multiplicative-expression % cast-expression
additive-expression:
multiplicative-expression
additive-expression + multiplicative-expression
additive-expression - multiplicative-expression
shift-expression:
additive-expression
shift-expression « additive-expression
shift-expression » additive-expression
relational-expression:
shift-expression
relational-expression
relational-expression
relational-expression
relational-expression

K-6

< shift-expression
> shift-expression
<= shift-expression
>= shift-expression

Appendix K C Language Summary

equality-expression:
relational-expression
relational-expression
equality-expression
equality-expression != relational:"'expression

==

AND-expression:
equality-expression
AND-expression &. equality-expression
exclusive-OR-expression:
AND-expression
exclusive-OR-expression
inclusive-OR-expression:
exclusive-OR-expression
inclusive-OR-expression

A

I

AND-expression

exclusive-OR-expression

logical-AND-expression:
inclusive-OR-expression
logical-AND-expression &.& inclusive-OR-expression
logical-OR-expression:
logical-AND-expression
logical-OR-expression II logical-AND-expression
conditional expression:
logical-OR-expression
logical-OR-expression ? expression

conditional-expression

assignment-expression:
conditional-expression
unary-expression assignment-operator assignment-expression
assignment-operator: one of
= *= 1= %= += -= «= »= &= A= 1=
expression:
assignment-expression
expression , assignment-expression
constant-expression:
conditional-expression

~.
I

K-7
--_._-----_._---------_ .. _--_._---

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-10B

K.1. 2. 2 Declarations
A declaration specifies the interpretation and attributes of a set of identifiers_
A declaration that also causes storage to be reserved for an object or
function named by an identifier is a definition.

declaration:
declaration-specifiers init-declarator-list [opt];
declaration-specifiers:
storage-class-specifier declaration-specifiers [opt]
type-specifier declaration-specifiers [opt]
init-declarator-list:
init-declarator
init-decLarator-list , imt-declarator
init-declarator:
declarator
declarator = initializer
storage-class-specifier:
typedef
extern
static
auto
register
type-specifier:
char
short
int
long
signed
[float not supported]
unsigned
double
const
volatile
void
struct-or-union-specifier
enum-specifier
typedef-name
task-specifier
[The last type-specifier in the list above. task-specifier, is specific to the
INTERVIEW implementation and is not standard C.]

K-8

'I'

Appendix K C Language Summary

struct-or-union-specifier:
struct-or-union identifier {opt] { struct-declaration-list }
struct-or-union identifier
struct-or-union:
struct
union
struct-declaration-iist:
struct-declaration
struct-declaration-list struct-declaration
struct-declaration:
type-specifier-list struct-declarator-list,'
struct-declarator-list:
struct-declarator
struct-declarator-list
struct-declarator:
declarator
declarator [opt]

j

struct-declarator

constant-expression

enum-specijier:
enum identifier {opt] { enumerator-list }
enum identifier
enumerator-list:
enumerator
enumerator-list , enumerator
enumerator:
enumeration-constant
enumeration-constant

=constant-expression

declarator:
pointer [opt] dec1arator2
declarator2 :
identifier
( declarator )
declarator2 [ constant-expression {opt] ]
declarator2 ( parameler-type..,./ist )
declarator2 ( identifier-list [opt])
pointer:
,~
I

,

,

,;

,. type-specijier-list loptJ
,. type-specifier-list [opt} pointer

K-9

INTERVIEW 7000 Series Advanced Programming: ATLC-107-9S1-108

type-specifier-list:
type-specijier
type-specIfier-list type-specifier
parameter-type-list:
parameter-list
parameter-list

I

.......

parameter-list:
parameter-declaration
parameter-list , parameter-declaration
parameter-declaration:
declaration-specijiers declarator
type-name
identifier-list:
identifier
identifier-list

I

identifier

type-name:
type-specifier-list abstract-declarator [opt]
abstract-declarator:
pointer
pointer [opt] abstract-declarator2
abstract-declarator2 :
( abstract-declarator )
abstract-declarator2 [opt} f constant-expression {opt] 1
abstract-declarator2 {opt] ( parameter-type-list (opt])
typedef-name:
identifier
initializer:
assignment-expression
{ initializer-list }
{ initializer-list , }
initializer-list:
initializer
initializer-list • initializer
task-specifier:
task-identifier { task-body}
task { task-body}
task-identifier

K-10

Appendix K C Language Summary

task-body:
external-definition
layer-declaration
task-body external-definition
task-body layer-declaration
layer-declaration:
#pragma layer integer-constant
K.1. 2. 3 Statements

A statement specifies an action to be performed.

statement:
labeled-statement
compoUlld-statement
expression-statement
selection-statement
iteration-statement
ju~-statement

wait/or-statement
[The last statement in the list above. wait/or-statement, is specific to the
INTERVIEW implementation and is not standard C.]

labeled-statement:
identifier : statement
case constant-expression
default : statement

statement

compound-statement:
{ declaration...,list {opt} statement-list [opt] }
declaration-list:
declaration
declaration-list declaration
statement-list:
statement
statement-list statement
expression-statement:
expression [opt} ;

f1t\
i "

f

selection-statement:
if ( expression ) statement
if ( expression ) statement else statement
switch ( expression ) statement

K-"11

INTERVIEW 7000 Series Advanced Programming: ATLC-107-951-108

iteration-statement :
while ( expression ) statement
do statement while ( expression ) ;
for ( expression [opt} ; expression [opt}
statement

expression [opt})

jump-statement:
goto identifier ;
continue ;
break
return expression [opt] ;
waitfor-statement:
waitfor { }
waitfor { waitfor_list }
waitfor-list:
expression : statement
waitfor_list expression: statement
K.1. 2.4 External definitions

file:
external-definition
file external-definition
external-definition:
function-definition
declaration
function-definition:
declaration-specifiers {opt} declarator function-body
function-body:
declaration-list [opt] compound-statement

K.1.3

Preprocessing directives
[These are instructions to the compiler included in source code.]
The implementation can include sections of program text. conditionally
include other source files. and replace macro's.
preprocessing-file:
group
preprocessing-file group

group:
group-part
group group-part

K-12

~"
,

Appendix K C Language Summary

group-part :
tokens [opt] new-line
if-section
control-line
tokens:
tolcen
tokens token
if-section:
if-group eli/-groups [opt] else-group [opt] endif-tine
if-group:
1/ if constant-expression new-line group [opt]
1/ ifdef identifier new-line group lopt}
1/ ifndef identifier new-line group {opt1

eli/-groups:
eli/-group
elif-groups elif-group
elif-group:
1/ elif constant-expression new-line group {opt]

else-group:
1/ else new-line group {opt]

endif-line:
1/ endif new-line

control-line:
1/
1/
1/
1/

include  new-line
include «x-char-sequence" new-line
define identifier tokens [opt] new-line
define identifier lparen identifier-list [opt]) tokens {opt]

new-line
1/
1/
1/
:#

under identifier new-line
line digit-sequence string-literal [opt} new-line
pragma x-char-sequence new-line
new-line

x-char-sequence:
x-char
x-char-sequence x-char
x-char:
~,

Ii

!
,'

any character in the source character set except the
new-line character

j

K-13

INTERVIEW 7000 Series Advanced ProgrammIng: ATLC-107-951-108

lparen:
the left-parenthesis character without preceding white space

new-line:
the new-line character
K.1.3.1 AR pragmas
#pragma hook hookjype hook_text
hook_type: decimal-constant

hook_text: string-constant
#pragma layer integer-constant
#pragma nowarn
#pragma object objectJile_name
objectJile_name: string constant
#pragma tracebuf trace_buffer_declaration_list {opt]
trace_buffer_declaration_list:

trace_buffer_declaration
trace_buffer_declaration_list trace_buffer_declaration
trace_buffer_declaration:
decimal-constant decimal-constant

* decimal-constant

K-14

ADDENDUM

Index To ADD-951-10

A

Clock
signal. 1-13
See also Speed
time-of-day, 1-14
See also DatelTime Setup
Compilation
error diaenostics. 2-15
fields that can be modified without causing
recompile. 2-16
rerun without recompiling. 2-15
seven phases. 2-14

Allocating disk space, 12-3
AUX 110, connector, 1-9
AUX leads. 1-9
Auxiliary TTL connector" 1-9

B

Conditions. EIA. fails to come true. 2-19
Connectors
back panel, 1-7
power. back panel. 1-7
Test Interface Module. 1-10-1-16
Control leads. playback. 2-17
of bit-image data. 2-17
of character data. 2-17

Back panel, 1-7
fan. 1-8
fan filter. clean to prevent overheating. 1-9
frequency selection, 1-8
Input/Output connectors. 1-9
AUXILIARY TIL. 1-9
CRTIRGB. 1-9
internal MODEM, 1-:9
PRINTER. 1-9
REMOTE RS-232, 1-9
RS-170 composite video. 1-10
onloff (power) switch. 1-8
power connector. 1-7
voltage selection. 1-7

CRT/ROB connector f 1-9

D
Data acquisition tracks. 12-3

BCC Setup. overview of screen, 2-11
BERT Setup. overview of: screen, 2-11

Data capture. 2-17
See also Playback; Recording data
RAM. data storage. 1-12

Boot-up
creating a user interface. HRD/usr/user_intrf.

Data plus leads, failure of leads to transition.
2-20

2-4

Data source, connection to. 1-16

running default prograUl, lusr/default. 2-5
system disk, 2-3

Data Transfer. Disk Maintenance. menu
selection. 12-7
Data transfer, INTERVIEW S, 10. 15 PLUS
data. 12.... 10-12-16

c
Capture Memory. field on Record Setup menu.
12-9
.
Character buffer. Storage :capacity, 1-12

Default menus. how to change. 2-6
Directories
lusr. 2-4
lusr/default. 2-5

MAY 1990

ADDENDUM

Disk drives. 1-5
drive references and priority, 12-3
microfloppies
compatibility. 1-5
write protection, 1-5
microfloppy disks, storage capacity, 1-5
Winchester hard disk, 1-7

F
Fan
back panel, 1-8
clean filter to prevent overheating, 1-9
FEB Setup, overview of screen, 2-11
File Maintenance, File Maintenance screen,
overview, 2-13

Disk Maintenance, 12-3-12-16
allocating disk space. 12-3
command
Data Transfer. 12-7
Disk Summary, 12-7
Duplicate Disk, 12-10
Format Disk. 12-5
INT 10, 12-10-12-16
data acquisition tracks. 12-3
description of disks. 12-3
initializing system. INTERVIEW 7000, 2-3
installing new system software. 2-7
menu selections. 12-2. 12-4-12-16
overview, 2-14

Format Disk, Disk Maintenance, menu
selection. 12-5
Freeze LED, front panel, 1-5
Frequency selection. back panel, 1-8
From. subfield on Disk Maintenance menu.
12-8
From Disk Number, subfield on Disk
Maintenance menu. 12-10
Front end buffer
applies to playback of bit-image data. 2-17
Idle Suppress field, does not apply to
playback of bit-image data. 2-17
on playback path of bit-image data. 2-17
time ticks and EIA leads. storage of. 1-12,
2-17

Disk Name, subfield on Disk Maintenance
menu, 12-5
Disk Number. subfield on Disk Maintenance
menu. 12-5

Front panel, 1-3
function keys, 1-4
LED overlay, 1-5
LED's, 1-4. 2-17
UIA, 1-11
plasma display. 1-3

Disk Summary. Disk Maintenance. menu
selection. 12-7
Display. plasma. 1-3
Display Setup, traces, 2-20
Display Setup screen, overview. 2-11

Function keys. 1-4

Drive Type, subfield on Disk Maintenance
menu, 12-6

G

Duplicate Disk
Disk Maintenance, menu selection. 12-10
installing new system software via the
DUPDISK command. 2-7

E
EIA. trigger conditions, fails to come true, 2-19
EIA leads. storage of, 1-12
Emulation, connectors used, 1-10
Errors, recoverable, 2-16
External monitors
ROB color video connector, 1-9
RS-170 video connector, 1-10

General operation.
boot-up program, creating a user interface.
2-4
changing default menus. 2-6
common problems. 2-19-2-21
data capture. 2-17
front end buffer, 2-17
front end buffer, on playback path of
bit-image data. 2-17
initializing system. INTERVIEW 7000. 2-3
installing new system software. 2-7
overview of menus. 2-9-2-14
power up, 1-16. 2-1
rerunning a test program, 2-15
running a test program, 2-14
running default program. 2-5

MAY 1990

ADDENDUM

H

L
Layer Setup screen. overview. 2-13
Layers, passing data between. 2-20
LED's
front panel. 1-4, 1-5, 2-17
INTERVIEW status, 1-5
interface status. 1-4
U/A. 1-5, 1-11
Test Interface Module. 1-11
Line data. data capture, 2-17
Line Setup screen, overview. 2-10

Hardware, 1-3-1-16
back panel. 1-7
clock, 1-13
disk drives. 1-5
front panel, 1-3
keyboard. 1-3
operating environment, 1-14
operating positions, 1-14
physical dimensions. 1-3
power up. 1-14
storage capacity, 1-12
High speed, optimizing performance, 2-2:2

M

HRD/usr/user_intrf
affect on Start Up screen. :2-:2
boot-up program. creating a user interface.
2-4

I
Idle Suppress, field on Front-End Buffer Setup
screen. does not applY'during playback,
2-17
Initializing system software, INTERVIEW 7000,
2-3
Input/output connectors, back panel. 1-9
AUXILIARY TIL. 1-9
CRT/ROB. 1-9. 1-10
internal MODEM. 1-9
PRINTER. 1-9
REMOTE RS-232, 1-9
RS-170 composite video. 1... 10

Maximum data rates
data analysis. 1-13
data recording. 1-13
Memory. capa(;ity. 1-12
Menus. overview, 2-9-2-14
See also Separate listing. each menu name
configuring menus, 2-10
Program Menu. 2-9
Microfloppy disks
compatibility. 1-5
storage capacity. 1-12
write protection, 1-5
Miscellaneous Utilities. overview. 2-14
Mode. test mode fleld on Line Setup menu.
1-11
Modem connector
external. 1-9
internal. 1-.9
MPM errors, 2-16

Installing new system software. on hard disk.
2-7

o

INT 10, ·Disk Maintenance selection.
12-14-12-16
.
INTERVIBW transfer, IN'tERVIEW 5. 10. 15.
PLUS data. transfer ftom Disk Maintenance
screen. 12-10-12-16
lnstrun'lent. menu field on Disk Maintenance
screen. for INTERVIEW lO·ttanafer. 12~14
Internal MODEM

connec~or.

1-9

p

K
Keyboard. 1-3
See also ASCII keys:
key
function keys. 1-4

eljltry

,

Object code. rerunning object version of
program. 2-15
OnIoff (power) switch. back panel. 1-8
Operating environment. 1-14
Operating positions, 1-14
Overlay. Test Interface Module, 1-5

under each special

Physical dimensions. size and weight. 1-3
Playback
control leads. 2-17
disk data. 2-17
EtA leads. storage. 1-12
time ticks. 2-17

MAY 1990

ADDENDUM

Power connector. 1-7

Stan At Block, subfield on Disk Maintenance
menu. 12-9
Stan up screen, 2-2
Statistics menus. overview, 2-13
Strike-through's. Protocol Spreadsheet, 2-19
Syntax errors, Protocol Spreadsheet, 2-1S
Isys/fiftLhertz, file name, 1-8
System disk. boot-up. 2-3

Power switch. back panel. 1-8
Power up. 1-14, 2-1
self tests. 2-1
Printer connector. 1-9
Program key. 2-4
unit unexpectedly enters Run mode, 2-19
Protocol Spreadsheet
increasing the size of, 2-13
overview, 2-12
syntax errors. 2-15
unexplained strike-through's. 2-19

T

R
RAM. data storage, 1-12

REMOTE RS-232 connector, 1-9
Recording data
maximum rate. 1-13
with EIA lead transitions, 1-12
Record Setup. overview of screen, 2-11
Remote LED, front panel, 1-5
Resolution. display, 1-3
RGB video connector, 1-9
RS-170 video connector, 1-10
RS-232. connector, REMOTE. 1-9
RS-232N.24, test connector, 1-10
Run mode. unit fails to enter, 2-19

s
Screen buffer, storage capacity. 1-12
Self tests. 2-1
Setup menus
Bee Setup. overview. 2-11'
BERT Setup. overview. 2-11
Display Setup screen, overview, 2-11
FEB Setup. overview, 2-11
Line Setup, overview. 2-10
overview, 2-10
See also Separate entry under name of each
menu
Record Setup, overview, 2-11
Speed, optimizing high-speed performance,
2-22

Temperature, operating, 1-14
Test connectors
software control, 1-11
Test Interface Module. back panel,
1-10-1-16
TO DCE, 1-11
TO DTE, 1-11
Test Interface Module
installation, 1-14
LED overlay, 1-5
installation, 1-15
LED's, back panel, 1-11
software control. 1-11
test connectors, 1-10-1-16
Time ticks
playback, 2-17
of bit-image data. 2-17
of character data. 2-17
storage of, 1-12
TimelDate Setup, overview, 2-14
Timers, no values displayed. 2-20
TO DCE. test connector. 1-11
TO DTE. test connector, 1-11
To Disk Number. subfield on Disk Maintenance
menu, 12-10
Transmit string. does not appear on display.
2-20
Trigger conditions. BIA. fails to come true.
2-19
Trigger Setup menus
overview. 2-11
transmit string. does not appear on screen.
2-20
Trouble-shooting
data plus leads. failure of leads to transition,
2-20
data-plus-leads display, failure of leads to
transition. 2-20
layers. passing data between. 2-20

MAY 1990

ADDENDUM

overheating. 1-9, 2-21
Program key. unit une~ctedly enters Run
mode. 2-19
Protocol Spreadsheet, unexplained
strike-tbrough' s, 2.... 19
Run mode. unit fails to enter. 2-19
timers. no values displayed, 2-20
transmit string. does not appear on screen,
2-20
trigger conditions. BIA. fails to come true.
2-19

lusr/user_intrf
affect on Start Up screen, 2-2
creating a user interface. 2-4
Utilities menus. overview. 2-14
See also Separate entry under name of each
menu

v
V.35, test connector, 1-10
Video connectors
CRT/ROB. 1-9
RS-170 composite video. 1-10
Voltage selection. back panel. 1-7

Type. subfield on Disk Maintenance menu.
12-8

u

w

U/A. LED. 1-11

Unresolved reference. error message. 2-19
lusr/default
affect on Start Up screen. 2-2
boot-up menu configuration, 2-5
default program, 2-5

Winchester hard disk
installing new system software. 2-7
storage capacity, 1-12
Write protection. microfloppies, 1-5

MAY 1990

--_._----------_._-----------------------_.

-------

ADDENDUM

MAY 1990

Index A
Technical Manual Part I and Part II
Symbols

A

.. abort. overlay for BOP abort, 5-13
e coding, 59-6
• badbcc, overlay for bad Bee or FeS. 5-13
e coding. 59~6

IBl bit mask

symbol. in Receive string condition,

21-7
)) close double parens symbol, 3-5, 22-4, 25-5
-/ closing delimiter for comment. 24-13
~

don't care symbol
in Receive string condition. 21-7
in spreadsheet string search, 33-35

ta flag. 7E flag symbol, 5:-13
e coding, 59-6
@J goodbcc, overlay for good Bee or FeS. 5-13

C coding, 59-6

I

highlighted plus symbol, indicates wrap in
logical line. 26-3

lEi not equal flag syinbol
in Receive string condition, 21-7
in spreadsheet string search. for beginning of
frame, 33-35

« open double parens symbol,

3-5, 22-4, 25-5

,- opening delimiter for comment, 24-13

* pad. in Outsync Char field,

4-8

lID sync, sync symbol, 4-7. 5-13
C coding, 59-6
..... tilde symbol, 3-4, 24'""<3
Zl.

time-fill. 5-8

I (root) directory. 13-4

A Bus En, indicator on RS-485 Test Interface
Module, 47-5
Abbreviations. glossary. B-1-B-I0
Abort
adjunct to monitor-frame condition
LAPD, 39-13, 39-15
SDLe, 35-14. 35-16
X.25 Layer 2, 33-14, 33-15
adjunct to send-frame action
LAPD.39-25
SDLe, 35-27
X.25 Layer 2, 33-28
adjunct to send-string action, Layer 1 (BOP),
28-9
appended to transmit string. 8-6
defined for BOP, 8-6, 33-10. 34-14, 39-9.
40-6. 42-6, 43-7
field on Bee Setup menu, 8-12
in e, 59-6
monitor/receive condition, Layer 1 (BOP
only). 28-4
overlay. BOP only. 8-4
Absolute pathnames. files and directories, 13-5
Accumulate. layer-independent action. 27-15
Accumulate action, 17-7
may apply to current, last. minimum. or
maximum values, 17-9
not found on trigger menus. 17-8
translated into C, 62-13
used to log one hour per day over days or
weeks. 17-10
Accumulate counter, layer-independent action.
27-15
Accumulate timer. layer-independent action,
27-15
Accumulator
created by being named in Accumulate action,

27-15
printing line of tabular statistics for. 27-16

structures. accumulator_struct, 62-14
Acronyms. glossary, B-I-B-10

Index to Part I and Part II

Actions
capture memory on/off, 11-10
Enhance. control of color display, 16-5
in C. 53-12
Layer 1, 28-6
accessed via Done key, 28-6
layer-independent, 27-8-27-13
Protocol Spreadsheet, programming block,
24-8
comments in, 24-13
record onloff, 11-10
ADDR. address. trace column
SDLC, 35-7
X.25 Layer 2. 33-7
Address
adjunct to monitor/receive-frame condition
SDLC, 35-13
X.25 Layer 2, 33-14
adjunct to send-frame action
SDLC, 35-24
X.25 Layer 2. 33-25
trace field. SNA-SDLC, 36-6
Affects, field on BCC Setup menu, 8-12
Again. editor command. 26-9
Aggregate 0.703 record, 50-5, 50-26
Aggregate T1 Record. 49-5, 49-26
Alarm
field on Trigger Setup menu, 22-11
layer-independent action. 27-13
routines, sound_alarm, 69-16

Async
data setup. 4-10
sample Line Setup, 4-13
Attributes
format of 32-bit word same in Display
Window and trace buffers. 61-14
in character buffer. 59-6
in Display Window
color, 61-4
current font. 61-4
derived from the current window color and
window_modifier values, 61-35
enhancements. 61-4
mapping of %m argument to attribute
variables. illustrated. 61-33
set via %m conversion specifier in format of
displayf routine, 61-12
stored in window color and
window_modifier variables, 61-12
three bytes of attributes to one byte of data.
61-4
in trace buffer
mapping of %m argument to attribute
variables, illustrated, 61-34
updated by %m conversion in format of
tracef routine, 61-27
written via %m conversion specifier to
trace_buf.hdr structure. 61-29
less flexible set of attributes in character
buffer than in Display Window, 59-15
not available via displayyrompt routine. 61-3
AUX Control. field on Interface Control menu,
10-17
AUX 1/0. connector, 1-9

Allocating disk space, 12-3

AUX leads. 1-9

Alternate Mark Inversion. transmission
technique, 48-4, 49-3
AMI. See Alternate Mark Inversion
ANSI format. SS#7 layer 3. 43-4
Append. run-mode printer output to existing
disk file. 14-7
Array
may be initialized by a string in C, 56-29.
57-13
name of array is 4-byte address in C, 58-2
size. 56-20
ASCII
default BCC parameters~ 8-8
hex-to-display conversion table. D2-3
keyboard-to-ASCII conversion table. Dl-3
ASCII keys, in programming menus and
spreadsheet, 3-4

AUX outputs
driven on/off by spreadsheet actions, 10-9
driven on/off on Interface Control menu.
10-17
location on TIM. 10-8
onloff, Layer 1 emulate-mode action. 28-10
Auto Configure, screen in automonitor mode,
5-3
Auto Terrnn. DIP switch, on RS-485 Test
Interface Module. 47-4
Auto-indent, editor command. 26-9
Automatic OSI primitives. See Primitives
Automatic X.2S Layer 2. 33-36
Automonitor mode
setting up. 4-3
stage in autoconfiguration displayed in Status
field. 5-3

Index to Part I and Part II

updates Line Setup screen, 5-4
with no dock, speed defaults to 168 kbps,
5-4
Autosync, subfield on Line Setup menu. 4-7,
4-8
Auxiliary connector, 1-4
Auxiliary TTL connector. 1-9
A UX port controlled by e program,
68-3-68-11
Average, column on Tabular Statistics screen,
17-6. 17-11, 27-10
accumulator struct. accumulator structute,
62-13 defined. 62-14

B
B Bus En, indicator on RS-485 Test Interface
Module. 47-5
B channels. ISDN. 48-3, 48-4
B8ZS. See Binary 8 Zero Suppression
Back panel, 1-7
fan. 1-8
fan filter. clean to prevent overheating. 1-9
frequency selection, 1-8
Input/Output connector'S. 1-9
AUXILIARY TIL. f-9
CRT/RGB. 1-9
internal MODEM. 1-9
PRINTER. 1-9
REMOTE RS-232. 1...9
RS-170 composite video, 1-10
on/off (power) switch, 1-8
power connector. 1-7
vohage selection, 1-7
Baekslash. entry of inside prompt message,
27-12
Backslash (\). escape character in C string.
56-20
Bad BCC
adjunet to monitor-frame condition
LAPD. 39-13, 39-15
dce bad bee, C variable, 77-1
dte -bad -bee. C variable, 77-1
SDLC, 35:14. 35-16
dee bad bee, C variable. 73-1
dte..J>ad':-bcc. C variable. 73-1
SS#7 Layer 2
dee bad bee. C variable. 79-1
dte':-bad':-bcc. C variable. 79-1

I~x

X.2S Layer 2, 33-14, 33-15
dee bad bee, C variable, 71-1
dte':;bad':;bec, C variable. 71-1
adjunct to send-frame action
LAPD.39-25
SDLe.35-27
X.25 Layer 2, 33-28
adjunct to send-string action, Layer 1. 28-9
appended to transmit string. 8-5
as condition, 8-5
fevar bd bcc td and fevar bd bee rd, e
events, 59-2
- monitor/receive condition, Layer 1, 28-4
operational only when Rev Blk Chk
enabled. 28-4
overlay. 8-3
Basic Rate ISDN, 48-3
Baud rate. defaUlt value for remote port. 6i... 20
Baudot
hex-to-display conversion table. D2-3
keyboard-to-Baudot conversion table, D1-9
no default BeC parameters, 8-8
Bee
See also Block checking
cross between a Layer 1 and Layer 2
function. 28-4
indicated by transmit tag in header of IL
buffer, 55-7
Layer 1 condition, 28-4
operational only when Rev Blk Chk
enabled. 28-4
subfield on Trigger Setup menu, 8-5, 22-4
traee column
LAPD,39-9
Q.931.40-6
SDLC.35-10
SNA-SDLC, 36-6
SS#7 Layer 2. 42-6, 43-7
X.2S Layer 2, 33-10
X.25 Layer 3, 34-14
BERT
"force-loopback" programming example.
9-21-9-22
analyze-only mode, 9-18
automatic error injection. 9-14
enabling/disabling by softkey, 9-18
status message. 9-21
block size. 9-13
G.703.9-42
T1,9-29
clearing counters. 9-6
clearing the results screen, 9-18
counters. 9-19
five pseudorandom patterns. 9-3
algorithms, 9-3

to Part I and Part II

freeze mode, 9-17
G.703. See T1. BERT
G.703 BERT. run-time function key, 9-46
half duplex. 9-6
"receive and analyze" versus "generate"
mode, 9-7
initiating the send-receive cycle. 9-7
invert. G.703, 9-41
manual error injection. 9-18
operating mode, selected on Line Setup
menu, 9-5
pattern, G.703. 9-41
patterns, 9-7
reinitializing a running test, 9-18
relation of BERT Setup menu to Interface
Control screen, 9-7
relation of BERT Setup menu to Line Setup
menu, 9-6, 9-15
synchronous versus asynchronous. 9-15
T1. See T1 t BERT
T1 BERT, run-time function key, 9-34
test length, 9-14
G.703,9-42
T1, 9-29
BERT modes, setting up, 4-4
Begin, editor command. 26-5
Begin CAS MF w/frame containing frame align.
signal, G.703. field on Interface Control
menu, 50-24
Binary, user-defined routine that displays binary
value of byte. 58-5
Binary 8 Zero Suppression
Tl Interface Control screen, 49-26
transmission technique. 49-4
Binary,display. of cursor characters. 5-15
in relation to order of transmission. 5-15
Bipolar violations
BPV's received
G.703, statistics display, 50-28
Tl statistics display. 49-29
0.703 transmissions, 50-19
T1 transmissions. 49-26
Bisync
CRC mode, 8-13
advantage over selectable mode. 8-13
field on BCC Setup menu. 8-11
sample Line Setup. 4-13
Bit errors
G.703 BERT statistics. 9-44
T1 BERT statistics, 9-31
Bit Mask key, 3-6

Bit mask
in Protocol Spreadsheet strings, 29-3
in Receive string condition. 21-7
in Suppress field, 5-11
masking bits in C variables, 57-8, 70-2
to detect XON and XOFF only, 5-12
Bit Order/Polarity, field on Line Setup menu,
4-11. 9-16
Significance in BERT testing. 9-16
Bit order
in relation to hexadecimal notation, 5-14
in relation to pattern sync in BERT, 9-11
normal versus reverse. 4-11
Bit-image data, 11-3
playback. 11-4
Bit-robbing. T1 transmissions, 49-32
Bits
field on Line Setup menu, 4-6, 9-16
in BERT testing. 9-15
number of, in setup, 4-6
per character, default value for remote port,
67-20
Bits In Error. BERT counter, 9-20
Bitwise and (&), C operator, 57-8, 61-36, 70-2
Blnk, subfield on Trigger Setup menu, 22-7
Block
component of BERT test. 9-13. 9-29, 9-42
editor command, 26-5
Block checking
automatically on for BOP, 8-4
distinction between transmitting and evaluating
BeC.8-3
enabling BCC overlays, 4-9, 8-3.
for DDCMP
automatically on. 37-2
data BCC may be tested as event variable in
C, 37-2
header BCC only may be tested by trigger,
37-2
looking under BCC overlay, 8-4
parameters defined on BCC Setup menu, 8-6
result used as trigger condition. 8-5
Block No. field on Line Setup menu, 4-5
Block Size. field on BERT Setup menu. 9-13
Blocks In Error
BERT counter, 9-20
G.703 BERT statistics. 9-44
Tl BERT statistics, 9-31
Blocks Received, BERT counter. 9-20
Blocks received
G.703 BERT statistics, 9-44
Tl BERT statistics. 9-31

Index to Part I and Part II

Blocks Sent, BERT counter. 9-20
Blocks sent
0.703 BERT statistics, 9-44
T1 BERT statistics, 9-31
BNC. 0.703 connectors. 50-8. 50-9
BOP, synchronization and BCC parameters
always defined for. 4-:9, 8-4. 8-8
Boards

See also Field Service
packaging and returning. See Field Service
Boot-up
creating a user interface. HRD/usr/user intrf,
2-4
running default program. lusr/default, 2-5
system disk, 2-3
BPV's received
0.703. statistics display, 50-28
T1 statistics display, 49..:.29
BPV-free seconds
G.703, statistics display, 50-28
T1 statistics display, 49-29
BPVs. See Bipolar violations
BREAK, T1 test access point. 49-10
Break
C statement, 53-6. 53-13, 56-2
used to exit a waitfot. 53-3, 53-6. 53-9
transmitting a break. set tcr b. C routine,
59-14
- Break key. 26-5
Breakout panel. on Test Interface Module, 10-5
RS-449, 45-4
RS-485, 47-3
V.35.44-4
X.21, 46-4
Buffer Control Leads, field on Front-End
Buffer Setup screen, 7-5
Buffer Full
condition, Trigger Setup menus. 21-11
fevar rev buffer full, C event. 59-2
layer:independent condition. 27-5
rcv_buffer_full. C variable, 59-2

c
C, color, field on Graphical Statistics menu,
18-7
C language
array. name of array is 4-byte address. 58-2
care mask. 57-8, 60-1, 61-36. 70-2

comments. 53-10
condition clause. equivalent to trigger, 53-8
may contain multiple expressions, 53-9
constants
character, 57-7
decimal, 57-7
hexadecimal, 57-7
octal, 57-7
conversion specifiers, 61-37
O/C#U, hex character, 57-8
%b,61-12
%c.61-11
character, 56-16, 57-8
%d.61-11
signed decimal. 56-14. 56-16. 57-8
%H,61-11
%i. 61-11
%m, 61-12. 61-27, 61-30. 61-32
%0, 61-11
octal, 57-8
%p.61-11
%s. 61-11
%u. 61-11
unsigned decimal, 56-14, 56-16
%X.61-11
%x,61-11
hex. 56-14, 56-16, 57-8
data types. 56-13
char, 56-13
int, 56-13
long, 56-13
long routine returns a long. 58-3
short, 56-13
short routine returns a short. 58-3
signed, 56-13
unsigned, 56-13
void. return statement invalid with this type,
58-3
declarations
automatic. 53-14
format. 53-14, 57-2
positioning and grouping, 53-15
scope, 52-Ifi, 53-17
global, 53-17
error messages. issued by compiler and
preprocessor. A3-1-A3-16
event variables
may be created by user, 57-6
one used by translator for every spreadsheet
condition. 53-10
programming rules. 53-11. 57-4, 57-6
executable statements. location on
spreadsheet, 53-17
expressions. conditional
nonzero always true, 53-12. 58-2
zero always false, 53-12. 58-2

Index to Part I and Part II

initialization, variable must be static to pass
initialized value into waitfor statement.
53-17, 56-17
introduction to AR version. 56-3-56-15
variations from standard C, 56-3
keywords
label. equivalent to spreadsheet State, 53-2
task, 56-3
equivalent to spreadsheet Test, 53-1
placed at highest level of source code.
52-16
locating compilation errors, 56-4
main function
created by translator, 52-1
placed at highest level of source code,
52-16
nonevent variables
checked when event is signalled, 57-5
true in expressions with nonzero value,
53-12
operators
++, 58-6
->, 57-17
bitwise and (&), 57-8, 61-36, 70-2
precedence. 56-17
right shift (»), has different effect on
signed and unsigned variables. 56-15
sizeof, 56-20, 71-13, 72-17. 73-13
pointer
always 32 bits no matter what the data type.
57-11
creating a pointer, 57-11
incrementing pointers of various data types.
57-12
m.J)acket_infoytr. pointer to first data byte
in X.25 packet, 72-8
m..,ptr_to_call]ef. pointer to 0.931
call-reference field, 78-4
m.J)tr_to_info_element. pointer to 0.931
info-element field, 78-4
making a pointer to the data in a received
frame. 71-8. 73-8, 77-8
making a pointer to the data in an IL
buffer, 57-10, 63-41
pointing with subscripts, 57-12, 57-13
rcvd.J)kt_infoJ)tr. pointer to first data byte
in X.25 packet, 72-8
rh.J)tr, pointer to first byte of SNA
request/response header, 74-4
ru.J)tr. pointer to first byte of SNA
request/response unit, 74-4
string. 56-19
structure pointer, creating a structure
pointer. 57-16
thJ)tr. pointer to first byte of SNA
transmission header. 74-4

predeclared identifiers
event. 56-4
fast_event. 56-4
label. 56-4
preprocessor directives
#define. 56-5, 61-40
example. 67-15
#include. 56-6. 61-23, 61-29. 61-30, 65-3
#pragma, placed inside of task definition,
52-16
#pragma hook
defining the hook text. 56-12
format of. 56-11
hook text added to top-level main
function. 56-12
in linkable-object files, 56-11
system-generated during Compile
spreadsheet. 56-11
used to "force" a call to a routine. 56-11
using multiple hooks, 56-12
#pragma layer, used to declare a layer, 53-1
#pragma nowarn, used to suppress compiler
warnings, A3-1
#pragma object
(ormat of. 56-8
placement of. 56-8
used to combine routine definitions with
spreadsheet program, 56-8
#pragma tracebuf. used to configure size of
trace-buffer arrays, 61-26
program main. 52-1
recommended sources. 56-22
regions on spreadsheet
actions. 53-12
conditions. 53-7
enter state. 53-3
layer. 53-1
next state, 53-4
state. 53-2
summary. 53-14
test. 53-1
routines. 58-1-58-6
always followed by parentheses, 58-2
most associated with specific spreadsheet
condition or action. 58-1
nonzero return makes conditional statement
true, 58-6
not usually necessary to declare, 58-1
user-defined. 58-4-58-6
display_binary, 58-5
strcmp. 58-6
temporary..,prompt, 58-4
statements
break. 53-6. 53-13. 56-2
used to exit a waitfor, 53-3, 53-6, 53-9

Index to Part I and Part II

goto, 53-4, 53-5, 53-7. 53-13
placed inside of state loop, 52-16
used to move program control to a
different state-label. 53-2. 53-4
if. 57-4, 58-6
nonzero expressions always true inside of
if statement, 58-2
routine that returns nonzero makes if
statement true, 58-6
used in Enter State conditions. 53-4
return, 58-2
breaks out of while loop, 58-6
waitfor, 53-2. 53-4. 53-5, 53-6, 53-7,
53-9, 53-13, 56-3, 57-4
defines a set of interrupts (events). 54-1
placed inside of state loop, 52-16
variable must be static to pass value into
waitfor, 53-17, 56-17
while. 58-6
nonzero expressions always true inside of
while statement. 58-2
status variables. See Nonevent variables
storage classes, static, variable must be static
to pass value into waitfor. 53-17. 56-17
storage-class specifiers, .extern, cannot be
declared below Test level. 53-15
stream, 65-1
strings, 56-19
comparing strings. 57 .... 14. 58-6
creating a string. 57-12
non-literal characters inside strings', 56-21
nonliteral characters inside set.J)rint_header
strings. 64-8
structure. accessing an element of a structure,
57-15
syntax summary, K-I-K-14
third tier in programming hierarchy. 19-4
translator
creates automatic main function. 52-1
levels of source code. 52-16
uses external routines. 58-1
variables, 57-1-57-17
C translator, 52-1
error messages. A2-1-A2-6
C/R
adjunct to monitor/receive-frame condition.
LAPD.39-13
adjunct to send-frame action. LAPD. 39-22
Command/Response, trace column. LAPD,
39-8

,~"
I

CAL-REF-VAL, call reference value. trace
column, Q.931, 40-5
CALL, send action, X.25 Layer 3, 34-31

CALL CONF, send action. X.2S Layer 3,
34=31
CALLED, field on X.25 Packet Level Setup
screen, 34-6
CALLING. field on X.2S Packet Level Setup
screen, 34-6
CAS MF resync criteria. G.703, field on
Interface Control menu, 50-25
CAS MF syn.c criteria. G.703. field on Interface
Control menu, 50-25
CAS multiframes, G.703 frame structures,
50-31
Cable length, Tl Interface Control screen,
49-21
Cable type. Tl Interface Control screen, 49-20
Cables
connection. See Field Service
disconnection. See Field Service
null-modem cable for remote port I/O. 67-24
Call Confirm
send-packet action, X.2S Layer 3. sending
"short" version without addresses and
facilities. 34-33
sent down (as primitive) to Layer 2. 30-9
Call Request
as character data, 34-9
as entry on X.2S Packet Level Setup screen,
34-6
as packet on trace display, 34-8
send-packet action, X.25 Layer 3, 34-32
sent up (as primitive) from Layer 2, 30-9
Call Request user data, may be longer than ten
character spaces, 34-7
Call reference value
adjunct to monitorlreceive-message condition,
Q.931. 40-10
monitor/receive condition. Q.931. 40-10
trace column, 0.931, 40-5
Called address, entered in CALLED field on
X.2S Packet Level Setup screen, 34-6
Calling address, entered in CALLING field on
X.2S Packet Level Setup screen, 34-6
Capture. field on Trigger Setup menu. 22-11,
22-12
Capture data to screen (on/off)
ctl_capture_rd, C routine, 59-9
ctl_capture_td. C routine, 59-8
Layer 1 action. 28-14
Capture Memory. field on Record Setup menu,
11-4, 11-6, 11-10. 12-8
Capture memory
See also Data capture; Recording data
Freeze key. 3-11

Index to Part I and Part II

Care mask, 60-1
C device for isolating bits in a variable, 57-8
masking for status of given ElA lead, 60-2
masking to detect EIA lead change. 60-1
Carriage Return. produced by operation of
CTRL and M keys, 29-1
Carrier losses. Tl statistics display, 49-31
Cause byte
adjunct to Restart, Reset, Clear, and Reg
Confum actions. 34-36
adjunct to Restart, Reset, Clear, and Reg
Confirm conditions, 34-20
listed for Reset, Clear, and Reg Confirm
packets, 34-22
listed for Restart packet, 34-21
listed for Send Clear actions. 34-37
CCrTT
format, SS#7 layer 3, 43-4
Open Systems· Interconnection model.
20-5-20-8
See also Layers
CCSS#7. See SS#7
CD
available for triggering. 28-5
field on Interface Control menu, 10-10,
10-14, 10-15
field on RS-232 Interface Control menu, 9-4,
9-6
CD on/off, Layer 1 Emulate DeE action, 28-10
CD-off delay. 10-16
CD-on delay, 10-16
Chaining, of programs via Load Program action,
27-19
Change Directory. File Maintenance. menu
selection, 13-16
Change idle character, Layer 1 action, 28-12
Channel, ISDN, ISDN Interface Setup selection.
48-10
Channel mode
G.703. field on Interface Control menu,
50-22
G.703 BERT. 9-40
Tl BERT, 9-27
Channel number
G.703. field on Interface Control menu,
50-23
Tl Interface Control selection, 49-24
Char
C data type, 56-13
subfield on Line Setup menu, 4-8

Character
C constant, 57-7
conversion for display, 56-16, 57-8
received, detected in C, 59-5
types, data versus special characters in C.
59-5
Character buffer. 11-4
attributes less flexible than in Display Window.
59-15
capacity. 5-27
data. 11-3
enhancement attributes carried in high byte of
event word, 59-6
playback. 11-4
recording. 11-10
storage capacity, 1-12
writing to, 59-15-59-19
Character data
buffer correlation with trace data. 5-26
display of
accessed by DATA softkey, 5-7
dual line, 5-8
single line. 5-8
Character field. defined, 34-7
Circuit Identifier Code (CIC). SS#7 Layer 3.
43-6, 43-10
Clear. editor command, 26-5
Clear key, 26-4
in menu fields. 3-6
in spreadsheet, 3-7
Clear path. emulate-mode action, X.25 Layer
3. 34-41
Clear statistical accumulator values. 27-15
Clear statistical counter values.
layer-independent action. 27-10
Clear statistical timer values, layer-independent
action. 27-11
Clock
field on Line Setup menu. 9-16
in BERT testing. 9-16
signal. 1-13
See also Speed
time-of-day. 1-14
See also DatelTime Setup
Clock Source. field on Line Setup menu. 4-10
COMMON. T1 test access point, 49-9
CONNECT IND primitive. example on
spreadsheet, 30-7
CONNECT REQ primitive. example on
spreadsheet. 30-8
in C. 63-12

Index to Part I and Part II

Code
conversion charts. DI-2-D1-14
field on Line Setup menu, 4-5. 8-8, 9-15,
9-16
significance in BERT testing. 9-15
standard codes, 4-5
user-defined, D3-1
Coding type. 0.703. Interface Control selection.
50-19
Color, applied to ROB output. not to plasma
screen, 61-1
Color display
color graphics. 16-6
connectors for external monitors. 16-3
miscellaneous utilities. 16-3-16-6
selectable options. 16-4-16-5
background color, 16-5
blink, 16-5
character, 16-5
trigger control of. 16-5-16-6
Command, field on File Maintenance menu,
3-6
Command addressing
adjunct to receive condition. X.25 Layer 2,
33-16
adjunct to send-frame action. X.25 Layer 2,

33-24
Comment. 24-13
debugging tool. 24-14
delimiters. 24-13
in C region, 53-10
length of. 24-13
location on spreadsheet. 24-13
purpose of, 24-14
valid characters. 24-13
Common Channel Signalling System #7. See
SS#7
Compilation
compilation automatic during object-code
save, 13-15
error diagnostics. 2-16
fields that can be modified without causing
recompile. 2-16 '
rerun without recompiling. 2-15
seven phases, 2-15
Compile, File Maintenance
compiles contents of file or spreadsheet,
13-21
compiling spreadsheet generates #pragma
hooks. 13-21
menu selection, 13-21 •

Condition clause. C construction corresponding
to trigger. 53-8
may contain multiple expressions. 53-9
Conditions
EIA. fails to come true, 2-20
in C, 53-7
Layer 1, 28-1
layer-independent, 27-3-27-7
counters in linkable-object ftles. 24-12
flags in linkable-object files. 24-13
Protocol Spreadsheet
naming requirements. 27-1
programming block. 24-8
comments in. 24-13
rules for combining conditions, 27-2
transitional vs. Status, 27-2, 27-6
Confirm primitives. 30-5
Connectors
back panel. 1-7
interface specifications. 1-1-1-13
power. back panel, 1-7
ROB. 16-3
RS-170 video, 16-3
RS-232 printer connector. 14-3
Test Interface Module, 1-10-1-16
Constants. 25-3-25-7
expansion of. 25-7
fox message, 29-4
in C string. 56-22
in Receive string condition. 21-8
in spreadsheet string. 29-3
legal names of. 25-4
nesting of, 25-6
Protocol Spreadsheet, 20-8
programming block. 24-8
comments in, 24-13
referencing. 25-5
scope of. 25-4
transmitting, 29-4
Control characters
data-entry of, 29-1
enhancement of via bit mask, 5-12
Control leads
See also EIA leads
playback. 2-18
of bit-image data. 2-18. 7-5
of character data. 2-17. 7-5
Conversion specifiers
in C routines. 61-10
table of C conversion specifiers, 61-37
Copy
editor command. 26-6
File Maintenance. menu selections. 13-17

Index to Part I and Part II

Counter
accumulated, 27-15
action
Protocol Spreadsheet. 17-3
Trigger Setup menus. 17-3
condition
Protocol Spreadsheet. 17-4. 27-5
when used in linkable-object files. 24-12
Trigger Setup menus, 17-4. 21-11
identified by name on statistics screen. 17-4
layer-independent action, 27-9
maximum value VB. maximum stat display,
27-6
may be identified on statistics screen following
run, 17-6
printing line of tabular statistics for, 27-16
relational operators. 27-5
shared between spreadsheet and Trigger Setup
menus, 27-9
transmitted. 29-4
Cover
removal. See Field Service
replacement. See Field Service
CPM board
block diagram. 2
connections for. J4-2
detachment of connectors, J5-2
firmware replacement. See Field service
hardware architecture, J3-3, J3-6-J3-7
view as a component. J2-2
CR control character, 3-5
CRC Mode, field on BCC Setup menu, 8-8,
8-11. 8-13, 8-15
CRC-4 errors, 0.703, statistics display. 50-28
CRC-6 errors, T1 statistics display, 49-30
CRT/ROB connector, 1-9

CTS
available for triggering. 28-5
field on Interface Control menu, 10-10,
10-12, 10-14. 10-15
field on RS-232 Interface Control menu, 9-4.

9-6
CTS onloff. Layer 1 Emulate DCE action,
28-10
CTS-off delay, 10-15
CTS-on delay, 10-15
Current, column on Tabular ·Statistics screen,
27-9, 27-10
Current Date. field on DatelTime Setup menu.
15-4

Current directory
File Maintenance screen, 13-10
filing system, 13-4
Current Time, field on DatelTime Setup menu,
15-4
Cursor
positioning the cursor in the Display Window,
pos_cursor, Croutine, 61-8
restoring cursor to previous position,
restore_cursor. C routine. 61-22
Cursor keys
in spreadsheet, 3-8
may be programmed in the Display Window,
3-11. 5-22. 61-4
on menu screens, 3-8
used to control playback speed, 3-11

o
%d. C conversion specifier, converts char to
short. 56-14
D, trace column. X.25 Layer 3, 34-13
D bit
adjunct to monitor/receive-packet condition.
34-18
adjunct to send-packet action. 34-36
position diagrammed. 34-13
value selectable for Call and Call Confirm
packets as well as Data. 34-19
D channel, ISDN. 48-3. 48-4
D4, Tl superframing, 49-23
D4 superframes. Tl frame structures, 49-32
DATA, field on X.2S Packet Level Setup
screen, 34-7
DATA IND primitive. example on spreadsheet,
30-9
DATA REQ primitive. example on spreadsheet.
30-9
Data
See also Character data
bit-image data. 11-3
buffered automatically in FEB. 7-3
character-oriented. 11-3
in IL buffer. 63-4
Data acquisition tracks. 12-3
Data capture. 2-17
See also Playback; Recording data
manual control of. 11-11
RAM, data storage. 1-12
trigger control of. 11-10

Index to Part I and Part II

Data compression. S5#7, Layer 1. 41-4
Data display
black and white enhancements, 16-6
C character types, data versus special
characters. 59-5
character buffer 16-bit word. 59-16
data event-word. 59-15
enhancements, created by ~ttribute bits in
high byte of event word. 59-6
special-receive word, 59... 15
Data event-word. data display, 59-15
Data Path
G.703, field on Interface Control menu.
50-22
T1, field on Interface Control menu. 49-24
T1 Interface Control selection, 49-23
Data packet
monitor/receive condition. X.25 Layer 3,
34-15
translates into two C variables, 72-1
send action. X.25 Layet 3. 34-31
Data plus leads
display available during playback, 7-5
display enabled/disabled by FEB setup. 7-5
display of. 5-9
control leads selected for, 5-9
RS-449. 45-7
V.3S, 44-7
X.21.46-7
softkey access, 5-9
X.21. 46-7
failure of leads to transition, 2-21
Data source, connection to, 1-16
Data speeds, selectable, C-l
Data Transfer. Disk Maintenance. menu
selection. 12-7
Data to Record. field on Record Setup menu,
11-6
Data transfer
INTERVIEW 5, 10. 15 PLUS data.
12-10-12-16
prior to playback, 11-4
Data-character buffer, 63-3
Se, also IL buffer
Data--start offset, in PDU! 63-5
Data-transmit delay. 10-14
DatelTime Setup, 15-3-15-4
menu selections, 15-2
set date. 15-3
set time. 15-3

Day of month. as trigger condition. 27-6
DCE, monitor· condition
LAPD.39-9
Layer 1, 28-3
0.931. 40-9
SDLC. 35-11
SS#7 Layer 2, 42-6. 43-7
X.25 Layer 2. 33-11
X.25 Layer 3. 34-15
DDCMP
Layer 1 package, 37-1
Decimal
conversion for display. 56-16, 57-8
conversion specifier. 61-11
in Ct constant. 57-7
Decimal field. defined, 34-6
Decrement counter layer-independent action,
27-9
Decrement flag byte, as 16-bit binary counter.
layer-independent action, 27-14
Default menus, how to change. 2-6
#define, C preprocessor directive. 56-5, 61-40
example, 67-15
Degraded minutes
G.703 BERT statistics. 9-44
Tl BERT statistics. 9-31
Delete
editor command. 26-5
File Maintenance
menu selection. 13-20
remove. C routine, 65-32
Delete Char key. 3-6. 26-4
Delete Line key. 3-7, 26-4
Destination Point Code (DPC). SS#7 Layer 3,
43-10
Diagnostic byte
adjunct to Restart. Reset. Clear. Diag, and
Reg Conftrm conditions. 34-23
adjunct to Restart. Reset. Clear. Diag. and
Reg Confirm send actions, 34-38
entered as two hex digits, 34-23
Directories
Isys, 13-6
/usc. 2-4, 13-6
/usr/defauh. 2-5
absolute pathnames. 13-5
directory listings, 13-10
.filing system. how to create. 13-5
naming conventions. 13-7
relative pathnames, 13-6
root (I) directory, 13-4
write-protected, 13-10

Index to Part t and Pi&rt II

t

Disk. source of playback data. 4-4
Disk drives. 1-5
current disk, filing system. 13-10
drive references and priority. 12-3
filing systems, moving from disk to disk. 13-5
microfloppies
compatibility, 1-5
write protection, 1-5
microfloppy disks. storage capacity, 1-5
Winchester hard disk, 1-7
installation. See Field Service
Disk Maintenance, 12-3-12-16
allocating disk space, 12-3
command
Data Transfer, 12-7
Disk Summary, 12-6
Duplicate Disk. 12-9
Format Disk, 12-5
INT 10, 12-10-12-16
data acquisition tracks. 12-3
data transfer, 13-7
description of disks, 12-3
initializing system. INTERVIEW 7000. 2-3
installing new system software, 2-7
menu selections. 12-2, 12-4-12-16
overview. 2-14
Disk Name, subfield on Disk Maintenance
menu, 12-5
Disk No
field on Line Setup menu, 11-4
field on Record Setup menu. 11-6, 11-10
Disk Number. subfield on Disk Maintenance
menu, 12-5
Disk Summary, Disk Maintenance, menu
selection. 12-6
Display, plasma, 1-3
Display Abott
field on Line Setup menu. 21-6
sub field of BOP Format. 4-9
subfield on Line Setup menu, 4-9
Display Idle
field on Line Setup menu. 28-11
subfield on Line Setup menu, 4-8, 5-10, 7-4
cannot display idle if suppressed in FEB.

7-4
Display Mode
current display mode tracked via C variables,
66-1
field on Display Setup menu. 5-7, 5-17
information on current display stored in C
variable, 61-1

Display Setup
menu selections. 5-2
traces. 2-21
Display Setup screen, overview, 2-11
Display States, field on Display Setup menu.
5-19. 27-19
Display Window
array of 1•.088 long integers, 61-35
cursor keys under programmer's control,
5-22, 61-4
display mode, 5-22
DL data. 30-10
DL_CONNECT CONF
entered manually at Layer 2 to "fool" Layer 3
into thinking there is a link, 34-46
primitive forced up Dy user program at Layer
2. 30-6
primitive sent upward by Layer 2 to confirm
the link, 30-9
DL_CONNECT IND
action primitive at Layer 2, 30-3
condition primitive at Layer 3, 30-3
DL_CONNECT REO
automatic when data primitives are passed
down by Layer 3, 31-1
primitive passed down from Layer 3, 30-8
primitive triggered automatically by Layer 3
Send action, 30-6
sent down automatically at Layer 3 if Layer 2
inactive. 34-44. 34-46
DL_DATA
macro. 29-5
primitives between Layers 2 and 3, 30-9
DL_DATA IND
condition at Layer 3, 39-31
primitive code for, 55-4
sent up automatically by Give Data action at
Layer 2, 33-28, 33-34, 35-27, 35-32,
39-26, 39-31
DL_DATA REO. sent down automatically by
Send or Resend action at Layer 3, 34-44
Don't Care key, 3-6
in Receive string condition, 21-7
Done key
on menu screens, 3-9
used to change real-time display softkeys, 5-6
used to exit softkey rack in spreadsheet, 3-9
used to move from Conditions to Actions.
33-21. 34-29, 35-21, 39-19
Double parens, 3-5
in Protocol Spreadsheet string. 29-3
in Receive string condition, 21-8
Down Arrow key. 26-4

Index to Part I and Part II

Drive, field on Layer Setup screen, 6-3
~,

. i

Drop-and-insert mode
G.703 transmissions. 9...38. 50-6
Interface Control selection, 50-21
ISDN transmissions. ISDN Interface Setup
selection, 48-10
T1 transmissions, 9-26, 49-5
Interface Control selection. 49-22
DS1
T1 circuits, 49-3
T1 physical interface, 49-6
DSR, available for triggering, 28-5
DSR on/off. Layer 1 Emulate DCE action,
28-10
DTE, monitor condition
LAPD,39-9
Layer 1. 28-3
0.931,40-9
SDLC.35-11
SS#7 Layer 2. 42-6, 43-7
X.2S Layer 2, 33-11
X.2S Layer 3, 34-15
DTR
available for triggering. 28-5
enables/disables B bus (RS-48S), 47-7
DTR on/off. Layer 1 Emulate DTE action,
28-10
Dual floppy disk drive bracket. changing. See
Field Service
Dual-channel testing. ISDN, 48-4
Duplicate Disk
Disk Maintenance. menu selection. 12-9
installing new system software via the
DUPDISK command. 2-7

E
EBCD
default BCC parameters. 8-9
hex-ta-display conversion table. D2-3
keyboard-to-EBCD con.version table. D1-4
reverse bit order appropriate for, 4-11
EBCDIC
default BCC parameters. 8-8
hex-to-display conversion table, D2-3
keyboard-to-EBCDIC eonversion table, DI-2
Echo program
BOP Info-field echo. 55-10
sync or async data. 55 ...9

Edit key, 3-7
Editing keypad, 26-3
Editor. Protocol Spreadsheet
See also Protocol Spreadsheet editor
editing a C program, 56-4
function keys. 26-5-26-10
EIA
condition. Trigger Setup menus, 21-9
Layer 1 conditions, 28-5
Layer 1 emulate-mode actions, 28-10
RS-485 application. 47-7
trigger conditions, fails to come true, 2-20
EIAleads
buffered or discarded in FEB. 7-3
effect on character-buffer capacity, 5-27
effect on data-plus-leads display. 7-5
effect on EIA trigger conditions, 7-3
driven onloff as trigger action, 10-9
four kinds of status indicators, 10-8
handshaking, 10-10
maintaining lead statuses during program
chaining. 27-20
masking for status. 60-2
masking to detect a change, 60-1
monitoring by trigger, 10-9. 44-7
storage of. 1-12
Emulate
field on LAPD Frame Level Setup screen.
39-3, 39-4
field on SDLC Frame Level Setup screen,

35-3. 35-4
field on SNA/SDLC Frame Level Setup
screen. 36-3
field on X.2S Frame Level Setup screen.
33-3. 33-4, 33-24
field on X.2S Layer 2 Setup screen. 33-16
field on X.2S Packet Level Setup screen.
34-3. 34-4
indicator on RS-485 Test Interface Module.
47-5
Emulate DCE, indicator on Test Interface
Module. 10-4
Emulate DTE. indicator on Test Interface
Module. 10-4
Emulate modes
effect of open breakout switch when
INTERVIEW is driving signal, 10-6
effect of open switch when INTERVIEW is
receiving signal. 10-6
installing connectors for. 10-4, 49-7. 50-9
setting up, 4-3
Emulation, connectors used. 1-10
Enable CRC-4. G.703. field on Interface
Control menu, 50-23

Index to· Part I and Part II

End, editor command. 26-5
End/Incl, field on Bce Setup menu, 8-12
End/N/Incl. field on BCe Setup menu, 8-12
End/StaystartedlIncl. field on BCC Setup menu,
8-12
End/Staystarted/N/Incl, field on Bee Setup
menu, 8-12
Enhance
field on Display Setup menu. 5-12, 11-5
field on Miscellaneous Utilities menu, 16-4,
16-$
field on Trigger Setup menu, 22-7
Enhance character data
as Layer 1 action. 28-13
ctl_enhanceJd. C routine, 59-8
ctl_enhance_td. e routine, 59-7
on Display Setup, 5-12

Error messages
interactive messages. A1-1-A1-15
issued by C translator, A2-1-A2-6
issued by compiler. A3-1-A3-16
locating errors, 56-4
issued by translator. locating errors, 56-4
Error-free seconds
BERT counter, 9-21
G.703 BERT statistics, 9-44
T1 BERT statistics, 9-31
T1 statistics display, 49-30
Error-free secs, G.703. statistics display. 50-29
Errors
in BERT
automatic injection, 9-14
manual injection. 9-18
recoverable. 2-17
ESF. Tl superframing. 49-23

Enhance selected trace rows
LAPD action. 39-29
12_enhance, C variable. 77-8
map to color display, 33-33. 34-42. 35-30,
39-30, 40-12. 42-10. 43-11
Q.931 action, 40-12
I3_enhance. C variable. 78-4
SDLC action. 35-30
12_enhance, C variable. 73-8
SNA action, 36-3
11_enhance, C variable. 74-4
SS#7 Layer 2 action. 42-10
12_enhance. e variable, 79-4
SS#7 Layer 3. 13_enhance, C variable, 80-7
SS#7 Layer 3 action. 43-10
X.25 Layer 2 action. 33-32
12_enhance, e variable. 71-8
X.2$ Layer 3 action, 34-42
13_enhance. C variable, 72-9
Enhancements
black and white. 16-6
color. 16-3-16-6
low intensity. 28-13
must be turned off as well as on at Layer 1,
28-13
used to highlight Bisync addresses, 28-13
Enter State
in e, 53-3
la yer-independent condition, 27-3

ESF errors. T1 statistics display, 49-30
ESF superframes, Tl frame structures. 49-32
Event
e type specifier, 56-4
program interrupt
two events never simUltaneous, 54-3
various possible origins. 54-2
Event variable
in C, may be created by user. 57-6
one used by C translator for every spreadsheet
condition, 53-10
Execute key, 3-6
Extern, C storage-class specifier, cannot be
declared below Test level, 53-IS
External monitors
control of enhancements
black and white, 16-6
color, 16-3-16-6
ROB color video connector, 1-9, 16-3
RS-170 video connector. 1-10. 16-3
Extra bits. G.703, field on Interface Control
menu. 50-24

F
FACILITIES. field on X.25 Packet Level Setup
screen, 34-7

ERR INJ
G.703 BERT, run-time function key, 9-45
T1 BERT. run-time function key, 9-32
Error Injection Rate. field on BERT Setup
menu, 9-14, 9-22

Facilities
adjunct to send-call action on Protocol
Spreadsheet. X.25 Layer 3, 34-33
relation to FACILITIES field on X.25
Packet Layer Setup screen, 34-33
length byte handled automatically, 34-7

Index to Part I and Part II

Failed seconds
0.703 BERT statistics. 9-44
Tl BERT statistics, 9-31
Fan
back panel. 1-8
clean filter to prevent overheating. 1-9
Fast event, C type specifier. 56-4
Fault. in half-duplex BERT t 9-9
on noisy circuit, 9-9
Faults
G.703 BERT statistics, 9-44
Tl BERT statistics. 9-31
FDL, T1 transmissions. See Frame Data Link
FEB. See Front end buffer
FEB board
block diagram, 2
connections for, J4-2
hardware architecture, J3-3, 13-11-J3-12
view as a component. 12.-2
FEB Setup screen, Tl options. 9-25
Field Service. J-1-J-2
boards
installation, J3-3
removal. J2-3-J2-6
CPM board, ftrmware replacement,
J5-1-J5-6
cables
connection, J3-15
disconnection, J2-5
cover
removal, 12-3
replacement. 12-6
dual floppy disk drive bracket. changing.
J7-1-J7-4
hard drive, installation. J6-1-J6... 6
logic board
installing. 13-1-J3-3
removal. 12-1-J2-6
MPM board. S 1 switch settings. J3-14
mux board. firmware replacement, J4-1-J4-5
PROMs, exchanging, J5-4
self tests, 13-15
static electricity elimination. Ji-3

,-~
I.

File Maintenance, 13-3-13-16
absolute pathnames, 13-5
C routines, 65-31-65-38
creating new directories. 13-5
current directory, 13-10
default directory. 13-4
directories. 13-4
File Maintenance screen. 13-9

current disk. 13-10
directory listings, 13-10
overview. 2-14
files
data files, 13-7
description of, 13-6
linkable-object files. 13-7. 24-10, 56-8
compiled contents of spreadsheet. 24-10
loading and saving, 13-3
marking files. 13-13
moving from file to file. 13-4
object files. 13-6, 13-14
Protocol Spreadsheet. 13-7
program files, 13-6. 13-14
selecting files for command execution,
13-12
setup files. 13-6, 13-14
types, 13-12
get_file_type, C routine. 65-36
set_file_type, C routine, 65-34
unmarking files. 13-13
menu selections, 13-2
Change Directory, 13-16
Compile, 13-21
compiles contents of file or spreadsheet.
13-21
compiling spreadsheet generates #pragma
hooks. 13-21
Copy. 13-17
Delete. 13-20
how to execute, 13-13
Load, 13-14
Make Directory, 13-16
Print. 13-19
Rename, 13-19
Save, 13-15
View, 13-18
Write Enable. 13-19
Write Protect, 13-20
moving from disk to disk, 13-5
naming conventions, files and directories.
13-7
pathnames. the use of periods. 13-8
relative pathnames. 13-6
root (I) directory. 13-4
the Isys directory. 13-6
the lusr directory, 13-6
write-protected files. 13-10
Fill-in frame, monitor/receive condition, SS#7
Layer 2, translates into two C variables,
79-3
Find, editor command. 26-9
FLO. flag, trace column, Q.931, 40-5
Flag key. 3-6
in Receive String condition, 21-7
valid in Suppress field. 5-11

Index to Part I and Part II

Flags
common to all tests and layers. 27-13
condition, Trigger Setup menus, 21-10
layer-independent action. 27-13
as toggling mechanism, 27-14
layer-independent condition, 27-7
when used in linkable-object files, 24-13
transmitted, 29-4
Force data-packet transmit, 34-45
Force receivers out of sync, Layer 1 action.
28-11
Format, field on Line Setup menu. 4-6, 4-9.
9-15, 21-6, 28-4. 28-12
significance in BERT testing, 9-15
Format Disk, Disk Maintenance, menu
selection, 12-5

with D4 framing. 49-33. 49-34
with ESF framing, 49-35
Framing error
fevar_frm_error_td and fevar_frm_error rd. C
events. 59-2
monitor/receive condition, Layer 1. 28-4
Framing errors. G.703, statistics display, 50-28
Framing mode, T1. Interface Control selection.
49-23
Framing pattern sequence (FPS), T1
transmissions, with ESF framing. 49-35
Freeze key. 3-11
contrasted with Capture On/Off trigger action,
3-11
Freeze LED, 10-4, 46-4. 48-6, 49-9. 50-11
front panel, 1- 5

Fox message, 28-8, 33-28, 34-38, 35-26.
39-25
"'forced down" from Layer 3 to the Layer 1
.
interface. 30-6
in BERT, 9-7
really a built-in constant, 29-4
Frame Data Link.
Tl Interface Control selection. 49-24
T1 transmissions, with ESF framing, 49-35
Frame fields
diagrammed for LAPD, 39-7
diagrammed for SDLC, 35-8
diagrammed for X.2S, 33-8
Frame resync criteria. 0.703, field on Interface
Control menu. 50-25
Frame sent, emulate-mode condition
LAPD,39-17
frame sent, C variable. 77..;.7
SDLC,35-18
frame sent. C variable, 73-7
should be used along with More/No More to
Resend, 33-20, 35-20, 39-18
X.2S Layer 2. 33-18
frame_sent, C variable. 71-7
Framed mode
0.703 BERT, 9-41
T1 BERT. 9-28
Frames received
0.703, statistics display, 50-27
T1 statistics display, 49-29
Framing bits
ISDN transmissions. 48-3
recording of. 49-26
T1 Interface Control selection, 49-24
Tl transmissions

Freeze mode
current mode status stored in C variable, 61-2
in BERT, 9-17
initiated by trigger. See Capture data to screen
(on/off)
parallel cursor movement during. 5-26, 33-6,
34-8. 35-6, 36-4. 40-4, 42-4. 43-4
Frequency selection. back panel. 1-8
From
field on Disk Maintenance menu, 11-4
subfield on Disk Maintenance menu, 12-7
From Disk Number, sub field on Disk
Maintenance menu. 12-9
Front End Buffer Setup. menu selections. 7-2
Front end buffer
applies to playback of bit-image data. 2-18
Idle Suppress field, does not apply to
playback of bit-image data, 2-18
on playback path of bit-image data, 2-18.
7-5, 7-6
setup
effect on character-buffer capacity, 5-27
effect on data-plus-leads display. 5-9
X.21. 46-7
may inhibit EIA activity (except data),
10-7
time ticks and EIA leads, storage of, 1-12,
2-17
Front panel. 1-3
function keys. 1-4
LED overlay, 1-5
LED's, 1-4, 2-18
VIA, 1-11

plasma display, 1-3
FT Errors, T1 statistics display, 49-30

Index to Part I and Part II

FTIFS Errors. Tl statistics display. 49-30

Full duplex handshaking. 10-12, 10-15
Function keys, 1-4

G
G.703, 50-1-50-17
aggregate data capture, 50-5
BERT, 9-35-9-46
automatic error injection rate, 9-42
bit errors, 9-44
block size, 9-42
blocks in error, 9-44
blocks received, 9-44
blocks sent. 9-44
channel mode, 9-40
degraded minutes. 9-44
error-free seconds. 9-44
failed seconds. 9-44
framed mode. 9-41
invert, 9-41
number of faults. 9-44
pattern, 9-41
run-time function keys. 9-45
Setup screen, 9-39
Statistics screen, 9-43
setting up. 9-36
severely errored seconds. 9-44
test length. 9-42
test seconds. 9-44
unframed mode, 9-40
Bipolar violations. 50-19
CCITT recommendation. 50-3
Tl.49-3
channel O. 50-4
channel data capture. 50-4
data displays, 50-7
drop-and-insert, 9-38, 50-6
emulation modes, 50-6. 50-9
framing characteristics. 50-4
Interface Control screen. 9-37. 50-2, 50-17
begin CAS MF w/frame containing frame
align. signal, 50-24
CAS MF resynccriteria, 50-25
CAS MF sync criteria, 50-25
channel mode. 50-22
channdnumber, 50-23
coding type. 50-19
data path. 50-22
enable CRC-4, 50-23
extra bits, 50-24
frame resync criteria. :50-25

include channel 16. 50-26
international bits. 50-25
line clock select. 50-21
line impedance, 50-19
national bits. 50-25
receiver gain, 50-19
signalling type, 50-23
termination, 50-19
transmit mode, 50-20
xmit distant.MF alarm. 50-22
xmit remote alarm, 50-22
xmit signalling all l's, 50-22
line conditions, statistics display. 50-29
monitor mode. 50-6
multiframe structure. CAS. 50-31
Primary Rate ISDN, 50-7
physical connectors, 50-8
record setup, 11-9
setting up menus for testing. 50-16
signalling bits
with CAS Signalling with channel 16. 50-32
with CCS/CAS signalling with CRC-4. 50-34
statistics display. 50...26
as alternate run-time display, 50-30
BPV's received. 50-28
BPV-free seconds. 50-28
CRC-4 errors. 50-28
error-free secs, 50-29
Frames re.ceived. 50-27
framing errors, 50-28
0.703 line conditions. 50-29
sync loss time. 50-28
sync losses. 50-28
test seconds, 50-27
Test Interface Module. 50-2. 50-:8, 1-19
signal direction, 50-10
Transmit mode. 9-38
testing and layer protocols, 50-17
testing configurations. 50-11
transmission speeds. 50-3
0.703 BERT. testing modes, 9-39
0.703 line conditions. 0.703, statistics display,
50-29
G.704, CCITT recommendation 0.703 framing. 50-4
T1 superframing, 49-4
G703STA. 0.703 BERT, run-time function key.
9-46
OBM board
block diagram. 2
connections for, 14-2
hardware architecture, J3-3. J3-5-J3-6
view as a component. 12-2

Index to Part I and Part 1/

General operation. 2-1-2-25
boot-up program. creating a user interface.
2-4
changing default menus. 2-6
common problems, 2-20-2-22
data capture, 2-17
front end buffer. 2-17
front end buffer, on playback path of
bit-image data. 2-18
initializing system, INTERVIEW 7000. 2-3
installing new system software. 2-7
overview of menus. 2-9-2-14
power up, 1-16. 2-1
rerunning a test program, 2-15
running a test program. 2-15
running default program. 2-5
Give data. 29-5
LAPD,39-26
LAPD action. 12Jive_data, C routine. 77-9
SDLC action. 35-27
12Jive_data, C routine. 73-9
X.25 Layer 2 action. 30-10. 33-28
12Jive_data, C routine, 71-9
X.25 Layer 3 action. 34-39
13Jive_data, C routine. 72-10
Glitch catcher, 10-8. 44-6. 45-6, 46-6
Glossary, abbreviations. B-I-B-IO
Go-error. editor command, 26-10
Go-line, editor command, 26-9
Good BCC
adjunct to monitor-frame condition
LAPD, 39-13. 39-15
dceJood_bcc. C variable. 77-1
SDLC, 35-14, 35-16
dceJood_bec. C variable. 73-1
X.25 Layer 2. 33-14, 33-15
dce_good_bec, C variable. 71-1
adjunct to send-frame action
LAPD,39-25
SDLC, 35-26
X.25 Layer 2. 33-28
adjunct to send-string action. Layer 1. 28-8
appended to transmit string, 8-5
as condition. 8-5
default BCe for frames. 33-28. 35-26, 39-25
monitor/receive condition. Layer I, 28-4
operational only when Rcv Blk Chk
enabled, 28-4
.
overlay. 8-3
parameters defined onBCe Setup menu, 8-6

Goto. C statement. 53-4. 53-5. 53-7. 53-13
placed inside of state loop, 52-16
used to move program control to a different
state-label. 53-2. 53-4
Graphical Statistics menu. color graphics. 16-6

H
Half duplex handshaking, 10-12, 10-15
Half-duplex BERT. 9-6
Handshake
default for remote port, 67-20
field on BERT Setup menu. 9-5, 9-6. 9-7,
9-13
relation to Interface Control screen. 9-7
Hard drive. installation. See Field Service
Hardware, 1-3-1-16
back panel, 1-7
block diagram of architecture, 2
clock. 1-13
current hardware configuration stored in
unit_config C variable, 66-1
disk drives. 1-5
hard drive. J6-1-J6-6
front panel. 1-3
interior layout. 12-3-12-5
keyboard, 1-3
operating environment, 1-14
operating positions. 1-14
physical dimensions. 1-3
power up. 1-14
storage capacity, 1':"12
Hazardous areas, J2-3
HDB3. See High Density Bipolar 3
Hex. subfield on Trigger Setup menu. 22-7.
22-8
Hex key
for hexadecimal data entry, 3-6
valid inside C strings. 56-22
for hexadecimal translation of line data. 5-14
LED display on keycap, 5-14
Hexadecimal
C constant. 57-7
conversion for display, 56-16, 57-8, 61-20
conversion specifier. 61-11
Hexadecimal code. conversion charts.
Dl-2-Dl-14
Hexadecimal display
in relation to order of.transmission. 5-14
turned onloff by trigger action. 5-15
Hexadecimal field. defined. 34-6

Index to Part I and Part II

rf'I

High Density Bipolar 3, transmission technique,
50-3
High Outgoing Channel #, field on X.2S Packet
Level Setup screen, 34-3
High speed
aggregate 0.703 record, 50-5
aggregate T1 record. 49-5. 49-26
data recording, 11-9
G.703 aggregate record. 50-26
optimizing performance, 2-22
Home key. 3-8, 26-4
Hook text
added to top-level main, 56-12
C code in #pragma hook directive. 56-11
definition
indirectly referencing routines. 56-12
may reference tasks. 56-12
Hook_type. decimal constant to identify type of
flpragma hook directive. 56-11
Host Port, SNA frame setup selection. 36-3
HRO/1.JM/user_intrf
affect on Start Up screen, 2-2
boot-up program. creating a user interface,
2-4

I
I. intensity. field on Graphical Statistics menu,

18-7
Idle
change idle-line character. 28-12
display in relation to Outsyncaction. 28-11
display used for visual record of time
intervals. 7-4
displaying for visual record of lead timings.
5-10
displaying synchronous idle. 4-8
idle action, C routine. S9-13
retained/discarded on FEB Setup menu, 7-3,
7-4
selecting transmit idle. 4-9
voltage not affected by inverted polarity. 4-12
Idle line action. used in X.21 bis, 32-4
Idle Suppress, field on Front-End Buffer Setup
screen, 7-4
,
does not apply during playback. 2-18
Idle select, T1. Interface Control selection.
49-22

Idle Timeout
conditions under which timer expires. 35-4
expired, emulate-mode condition, SDLC.
35-18
field on SOLC Frame Level Setup screen,
35-3
field on SNA/SOLC Frame Level Setup
screen. 36-3
maximum and minimum values, 35-4
If, C statement, 58-6
nonzero expressions always true inside of if
statement, 58-2
routine that returns nonzero makes if
statement true. 58-6
used in Enter State conditions. 53-4
IL buffer
advantage as storage medium, 55-1
and primitives. 30-3
created by DOCMP package, 37-2
creating a structure-pointer to an IL buffer.
63-6
data-character buffer, 63-3
being passed up the layers. 55-2. 63-4
downward moving. illustrated. 55-6, 63-2
identified by segment number. 55-5
number of the buffer in POU, 63-5
pointer-list buffer. 63-3
being passed down the layers. 63-2
pointing to data inside an IL buffer. 63-5,
63-41
SOU shrinks as IL buffer moves up the layers.
55-1
string to be referenced in. 30-6
structure of. 63-3-63-4
header, 63-3
service data unit, 63-3-63-4
data, 63-4
list node. 63-4
list-header node. 63-4
upward moving. illustrated, 55-2
INFO frame
monitor/receive condition
LAPO, 39-10
translates into two C variables, 77-6
SOLC, 35-12
translates into two C variables. 73-6
X.25 Layer 2. 33-12
translates into two C variables. 71-6
send action
LAPO, 39-20
SOLC, 35-22
used to convey OL data sent down from
Layer 3. 33-23, 39-20
X.2S Layer 2. 33-22
INFO-ELEMENT. trace column. Q.931, 40-5

Index to Part I and Part II

INJIERR
0.703 BERT, run-time function key, 9-45
T1 BERT. run-time function key, 9-32
INT 10, Disk Maintenance selection.
12-14-12-16
INTERVIEW transfer. INTERVIEW 5. 10, 15
PLUS data. transfer from Disk Maintenance
screen, 12-10-12-16
In-band signaling, T1 transmissions, 49-23,
49-32
In/out. editor command, 26-6
#include. C preprocessor directive. 56-6. 61-23.
61-29. 61-30
stdio.h file included with all disk 1/0 routines,
65-3
Include channel 16, 0.703, field on Interface
Control menu. 50-26
Increment counter, layer-independent action.
27-9
Increment flag byte. as 16-bit binary counter.
layer-independent action, 27-14
Indication primitives. 30-5
versus "Requests", 30-10
Info element. Q.931. 40-5
Initial Condition. field on Record Setup menu,
11-9
Initial Phase, field on X.21 Interface Control
menu. 46-9
Initial State. field on BCC Setup menu. 8-11
Initializing system software, INTERVIEW 7000,
2-3
Injection Rate
field on BERT Setup menu, 9-19
status field on BERT results screen, 9-21
Input/output connectors, back panel, 1-9
AUXILIARY TTL. 1-9
CRT/ROB. 1-9, 1-10
internal MODEM, 1-9
PRINTER, 1-9
REMOTE RS-232, 1-9
RS-170 composite video. 1-10
Insert Char key, 26-4
in menu fields, 3-6
used to exit insert mode, 3-8
Insert Line key. 26-4
in spreadsheet. 3-7
on statistics screens, 3-7
Insert mode, 3-8, 26-4

Installing new system software, on hard disk.
2-7
Instrument. menu field on Disk Maintenance
screen, for INTERVIEW 10 transfer, 12-14
Int, C data type, 56-13
same as short int, 56-13
Integral promotion. 56-16, 61-11
Integrated Services Digital Network (ISDN).
SS#7 Layer 3, 43-22
Interactive messages. A1-1-A1-15
Interface Control menu, 10-10
in relation to Line Setup menu, 10-10
RS-485 application. 47-7
X.21,46-8
Interface Control screen, 0.703 options, 9-37
Interlayer buffer. See IL buffer
Interlayer message buffer. See IL buffer
Internal MODEM connector, 1-9
International bits. 0.703. field on Interface
Control menu. 50-25
Interrupt packet, sample program to enhance
all. 34-43
Invalid frame
defined, 33-7. 35-7, 39-8
receive condition
LAPD.39-16
SDLC,35-16
X.2S Layer 2. 33-16
Invalid packet
defined. 34-12
receive condition. X.25 Layer 3. 34-26
invaIidJ>acket. C variable. 72-8
Invert BCC. field on BCC Setup menu, 8-11
IPARS
default BCC parameters, 8-8
default sync pattern. 4-7
hex-to-display conversion table. D2-3
keyboard-to-IPARS conversion table. Dl-6
reverse bit order appropriate for. 4-11
SY characters inappropriate for. 4-7
ISDN
See also Q.931
B channels. 48-3, 48-4
Basic Rate ISDN, 48-3
channel. ISDN Interface Setup selection.
48-10
D channel, 48-3, 48-4
dual-channel testing, 48-4
ISDN D. 38-3
LED's front panel. 48-6

Index to Part I and Part II

line conditions. ISDN s~tistics display. 48-11
monitor mode, installing connectors for. 48-8
NT, network termination. 48-7
NT state, 48-13
physical devices. 48-6
RD line status. 48-13
sample Line Setup. 4-13
single-channel testing. 48-5
speaker, ISDN Interface Setup selection.
48-10
statistics display, as alternate run-time display,
48-11
TO line status, 48-12
TE, terminal equipment, 48-7
TE state, 48-11
Test Interface Module, 48-2. 48-6, 1-21
testing interfaces, 48-6, 4S-7
Isoc
data setup, 4-10
format in BERT, 9-16

J
JIS7
hex-to-display convers\on table. D2-3
keyboard-to-JIS7 con~rsion table. Dt-10
JIS7/JIS8. optional codes. H-1
JIS8
hex-to-display conversion table. Dl-3
keyboard-to-JISS conversion table. D1-12.
01-13

L. label, field on Graphical Statistics menu.
18-4
LAPD. 39-3-39-14
diagram of frame fields, 39-7
send actions, 39-19
used with ISDN D channel, 38-3
LAPD Frame Level Setup screen, 39-2
Label
C keyword. equivalent to a spreadsheet State,
53-2
C type specifier, 56-4
Last. column on Tabular Statistics screen, 17-6,
27-10, 27-11
Layer, field on Display Setup menu, 5-17, .
5-19, 27-19
Layer 2, user program to force packets up to
Layer 3 and down to Layer 1, 34-24
Layer Setup. 6-3-6-6
how to save, 6-5
Personality packages. 6-3
reside on user and hard disks, 6-3
Protocol Configuration screen, 6-4
protocols. select and load. 6-3
Layer Setup screen, overview. 2-14
Layers
identified on Program Trace, 5-19
in C. 53-1
Protocol Spreadsheet. programming block.
24-8
comments in. 24-13
passing data between, 2-21
program model, 20-3-20-8

LeN

K
Katakana, JIS7/S optional code set, H-1
Keyboard, 1-3
See also ASCII keys; entry under each special
key
.
condition. Trigger Setup menus. 21-12
editing keypad, 26-3
function keys, 1-4
layer-independent condition. 27-4
programming keys. 3-3-3-7
real-time keys. 3-10-3-12
soft (function) keys, 3.,.3
for editing, 26-5-26-10
translation tables, D-1-D-2
Keyword, 29-3

L

adjunct to monitor/receive-packet condition,
X.25 Layer 3. 34-18
allocation sequence. 34-5. 34-31
assigned dynamically on per-call basis, 34-4
column on X.25 Packet Level Setup screen,
34-4. 34-5
predefined for a particular call address
("path"). 34-4. 34-6
trace column. X.25 Layer 3, 34-12
LED's
front panel. 1-4. 1-5, 2-18
during playback. 10-4
Freeze, 10-4, 46-4. 48-6, 49-9, 50-11
INTERVIEW status. 1-5
interface status, 1-4
not affected by FEB suppression of EIA
leads, 10-7

Index to Part I and Part II

Remote, 10-4, 48-6, 49-9, 50-11
RS-232 overlay. 10-4
RS-449 overlay. 45-2, 45-4
U/A. 1-5. 1-11, 10-4, 44-4. 45-4
V.35 overlay, 44-2, 44-4
X.21 overlay, 46-4
green-red characteristics not affected by logic
(polarity). 4-12
Test Interface Module, 1-11

. counters or flags in, 24-12
efficiently use memory and spreadsheet,
24-12. 56-10
in /lib directory. 13-21
indirectly referencing routines. 56-10
scope of routine definitions contained in. 56-8
search rules for, 24-11, 56-8
transparent to unit configuration, 13-22

Left Arrow key. 26-4

List header, beginning of linked list in IL
buffer, 55-7

llib directory, filing system, 13-21, 24-11. 56-9

List node. See IL buffer

Line clock select
G.703. Interface Control selection. 50-21
T1. Interface Control selection. 49-22

List-header node. See IL buffer
Lists, on Protocol Spreadsheet, 29-1

Line data. data capture. 2-17

Load, File Maintenance. menu selections.
13-14

Line impedance. G.703, Interface Control
selection. 50-19

Load key. 3-6, 13-14

Line number, of cursor position in frozen
Program Trace. 5-20
Line Setup, 4-3-4-4
current line setup parameters stored in
unit_setup C variable. 66-1
significance in BERT testing. 9-15
Line Setup screen
menu selections, 4-2
Async. 4-13
Bisync. 4-13
ISDN. 4-13
SNA.4-13
SS#7.4-13
X.2S, 4-13
overview, 2-11

Load program
layer-independent action, 27-19
loadj>rogram, C routine, 69-12
Logical DTE/DCE
contrasted to physical DTE/DCE, 33-4
determines command and response addresses,
33-4. 33-16
determines order (ascending/descending) of
LCN selection, 34-4
Long, C data type. 56-13
long routine returns a long. 58-3
Loop down
Tl BERT, run-time function key, 9-33
Tl command. 49-9

Line utilization, programming example. 17-11
Linefeed. not valid in C string. 56-20
Linkable-object files. 13-7
#pragma hook directives in, 56-11
accessed via #pragma object, 56-8
accessed via Object block-identifier. 24-10
advantage over object flIes. 13-22
C code
contents of LOBJ files. 13-7
must be compatible with menu selections,
13-22
combined with spreadsheet program, 56-19
compiled spreadsheet
accessed via OBJECT block-identifier only.
13-21
contents of LOBJ files, 13-7, 13-21
must be a valid program, 13-21
contents of, 13-21, 24-10

Loop up
T1 BERT. run-time function key, 9-32
Tl command. 49-9
Loop-back C/R bit, adjunct to send-frame
action, LAPD, 39-22
Loop-back PIF bit
adjunct to resend-frame action
LAPD.39-27
X.2S Layer 2. 33-30
adjunct to send-frame action
LAPD.39-23
SDLC, 35-24
X.2S Layer 2. 33-25
Low, subfield on Trigger Setup menu. 22-7
Low Outgoing Channel #, field on X.2S Packet
Level Setup screen, 34-3
LRC Parity. field on BCC Setup menu, 8-11
LU 6.2, SNA selection, 36-3

Index to Part I and Part II

~~
i

M

Message type, Q.931. 40-5

M, trace column. X.25 Layer 3, 34-14
M bit
adjunct to monitor/receive-packet condition,
34-18
adjunct to send-data ""Packet action, 34-36
position diagrammed. 34-14
MAKE, T1 test access point. 49-9
Main
C function, placed at hlghest level of source
code, 52-16
program main created by C translator, 52-1
hook text from #pragma hook directives
added to, 56-12
using multiple hooks, 56-12
Maintain, field on Interface Control menu.
10-18
X.21,46-9
Maintain bit
freeing via the _free_ll_ms£...buff routine.
55-5
setting via the _set_maint_buff_bit routine.
55-5
used to lock an IL buffer against reallocation,
55-5
Make Directory, File Maintenance
menu selection, 13-16
mkdir, C routine. 65-33
Mark key, 26-5
on File Maintenance screen, 3-6, 13-13
used as program tab in spreadsheet, 3-9
Maximum, column on Tabular Statistics screen,
17-6. 27-10
Maximum data rates
data analysis. 1-13
data recording. 1-13
Memory, capacity. 1-12
Menus
overview. 2-9-2-14
See also Separate listing. each menu name
configuring menus, 2...;10
Program Menu. 2-9
Record Setup, 11-5-11-11
Message, indicator on RS-485 Test Interface
Module. 47-6
Message Buffer. field on :BERT Setup menu,
9-10
Message fields. diagrammed for 0.931. 40-7
Message Signal Units (MSU's). Layer 3. 43-6

MIL, field on Line Setup menu. 4-12
MIL-ISS. 4-12
MISC. trace column. X.25 Layer 3, 34-14
Microfloppy disks
compaubUity, 1-5
storage capacity, 1-12
write protection. 1-5
Minimum. column on Tabular Statistics screen,
17-6, 27-10
Miscellaneous Utilities
overview, 2-14
with COIOT mapping options. 16-3-16-6
See also Graphical statistics menu. color
graphics
Miscellaneous Utilities screen
black and white enhancements, 16-6
color display, selectable options. 16-4-16-5
background color, 16-5
blink, 16-5
character. 16-5
controlling color displays from. 16-3-16-6
menu selections, 16-2
Mnemonics. glossary. B-I-B-I0
MOD 128. 33-5. 34-4, 35-4. 39-4
MOD 8, 33-5, 34-4, 35-4. 39-4
Mode
default handshake for remote pon, 67-20
field on Line Setup menu. 4-3, 9-5. 9-6,
9-22, 10-3, 10-10, 11-4, 28-10, 33-15,
34-24. 39-15. 49-7. 50-8
test mode field on Line Setup menu, 1-11
Mode of Operation
field on Frame Level Setup screen, 33-12.
34-16. 39-10
field on LAPD Frame Level Setup screen,
39-3, 39-4
field on SDLC Frame Level Setup screen,
35-3, 35-4
field on SNA/SOLC Frame Level Setup
screen, 36-3
field on X.25 Frame :Level Setup screen,
33-3, 33-5
field on X.25 Packet Level Setup screen,
34-3. 34-4
Modem connector
external, 1-9
internal. 1-9
Modem eliminator, patching example. 10-7

Index to Part I and Part II

Monitor mode
installing connectors for, 10-3, 49-7. 50-8
ISDN, 48-8-48-9
not affected by position of breakout switches,
10-6
setting up. 4-3
Monitor path, upward path of IL buffer in
monitor (or emulate) mode, 55-3
More to resend, emulate-mode condition
LAPD,39-18
translated into C, 77-8
SDLe, 35-19
translated into C, 73-8
X.25 Layer 2, 33-19
translated into C, 71-8
X.2S Layer 3, 34-28
translated into C, 72-11
Move, editor command. 26-6
MPM board
block diagram, 2
connections for. J4-2
hardware architecture. 13-3, J3-12-J3-13
S1 switch settings. See Field Service
view as a component. J2-2
MPM errors. 2-17
MSG-TYPE, trace column. Q.931. 40-5
MUX board, hardware architecture. 13-3, J3-5
Multidrop handshaking, 10-12. 10-15, 10-16
Mux board. firmware replacement. See Field
service

N
N. name, field on Graphical Statistics menu,
18-6

Network Management (NETM) Headers, SS#7
Layer 3, 43-18
NETM condition, translates into two e
'
variables. 80-1
Newline, nonliteral used inside C string, 56-20
writes fresh blank line into trace buffer, 61-27
writes hex 00 OA (ASCII CR-LF) to printer
output, 64-9
Next Page key, 26-4
in spreadsheet, 3-8
on statistics screens, 3-8
on trace display. 33-6, 34-8. 35-5, 36-4,
40-4, 42-4, 43-4
Next state
in C, 53-4
Protocol Spreadsheet, programming block,
24-9
comments in. 24-13
No BCC. appended to transmit string. 8-6
interpreted as bad BCC. 8-6
No display. display mode. 5-28
No more to resend, emulate-mode condition
LAPO, 39-18
translated into C, 77-8
SOLe. 35-19
SOLe variable. translated into e, 73-8
X.25 Layer 2. 33-19
translated into C. 71-8
X.25 Layer 3, 34-28
translated into C. 72-11
Nonevent variables. 59-5
in C
checked when event is signalled, 57-5
true in expressions with nonzero value,
53-12
Nonliteral characters
inside C strings. 56-21
inside set..,print_header strings. 64-7

N_DATA. macro, 29-5

Nonzero conditional expression, always true in
C, 53-12, 58-2

N_DATA IND, sent up automatically by Give
Data action at Layer 3, 34-39, 34-44

Not Equal key, 3-6
in Receive string condition, 21-7
used in Suppress field to indicate .. display
only", 5-11

Naming. of variables in C, 57-2
National bits. G.703. field on Interface Control
menu, 50-25
National Format. field on S8#7 Packet Level
Setup screen. 43-3
Negative exponent, meaning in BERT formulas,
9-14
Network Indicator, SS#7 Layer 3, 43-9

NRZI. field on Line Setup menu. 4-12
Nr
acknowledging last NSf adjunct to send-frame
action
LAPD.39-23
SDLC, 35-24
X.2S Layer 2. 33-26

Index to Part I and Part II

calculated automatically, adjunct to
send-frame action
LAPD,39-23
SDLC, 35-24
X.25 Layer 2. 33-26
repeating last Nr, adjunct to send-frame
action
LAPD,39-23
SDLC. 35-24
X.25 Layer 2, 33-26
reset, emulate-mode action
LAPD,39-28
SDLC, 35-30
X.25 Layer 2. 33-31
trace column
LAPD,39-8
SDLC.35-9
staggered to indicate two separate numbering
sequences, 33-9, 35-9
X.25 Layer 2, 33-9
value. adjunct to send-frame action
LAPD,39-23
SDLC.35-24
X.2S Layer 2. 33-26
Nr error, emulate-mode condition
LAPD.39-16
SDLC. 35-18
X.2S Layer 2, 33-18
Ns
calculated automatically, adjunct to
send-I-frame action
LAPD,39-24
SDLC, 35-26
X.25 Layer 2, 33-27
reset. emulate-mode action
LAPD,39-28
SDLC, 35-30
X.25 Layer 2, 33-31
same as last-received Nr. adjunct to
send-I-frame action
LAPD,39-24
SDLC.35-26
X.25 Layer 2, 33-27
skip to correct Ns plus one. adjunct to
send-I-frame action
LAPD,39-24
SDLC.35-26
X.25 Layer 2. 33-27
trace column
LAPD,39-8
SDLC, 35-9
staggered to indicate two separate numbering
sequences. 33-9,35-9
X.25 Layer 2, 33-9

value, adjunct to send-I-frame action
LAPD.39-24
SDLC, 35-25
X.2S Layer 2. 33-26
Ns error, emulate-mode condition
LAPD,39-16
SDLC, 35-17
X.25 Layer 2. 33-17
NT

ISDN network termination, 48-7
state on ISDN line. 48-13
Null
added by compiler to terminate string. 56-19,
57-12
not valid in C string. 56-20
octal or hex version legal inside C string,
56-21
terminates execution of display and print
routines. 56-21
termination overridden by %H conversion
specifier. 61-10
Number of Faults. BERT counter, 9-21

o
Object, Protocol Spreadsheet, programming
block, 24-8
C regions in relation to, 53-1. 52-16. 53-17
comments in. 24-13
format of. 24-11
must be used to access compiled spreadsheet,
13-21
only C regions and comments may precede,
24-8
placement of. 24-11
used to access #pragma hook routines, 56-12
used to access linkable-object files. 24-10,
56-12
Object code
contents of llnkable-object files
compiled C code. 13-7
compiled spreadsheet, 13-7
accessed via OBJECT block-identifier
only. 13-21
must be a valid program. 13-21
contents of object files. 13-6
loaded in automatically via Load Program
action. 27-19
rerunning object version of program. 2-15
Object files. 13-6. 13-12. 13-14
compared to linkable-object files, 13-7,
13-22
not as versatile as source-code files. 13-15
use disk-space intensively. 13-15

Index to Part I and Part II

Octal
C constant. 57-7
conversion for display, 57-8, 61-20
conversion specifier, 61-11
Offset, 5-26
On Signal, layer-independent condition, 27-8
On/off (power) switch, back panel, 1-8
One, transmitting steady one, set_tcr_b, C
routine, 59-14
1 OF, field on Trigger Setup menu, 21-8
One-of character list
effect of not-equal character, 21-8
monitor/receive condition, Layer 1, 28-3
OOF events. Tl statistics display, 49-30
OPT-951-01-1, J6-1-J6-6
OPT-951-22-1, optional codes J187/8, H-l
OPT-951-98-1, rack mount, 0-1-G-4
Operating environment, 1-14
Operating positions, 1-14
Operator messages
interactive messages, AI-1-Al-15
issued by C translator, A2-1-A2-6
issued by compiler, A3-1-A3-16
Operator precedence, C language, 56-17
Operators, relational, in counter conditions.
27-5
Order of transmission
in relation to binary display, 5-15
in relation to code charts, 4-11
in relation to hex display, 5-14
in relation to pattern sync in BERT. 9-11
Originating Point Code (OPC), SS#7 Layer 3.
43-9
Origination/destination link. message-type
condition, Q.931, 40-11
OSI
Layer Setup, 6-3
Open Systems Interconnection. layered
programming, 20-3-20-8
See also Layers
primitives, 20-8
OSI primitives. See Primitives
Other frame
monitor/receive condition
LAPO, 39-11
SOLC, 35-12
X.25 Layer 2, 33-12

send action
LAPO, 39-21
SOLC. 35-23
X.25 Layer 2, 33-24
Other packet
monitor/receive condition, X.2S Layer 3,
34-17
send action, X.2S Layer 3, 34-33
Out of sync, status message in BERT. 9-21
Output jacks
on RS-232 TIM, 10-8
on RS-449 TIM, 45-6
on V.35 TIM, 44-6
on X.21 TIM, 46-6
Outsync
called "resync" in BERT. 9-8
Layer 1 action, 28-11
compared to Capture Off action. 28-11
outsync_action, C routine, 59-10
parameters not selectable in OOCMP. 37-1
subfield on Line Setup menu, 4-7. 4-8
Outsync Char, field on Line Setup menu, 3-6
Overlay, Test Interface Module, 1-5 '
Overrun, of print buffer. 64-1
minimize by suspending playback. 64-2
Overstrike mode, 3-8

p
P/F, trace column
LAPO, 39-8
SOLC. 35-10
SNA-SDLC, 36-6
X.2S Layer 2, 33-10
P/F bit
adjunct to monitor/receive-frame condition
LAPO.39-13
SOLe, 35-14
X.25 Layer 2, 33-14
adjunct to resend-frame action
LAPO, 39-27
SOLC, 35-29
X.2S Layer 2. 33-30
adjunct to send-frame action
LAPO.39-23
SOLC.35-24
X,2S Layer 2, 33-25
PATH. field on X.2S Packet Level Setup
screen, 34-5
Packages Loaded
column on Layer Setup menu. 33-3, 34-3,
39-3, 43-3
column on Layer Setup screen, 6-4

Index to Part I and Part II

Packet fields, diagrammed for X.2S, 34-10
Packet sent, emulate-mode condition
should be used along wiUl More/No More to
Resend. 34-29
.
X.2S Layer 3. 34-27
packet_sent, C variable, 72-8
Parity
a consideration when entering BCC
parameters, 8-11
adjustment automatic in Sync Chars field. 4-7
always the last bit transmitted. 4-11
automatic calculation of in receive sync
pattern, 4-7
default value for remote port, 67-20
field on Line Setup menu, 4-6. 4-7, 9-16,
21-6. 28-4
field on Printer Setup menu, 14-4
in BERT testing. 9-15
in setup, 4-6
Parity errors
monitor/receive condition, Layer 1, 28-4
special display of. 4-6
Patching. modem-eliminator example. 10-7
Path
adjunct to receive-packet condition, X.2S
Layer 3, 34-25
adjunct to send-packet action, X.25 Layer 3,
34-32, 34-33. 34-34
used in all packet types except Restart,
34-34
correspondence at different layers, 30-5.
34-34
more "programmable" than LCN. 34-25.

34-34
part of definition of data primitive, 30-5
rcvd_devicej)ath. C variable. 72-9
tied to a set of Call Request parameters on
X.25 Packet Level Setup screen, 34-5.
34-25. 34-34, 72-9
Pattern, field on BERT Setup menu, 9-7
Pattern Sync Status
field on BERT results screen, 9-20
line on BERT results screen. 9-21
Pattern sync. in half-duplex pseudorandom
BERT. 9-11
two default sets, 9-13
PCM board
block diagram, 2
connections for, 14-2
hardware architectUre, 13-3, J3-8-J3-11
view as a component. ~-2
PDU. See Primitive data unit; Primitives

Perc(entage). 5-26
of Program Trace buffer storing previous data,
5-20
Percentages. computed through the sampling
action, 17-11
Personality packages. See Protocol packages;
Protocol packages and Layers
PH_ACTIVATE REO. sent down automatically
at Layer 2 if Layer 1 inactive. 33-34.
35-32, 39-31
PH_DATA. primitives between Layers 1 and 2.
30-9
PH_DATA REO. sent down automatically by
Send or Resend action at Layer 2, 33-34.
35-32, 39-31
PH_TD_DATA IND
implemented by a set of monitor-path
variables. 55-3
implemented by a set of receive-path
variables. 55-3
signalled by DDCMP package. 37-2
Physical DTE/DCE
basis of Source column on trace display.
33-7. 34-12. 35-5. 36-4, 39-6. 40-5
contrasted to logical DTE/DeE, 33-4
Physical dimensions, size and weight. 1-3
Playback
control leads. 2-17. 7-5
disk data. 2-18
EIA leads. storage. 1-12
manual control of. 3-11
source of data selected on Line Setup screen,
4-4
startJcn:i"p1ay. C routine. 65-3, 69-16
suspend_rcrd"play, C routine. 65-3. 69-17
time ticks. 2-18. 7-6
timer values not affected when time ticks
enabled. 27-10
transfer of data prior to, 11-4
Pointer. in C
always 32 bits no matter what the data type,
57-11
creating a pointer. 57-11
incrementing pointers of various data types.
57-12
mJ)acket_infoj)tr. pointer to first data byte
in X.2S packet, 72-8
mj)tr_to_ca1l_ref. pointer to 0.931
call-reference field. 78-4
mj)tr_to_info_element. pointer to Q.931
info-element field. 78-4
making a pointer to the data in a received
frame, 71-8, 73-8. 77-8

Index to Part I and Part II

making a pointer to the data in an IL buffer,
57-10, 63-41
pointing with subscripts, 57-12, 57-13
rcvd..,pkt_info..,ptr. pointer to first data byte in
X.2S packet, 72-8
rh..,ptr, pointer to first byte of SNA
request/response header, 74-4
ru..,ptr, pointer to first byte of SNA
request/response unit, 74-4
string. 56-19
structure pointer, 57-16
th..,ptr. pointer to first byte of SNA
transmission header, 74-4
Pointer-list buffer. 63-3
See also IL buffer
Polarity
field on Line Setup menu, 4-11
nonnal versus inverted, 4-12
Pound sign (#), precedes preprocessor
directives. 56-5
Power connector, 1-7

.hook text added to top-level main function,
56-12
in linkable-object files. 56-11
system-generated during Compile spreadsheet,
56-11
using multiple hooks. 56-12
#pragma layer. C directive. used to declare a
layer. 53-1
#pragma nowarn, C directive, used to suppress
compiler warnings. A3-1
#pragma object. C preprocessor directive, 56-8
format of. 56-8
placement of, 56-8
#pragma tracebuf, C directive. used to configure
size of trace-buffer arrays, 5-18, 5-24.
61-26
Preamble, field on BERT Setup menu, 3-6
Preamble characters, in half-duplex BERT, 9-7,

9-9

Power switch, back panel. 1-8
Power up. 1-14, 2-1
self tests. 2-1
PROMs, exchanging. See Field Service
PROTSEL. Protocol Select, Layer Setup
function key used to select
protocol-configuration screen for a given
layer, 33-3, 34-3, 43-3
Pr
acknowledging last Ps, adjunct to send-packet
action, X.25 Layer 3, 34-36
calculated automatically, adjunct to
send-packet action, X.25 Layer 3. 34-36
repeating last Pr. adjunct to send-packet
action. X.25 Layer 3, 34-36
reset, emulate-mode action, X.2S Layer 3,
34-41
trace column
staggered to indicate two separate numbering
sequences, 34-13
X.25 Layer 3, 34-12
value. adjunct to send-packet action, X.25
Layer 3, 34-35
Pr error, emulate-mode condition, X.25 Layer
3, 34-27
pr_error, C variable. 72-8
#pragma, C directive. placed inside of task
definition, 52-16
#pragma hook. C preprocessor directive, 56-11
defining the hook text. 56-12
fonnat of, 56-11

Precision
length of conversions in display and print
routines. 61-10
size of data types. 56-13
Prev Page key, 26-4
in spreadsheet, 3-8
on statistics screens, 3-8
on trace display, 33-6, 34-8, 35-5. 36-4,
40-4. 42-4. 43-4
used to restore previous menu. 3-8
Primary (host) in SDLC. 35-4
Primary Rate ISDN. 49-6
0.703,50-7
Primitive data unit
See also Primitives
and IL buffers, 30-3
being passed down the layers. illustrated, 63-2
being passed up the layers. 55-2
illustrated, 63-4
structure of. 63-5
data length. 63-5
data-start offset, 63-5
IL buffer number. 63-5
Primitives
accessing information in, 63-5-63-11
as conditions and actions. 30-3
automatic. 31-1
at Layer 1, 30-3
below the top layer, 31-1
monitor primitives. 31-1
varies with protocol package, 31-1
currently not accessible at Layer 1. 30-3
indications versus requests. 30-10

Index to Part I and Part II

Layer 1 not automatic, 30-3
Layers 1 through 7, listed. 30-11-30-13
layered programming. lO-3
OS1,20-8
.
OS1 routines
sending primitives up and down the layers,
63-44
on spreadsheet
indication of direction, 30-4
indication/confirm, 30-5
path. 30-5
request/response, 30-5
type, 30-4
pointing to data inside PDUs, 63-3
prefixes, 30-4
several automatic at given layer
LAPD,39-31
SDLC, 35-33
X.25 Layer 2. 33-34
X.25 Layer 3, 34-44
shared by layers. 30-3
used for passing data macros downward, 29-5
Print
File Maintenance. menu selection. 13-19
layer-independent action, 27-16
used to check status of print buffer. 64-1
Print accumulator t layer-independent action,
27-16
Print buffer
overrun, 64-1
minimize by suspending playback. 64-2
queues unprinted text from print actions. 64-1
Print counter. layer-independent action. 27-16
statistical log produced by. 17-9
Print key
used to print data. 3-13
used to print programming screens or
spreadsheet. 3-6, 14-7-14-8
Print prompt, layer-independent action, 27-18
Print server. transfers output from print buffer
to printer port, 64-1
Print timer. layer-independent action. 27-16
statistical log produced by, 17-9
Printer. 14-3-14-5
C print routines. 64-1-..,.64-10
nonliteral characters inside setJ'rint_header
strings. 64-8
C print structures. 64-1
Printer Setup screen. 1<~-3-14-5
menu selections. 14-2. 14-3-14-5
characters per line. 14-5
form feed, 14-5

format character buffer. 14-5
handshake mode. 14-6
lines per page. 14-5
new line, 14-4
number of bits, 14-4
number of pads. 14-5
parity. 14-4
print to file jnstead of printer, 14-6-14-7
printer type, 14-5
speed. 14-4
print server transfers output from print buffer
to printer port. 64-1
printing data, 14-10-14-15
from display window, 14-16-14-17
line data. 14-10-14-15
program trace, 14-14-14-15
protocol traces. 14-13-14-15
statistics. 14-15
user traces. 14-17
printing disk files. 14-17-14-18
printing static displays, 14-7-14-8
Layer Setup screen, 14-8
Protocol Spreadsheet, 14-8
program menus, 14-8
setup menus. 14-8
Trigger Setup screens. 14-8
RS-232 printer connector. 14-3
special characters. data, display of, 14-10
special characters. menus, display of, 14-7
spreadsheet control of. 14-17
unprinted text queued in print buffer, 64-1
Printer connector. 1-9. 14-3. 64-1, 1-3
Program files, saving and loading. 19-6
Program key, 2-4, 3-4
unit unexpectedly enters Run mode. 2-20
Program trace, 5-18
#pragma tracebuf. 5-18, 61-26
as customized protocol analysis. 27-19
as debugging tool, 27-19
buffer containing 4096 characters, 61-23
buffer may be scrolled through in Freeze
mode. 5-18, 61-23
buffer size may be increased, 5-18, 61-26
C routines. 61-27
generated by trace actions on the Protocol
Spreadsheet, 27-18
one of eight trace buffers. 61-23
printing, 14-14
run-mode softkey available if Trace action
invoked or if state trace requested. 5-18
sample trace. 5-18. 5-20
selecting state names from via Display Setup,
5-19. 27-19
specific to LayerlTest selected on Display
Setup. 5-19. 27-19

Index to Part t and Part II

I

structures, declared in trace buf.h #include
file. 61-23
trace_bur. C structure. 61-23
trace_buffer_header. C structure, 61-23
Programming
concepts of
branching (changing states). 20-3. 24-9
OS1 layers, 20-3-20-8
simultaneous tests, 20-3-20-4
states. 20-3
three-tiered design. 19-1-19-6
program structure, Protocol Spreadsheet.
24-6-24-7
Prompt
blanking the entire prompt line. 58-4
display-prompt, C routine. 61-3, 61-21
field on Trigger Setup menu, 22-3
layer-independent action. 27-12
most recent prompt retained in Display
Window. 61-3
printing. 27-18
prompt line never accessed by trace routines,
61-4
using backslash and double-quote characters
inside of, 27-12
Protocol header
applied to user data by Send action. 30-6
not applied if Data Req primitive used instead
of Send. 30-7
Protocol hex. user program to convert X.2S
headers to hexadecimal. 33-35
Protocol packages, 6-3
general description. 19-3-19-4. 20-7-20-8
user disk. 6-3
Protocol Spreadsheet
comments. 24-13
constants. 20-8. 25-3-25-7
creating and editing, 19-4-19-5
See also Protocol Spreadsheet editor
editor. See Protocol Spreadsheet editor
files
reading and writing. 26-6-26-10
saving and loading. 19-6
function key hierarchy (editor). 26-2
function key hierarchy (programming). 24-2
function keys. 24-3-24-5
fundamentals. 24-3-24-7
general description of capabilities. 19-1.
19-3-19-4
increasing the size of. 2-13
Layer 1 conditions and actions enabled
automatically, 28-1
Mark key. used as program tab. 3-9

overview. 2-12
printing. 14-8
program format. 24-9
program structure. 24-6-24-7
special ASCII characters
backslash (\). 3-5
double quote ("). 3-5
space ( ). 3-5
spreadsheet editor. WRITE command, 13-7
syntax errors, 2-16
unexplained strike-through's, 2-20
use of cursor keys. 3-8
use of softkeys and the Done key. 3-9
variables shared with Trigger Setup menus,
19-5
Protocol Spreadsheet editor, 26-3-26-10
insert mode, 3-8
Mark key, used as program tab. 3-6
WRITE command, 13-7
Protocol Trace
buffer
logical beginning offset. 61-40
logical end offset, 61-40
monitor position within, 61-38
physical beginning of, 61-38
physical end of, 61-38
size of, 61-38
Protocol trace
See also Trace display
display entering Run mode enabled on Display
Setup. 5-17
enabled on Layer Setup screen, 5-16
printing. 14-13
Protocols
compatibility with line setup, 6-4
how to select and load, 6-3
Ps
calculated automatically, adjunct to
send-data-packet action, X.25 Layer 3,
34-35
reset, emulate-mode action, X.25 Layer 3,
34-41
same as last-received Pr. adjunct to
send-data-packet action. X.25 Layer 3.
34-35
skip to correct Ps plus one. adjunct to
send-data-packet action. X.25 Layer 3.
34-35
trace column
staggered to indicate two separate numbering
sequences, 34-13
X.2S Layer 3, 34-12
value. adjunct to send-data-packet action,
X.25 Layer 3. 34-34

Index to Part I and Part II

Ps error, emulate-mode condition. X.2S Layer
3, 34-27
ps_error, C variable, 72,...8

Q
Q, trace column, X.25 Layer 3, 34-13

Q bit

adjunct to monitor/receive-packet condition.
34-18
adjunct to send-packet action, 34-36
position diagrammed. 34-13
Q.931
diagram of message fielQs. 40-7
message types. adjunct to DTE and DCE
receive conditions. 40-9
used with ISDN D channel. 38-3
Quotation mark. entry of inside prompt
message, 27-12

REMOTE RS-232 connector, 1-9
See also Remote port
Read. editor command. 26-6
formatted. 26-6
unformatted. 26-7
Receive
emulate-mode condition
LAPD.39-15
Layer 1. 28-3
SDLC, 35-16
X.25 Layer 2, 33-15
X.2S Layer 3, 34-24
does not see the data line directly. 34-24
may specify path as added condition.
34-24
via REMOTE RS-232 port. 67-1
Receive path. upward path of IL buffer in
emulate mode. 55-3
Receiver. Conditions. Trigger Setup menus,

21-5
Receiver gain. G.703. Interface Control
selection, 50-19
.

R

Record
layer-independent action, 27-20
staIt_rcrd"'play, C routine. 14-6. 65-3, 69-16
suspendJcrd..,:play. C routine. 65-3, 69-17

RAM
data storage. 1-12
RAM -to-disk transfer
bit-oriented data. 11-4
character buffer. 11-4

Record Ch16. G.703 Interface Control screen,
50-5

Rack mount assembly, 0-1-G-4

Record Framing Bits. Tl Interface Control
selection, 49-5, 49-26

RC-8245. See RS-48S
Rcv Blk Chk
enabled automatically for BOP, 28-4
field on Line Setup me$U, 8-3, 21-5. 28-4.
28-9
field on Line Setup scr~en. 22-5
must be enabled for BCC conditions to come
true. 28-4
subfield on Line Setup menu. 4-9
REJ

monitor/receive condition
LAPD.39-10
SDLC.35-12
X.25 Layer 2. 33-12
,
address needed for Receive REJ. 33-16
X.25 Layer 3. 34-16
send action
LAPD,39-20
SDLC.35-23
X.2S Layer 2. 33-23
address required tot Send REI. 33-23
X.2S Layer 3. 34-31

Record key, 3-11, 11-11
Record Setup
defaults. 11-4
menu selections. 11-2. 11-5-11-10
overview of screen, 2-12
the screen buffer, 11-4
Record Speed
field on Record Setup menu, 11-7
G.703 channel data capture. 50-5
Tl channel data capture. 49-4
Recording data, 11-3-11-11
format of recorded data, 11-3
bit-image data. 11-·..3
character-oriented. 11-3
manual control of. 3-11
maximum rate, 1-13
medium used. 11-3
record speed
high-speed, 11-9
normal. 11-7

Index to Part I and Part II

screen buffer
manual control of, 11-11
trigger control of. 11-10
spreadsheet control of, 27-20
trigger control of, 11-10
with EIA lead transitions. 1;"'12
Redirect run-mode output
Line and Record setups override. 14-6
terminated by recording to disk. 14-6
to disk file instead of printer, 14-6
Relative pathnames. files and directories, 13-6
Relay baton. See Maintain bit
Remote connector, 1-2
Remote LED. 10-4. 48-6, 49-9. 50-11
front panel, 1-5
Remote port
default configuration. 67-20
transmit and receive data. 67-1
Remote RS-232 connector, Remote port
controlled by C program. 67-1-67-27
Rename, File Maintenance
menu selection, 13-19
rename. C routine, 65-31
Repair, replacement. return, assistance.
E-I-E-3. H-1-H-4
Replace, editor command. 26-9
Reque~primitives,

30-5
versus "indications", 30-10

Resend frame
effect on Frame Sent condition, 33-18.
35-18, 39-17
first in window. 33-30, 35-29. 39-27
action resets resend pointer, 33-30, 35-29.
39-27
in relation to window. 33-5, 34-4. 35-5. 39-5
LAPD action, 39-26
resend_frame. C routine. 77-10
next in window. 33-30. 35-29. 39-27
default resend, 33-30. 35-29. 39-27
SDLC action. 35-27
resend_frame. C routine. 73-10
used with More To Resend and No More To
Resend conditions, 33-19, 35-19, 39-18
X.25 Layer 2 action, 33-29
resend_frame. C routine. 71-10
Resend packet
effect on Packet Sent condition, 34-27
fir~ in window, 34-39
action resets resend pointer, 34-40

next in window, 34-39
default resend, 34-39
programming example. 34-46
used with More To Resend and No More To
Resend conditions. 34-28
X.25 Layer 3 action, 34-39
resend"'packet, C routine. 72-14
Resend pointer, reset automatically by
acknowledgement. 33-30, 35-29. 39-27
Resend window. programming example. 34-46
Reset
0.703 BERT, run-time function key. 9-45
Tl BERT, run-time function key. 9-32
Reset Nr. emulate-mode action
LAPD.39-28
reset_nt. C routine. 77-11
SDLC. 35-30
reset_nr, C routine. 73-11
X.2S Layer 2. 33-31
reset_nr, C routine, 71-11
Reset Ns. emulate-mode action
LAPD,39-28
reset_ns, C routine, 77-11
SDLC, 35-30
reset_ns. C routine. 73-11
X.25 Layer 2. 33-31
reset_nsf C routine. 71-11
Reset Pr and Ps, emulate-mode action, X.25
Layer 3, 34-41
reset"'pr...ps, C routine. 72-15
Resolution. display. 1-3
Response addressing
adjunct to receive condition. X.2' Layer 2.
33-16
adjunct to send-frame action. X.2S Layer 2,
33-24
Response primitives. 30-5
Restart
0.703 BERT, run-time function key, 9-45
Tl BERT. run-time function key. 9-32
Restart (or start) timeout, layer-independent
action, 27-11
Restart (or start) timer
in C, 62-11
layer-independent action. 27-10
Resync.9-9
field on BERT Setup menu. 9-8, 9-21
in full-duplex BERT. 9-8
may be inappropriate on noisy circuit. 9-9
triggered by a fault, 9-21
not available in half-duplex BERT. 9.,..9
outsync mode in BERT. 9-9

Index to Part I and Part II

Retransmitted I-frames. sample program to
enhance all. 33-33
Return. C statement, 58-2
breaks out of while loop. 58-6
Return key, 3-5. 29-1
Rev, subfield on Trigger Setup menu, 22-7
Reverse EBCD
hex-to-display conversion table, D2-3
keyboard-to-reverse-EBCD conversion table,
D1-7

X.2S Layer 2, 33-12
address needed for Receive RR. 33-16
X.2S Layer 3, 34-16
send action
LAPD.39-20
SDLC.35-23
X.25 Layer 2. 33-23
address required for Send RR. 33-23
X.25 Layer 3. 34-31
RS-170 video connector, 1-10, 16-3

ROB video connector, 1-9. 16-3

RS-232
connector, REMOTE, 1-9
Test Interface Module, 1-7

RI, available for triggering. 28-5

RS-232N.24, test connector, 1-10

Right Arrow key. 26-4

RS-449
circuits. monitOring by trigger, 45-8
data-plus-leads display. 45-7
lead status, in C. 60-2
Test Interface Module. 45-2. ]-15
DIP switches
balanced circuits. 45-5
unbalanced circuits. 45-5

ROB monitor. 1-5

RJ45. ISDN connectors. 48-6
RNR
monitor/receive condition
LAPD.39-10
SDLC. 35-12
X.25 Layer 2, 33-12
address needed for Receive RNR, 33-16
X.25 Layer 3, 34-16
send action
LAPD,39-20
SDLC, 35-23
X.25 Layer 2. 33-23
address required for Send RNR. 33-23
X.25 Layer 3. 34-31
ROLL, function key. used to roll through
packet-level "causes". 34-20. 34-36
Robbed bits. T1 Interface Control selection,
49-24
Robbed-bit signaling. T1 transmissions. 49-23
Roll Back key. 3-8, 26-4, 33-5, 34-8. 35-5.
36-4. 40-4. 42-4. 43-4
Roll Fwd key. 3-8, 26-4, 33-5, 34-8. 35-5,
36-4, 40-4, 42-4. 43...4
Root directory. filing system, 13-4
Routines. in C, 58-1-58-6
always followed by parentheses, 58-2
nonzero retummakes conditional statement
true, 58-6
not usually necessary to declare. 58-1
user-defined, 58-4-58-6
RR

monitor/receive condition
LAPD.39-10
SDLC.35-12

RS-48S
data display
A bus as TD data. 47-6
B bus as RD data. 41-6
dual tri-state bus interface. 47-3
enable/disable buses
DTR controls B bus, 47-7
RTS controls A bus. 47-7
via C ctLeia routine, 47-8
via EIA spreadsheet (or trigger) action.
47-7
via Interface Control Screen, 47-7
Line Setup configuration. 47-6
minimum length of message. 47-6
only valid emulate mode is EMDTE. 47-3
Test Interface Module. 47-2. 1-13
activates drivers to allow transmission. 47-6
connectors. 47-3
controls output of protocol flags. 47-6
DIP switches
balanced data circuits. 41-4
connector-termination. 41-4
LEns
A BUS EN. 47-5
B BUS EN. 47-5
EMULATE, 47-5
MESSAGE. 47-6
suppresses non-protocol flags, 47-6
test points. 47-4
transmit message. via SEND spreadsheet
action. 47-7

Index to Part I and Part II

RTS
available for triggering, 28-5
enables/disables A bus (RS-485), 47-7
field on Interface Control menu, 10-10,
10-12, 10-14, 10-15
field on RS-232 Interface Control menu, 9-4,
9-6
RTS on/off, Layer 1 Emulate DTE action,
28-10
RTS-off delay, 10-14
RTS-on delay, 10-12
Rub Out key, 3-7, 26-4
Run mode. unit fails to enter, 2-20

s
S, scale, field on Graphical Statistics menu.
18-5, 18-6
SABM
monitor/receive condition. X.25 Layer 2,
33-12
sample program to enhance all occurrences on
trace display, 39-30
send action, X.25 Layer 2, 33-23
SABME. monitor/receive condition. X.25 Layer
2. 33-12
SAPI
adjunct to monitor/receive-frame condition,
LAPD, 39-12
adjunct to send-frame action, LAPO, 39-22
trace column, LAPD. 39-6
Sample action
on counter, 17-6
clears current value. 17-7
translated into C, 62-4
on timer. 17-6
used to compute percentages. 17-11
Sample counter value
in C, 62-4
layer-independent action, 27-10
Sample test, force data-packet transmit, 34-45
Sample timer
in C, 62-12
layer-independent action, 27-11
Save. File Maintenance, menu selection, 13-15
Save key. 3-6. 13-15
Screen buffer, storage capacity, 1-12

Screen display of data
sixteen data lines in center of, 5-5
three divisions of, 5-5
three lines of softkey functions at bottom of.
5-5
two status lines at top of, 5-5
SOLC
diagram of frame fields, 35-8
SOLC Frame Level Setup screen, 35-2
. SOU. See Service data unit
SELECT, function key, used to select a rolling
packet-level "cause", 34-20, 34-36
SETUP, sample program to enhance all
occurrences on trace display, 40-13
Secondary (drop) in SDLC, 35-4
identified in ADDR column of trace display,
35-7
Segment, in 80286 processor, number used to
identify IL buffer, 55-5, 63-5
Selectable. eRC mode. 8-13
versus Bisync mode. 8-13
Selections. column on Layer Setup screen, 6-4
Selectric
default BCC parameters, 8-9
hex-to-display conversion table. D2-3
keyboard-to-Selectric conversion table, D1-8
Self tests, 2-1
See also Field Service
Send frame. Layer 2 action
effect on Frame Sent condition. 33-18,
35-18, 39-17
LAPD,39-20
send_frame, C routine. 77-12
SOLC, 35-22
send_frame, C routine, 73-12
SNA, 36-3
send_frame, C routine, 74-5
X.2S, 33-22
default parameters, 33-22. 33-23
send_frame, C routine, 71-12
Send packet, Layer 3 action
does not send packet directly out on line,
34-24. 34-30
effect on Packet Sent condition. 34-27
X.25, 34-29
sendyacket. C routine. 72-16
Send string
Layer 1 action. 28-7. 33-27, 34-38, 35-26,
39-24. 47-7
11 il tansmit, C routine. 59-12
U:tansmit, C routine, 59-11

Index to Part I and Part 1\

Service data unit
component in IL buffer structure. 63-3
intransnntroutine.55-4
offset. 55-1
shrinks as IL buffer moves up the layers.
55-1
size in PDUt 63-5
Service Indicators (SI0'sh SS#7 Layer 3, 43-17

Signal Channel Number. T1 Interface Control
selection. 49-6
Signal channel idle char. T1 Interface Control
screen. 49-27
Signal channel number. T 1 Interface Control
screen. 49-27
Signal channel polarity. T 1 Interface Control
screen, 49-27

Set (and start) timeout, layer-independent
action. 27-11

Signaling bits. T1 Interface Control selection.
49-24

Set counter value, layer-independent action,
27-9

Signalling bits. 0.703 transmissions
with CAS signalling with channel 16. 50-32
with CCS/CAS signalling with CRC-4, 50-34
Signalling Channel Control Part (SCCP). SS#7
Layer 3. 43-19
Signalling Link Selection (SLS). SS#7 Layer 3,
43-6. 43-10
Signalling type, 0.703, field on Interface
Control menu. 50-23
Signed, C data type, 56-14

Set Date, field on DatelTime Setup menu, 15-3
Set flag bits, layer-independent action. 27-14
Set idle character. Layer 1 action. 28-12
Set Time, field on DatelTime Setup menu, 15-3
Setup files. saving and loading, 19-5-19-6
Setup menus
Display Setup screen. overview. 2-11
Line Setup. overview. 2-11
overview. 2-11
See also Separate entry under name of each
menu
Record Setup, 11-5-11-10
overview, 2-12
Severely errored seconds
G.703 BERT statistics. 9-44
Tl BERT statistics, 9-31
Shipping. how to pack, F-1-F-4
Short, C data type. 56-13
short routine returns a short. 58-3
S10
monitor/receive condition. LAPD. 39-10
send action. LAPD. 39-21
SI1
monitor/receive condition. LAPD, 39-10
send action, LAPD. 39-21

Sig Channel Polarity, T1 Interface Control
selection, 49-6
Sign extension. occurs during conversion of
signed data types in C, 56-14
Signal
layer-independent action. advantage over flag
or counter, 27-14
layer-independent conQition. 27-8
used in layer-to-Iayer ~mmunication. 55-7
Signal Channel Idle Char \ T 1 Interface Control
selection, 49-6

Single-channel testing. ISDN. 48-5
Size, trace column
LAPD.39-8
SDLC.35-10
SNA-SDLC, 36-6
X.25 Layer 2. 33-10
X.2S Layer 3, 34-14
Sizeof. C operator, 56-20, 71-13. 72-17.
73-13
SNA
fields in protocol trace. 36-7
LU 6.2, 36-3
sample Line Setup. 4-13
SNAfSDLC Frame Level Setup screen. 36-2
SNRM. send action. SDLC. 35-23
Source. field on Line Setup menu. 4-4. 11-4
Speaker, ISDN. ISDN Interface Setup selection,
48-10
Special-recieve word. data display, 59-15
Speed
different speeds for TD and RD, 4-11
field on Line Setup menu. 4-10
optimizing high-speed performance. 2-22
selecting monitor and transmit speeds, 4-10
selecting record speed. 11-9
SRC. source, trace column
LAPD.39-6
Q.931. 40-5
SDLC.35-7

index to Part I and Part II

SS#7 Layer 2, 42-5
X.25 Layer 2, 33-7
X.2S Layer 3. 34-12
SREJ
monitor/receive condition
SDLC, 35-12
X.25 Layer 2, 33-12
address needed for Receive SREJ. 33-16
send action
SDLC.35-23
X.25 Layer 2, 33-23
address required for Send SREJ, 33-23
SS#7
Layer 1, 41-3-41-6
compression of data. 41-4
Run-time display. 41-3
setup for testing, 41-3
Layer 2. 42-3-42-12
frame structure and values. 42-11
Run-time display. 42-3
setup for testing. 42-3
testing in emulate mode. 42-11
testing in monitor mode. 42-6
Layer 3, 43-3-43-22
ANSI format, 43-4
CCITI format, 43-4. 43-9
Circuit Identifier Code (CIC) , 43-6, 43-10
Destination Point Code (DPC), 43-10
Integrated Services Digital Network (ISDN),
43-22
Message Signal Units (MSU's). 43-6
incomplete. 43-7
structure and values, 43-12-43-22
Network Indicator, 43-9
Network Management (NETM) Headers.
43-18
Originating Point Code (OPC). 43-9
Service Indicators (SIO's). 43-17
Signalling Channel Control Pan (SCCP).
43-19
Signalling Link Selection (SLS). 43-6,
43-10
setting up. 43-3
Telephone User Pan (TUP). 43-20-43-21
testing in Monitor mode. 43-7-43-22
US standard fonnat. 43-9
sample Line Setup. 4-13
START/INCL, field on BCC Setup menu, 8-10
START/N/INCL, field onBCC Setup menu.
8-11, 8-14
STX, field on BCC Setup menu, 8-11
Start At Block. subfield on Disk Maintenance
menu. 12-8

Start timeout, layer-independent action, 27-11
Start timer. layer-independent action, 27-10
Start up screen, 2-2
Start-stop, data setup, 4-10
Start-stop bit, voltage not affected by inverted
polarity, 4-12
Start/lncl, field on BCC Setup menu, 8-11
Start/N/Incl, field on BCC Setup menu, 8-12
States
in C, 53-2
introduction to concept, 20-3
Protocol Spreadsheet, programming block,
24-8
comments in, 24-13
traced along with layers and tests on Program
Trace, 5-19
.
Static electricity
anit-static packing. 11-3
elimination. J 1-3
Static Leads. field on Interface Control menu.
10-17
Statistics
graphics display
accessing via softkey, 18-3
printing, 14-15
identification of counters and timers. 17-4
postponed until after run, 17-6
tabular display
75 values displayed at one time, 17-3
accessing via softkey. 18-3
can scroll through 100 counters. timers, and
accumulators, 17-5
printing. 14-15
tabular menu
cursor movement, 17-4
two cursors, 17-4
Statistics menus, overview, 2-13
Statistics screen
G.703 BERT. 9-43
T1 BERT. 9-30
Statistics Type. field on Display Setup menu,
18-3
Stats. statistical softkey t linked to Statistics Type
field in Display Setup menu, 18-3
Status
four kinds of indicators for leads. 10-8
Status lines
division of Run-mode screen, 5-5
recordlplayback field, 4-5, 11-9
in BERT. 9-18
Status variables. See Nonevent variables

Index to Part I and Part II

Stop At, field on Record Setup menu, 11-10
Stop Bits
field on Line Setup menu, 21-6, 28-4
subfield on Line Setup menu, 4-10
Stop timeout, layer-independent action, 27-11
Stream, copy of disk file used by disk I/O
routines, 65-1
Strike-through's, Protocol Spreadsheet, 2-20
String
adjunct to send-frame action
LAPD.39-24
SDLC,35-26
X.2S Layer 2, 33-27
adjunct to send-packet action. X.2S Layer 3,
34-33, 34-38
relation of string entry in Call Request to
OATA field on Pa~ket Level Setup
screen, 34-33
.
conversion specifier, 61-11
Layer 1 send action. 33-27, 34-38, 35-26.
39-24
location of IL buffer. 30;"6
monitor/receive condition
always in quotation marks on Protocol
Spreadsheet, 28-3
Layer 1, 28-3, 28-4
monitored or received, size limit. 28-3
referenced in IL buffer. 30-6
send action
.
always in quotation marks onPrntocol
Spreadsheet, 28-8
no practical size limit. 28-7
valid characters. 28-7
to be passed down with data primitive. 30-6
used to initialize an array in C, 56-19. 57-13
user-defined routine that matches string
against line data. 5 8~6
Strings on Protocol Spreac\Sheet. 29-1
Strip, field on BCC Setup menu. 8-12
Structure, in C. 57-15
Suppress. field on Oisplay.Setup menu. 5-10,
5-13
Suppress not equal. logical equivalent of
"display only", 5-11
Suppress selected trace roWs
LAPD action. 39-29, 39-30
12_suppress. C variable. 77-8
Q.931 action, 40-12. 4Qe-13
I3_suppress. C variable. 78-4

SOLC action. 35-30, 35-32
12_suppress, C variable. 73-8
SNA action. 36-3
12_suppress. C variable. 74-4
SS#7 Layer 2 action, 42-10, 42-11
12_suppress. C variable, 79-4
SS#7 Layer 3 action, 43-10, 43-11
I3_suppress. C variable, 80-7
X.2S Layer 2 action, 33-32, 33-33
12_suppress, C variable. 71-8
X.2S Layer 3 action, 34-42, 34-43
13_suppress, C variable. 12-9
Sync Char
field on Line Setup menu, 3-6. 9-9
subfield on Line Setup menu. 4-7
Sync characters
in half-duplex BERT, 9-7
must be included in transmit string, 29-3
Sync length, Interface Control screen, 49-25
Sync loss time
G.703, statistics display, 50-28
Tl statistics display. 49-30
Sync losses
G.703, statistics display, 50-28
Tl statistics display, 49-29
Sync Pattern
field on BERT Setup menu. 3-6. 9-9
not applicable in pseudorandom full-duplex
test. 9-11
used for pattern sync in half-duplex
pseudorandom test. 9-11
versus Sync Chars on Line Setup menu. 9-9
in fox or user-dermed test. 9-9
Sync symbol, special symbol on data display,
4-7
Synchronization
accidental syncrung. 4-9
continuous search for sync (autosync). 4-8
default patterns for standard codes. 4-7
entering a one-character pattern. 4-7
in-sync status message in BERT. 9-21
searched for following Outsync action, 28-11
when receivers do not search for sync. 4-9
Synchronization point. in half-duplex
pseudorandom BERT, 9-11
Syntax errors. Protocol Spreadsheet. 2-16
/sys/fifty_hertz. file name. 1-8
System disk. boot-up, 2-3. 6-3

tnc:lex to Part .1 .and Part II

T
T. type, field on Graphical Statistics menu,
18-5
T1, 49-1-49-17
aggregate data capture, 49-5
BERT, 9-23-9-34
automatic error injection rate, 9-29
bit errors, 9-31
block size. 9-29
blocks in error, 9-31
blocks received, 9-31
blocks sent, 9-31
channel mode, 9-27
degraded minutes, 9-31
error-free seconds. 9-31
failed seconds. 9-31
framed mode, 9-28
number of faults, 9-31
run-time function keys, 9-32
Setup screen, 9-27
Statistics screen, 9-30
setting up. 9-24
severely errored seconds, 9-31
test length, 9-29
test seconds, 9-31
unframed mode, 9-28
Bipolar violations. 49-26
bit-robbing
with D4 framing. 49-34
with ESF framing, 49-35
CRC check during sync. ESF framing,
Interface Control selection, 49-25
channel data capture. 49-4
clear-channel signaling
with D4 framing, 49-34
with ESF framing. 49-35
data displays, 49-6
drop-and-insert, 9-26, 49-5
emulation modes. 49-5, 49-7
FAS. 49-35
FEB Setup screen. 9-25
FPS (framing pattern sequence). in ESF
transmissions, 49-35
field on Interface Control menu, 10-15
field onLAPD Frame Level Setup screen,
39-3
field on X.2S Frame Level Setup screen. 33-3
frame structures. D4 and ESF. 49-32
framing bits
D4, 49-33. 49-34
ESF,49-35
recording of, 49-26
framing characteristics, 49-4

Interface Control screen, 49-2. 49-19
B8ZS Coding, 49-26
cable length. 49-21
cable type, 49-20
channel number. 49-24
check CRC during sync, 49-25
data path, 49-24
Framing mode, 49-23
Fs Bits, 49-24
frame data link. 49-24
framing (Ft) bits. 49-24
idle select, 49-22
line clock select. 49-22
record framing bits. 49-26
robbed bits, 49-24
sig channel polarity, 49-27
signal channel idle char, 49-27
signal channel number. 49-27
sync length. 49-25
Transmit mode, 49-21
yellow alarm. 49-24, 49-25
in-band signaling
with D4 framing, 49-34
with ESF framing, 49-35
Line Clock selection. 49-12
line conditions, statistics display, 49-31
monitor mode. 49-5
Primary Rate ISDN. 49-6
physical connectors. 49-6
record setup, 11-9
Sync procedure, D4 framing, Interface
Control selection. 49-25
setting up menus for testing, 49-18
signaling, robbed-bit (in-band). 49-23
statistics display. 49-27
BPY's received. 49-29
BPY-free seconds, 49-29
CRC-6 errors. 49-30
carrier losses. 49-31
ESF errors. 49-30
error-free seconds. 49-30
Frames received, 49-29
FT errors. 49-30
FT/FS errors, 49-30
OOF events, 49-30
sync loss time, 49-30
sync losses. 49-29
T1 line conditions. 49-31
test seconds. 49-29
superframing. 49-23
Test Interface Module. 49-2. 49-6. 1-17
signal direction, 49-10
Transmit mode. 9-26
test access points. 49-9
testing and layer protocols. 49-19
testing configurations. 49-11
transmission speeds, 49-3

Index to Part I and Part \I

T1 BERT. testing modes. 9-27
T1 expired. emulate-mode condition
LAPD, 39-4, 39-16
X.2S Layer 2, 33-4, 33-18
T1 line conditions. Tl statistics display. 49-31
T1 statistics display, as alternate run-time
display. 49-32
Tl timeout
conditions under which timer expires, 33-4.
39-4
maximum and minimum values. 33-4. 39-4
TISTATS. T1 BERT. run-time function key,
9-34
T2. field on Interface Control menu, 10-14
T3, field on Interface Control menu. 10-14

TS. field on Interface Control menu. 10-16
T6, field on Interface Control menu, 10-16
Task
C keyword, 56-3
equivalent to spreadsheet Test. 53-1
placed at highest level of source code,
52-16
in linkable-object files. local to the file.
56-11
intercommunication between tasks via signal
routine. 55-7
use routine in hook text to export tasks from
LOBJ files, 56-11

Test Length. field on BERT Setup menu, 9-14,
9-29, 9-42
Test points. on RS-485 TIM. 47-4
Test Seconds, BERT counter, 9-20

TE
ISDN terminal equipment. 48-7
state on ISDN line, 48-11
TEl
adjunct to monitor/receive-frame condition,
LAPD.39-12
adjunct to send-frame action, LAPD. 39-22
trace column, LAPD. 39-6
Telephone User Pan (TUP). SS#7 Layer 3.
43-20-43-21
Temperature, operating. 1-14
Termination, G.703. Interface Control selection,
50-19
Test. field on Display Setup menu, 5-19, 27-19
Test connectors
software control, 1-11
Test Interface Module, back panel.
1-10-1-16
TO DCE. 1-11
TO DTE, 1-11

Test Interface Module
G.703,50-8
signal direction. 50-10
ISDN. 48-2. 48-6
installation, 1-14, 10-3
LED overlay, 1-5
installation. 1-15. 10-3
LED's, back panel, 1-11
RS-232
AUX outputs, 10-8
breakout panel, 10-5
effect of opened switch on screen and
LED display, 10-S
output jacks. 10-8
test points. 10-8
user-assigned input. 10-7
RS-449, 45-2
AUX outputs. 45-7
output jacks. 45-6
software control, 1-11
Tl, 49-6
signal direction. 49-10
test connectors, 1-10-1-16
V.35,44-2
AUX outpUts, 44-7
output jacks, 44-6
X.21.46-2
output jacks, 46-6

Test seconds
G.703. statistics display. 50-27
G.703 BERT statistics. 9-44
Tl BERT statistics. 9-31
Tl statistics display. 49-29
Tests
identified on Program Trace, 5-19
in C. 53-1
Protocol Spreadsheet, programming block,
24-8
comments in, 24-13
simultaneous, program design, 20-3-20-4
TIM
See also Test Interface Module

hardware architecture. J3-14
Tick Rate, field on Front-End Buffer Setup
menu. 7-7, 18-7
Tick rate. 7-6
should agree with time "Unit" on Statistics
screen, 7-6

Index to Part I and Part II

Time, trace column
LAPD,39-8
Q.931, 40-6
SDLC, 35-10
SNA-SDLC, 36-6
SS#7 Layer 2, 42-6
SS#7 Layer 3, 43-6
values may be wall time, ticks, or recorded
ticks. 33-10. 34-14, 35-10, 36-6, 39-8.
40-6. 42-6, 43-6
X.25 Layer 2, 33-10
X.25 Layer 3, 34-14
Time of day, layer-independent condition, 27-6
Time Ticks, field on Front-End Buffer Setup
screen, 7-6, 33-10, 34-14. 39-8, 40-6.
42-6, 43-6
Time ticks
effect on capacity of character buffer, 5-27
enabled/disabled on FEB Setup screen. 7-3
encodable in bit-image or character data. 7-3
gives most accurate timer readings. 27-10
playback, 2-18
of bit-image data. 2-18. 7-6
of character data, 2-17, 7-6
storage of, 1-12
stored in variable called l1_tick_count. 62-8
versus wall-clock timing measurements, 7-3,
7-6, 62-11
Time-of-day clock. See DatefTime Setup
Time/Date Setup, overview, 2-14
Timeout
condition. Trigger Setup menus, 21-10
field on Trigger Setup menu. 22-8
layer-independent action, 27-11
layer-independent condition. 27-4
maximum value. 27-11
program to increase maximum value, 27-12
restart (or start). 27-11
shared between spreadsheet and Trigger Setup
menus, 27-11
Timeout expired, SDLe condition. 35-4
Timer
accumulated. 27-15
action
Protocol Spreadsheet. 17-3
Trigger Setup menus, 17-3
identification postponed until after run, 17-6
identified by name on statistics screen, 17-4
layer-independent action, 27-10
printing line of tabular statistics for, 27-16
Timers, no values displayed, 2-21
TO DCE, test connector, 1-11

TO DTE. test connector. 1-11
To Disk Number, subfieJd on Disk Maintenance
menu, 12-9
Trace
as component of custom protocol analysis.
5-20
as debugging tool, 5-19
compared to prompt. 5-19
layer-independent action, 27-18
layer-independent spreadsheet action. 5-19
versus prompt. 27-18
Trace buffer
correlation with character data. 5-26
Trace display
LAPD,39-5
Q.931, 40-3
SDLC.35-5
SNA-SDLC. 36-4
X.25 Layer 2. 33-5, 42-3
X.25 Layer 3, 34-8, 43-4
Transitional condition. 27-2, 27-6, 28-1
C translation uses event variable, 54-3
Transitional/status condition. 27-2. 28-1. 28-5
C translation uses event or status variable.
54-3
Transmit
sample transmit program
BOP echo, 55-10
sync or asyne echo, 55-9
via REMOTE RS-232 port, 67-1
Transmit complete. Layer 1 condition. 28-6
Transmit mode
G.703. Interface Control selection. 50-20
T1. Interface Control selection. 49-21
Transmit string
complete version entered only at Layer 1.
29-3
does not appear on display, 2-21
Transmit tag. in header of IL buffer. 55-7
Trigger. condition-action grouping on Protocol
Spreadsheet. 27-1
Trigger conditions. EIA, fails to come true.
2-20
Trigger freeze. See Capture data to screen
(on/off)
Trigger Setup. variables shared with Protocol
Spreadsheet, 19-5
Trigger Setup menus, 21-3
Actions. 22-3-22-12
basic description of capabilities, 19-2

Index to Part I and Part II

Conditions
Buffer Full, 21-11
combined with other Conditions, 21-4
Counter, 21-11
combined with other Conditions. 21-4
combining static and instantaneous, 21-4
EIA, 21-9
combined with other Conditions, 21-4
Flags. 21-10
combined with other Conditions, 21-4
Keyboard, 21-12
Receiver, 21-5
Timeout. 21-10
Xmit Complete. 21-10
menu selections
(Actions), 2
(Conditions), 2
overview, 2-12
transmit string, does not appear on screen,
2-21
Trigger Summary screen, 23-3
Triggers
active. 21-4
control of color display, 16-5-16-6
in C, 53-8
Trouble-shooting
data plus leads. failure of leads to transition,
2-21
data-pIus-leads display,. failure of leads to
transition. 2-21
layers, passing data between. 2-21
overheating, 1-9. 2-22
Program key, unit unexpectedly enters Run
mode, 2-20
Protocol Spreadsheet, unexplained
strike-through's. 2-20
Run mode. unit fails to enter, 2-20
timers. no values displayed, 2-21
transmit string. does not appear on screen,
2-21
trigger conditions. EIA. fails to come true,
2-20
Twisted pair. patch cords. 44-5, 45-5, 46-5
Two's complement, 56-14
TYPE, trace column
LAPD.39-8
SDLC,35-7
X.25 Layer 2, 33-7
X.25 Layer 3. 34-12
Type
field on BCC Setup menu, 8-11
field on Disk Maintenance menu, 11-4
field on Display Setup menu. 5-7

primitives. 30-4
subfield on Disk Maintenance menu, 12-8
Type conversion, automatic in some
circumstances in C. 56-14
triLflag, name of flag mask on Trigger Setup
menus. 21-11, 22-6, 27-7
trii.-timeout_1. name of timeout on Trigger
Setup menus, 22-9
trilLtimeout_2. name of timeout on Trigger
Setup menus. 22-9

u
%u, C conversion specifier. converts char to
short. 56-14
U. unit. field on Graphical Statistics menu, 18-7
UIA

LED,1-11
RS-232 input jack, 10-7
RS-449 input jacks. 45-5
A and Bt 45-5
A used for unbalanced patching. 45-5
V.35 input jacks t 44-5
A and B t 44-5
A used for unbalanced patching, 44-6
X.21 input jacks. 46-5
A and B t 46-5
monitored for on/off status. 32-7
UA, send action
SDLC, 35-23
X.2S Layer 2. 33-23
Undelete. editor command, 26-9
Unframed mode
0.703 BERT. 9-40
Tl BERT. 9-28
Unit. column on Tabular Statistics screen, 17-6
Unit of time
selection for printout of timer line. 27-17
selection on a statistics screen, 7-7
Unknown frame. receive condition
LAPD.39-16
SDLC.35-16
X.25 Layer 2. 33-17
Unknown packet. receive condition. X.25 Layer
3, 34-26
Unresolved reference. error message, 2-20
Unsigned, C data type. 56-14
Up Arrow key. 26-4
User disk. personality packages reside on. 6-3

Index to Part I and Part II

User trace
#pragma tracebuf. 5-24, 61-26
buffer may be scrolled through in Freeze
mode, 61-23
buffer size may be increased. 5-24, 61-26
C routines. 61-27
display mode, 5-24-5-26
messages written only via C routines, 61-23
newline nonliteral (\n) provides leading blank
line. 61-27
seven buffers containing 4096 characters each.
61-23
seven of eight trace buffers are user-trace
buffers, 61-23
structures, declared in trace buf.h #include
file. 61-23
trace_buff C structure, 61-23
trace_buffer_header. C structure, 61-23
User-assigned BERT pattern. 9-7

lusr directory. filing system, 13-6
lusrldefault
affect on Start Up screen, 2-2
boot-up menu configuration, 2-5
default program. 2-5
lusrluser_intrf
affect on Start Up screen, 2-2
creating a user interface, 2-4
may be given display line on stat screen(s).

27-15
Utilities menus, overview, 2-14
See also Separate entry under name of each
menu

Voltages
RS-232
detected by receivers, 10-9
generated by drivers, 10-9
generated by special output jacks, 10-8
indicated by UA-input LEDs. 10-7
RS-449
generated by special output jacks, 45-6
indicated by UA-input LEDs. 45-5
V.35
generated by special output jacks, 44-6
indicated by UA-input LEDs, 44-6
X.21
generated by special output jacks. 46-6
indicated by UA-input LEDs. 46-5

w
Wait for End Of Frame
condition dependent on Rcv Blk Chk. ON,
8-5
sub field on Trigger Setup menu, 8-5
Wait for End of Frame, subfield on Trigger
Setup menu, 21-9
Wait for EOF (end of frame)
adjunct to String or One-of condition, Layer
1. 28-5
Layer 1 condition, 28-3
Waitfor. C statement, 53-2, 53-4, 53-5, 53-6,
53-7, 53-9, 53-13. 54-1. 56-3
placed inside of state loop. 52-16
Wall clock
accurate to one millisecond. 7-6
controls timers when time ticks are disabled.

v

27-10

V, value, field on Graphical Statistics menu.
18-6
V.35
circuits. mOnitoring by trigger, 44-7
Test Interface Module. 44-2, 1-9
DIP switches
balanced circuits, 44-5
unbalanced circuits, 44-5
test connector. 1-10

drives the timers displayed on the stats results
screen, 62-11
enabled when time ticks are disabled, 7-6
timings available via the
get_wall_time_286_ticks routine. 62-11
Warranties. E-3
WECO 310. Tl connectors. 49-7. 49-8
While. C statement. nonzero expressions always
true inside of while statement. 58-2

Video connectors
CRTIRGB, 1-9
RS-170 composite video. 1-10
View, File Maintenance. menu selection. 13-18
Void, C data type. return statement invalid with
this type. 58-3
Voltage selection, back panel. 1-7

Winchester hard disk
installing new system software. 2-7
storage capacity. 1-12
Window
cleared by Reset Ns action, 33-31, 35-30.
39-28
defined. 33-29, 34-39, 35-27, 39-26

Index to Part I and Part II

empty, emulate-mode condition. 34-28.
35-18, 39-17
LAPD, translated into C, 77-8
SDLC. translated intoC, 73-8
X.25 Layer 2. 33-18
translated into C, 71-8
X.25 Layer 3. translated into C, 72-13
full
effect on Send action, 33-23. 34-31.
35-22. 39-20
emulate-mode condition, 34-28. 35-18.
39-17
LAPD, translated into C, 77-8
SDLC, translated into C, 73-8
X.25 Layer 2. 33-18
translated into C, 71-8
X.25 Layer 3, translated into C, 72-12
not empty, emulate-mode condition. 34-28,
35-18, 39-17
LAPD. translated into C, 77-8
SDLC, translated into C. 73-8
X.25 Layer 2, 33-18
translated into C. 71-8
X.25 Layer 3, translated into C, 72-13
not full. emulate-mode condition, 34-28.
35-18, 39-17
LAPD, translated into C, 77-8
SDLC, translated into C, 73-8
X.25 Layer 2. 33-18
translated into C. 71-8
X.25 Layer 3, translated into C, 72-12
Window Size
field on LAPD Frame Level Setup screen.
39-3
field on SDLC Frame Level Setup screen,
35-3
field on SNA/SDLC Frame Level Setup
screen, 36-3
field on X.2S Frame Level Setup screen, 33-3
field on X.25 Packet Level Setup screen,
34-3
Window size. 33-5, 34-4, 35-5, 39-5
Write, editor command, 13-7, 26-6
formatted. 26-6
unformatted, 26-7
Write Enable. File Maintenance, menu
selection, 13-19
Write Protect, File Maintenance, menu
selection. 13-20
Write protection, microfloppies, 1-5
while. C statement, 58-6

x
%x. C conversion specifier, converts char to
short. 56-14
X.200, CCI'IT recommendation. 20-5
X.21
call-setup phase. 32-4
clampinglunclamping data leads, 32-9
set_tcr_b. C routine. 70-8
invoking. 32-10
enter_call-phase, C routine, 70-9
plus. ben and sync idle. 32-9
x21 idle action. C routine. 70-6
selectable as initial phase, 46-9
send action. 32-8
code and format. 32-8
x21_transmit_call. C routine, 70-7
data-plus-Ieads display. 46-6
data-transfer phase, 32-5
default initial phase. 46-9
invoking, 32-11
enter_data-phase. C routine. 70-9
selectable as initial phase, 46-9
send action. 32-7
Interface Control Menu screen, 46-8
Layer 1 package. 32-3
leads
controlling C and It 32-10
monitoring C and I for true or valid status,
32-'6
mOnitoring T and R for valid status. 32-5
sending from Layer 2. 32-5. 32-11
Test Interface Module. 46-2. 1-11
DIP switches. 46-5
X.21 bis. lead conversions. 32-4
X.2S

diagram of frame fields. 33-8
diagram of packet fields. 34-10
sample Line Setup. 4-13
user program to convert protocol headers to
hexadecimal, 33-35
user program to force data packets containing
fox messages out onto the line from Layer
3. 34-45
user program to make Layer 2 "automatic"
for higher layer. 33-36
X.25 Frame Level Setup screen, 33-2
X.25 Packet Level Setup screen. 34-2. 34-32
Xmit Complete
condition, Trigger Setup menus. 21-10
fevar_xmit_cmplt, C event. 59-5
Layer 1 condition. 28-6
Xmit Delay, field on Interface Control menu,
10-12. 10-16

tndex to Part I and Pert II

-----"""----------------

Xmit distant MF alarm. G.703. Interface
Control selection, 50-22
Xmit Idle Char
field on Line Setup menu, 3-6
subfield on Line Setup menu, 4-9
Xmit remote alarm, G.703. field on Interface
Control menu, 50-22
Xmit signalling all l's, G.703, Interface Control
selection, 50-22
XS-3
default BCC parameters. 8-9
default sync pattern, 4-7

hex-to-display conversion table. D2-3
keyboard-to-XS-3 conversion table, D1-5
SY characters inappropriate for. 4-7

v
Yellow alarm, Tl transmissions, 49-24

z
Zero. transmitting steady zero. set_tcr_b. C
routine, 59-14

Index to Part I and Part II

Index B
C Structures, Variables, and Routines
A

counter_name_change, counter event, 54-2.
54-3, 62-1
defined. 62-3

Aux. port 110
events. aux._change, 68-4
routines
set_aux._ctl_leads. 68-6
set_aux._direction, 68 .... 5
set_aux.Jeg. 68-10
write_aux., 68-7
variables
curr_aux_value, 68-4
prev_aux_value. 68-4

counter_strllct. counter structure. 57-15, 62-1,
62-6, 62-16
defined. 62-2
crnt_date_of_day, real-time clock variable.
defined. 69-4
crnt_displaLscreen, status variable. 61-1. 66-1,
69-18
defined. 61-2

add_arraLto_buff. data-display routine,
defined, 59-18

crnt_time_oCday. real-time clock variable.
52-1. 54-1. 57-3
defined, 69-4

add_event_to_buff. data-display routine.
defined. 59-17

crnt_tm, real-time clock structure, defined.
69-2

_append_il_buff_list_cnt. OSI layer-independent
routine. 55-7
defined, 63-43
aux_change. aux port 1/0 event. 68-3, 68-10
defined. 68-4

B
bcc_error
LAPD event. defined, 77-3
SDLC event. defined, 73-3
X.25 Layer 2 event. defined. 71-3

c
Counter
events. counter_name_change. 62-3
structures, counter_struct. 62-2
ciearerr, disk 1/0 routine, 65-2. 65-4
defined. 65-10
convert tick count. timer routine. 62-11.
62-12. 62-18
defined, 62-18

ctl_capture_rd. data-display routine. 57-12,

59-9
defined, 59-9
ctl_capture_td. data-display routine, 57-12
defined. 59-8
ctl_eia
EIA routine. 60-4
defined, 60-3
RS-485 application, 47-8
X.21 routine. 70-5
dermed. 70-4
ctl_enhance_fd, data-display routine, defined.
59-8
ctl_enhance_td. data-display routine. defined,
59-7
curr_aux._value. aux port I/O variable, 68-8.
68-10
defined, 68-4
current_col. Display Window variable. 61-4
defined, 61-5
current_eia_leads
EIA variable. 57-8, 60-1. 60-2, 60-3
defined, 60-2
X.21 variable, 70-2
defined. 70-3
current_line. Display Window variable. 61-4
defined, 61-5

Index to C Structures. Variables. and Routines

D
Data display
routines
add_array_to_buff, 59-18
add_event_to_buff. 59-17
ctl_captureJd, 59-9
ctl_capture_td. 59-8
ctl_enhanceJd, 59-8
ctl_enhance_td, 59-7
variables
rd_modifier. 59-5
td_modifier, 59-4
DDCMP
events
fevar_bd_bcc_Td, 75-2
fevaT_bd_bcc_td. 75-2
fevar_bd_bcc2_rd. 75-2
fevar_bd_bcc2_td. 75-2
fevarJd_bccJd, 75-2
fevarJd_bcc_td. 75-2
fevarJd_bcc2_rd. 75-2
fevar_sd_bee2_td, 75-2
Disk I/O. routines
elearerr, 65-10
£Close, 65-5
feof, 65-7
ferror, 65-8
fflush. 65-6
fgete. 65-20
fgets, 65-18
fopen. 65-4
fprintf, 65-28
fputc, 65-26
fputs, 65-25
fread, 65-16
fseek. 65-11
fwrite. 65-23
Jet_file_type. 65-36
lock. 65-14
mkdir, 65-33
remove, 65-32
rename, 65-31
rewind, 65-13
_set_file_type, 65-34
ungete, 65-21
unlock. 65-16
Display Wmdow
routines
displaYJ>rompt, 61-21
displaye, 61-9
displayf, 61-9

displays, 61-20
pos_cursor. 61-21
restore_cursor, 61-22
sprintf, 61-13
structures. display_window_index_buffer. 61-8
variables
current_col, 61-5
current_line, 61-5
display-Window_buffer, 61-7
window_color. 61-5
window_modifier, 61-7
d_dce_frame. ISDN event. defined. 76-2
d_dte_frame, ISDN event, defined, 76-2
d_rcv_frame. ISDN event. defined, 76-2
dee_abort
LAPD event. defined. 77-3
SDLC event, defined, 73-3
SS#7 Layer 2 event, defined, 79-2
X.25 Layer 2 event, defined, 71-3
dce_bad_bce
LAPD event, defined, 77-3
SDLC event, defined. 73-3
55#7 Layer 2 event. defined, 79-2
X.25 Layer 2 event. defined, 71-3
dee_flags, S5#7 Layer 1 variable, defined. 79-5
dee_frame, 54-2
LAPD event, defined. 77-3
SDLC event, defined, 73-3
5S#7 Layer 2 event, defined, 79-2
X.25 Layer 2 event, defined. 71-3
dce_frames_suppressed, 55#7 Layer 1 variable,
defined, 79-5
dceJood_bee
LAPD event, defined, 77-3
5DLC event, defined. 73-3
SS#7 Layer 2 event. defined, 79-2
X.2S Layer 2 event. defined. 71-3
dce...packet
0.931 event. defined, 78-2
55#7 Layer 3 event, defined, 80-2
X.2S Layer 3 event, defined, 72-3
display_binary, user-defined routine, 58-5
displaYJ>rompt. Display Window routine, 67-16
defined. 61-21
display_screen_changed. status event, 61-1,
66-1
defined, 61-2
display_window_buffer, Disp1ay Window
variable. 61-4. 61-35, 61-36
defined. 61-7

Index to C Structures. Variables, and Routines

display_window_index_bufter. Display Window
structure, 61-7. 61-35
defined, 61-8
displaye, Display Window routine, 61-1
defined, 61-9
displayf. Display Window routine, 56-14,
56-19, 61-1. 61-3, 61-8, 61-13, 61-32,
61-33. 65-7. 65-19, 67-6, 67-11
defined. 61-9
displays, Display Window routine, 56-19,
56-22, 57-10, 58-1. 58-3, 61-1, 65-12,
65-24
defined. 61-20
dte_abort
LAPD event, defined. 77-3
SDLC event. defined. 73-3
SS#7 Layer 2 event, detmed. 79-2
X.25 Layer 2 event, defined, 71-3
dte_bad_bee
LAPD event, defined, 77-3
SDLe event. defined, 73-3
SS#7 Layer 2 event, defined, 79-2
X.25 Layer 2 event, defined, 71-3
dte_flags, SS#7 Layer 1 variable, defined, 79-5
dte_frame
LAPD event. defined. 77-3
SOLe event, defined. 73-3
SS#7 Layer 2 event, 79-3
defined. 79-2
X.2S Layer 2 event, defined. 71-3
dte_frames_suppressed. SS#7 Layer 1 variable.
defined. 79-5
dteJood_bce
LAPD event, defined, 77-3
SOLe event, defined, 73-3
SS#7 Layer 2' event, defined. 79-2
X.25 Layer 2 event, defined. 71-3
dteJ)aeket. 54-2
0.931 event. defined, 78-2
SS#7 Layer 3 event. 80... 1
defined, 80-2
X.25 Layer 3 event, defined. 72-3
_dup_il_bufClist, OSI layer~independent
routine. 63-43. 63-44
defined. 63-34
_dup_il_buff_list_start. OSI layer-independent
routine. 63-39, 63-42.. 63-43
defined, 63-33

E
EIA
events. fevar_eia_ehanged, 60-2
routines, cteela. 60-3
RS-485 application. 47-8
variables
current_eia_leads. 60-2
previous_eia_leads, 60-2
enter_callJ)hase. X.21 routine. 70-9
defined. 70-9
enter_dataJ)hase. X.21 routine, 70-10
defined. 70-9

F
Flag
events, flaL.name_change, 69-4
structures, flaL.stTUct, 69-2
fclose. disk I/O routine. 65-1. 65-3, 65-6,
65-7. 65-10. 65-11. 65-13, 65-14, 67-16
defined. 65-5
feof, disk 110 routine. 65-4. 65-8
defmed, 65-7
ferror. disk 1/0 routine, 65-4, 65-9
defined, 65-8
levar abort rd. line event, 59-6
defined, 59-3
fevar_abort_td, line event, 59-6
defined, 59-3
fevar bd bee rd
onCMP event. defined. 75-2
line event, 59-2, 59-6
defined, 59-3
fevar bd bee td
DoCMP event. defined. 75-2
line event. 59-2
defined. 59-3
fevar bd bec2 rd, DDCMP event, 59-6
defined. 75..:2
fevar bd bee2 td. DDCMP event, defined,
75-2fevar_ eia_changed
EIA event. 53-1S. 54-2. 60-1, 60-3
defined. 60-2
X.21 event. 70-2
defined, 70-3
fevar_frm_errorJd. line event, defined. 59-3
fevaT_frm_erroT_td, line event, defined. 59-3
fevarJd_becJd
DOCMP event. defined, 75-2
line event, 54-2, 59-6
defined. 59-3

lndex to C Structures, Variables, and Routines

fevar-id_bcc_td
DDCMP event, defined, 75-2
line event, defined, 59-3
fevar-id_bcc2Jd, DDCMP event, 59-6
defined. 75-2
fevar-id_bcc2_td, DDCMP event, defined,
75-2
fevaryaritLrd, line event, defined. 59-3

_free_il_msLbuff. OSl layer-independent
routine, 55-5. 63-38. 63-39
fseek. disk 110 routine. 65-2. 65-4. 65-12.
65-14
defined, 65-11
fwrite. disk 110 routine. 65-1, 65-2. 65-15,
65-24. 65-36
defined, 65-23
defined. 63-37

fevaryarity_td, line event, defined. 59-3
fevar_rcv_buffer_full. line event. 59-2
defined. 59-3
fevarJcvd_charJd, line event. 55-1, 59-5
defined. 59-3
fevar rcvd char td. line event. 54-2. 55-1,
59-5 defined, 59-3
fevar_time_of_day. real-time clock event, 52-1.
54-1, 54-2. 57-1. 57-3
defined, 69-4

G
get_68kJ'hys_addr. stats-display routine, 58-1.
62-5, 62-7. 62-16
dermed, 62-14
-iet_file_type. disk I/O routine. 65-37
defined. 65-36
defined. 63-32

fevar_xmit_cmplt. transmit event, 59-5
defined, 59-4

-iet_il_msLbuff. OSI layer-independent
routine, 55-5. 55-8. 59-13. 63-36. 63-37.
63-41, 63-45, 71-13, 72-17. 73-13, 76-5.
77-13
defined. 63-31

fflush, disk 110 routine. 65-1, 65-2. 65-3.
65-7
defined, 65-6

get_wall_time_286_tkks, timer routine. 62-11.
62-12. 62-17
defined. 62-17

fgetc, disk I/O routine. 65-1. 65-2
defined, 65-20

get_wall_time_ticks, timer routine, 62-17
defined, 62-16

fgets. disk I/O routine, 65-1, 65-2. 65-19
defined. 65-18
flaLname_change. flag event. 54-2, 54-3
defined, 69-4
flaLstruct, flag structure. defined. 69-2
fopen, disk I/O routine, 65-2. 65-3. 65-5.
65-13. 67-15
defined, 65-4
fprintf. disk I/O routine, 65-2. 65-7. 65-31
defined. 65-28
fputc, disk I/O routine, 65-2. 65-11. 65-27
defined, 65-26
fputs. disk I/O routine. 65-2
defined. 65-25
frame sent
LAPD event. defined, 77-4
SDLC event. defined. 73-4
X.25 Layer 2 event. defined. 71-4
fread, disk 110 routine. 65-1. 65-2, 65-9,
65-17, 65-36, 67-16
defined. 65-16

I
Interrupt
events, signal_name. 69-4
routines, signal. 69-15
ISDN
events
d_dce_frame. 76-2
d_dte_frame. 76-2
dJcv_frame. 76-2
routines
send_d_frame. 76-3
send_d_frame_il. 76-4
set_isdn_speaker_chan. 76-5
structures, xmit_list. 76-1
idle_action, transmit routine. defined. 59-13
il buffer. OSI structure. 55-7. 57-16. 63-6,

-

63-7
defined. 63-9

il list header. OSI structUre. 63-4

-defined. 63-10

Index to C Structures. Variables, and Routines

iLlist_node. OSI structure. 63-4
defined. 63-11
index. string routine. 56-22. 69-11
defined. 69-11
_insert_il_buff_list_cnt
OSI layer-independent routine. 55-5, 55-7,
55-8, 59-13, 63-36, 63-39. 63-41.
63-42, 63-46, 71-13, 72-17, 73-13.
76-5, 77-13
defined, 63-39
invalid_frame
LAPD event, defined. 77-3
SDLC event, defined. 73-3
X.25 Layer 2 event, defined, 71-3
invalid.J'acket, X.25 Layer 3 event. defined.
72-3
OSI routine. 63-12

K
Keyboard
events
keyboard_new_any_key, 69-5
keyboard_new_key, 69-4
routines, send_key, 69-17
structures. keyboard. 69-2
variable. keyboard_any_key, 69-5
keyboard, keyboard structure. defined. 69-2
keyboard_any_key, keyboard variable. 53-9,
53-1~ 59-14. 69-18
defined. 69-5
keyboard_new_anLkey, keyboard event, 53-9,
53-13. 53-14, 53-15, 57-2
defined. 69-5
keyboard_new_key, keyboard event, 53-14,
53-IS, 54-2. 69-2
defined. 69-4

L
LAPD
events
bcc_error, 77-3
dee_abort, 77-3
dee_bad_bce. 77-3
dee_frame, 77-3
dee-iood_bec. 77-3
dte_abort. 77-3
dte_bad_bce, 77-3
dte_frame, 77-3

dW-8ood_bec, 77-3
frame_sent, 77-3
invalid_frame. 77-4
12_Tl, 77-3
nr_error, 77-3
ns_error, 77-3
rcvd_frame. 77-3
routines
12-iive_data, 77-9
resendjrame, 77-10
reset_nr, 77-11
reset_ns. 77-12
send_frame. 77-12
structures. send_frame_structure. 77-2
variables
12_current_window_edge, 77-5
12_enhance. 77-6
12_lower_window_edge. 77-5
12Jesend_edge. 77-5
12_suppress. 77-6
12_upper_window_edge, 77-5
m frame addr cr, 77-4
m:frame:addr:sapi, 77-4
m_frame_addr_tei, 77-4
m_frame_bcc_type. 77-4
m_frame_cntrl_byte_l. 77-4
m_frame_nr. 77-4
m_frame_ns, 77-4
m_frame.J'f, 77-4
m_frame_type, 77-4
rcvd_frame_addr_cr. 77-4
rcvd_frame_3ddr_sapi, 77-4
rcvd_frame_addr_tei. 77-4
rcvd_frame_bcc_type. 77-5
rcvd_frame_bufCseg, 77-5
rcvd_frame_cntrl_byte_l. 77-5
revd_frame_nr. 77-5
rcvd_frame_ns. 77-5
rcvd_frameJ'f. 77-5
rcvd_frame_sdu_offset, 77-5
rcvd_frame_sdu_size, 77-5
rcvd_frame_type. 77-4
Line
events
fevar_abort_rd. 59-3
fevar_abort_td, 59-3
fevar_bd_bccJd. 59-3
fevar_bd_bcc_td, 59-3
fevar_frm_errorJd. 59-3
fevar_frm_error_td. 59-3
fevar-id_bcc_rd, 59-3
fevarJd_bcc_td, 59-3
fevar,..ParitYJd. 59-3
fevarJ'arity_td, 59-3
fevarJcv_buffer_full, 59-3

index to C Structures. Variables. and Routines

, - - - - - - - .._------

fevar_rcvd_char_rd. 59-3
fevarJcvd_char_td. 59-3
routines. outsync_action, 59-10
variables
rcv_buffer_full, 59-4
rcvd_charJd, 59-4
rcvd_char_td, 59-4
Lock, routines
lock. 69-13
unlock. 69-14
11 il transmit. transmit routine, 55-1. 55-4,
- 55-8, 63-39
defined, 59-12
11 tick count. timer variable, 62-8, 62-9,
- 62=11. 62-18. 63-10. 63-16, 63-19,
63-22, 63-25. 63-28, 63-30
defined. 62-10

.SDLC variable. 73-8
defined, 73-5
X.25 Layer 2 variable. 71-8
defined, 71-5
12_suppress
LAPD variable, 77-8
defined. 77-6
SDLC variable, 73-8
defined. 73-6
SNA variable, 74-4
SS#7 Layer 2 variable, 79-4
defined, 79-3
X.25 Layer 2 variable. 71-8
defined. 71-5
12 Tl
LAPD event. defined. 77-3
SDLC event, defined. 73-3
X.25 Layer 2 event, defined, 71-3

l1_transmit, transmit routine, 59-1
defined, 59-11

12 tick count, OS! Layer 2 variable. defined.

ll_trbuf. trace buffer structure. defined, 61-25

12_trbuf. trace buffer structure, defined, 61-25

12_current_window_edge
LAPD variable. defined. 77-5
SDLC variable. 73-8
defined. 73-5
X.25 Layer 2 variable. 71-8, 77-8
defined, 71-5

12_upper_window_edge
LAPD variable. 77-8
defined. 77-5
SDLC variable. 73-8
defined. 73-5
X.25 Layer 2 variable. 71-8
defined. 71-5

12_enhance
LAPD variable. 77-8
defined, 77-6
SDLC variable, 73-8
defined. 73-6
SNA variable, 74-4
SS#7 Layer 2 variable. 79-4
defined. 79-3
X.25 Layer 2 variable, 71-8
defined. 71-5
12Jive_data
LAPD routine, defined. 77-9
SDLC routine, defined. 73-9
X.25 Layer 2 routine, defined, 71-9
12 lower window edge
LAPD-variable:- 77-8
defined, 77-5
SDLC variable. 73-8
defined, 73-5
X.25 Layer 2 variable, 71-8
defined, 71-5
12 resend edge
LAPD ;ariable. 77-8
defined. 77-5

- 63=16

12pp_trbuff. Protocol Trace variable. defined,
61-39
12pp_trbuff_ctl, Protocol Trace structure.
defined. 61-41
12pp_ trbuff_end. Protocol Trace variable.
defined, 61-39
13_clear"path. X.2S Layer 3 routine. defined.
72-11
13 enhance
'0.931 variable, 78-4
defined. 78-3
SS#7 Layer 3 variable. 80-7
defined. 80-6
X.25 Layer 3 variable. 72-9
defined. 72-7
13Jive_data. X.25 Layer 3 routine. defined,
72-10
13 more to resend. X.25 Layer 3 routine,
- defuled:- 72-11
13_suppress
0.931 variable. 78-4
defined, 78-3

Index to C Structures, Variables. and Routines

SS#7 Layer 3 variable. defined. 80-6
X.25 Layer 3 variable. 72-9. 80-7
defined. 72-7

lo_n.Jldu_seg, OSI Layer 4 variable. defined,
63-20
lo_n"'prmtv, OSI Layer 4 event. defined. 63-20

13_tick_count, OSI Layer ,3 variable. defined,
63-19

lo_nJ>rmtv_code. OSI Layer 4 variable. 63-51
defined, 63-20

13_trbuf. trace buffer structure, defined. 61-25

lo_n-prmtv-path, aS! Layer 4 variable. 63-55
defined. 63-21

13_window_empty, X.2S Layer 3 routine,
defined, 72-13
13_window_full. X.2S Layer 3 routine, 58-2
defined, 72-12
13pp_trbuff, Protocol Trace variable, defined,
61-39

lo_n_sdu, OSI Layer 4 variable. 63-55
defined. 63-21
IO"'p_il_buff. OSI Layer 7 variable. defined.
63-30
lO"'p""pdu_seg. OSI Layer 7 variable. defined.
63-29

13pp_trbufCct1. Protocol Trace structure,
defined. 61-42

l0...p...prmtv. OSI Layer 7 event. defined. 63-29

13pp_trbufCend. Protocol Trace variable.
defined. 61-39

10....P...Prmtv_code. OSI Layer 7 variable. 63-63
defined. 63-29

14_tick_count. OSI Layer 4 variable, defined.
63-22

10J)...prmtv...path, OSI Layer 7 variable. defined,
63-29

14_trbuf. trace buffer structure, defined, 61-25

IOJ)_sdu. OSI Layer 7 variable. defined. 63-30

IS_tick_count. OSI Layer 5 variable. defmed,
63-25

10J)h_il_buff. OSI Layer 2 variable, 55-3,
63....46
defined. 63-15

lS_trbuf.trace buffer structure. defined, 61-26
16_tick_count. OSI Layer 6 variable. defined,
63-28

IO"'ph-pdu_seg, OSI Layer 2 variable. defined.

63-14

16_trbuf. trace buffer structure, defined. 61-26

}o"'phJ)rmtv. OSI Layer 2 event. 55-3
dermed. 63-14

17_tick_count, OSI Layer .7 variable, defined,
63-30

10...Ph....Prmtv_code. OSI Layer 2 variable. 63-45
.
defined. 63-14

17_trbuf. trace buffer structure. defined. 61-26

l0....Ph...PrmtvJ)ath. OSI Layer 2 variable.
defined. 63-15

lo_dl_it.buff. 051 Layer 3 variable. 55-3,
63-50
defined. 63-18
10_dl.Jldu-.seg, OSI Layer 3 variable. defined.
63-17
lO_dl"'prmtv. OSI Layer 3 event. 55-3
defined. 63-17
10_dl.J'l1Xltv_code. OSI Layer 3 variable. 63:-47
defined. 63-17
lo_dl"'prmtvJ)ath, 051 Layer 3 variable, 63-47.
63-51
defined. 63-18
10 dl sdu. OSI Layer 3 variable. 55-3, 63-51
defined. 63-18
10 n U buff. OSI Layer 4i variable, 63-54,
- 63':-56
defined, 63-21

lO"ph_sdu, OSI Layer 2 variable, 55-3, 63-46,
63-47
defined. 63:-15
10 s il buff. OSI Layer 6 variable, 63-62
'defined. 63-27
lo_s-Pdu_seg. OSI Layer 6 variable. defined.

63-26
lo_s"'prmtv, OSI Layer 6 event. defined, 63-26
lo_s"'prmtv_code, OSI Layer 6 variable. defined.
63-26
lo_s...prmtv..path. OSI Layer 6 variable. 63... 63
defined. 63-27
10 s &du. OSI Layer 6 variable. 63-63
'defined, 63-27
10_t_U_buff, aS! Layer 5 variable. 63-58
defined. 63-24

Index to C Structures. Variabtes. and Routines

-------

lo_t"'pdu_seg. OSI Layer 5 variable. defined.
63-23

m_frame_nr. LAPD variable, defined, 77-4

lo_t..,prmtv.OSI Layer 5 event, defined, 63-23

m_frame"'pf
LAPD variable, defined, 77-4
SDLC variable, defined. 73-4
X.25 Layer 2 variable. defined, 71-4

lo_t..,prmtv_code, OSI Layer 5 variable, 63-55,

63-59
defined. 63-23

m_frame_ns, LAPD variable, defined. 77-4

lo_t_sdu, OSI Layer 5 variable. 63-59
defined. 63-24

m_frnme_type
LAPD variable. defined, 77-4
SDLC variable. defined. 73-4
SNA variable. 74-1
X.25 Layer 2 variable, defined. 71-4

Ioad...program. program-chaining routine, 69-13
defined. 69-12

m info element len. Q.931 variable. defined.
- 78':-3

lock
disk I/O routine. 65-4, 65-15
defined, 65-14
lock routine. 69-14
defined, 69-13

m_Iabel_dpc. SS#7 Layer 3 variable. defined.
80-6

lo_t"'prmtv"'path. OSI Layer 5 variable. 63-59
defined. 63-24

m_IabeLopc. SS#7 Layer 3 variable. defined.
80-6
m_Iabel_sls. SS#7 Layer 3 variable. defined.
80-6
m_li, SS#7 Layer 2 variable. defined, 79-3

M
m_bib, SS#7 Layer 2 variable. defined. 79-2
m_callJef_flag, Q.931 variable, defined, 78-2
m_callJeClen. Q.931 variable. defined, 78-3 .
m_cic, SS#7 Layer 3 variable, defined, 80-6
m_code_type. SS#7 Layer 3 variable. defined.
80-2
m_fib. SS#7 Layer 2 variable. defined. 79-2
m_frame_addr
SDLC variable. defined, 73-4
X.2S Layer 2 variable. defined, 71-4
m frame addr cr, LAPD variable. defined,
- 77-4m_frame_addr~sapi, LAPD variable, defined,

77-4
m frame addr tei. LAPD variable, defined.
- 77-4m_frame_bcc_type
LAPD variable. defined. 77-4
SDLC variable. defined. 73-4
SS#7 Layer 2 variable, defined. 79-3
X.25 Layer 2 variable, defined. 71-4
m frame cntrl byte 1
LAPD ;ariable, defined, 77-4
SDLC variable. defined. 73-4
X.25 Layer 2 variable, defined. 71-4

m_lo_dUI_buff. OSI Layer 3 variable. 55-3,
63-5, 63-7. 63-8, 63-9, 63-10, 63-11,
63-52
defined. 63-18
m_lo_dl..,.Pdu_seg. OSI Layer 3 variable. 63-8
defined, 63-17
m_Io_dl"'prmtv. OSI Layer 3 event. 55-3. 63-7
defined, 63-17
m_Io_dI..,prmtv_code, OSI Layer 3 variable.
63-8, 63-48
defined, 63-18
m_lo_dl..,.PrmtvJlath. OSI Layer 3 variable.
63-8
defined. 63-18
m_lo_dl_sdu_offset. OSI Layer 3 variable. 55-3,
63-8. 63-10, 63-52
defined. 63-18
m 10 dl sdu size, OSI Layer 3 variable, 55-3,
- 63-8. 63:'52
defined. 63-18
m_lo_n_il_buff. OSI Layer 4 variable, 63-56
defined. 63-21
m_lo_nJldu_seg. OSI Layer 4 variable. defined,
63-20
m_lo_n..,prmtv. OSI Layer 4 event. defined.
63-20
m_Io_n"'prmtv_code. OSI Layer 4 variable,
63-52
defined, 63-21

Index to C Structures. Variables. and Routines

ID_Io_n..prmtv..path, 051 Layer 4 variable.
defined. 63-21

ID_lo_s-Pdu_seg, OSI Layer 6 variable. defined.
63-26

m_lo_n_sdu_offset. OSI Layer 4 variable. 63-56
defined. 63-21

ID_lo_sJ'rmtv. OSI Layer 6 event. defined,
63-26

m_Io_n_sdu_size. OSI Layer 4 variable. 63-56
defined. 63-21

m_Io_sJ'rmtv_code. OSI Layer 6 variable.
63-60
defined. 63-26

m_lo"p_il_buff. OSI Layer 7 variable. defined.
63-30

m_lo_s..prmtv..path. OSI Layer 6 variable.
defined. 63-27

m_lo"p"pdu_seg, OSI Layer 7 variable. defined.
63-29

m_Io_s_sdu_offset. OSI Layer 6 variable, 63-64
defined, 63-27

m_I0..p..,prmtv. OSI Layer 7 event. defined.
63-29

ID_Io_s_sdu_size. OS! Layer 6 variable, 63-64
defined, 63-27

m_loo-PJ'rmtv_code. OS! Layer 7 variable.
63-64
defined. 63-29
m_lo"'pJ'rmtvJ'ath. 051 Layer 7 variable.
defined. 63-30
ID_loJ'_sdu_offset. OSI Layer 7 variable.
defined. 63-30
m_lo"'p_sdu_size. OSI Layer 7 variable, defined.
63-30
ID_IoJ'h_il_buff
OSI Layer 2 variable, 55-1. 55-2, 55-3.
63-48
defined, 63-15
OSI layer 2 variable. 57-10. 57-12, 57-17
ID_loJ'ho-Pdu_seg, OSI Layer 2 variable.
defined, 63-14
ID_loJ'hJ'rmtv
051 Layer 2 event. 55-1. 55-3
defined. 63-15
OSI layer 2 event, 57-10
signalled by DDCMP package. 37-2

ID_lo_t_il_buff, OSI Layer 5 variable. 63-60
defined. 63-24
m_lo_tJ'du_seg. OSI Layer 5 variable, defined.
63-23
ID_lo_t"prmtv. OSI Layer 5 event. defined,
63-23
m_lo_tJ'rmtv_code, OSI Layer 5 variable.
63-56
.
defined. 63-23
m_Io_t"prmtvJ'8th, OSI Layer 5 variable,
defined. 63-24
m_lo_t_sdu_offset. OSI Layer 5 variable, 63-60
defined. 63-24
m_Io_t_sdu_size. 051 Layer 5 variable, 63-60
defined. 63-24
ID_message_type. 0.931 variable, defined. 78-3
m_message_type_defined, 0.931 variable.
defined. 78-2
IDJ'8cket_bcc_type, 0.931 variable. defined.
78-2
mJ'acket_bufCseg, X.2S Layer :3 variable. 72-8
defined. 12-5

mJoJ'hJ'rDltv_code. 051 Layer 2 variable,
defined. 63-14

mJ'acket_cause. X.2S Layer 3 variable.
defined. 72-4

ID_loJ'hJ'rmtv"path. 051 Layer 2 Variable.
defined, 63-14

m"packet_d, X.25 Layer 3 variable, defined.

m_loJ'h_sdu_offset. 051 Layer 2 variable.
55-1. 63-48
defined, 63-15
m_IoJ'h_sdu_size, OSI Layer 2 variable, 55-3.
63-48
defined, 63-15
ID_Io_s_il_buff. OSI Layer 6 variable, 63-64
defined. 63-27

72-3
mo-Pack.et_daf. SNA variable. defined. 74-2
ID"'packet_def, SNA variable. defined. 74-2
mJ'acket_dialLcode. X.2S Layer :3 variable,
defined. 72-4
mJ>acket_dsaf, SNA variable. defined. 74-2
IDo-Packet_fi. SNA variable. defined. 74-3
IDJ'acket_fid_type. SNA variable, 74-1
defined, 74-2

Index to C Structures, Variables. and Routines

mJ'acket_info_length, X.2S Layer 3 variable.
72-9
dermed. 72-5
mJ>acket_info_offset. X.2S Layer 3 variable,
defined. 72-$
mJ'acket_infoJ>tr
X.25 Layer 2 variable. 58-6
X.25 Layer 3 variable. 58-1, 61-29, 61-30,
72-8
defined, 72-6
mJ'acket_info_seg, X.2$ Layer 3 variable,
defined, 72-$
mJ'acket_lcn, X.25 Layer 3 variable, 61-29.
61-30
defined. 72-3
mJ'acket_lcnJI'P. X.2S Layer 3 variable.
defined. 72-3
mJ'acket_length
SNA variable. defined. 74-2
X.2S Layer 3 variable. 72-8
defined. 72-$
mJ'acket_lsid. SNA variable. defined. 74-2
mJ'acket_m. X.2S Layer 3 variable. defined.

72-3
mJ>acket_oaf, SNA variable. defined. 74-2
mJ'acket_oef. SNA variable. defined. 74-2
mJ>acket_osaf. SNA variable. defined. 74-2
mJ'acketJ'r. X.2S Layer 3 variable, defined,

72-3

mJ'acket_type, X.2$ Layer 3 variable. defined.
72-4
mJ'acket_type_byte. X.2S Layer 3 variable,
defined. 72-4
mJ'rot_disc, Q.931 variable. defined, 78-2
mJ'tr_to_caILref, Q.931 variable. 78-4
defined, 78-3
mJ'tr_to_info_element. Q.931 variable. 78-4
defined, 78-3
m_sio_ni, SS#7 Layer 3 variable, defined, 80-2
m_sioJ'riority, SS#7 Layer 3 variable. defined.
80-2
m_sio_si, SS#7 Layer 3 variable, 80-1
defined. 80-2
m_soO, SS#7 Layer 2 variable. 79-4
defined, 79-3
m_unit_type, SS#7 Layer 2 variable. 79-3
defined. 79-2
mkdir. disk 1/0 routine. defined, 65-33
mpm_info. status structure, defined, 66-5

N
nr_error
LAPD event, defined. 77-3
SOLC event. defined. 73-3
X.25 Layer 2 event, defined, 71-3
ns_error
LAPO event. defined, 77-3
SOLC event. defined. 73-3
X.2S Layer 2 event. defined, 71-3

mJ'acketJ>s. X.2S Layer 3 variable. defined.

72-3
mJ'acketJ'tf. X.2S Layer 3 variable. 57-14
defined, 72-6
mJ'acket_q, X.2$ Layer 3 variable, defined.
72-3
mJ'acketJri. SNA variable. defined. 74-3
mJ>acket_rti. SNA variable. defined. 74-3
mJ'acketJu_category, SNA variable, defined.
74-3
mJ'acket_sdi, SNA variable. 74-4
dermed, 74-3
m..J'acket_sdu_offset, X.2S Layer 3 variable,
72-8
defined. 72-$

o
OSI
events
lo_dlJ'rmtv, 63-17
lo_nJ'nntv. 63-20
10J'J'rmtv, 63-29
lOJ'hJ'rmtv. 63-14
lo_s..,pnntv, 63-26
lo_tJ'rmtv. 63-23
m_Io_dlJ'rmtv. 63-17
m_lo_nJ'nntv. 63-20
m_lo"'pJ'rmtv, 63-29
m_IoJ'hJ'rmtv. 63-14
m_lo_sJ'rmtv. 63-26
m_lo_t..,prmtv. 63-23
up_dlJ'rmtv, 63-14

Index to C Structures. Variables. and Routines

up_n.J>ITntv, 63-11
up.J>.J>ITntv, 63-26
up_s.J>ITntv, 63-23
up_t.J>rmtv. 63-20
routines. 63-30
_append_il_buff_list_cnt. 63-43
_dup_iLbuff_list, 63-34
_dup_il_bufClist_start, 63-33
_free_il_msLbuff. 63-31
Jet_il_msLbuff. 63-31
_insert_il_buff_llst_cnt. 63-39
_open_space_in_il_buff. 63-35
_set_maint_bufCbit. 63-37
_start_il_bufClist, 63-32
send_dl.J>ITntv_above. 63-46
send_dl.J>rmtv_below., 63-53
send_m_dl.J>ITntv_above, 63-48
send_m_n.J>nntv_above. 63-52
send_m.J>.J>rmtv_above. 63-64
send_m_s.J>rmtv_above. 63-60
send_m_t.J)ITntv_above. 63-56
send_n.J>rmtv_above. 63-50
send_n.J>rmtv_below•. 63-51
send.J>.J>rmtv_above. 63-62
send.J>.J>rmtv_below.63-66
send.J)h.J>rIDtv_below. 63-49
send.J>h_to_above. 63-44
send_s...,PrIDtv3bove.63-58
send_s...,PrIDtv_below. 63-65
send_t.J)rmtv_above, 63-54
send_t.J>rmtv_below. 63-61
structures
il_buffer. 63-9
il_list_header, 63-10
il_list_node, 63-11
pdu.63-8
variables. 63-12-63-30
12 tick count. 63-16
13:tick:count, 63-19
14_tick_count. 63-22
15 tick count, 63-25
16:tick:count. 63-28
17_tick_count. 63-30
lo_dUI_buff. 63-18
lo_dl.J>du_seg, 63-11
lo_dl.J)rmtv_code. 63-17
lo_dl.J)rmtv.J>ath. 63-18
lo_dl_sdu. 63-18
lo_n_iLbuff, 63-21
10_n.J)du_seg, 63-20
lo_n.J)rmtv_code, 63...20
10_n.J)rmtv.J)atb, 63-t21
lo_n_sdu, 63-21
IO.J)_il_buff. 63-30
lO.J).J>du_seg. 63-29

lOJ>J>rIDtv_code, 63-29
lO_l'...prmtvJ>ath, 63-29
l0.J>_sdu, 63-30
IOJ>h_il_buff. 63-15
lO.J)h.J)du_seg, 63-14
lo-ph-prmtv_code, 63-14
l0.J>h.J)rIDtv.J)ath. 63-15
10.J>h_sdu, 63-15
lo_s_il_buff, 63-27
lo_s"'pdu_seg, 63-26
10_sJ>rmtv_code, 63-26
lo_s...prmtvJ>ath, 63-27
lo_s_sdu, 63-27
lo_t_il_buff. 63-24
lo_t...,Pdu_seg. 63-23
lo_tJ>rIDtv_code, 63-23
lo_t...prmtvJ>ath. 63-24
lo_t_sdu. 63-24
m_Io_dl_il_buff. 63-18
m_Io_dl"'pdu_seg. 63-17
m_Io_dl...,PfIDtv_code. 63-18
m_lo_dlJ>rmtvJ>ath. 63-18
m_Io_dl_sdu_offset, 63-18
m 10 dl sdu size, 63-18
mJo:n]I_buff. 63-21
m_Jo_n...,Pdu_seg. 63-20
m_Io_nJ'rttltv_code. 63-21
m_lo_nJ>rmtvJ>ath, 63-21
m 10 n sdu offset, 63-21
m-10- n-sdu- size, 63-21
mJo:J>:il_bUff, 63-30
m_loJ>J>du_seg, 63-29
m_lo...p-Ptmtv_code. 63-29
m_JoJ>"'prmtv.J)ath. 63-30
m_lo.J)_sdu_offset. 63-30
m_Io.J)_sdu_size. 63-30
m_IoJ>h_il_buff. 63-15
m_loJ>h.J)du_seg, 63-14
m_lo"'ph-prmtv_code. 63-14
m_lo.J)h.J)rIDtvJ>ath, 63-15
m_IoJ>h_sdu_offset. 63-15
m_loJ>h_stlu_size, 63-15
m_Io_s_il_buff. 63-27
m_lo_s.J)du_seg, 63-26
m_lo_sJ'rmtv_code. 63-26
m_lo_sJ>rmtvJ>ath. 63-27
m_lo_s_sdu_offset. 63-27
m_lo_s_sdu_size, 63-27
m_lo_t_il_buff. 63-24
m_lo_t...,Pdu_seg, 63-23
m_lo_tJ>rmtv_code. 63-23
m_lo_t.J)rIDtv.J)ath, 63-24
m_Io_t_sdu_offset, 63-24
m_Io_t_sdu_size, 63-24
phJ'rIDtv_type. 63-13
up_dl_il_buff, 63-16

Index to C,Structures. Variables. and Routines

up_dl..,pdu_seg. 63-15
up_dl"'pnntv_code, 63-16
up_dl..,prmtv"'path, 63-16
up_dl_sdu, 63-16
up_n_il_buff, 63-19
up_n"'pdu_seg, 63-19
up_n..,pnntv_code. 63-19
up_n..,prmtv..,path. 63-19
up_n_sdu, 63-19
up..,p_il_buff, 63-28
up"'p"'pdu_seg, 63-27
up..,p..,pnntv_code. 63-28
up..,p..,prmtv-patll, 63-28
up-p_sdu, 63-28
up_s_il_buff, 63-25
up_sJXlu_seg, 63-24
up_s-prmtv_code, 63-25
up_s-pnntv..,path, 63-25
up_s_sdu. 63-25
up_t_il_buff, 63-22
up_t-pdu_seg. 63-22
up_t..,prmtv_code, 63-22
up_t-pnntv-path, 63-22
up_t_sdu. 63-22
_open_space_in_il_buff. OSI layer-independent
routine. 55-9. 63-36. 63-39, 63-42. 63-44.
63-45
defined, 63-35
outsync_action. line routine. defined, 59-10

Program chaining. routines, load..,program,
69-12
Protocol Trace
structures
12pp_trbuff_ctl. 61-41
13pp_trbuff_ctl, 61-42
variables
12pp_trbuff, 61-39
12pp_trbuff_end, 61-39
13pp_trbuff, 61-39
13pp_trbufCend, 61-39
packet_sent, X.2S Layer 3 event. defined, 72-3
pdu, OSI structure, 55-4, 63-47. 63-51, 63-55,
63-59
defined, 63-8
ph"'pnntv_type, OSI Layer 1 variable, 63-49
defined. 63-13
pos_cursor, Display Window routine, 58-1,
58-3, 61-1. 61-3. 61-8, 61-9, 61-22.
61-27, 65-22
defined, 61-21
pr_error, X.25 Layer 3 event, defined. 72-3
prev_aux._value. aux. port 110 variable. 68-10
defined, 68-4
prev_date_of_day, real-time clock variable,
defined, 69-4

p
Playback
routines
start]crd-play. 65-3
suspend_rcrd"'play, 65-3
Primitives
OSI routines
Layer 1, 63-44
Layer 2. 63-46-63-50
Layer 3, 63-50
Layer 4, 63-54-63-58
Layer 5. 63-58-63-62
Layer 6, 63-62
Layer 7, 63-66-63-67
layer-independent. 63-31-63-44
See also IL buffer
Print
routines
printc, 64-4
printf, 64-4
prints. 64-9

. set"'print_header, 64-8
sprintf, 64-7
structures • ..,print_buffer, 64-2

prev_display-screen.
defined. 61-3

'Status

variable. 61-1. 66-1 .

prev_time_oCday. real-time clock variable.
defined. 69-4
prev_tm. real-time clock structure, defined,
69-2
previous_eia_Ieads
EIA variable, 60-1. 60-3
defined. 60-2
X.21 variable, 70-2
defined, 70-3
..,print_buffer. print structure. 64-1
defined. 64-2
used to check status of print buffer. 64-1
printc. print routine. 64-1. 64-4
defined. 64-4
printf. print routine. 64-1. 64-6
defined. 64-4
prints, print routine, 56-22. 64-1
defined, 64-9

Index to C Structures, Variables, and Routines

pro&.Jrbuf. trace buffer structure, defined
61-25
•
ps_error. X.25 Layer 3 event, defined. 72-3

Q
Q.931
events
dceyacket. 78-2
dteyacket, 78-2
variables
i3_enhance. 78-3
13_suppress. 78-3
m_call_reCflag. 78-2
m_call_reClen. 78-3
m_info_element_len, 78-3
m_message_type, 78-3
m_message_type_defined, 78-2
myacket_bcc_type, 78-2
m-Pfot_disc. 78-2
mytr_to_callJef, 78 ... 3
mytr_to_info_element. 78-3

R
Real-time clock
events, fevar_time_oCday. 69-4
structures
cmt_tm. 69-2
prev_tm, 69-2
tm, 69-2
variables
cmt_date_oCday, 69-4
cmt_time_oCday, 69-4
prev_date_ oCday. 69+-4
prev_time_of_day, 69-4
Record
routines
stan_rcrdylay, 65-3. 69-16
suspend_rcrd...pJay. 65-.3, 69-17
Remote pon 1/0
events
rmt_break. 67-3
rmt_input_almost_empty. 67-3
rmt_input_almost_full~ 67-3
rmt_input_empty, 67"",3
rmt_input_not_empty" 67-3
rmt_input_overfiow. 67-3
rmt_output_empty, 67;-3

routines
rmt_flushi. 67-8
rmt_flusho. 67-16
rmtJet_baud_rate, 67-25
rmtJet_bits, 67-25
rmtJet_mode, 67-26
rmtJetyarity, 67....26
rmtJetc, 67-4
rmtJetJ, 67-5
rmtJets, 67-6
rmt_lock. 67-9
rmt.,..putb. 67-14
rmt.,..putc, 67-11
rmt"'puts, 67-13
rmtJesumeo. 67-18
rmt_send_break. 67-19
rmt_set_baudJate. 67-21
rmt_set_bits, 67-22
rmt_set_mode, 67-24
rmt_setyarity, 67-23
rmt_suspendo, 67-17
rmt_unlock. 67-10
rev_buffer_full, line variable, 59-2
defined. 59-4
rcvd_char_rd. line variable. 55-1. 59-5 59-6
59-18
•
•
defined. 59-4
revd_char_td. line variable. 55-1. 59-S, 59-6,
59-17. 59-19
defined, 59-4
rcvd_device...P3th. X.25 Layer 3 variable. 72-9
defined. 72-7
rcvd_frame
LAPD event, defined, 77-3
SDLC event, defined, 73-3
X.2S Layer 2 event, defined. 71-3
rcvd frame addr
SDLC variable, defined. 73-4
X.2S Layer 2 variable. defined, 71-4
rcvd_frame_addr_cr. LAPDvariable. defined.,

77-4
rcvd_frame_addr_sapi. LAPD variable. defined.

77-4
rcvd_frame_addr_tei. LAPD variable. defined.

77-4
rcvd_frame_bee_type
LAPD variable, defined, 77-5
SDLe variable, defined. 73-5
X.25 Layer 2 variable. defined. 71-4
rcvd_frame_buff_seg
LAPD variable, 77-8
defined, 77-5

Index to C Struotures. Variables. and Routines

SDLC variable. 73-8
defined, 73-5
X.25 Layer 2 variable, 71-8
defined, 71-5
rcvd_frame_ cntrl_byte_1
LAPD variable, defined. 77-5
SDLC variable. defined, 73-4
X.25 Layer 2 variable. defined, 71-4
rcvd_frame_nr
LAPD variable, defined, 77-5
SDLC variable. defined, 73-S
X.2S Layer 2 variable, defined, 71-4
rcvd_frame_ ns
LAPD variable. defined, 77-5
SDLC variable. defined. 73-5
X.25 Layer 2 variable. defined, 71-S
rcvd_frame.,.pf
LAPD variable, defined, 77-S
SDLC variable, defined. 73-4
X.25 Layer 2 variable. defined, 71-4
rcvd_frame_sdu_offset
LAPD variable. 77-8
defined, 77-5
SDLC variable. 73-8
defined. 73-5
X.25 Layer 2 variable, 71-8
defined. 71-5
rcvd_frame_sdu_size
LAPD variable, 77-8
defined. 77-5
SDLC variable, 73-8
defined, 73-5
X.25 Layer 2 variable, 71-8
defined. 71-5
rcvd_frame_type
LAPD variable, defined. 77-4
SOLC variable. defined. 73-4
X.25 Layer 2 variable. defined, 71-4
rcvd.,.packet, X.2S Layer 3 event. defined. 72-3
rcvd.,.packetJ'tr. X.2S Layer 3 variable.
defined, 72-6
rcvd"'p8cket_type, X.2S Layer 3 variable.
defined, 72-S
rcvdJ'kt_bufCseg, X.25 Layer 3 variable. 72-8
defined, 72-6

rcvdJ'kt_cause, X.25 Layer 3 variable, defined.

72-4
rcvd"pkt_d. X.25 Layer 3 variable, defined.

72-4
rcvd"pkt_diagn, X.25 Layer 3 variable, defined,

72-4
rcvdykt_info_length, X.2S Layer 3 variable,

72-9
defined. 72-6
rcvd"pkt_info_offset, X.25 Layer 3 variable.
defined, 72-6
rcvdJ'kt_infoJ>tr. X.25 Layer 3 variable, 72-8
defined. 72-6
rcvdJ>kt_info_seg. X.25 Layer 3 variable,
defined. 72-6
rcvd.,.pkt_lcn, X.2S Layer 3 variable, defined,

72-4
rcvd.,.pkt_Iength, X.25 Layer 3 variable, 72-8
defined, 72-6
rcvdJ>kt_m. X.25 Layer 3 variable, defined,

72-4
rcvd.,.pkt.,.pr. X.25 Layer 3 variable. defined,

72-4
rcvd.,.pkt..ps, X.25 Layer 3 variable, defined.

72-4
rcvd"pkt_q, X.25 Layer 3 variable. defined,
72-4
rcvd"pkt_sdu_offset. X.2S Layer 3 variable.

72-8
defined, 72-6
rcvd"pkt_type_byte, X.25 Layer 3 variable,
defined. 72-5
rd_modifier, data-display variable, 59-7. 59-18
defined. 59-5
remove, disk 1/0 routine, 65-3. 65-33
dermed. 65-32
rename, disk 1/0 routine, 65-3, 65-32
defined, 65-31
resend frame
LAPD routine, defined, 77-10
SOLC routine, defined, 73-10
X.25 Layer 2 routine. defined. 71-10
resend.,.packet. X.25 Layer 3 routine. defined,
72-14
reset nr
LAPO routine. defined, 77-11
SDLC routine, defined. 73-11
X.25 Layer 2 routine. defined. 71-11
reset ns
LAPD routine. defined, 77-12
SDLC routine. defined. 73-12
X.25 Layer 2 routine. defined. 71-11

Index to C Structures, Variables, and Routines

reset-pr-ps. X.2S Layer 3 routine, defined,
72-15

rmt_lock. remote port I/O routine, 67-10
defined. 67-9

restore_cursor, Display Window routine. 61-1,
61-8. 61-22
defined. 61-22

rmt_output_empty, remote port 1/0 event.
defined. 67-3

rewind. disk 110 routine, 65-2, 65-4
defined, 65-13
rhJ>tr. SNA variable, defined, 74-3
rindex. string routine, 56-22
defined. 69-12
rmt_break. remote port I/O event, defined,
67-3
rmt_flush_i, remote port 110 routine, 67-15
rmt_flushi. remote port I/O routine, 67-9
defined. 67-8
rmt_flusho. remote port 1/0 routine, 67-17
defined, 67-16
rmtJet_baudJate. remote port 110 routine.
67-25
defined, 67-25

rmt-putb, remote port 1/0 routine. 67-16
defined, 67-14
rmtJ>ute, remote port 1/0 routine. 67-12.
67-17
defined, 67-11
rmt-puts. remote port 110 routine. 67-14
defined, 67-13
rm~resumeo.

remote port 1/0 routine. 67-19
defined, 67-18

rmt_send_break. remote port 1/0 routine,
67-20
defined. 67-19
rmt_set_baud_rate. remote port 110 routine,
67-22
defined. 67-21
rmt_set_bits. remote port 110 routine. 67-22
defined. 67-22

rmtJet_bits. remote port I/O routine. 67-26
defined. 67-25

rmt_set_mode, remote port 110 routine. 67-25
defined, 67-24

rmtJet_mode. remote port 110 routine. 67-27
defined, 67-26

rmt_setJ>arity. remote port 110 routine. 67-23
defined. 67-23
rmt_suspendo, remote port 1/0 routine, 67-18
defined. 67-17

rmtJet-parity. remote port 110 routine. 67-26
defined, 67-26
rmtJete, remote port 1/0 routine, 67-5. 67-9.
67-19
defined. 67-4

rmt_unlock. remote port 110 routine, 67-11
defined, 67-10
ru....,ptr, SNA variable, defined, 74-3

rmtJetl, remote port 1/0 routine, 67-6
defined. 67-5
rmtJets, remote port I/O routine. defined,
67-6
rmt_input_almost_empty, remote port 1/0 event,
67-2
defined. 67-3
rmt_input_almost_full, re$ote port 1/0 event.
67-2
defined. 67-3
rmt_input_empty, remote port I/O event. 67-2
defined, 67-3
rmt_input_not_empty. remote port 1/0 event.
67-2
defined, 67-3
rmt_input_overflow. remote port 1/0 event,
67-2
defined. 67-3

s
SDLe
events
bee_error. 73-3
dee_abort. 73-3
dee_bad_bee, 73-3
dee_frame. 73-3
dceJood_bce. 73-3
dte_abort. 73-3
dte_bad_bee. 73-3
dte_frame, 73-3
dteJood_bec. 73-3
frame_sent. 73-4
invalid_frame. 73-3
12_T1. 73-3
nr_error, 73-3
ns_error. 73-3
revd_frame, 73-3

Index to CStructures, Variables. and Routines

routines
12Jive_data. 73-9
resend_frame, 73-10
reset_nr. 73-11
reset_ns, 73-12
send_frame, 73-12
structures, send_frame_structure, 73-2
variables
12_current_window_edge, 73-5
12_enhance, 73-6
12_1ower_window_edge, 73-5
12_resend_edge. 73-5
12_suppress. 73-6
12_upper_window_edge. 73-5
m_frame_addr, 73-4
m_frame_bcc_type. 73-4
m_frame_cntrl_byte_1. 73-4
m_frameyf. 73-4
m_frame_type. 73-4
rcvd_frame_addr. 73-4
revd_frame_bcc_type. 73-5
rcvd_frame_bufCseg. 73-5
rcvd_frame_cntrl_byte_l. 73-4
rcvd_frame_nr. 73-5
rcvd_frame_ns. 73-5
rcvd_frameyf. 73-4
rcvd_frame_sdu_offset. 73-5
revd_fratne_sdu_size. 73-5
rcvd_fratne_type. 73-4
SNA
events. See SDLC. events
routines. See SDLC. routines
structures. See SDLC, structures
variables
See also SDLC. variables
tn-packet_daft 74-2
m-packet_def, 74-2
m-packet_dsaf, 74-2
tn-packet_fi. 74-3
tnyacket_fid_type, 74-2
tn-packet_length, 74-2
m-packet_lsid. 74-2
m-packet_oaf. 74-2
tn-packet_oef. 74-2
tnyacket_osaf. 74-2
tn-packetJri. 74-3
tn-packet_rti. 74-3
tn-packet_ru_category, 74-3
m-packecsdi. 74-3
rh-ptr, 74-3
ru-ptr. 74-3
thytr, 74-3

SS#7 Layer 1, variables
dce_flags, 79-5
dee_frames_suppressed. 79-5
dte_flags. 79-5
dte_fratnes_suppressed, 79-5
SS#7 Layer 2
events
dee_abort, 79-2
dee_bad_bee. 79-2
dee_frame. 79-2
deeJood_bec. 79-2
dte_abort, 79-2
dte_bad_bcc, 79-2
dte_fratnc, 79-2
dteJood_bce, 79-2
variables
12_enhanee. 79-3
12_suppress, 79-3
tn_bib. 79-2
tn_fib. 79-2
tn_frame_bcc_type. 79-3
tn_lit 79-3
tn_soO, 79-3
tn_unit_type, 79-2
SS#7 Layer 3
events
dceyacket, 80-2
dteyaeket. 80-2
variables
13_cnhanee. 80-6
13_suppress. 80-6
tn_cic. 80-6
m_code_type. 80-2
tn_label_dpc, 80-6
tn_Iabel_opc, 80-6
tn_label_sIs. 80-6
tn_sio_nj. 80-2
m_sio-priority, 80-2
tn_sio_si. 80-2
Stats display
routines
get_68kyhys_addr. 62-14
send_stat_tnessage. 62-15
structures. stat_ross, 62-5
Status
events, display_screen_changed. 61-2
structures
mpm_info, 66-5
unit_config, 66-3
unit_setup, 66-2
variables
cmt_display-screen, 61-2
prey_display-screen, 61-3

Index to C Structures. Variables, and Routines

String
routines
index. 69-11
rindex. 69-12

sendyyrmtv_above. 051 Layer 6 routine.
defined. 63-62

send_d_frame
ISDN routine. defined. 76-3
transmit routine, 76-1

send.....Packet. X.25 Layer 3 routine. defined.
72-16

send.....Pyrmtv_below. 051 Layer 7 routine.
defined, 63-66

send_d_frame_il. ISDN routine, defined, 76-4

sendyacket_structure. X.2S Layer 3 structure.
72-17
defined, 72-2

send_dlyrmtv_above. 051 Layer 2 routine.
55-4
defined, 63-46

sendyhJ>rrntv_below. 051 Layer 2 routine,
55-8. 63-:39, 63-43, 63-44
dermed, 63-49

send_dl""'prmtv_below, 051 Layer 3 routine,
55-8. 63-42
defined. 63-53

sendJ>h_to_above. 051 Layer 1 routine. 63-46
defined. 63-44
send_syrmtv_above, 051 Layer 5 routine.
defined, 63-58

send_frame
LAPD routine. defined. 77-12
SDLC routine. defined, 73-12
SNA routine, 74-5
X.2S Layer 2 routine. defined. 71-12

send_sJ>rffitv_below. OSI Layer 6 routine.
defined. 63-65

send_frame_structure
LAPD structure, 77-13
defined, 77-2
SDLC structure, 73-13
defined, 73-2
SNA Layer 2 structure, 74-1
X.25 Layer 2 structure. 71-13
defined. 71-2

send_tyrmtv_above, 051 Layer 4 routine.
defined. 63-54

send_key. keyboard routine, 3-11, 5-22; 61-4
defined. 69-17

set_aux_direction. aux port I/O routine. 68-5,
68-8, 68-9
defined. 68-5

send_m_dlyrmtv_above. 051 Layer 2 routine,
defined. 63-48

set_auxJeg. aux port I/O routine, 68-11
defined, 68-10

send_m_nyrmtv_above, OS1 Layer 3 routine.
defined. 63-52

_set_rue_type, disk 1/0 routine. 65-35
defined. 65-34

send_m.....Pyrmtv_above. 051 Layer 6 routine.
defined. 63-64

set_isdn_speaker_chan. ISDN routine. 76-2
defined, 76-5

send_m_syrmtv_above. 051 Layer 5 routine,
defined, 63-60
send_rn_t.....Prmtv_above. 051 Layer 4 routine.
defined. 63-56
send_n.....Prmtv_8bove. OSl Layer 3 routine,
defined, 63-50
send_n.....prmtv_below, 051 Layer 4 routine.
55-7. 55-8. 63-41. 63-58
defined, 63-57

send_stat_message. stats-display routine, 62-15,
62-16
defined. 62-15

send_tyrmtv_below. OSl Layer 5 routine,
63-41
defined. 63-61
set_aux_ctUeads. aux port lIO routine. 68-6.
68-8. 68-9
defined. 68-6

_set_maint_buff_bit. OSI layer-independent
routine. 55-4. 55-5, 63-39, 63-41, 63-42,
63-43, 63-44, 63-46. 63-48, 63-50,
63-51, 63-52. 63-54, 63-56, 63-57. 63-59
defined. 63-37
set.....Print_header. print routine. 64-1. 64-9
dermed. 64-8
set tcr b
transnut routine. defined. 59-14
X.21 routine, 70-8
defined., 70-8

Index to C Structures, Variables. and Routines

signal. interrupt routine. 57-6
defined. 69-15
signal_name. interrupt event. defined. 69-4
sound_alarm. alarm routine. defined, 69-16
sprintf
Display Window routine, defined, 61-13
print routine. 61-13, 64-1, 64-7
defined. 64-7
used to specify precision for tracef, 67-16
_start_il_bufClist. OSI layer-independent
routine. 55-5. 55-8, 59-13, 63-36, 63-41,
63-45, 71-13, 72-17. 73-13. 76-5, 77-13
start_oCron_date, timer variable. defined.
62-10
start_oCron_time, timer variable, defined,
62-10
start_rcrdJ'lay
playback routine. 65-3
record routine, 14-6; 65-3
defined, 69-16
stat_msg. stats-display structure. 62-15
defined, 62-5
stracef. trace buffer routine, 61-13, 61-30
defined, 61-29
strcmp. user-defined routine, 58-6
suspendJcrd-play
playback routine. 65-3
record routine. 65-3
defined. 69-17

T
Timeout
events. timeout_name_expired. 69-4
routines
timeout_restart_action, 69-8
timeout_stop_action. 69-10
structures. timeout. 69-3
Timer
routines
convert_tick_count. 62-18
get_wall_time_286_ticks. 62-17
get_wall_time_ticks. 62-16
structures. timer_struct, 62-9
variables
l1_tick_count, 62-10
start_oCron_date. 62-10
start_of_run_time. 62-10

Trace buffer
routines
stracef. 61-29
tracec, 61-27
tracef. 61-28
traces. 61-31
structures
l1_trbuf. 61-25
12 trbuf. 61-25
13:trbuf. 61-25
14_trbuf. 61-25
15_trbuf, 61-26
16_trbuf. 61-26
17_trbuf. 61-26
pro1Ltrbuf. 61-25
trace_buf. 61-24
trace_buffer_header. 61-24
Transmit
events. fevar_xmit_cmplt. 59-4
routines
idle action. 59-13
11 if transmit, 55-4, 59-12
l1=transmit. 59-11
set_tcr_b, 59-14
structures, xmit_list. 59-1
td_modifier. data-display variable. 59-7. 59-17
defined, 59-4
temporary-prompt. user-defined routine. 58-4
thJ'tr. SNA variable, defined, 74-3
timeout. timeout structure, 58-5
defined, 69-3
timeout_nome_expired. timeout event, defined.
69-4
timeout restart action. timeout routine. 58-4.
69-9
defined. 69-8
timeout_stop_action, timeout routine, 69-10
defined. 69-10
timer struct, timer structure. 62-8
defined. 62-9
tm. real-time clock structure. defined, 69-2
trace buf, trace buffer structure. 61-23. 61-29.
61-30, 61-35
defined, 61-24
trace buffer header, trace buffer structure,
61-23, 61-32
defined, 61-24
tracec. trace buffer routine. 61-1. 61-4, 61-28
defined, 61-27
tracef. trace buffer routine, 61-1, 61-4, 61-27,
61-29. 61-32, 61-34. 61-35, 65-18
defined, 61-28

Index to C Structures. Variables. and Routines

traces, trace buffer routine. 56-22. 61-1. 61-4
defined, 61-31

uPJ'_il_buff. OSI Layer 6 variable. 63-65,
63-66
defined, 63-28
up"'p..,pdu_seg, OSI Layer 6 variable, defined,
63-27

u

up...p...pTtntv. OSI Layer 6 event. defined, 63-26

ungetc. disk I/O routine, 65-1, 65-2. 65,...4,
65-22
defined. 65-21
unit_config, status structure, 11-7; 66-1
defined, 66-3
unit_setup. status structure. 66-1
defined, 66-2
unlock
disk 110 routine. 65-4
defined. 65-16
lock routine, defined, 69-14

up...p...pTtntv_code, OSI Layer 6 variable. 63-67
defined, 63-28
uPJ'J'Ttntv"'path. OSI Layer 6 variable. 63-65
defined. 63-28
up"'p_sdut OSI Layer 6 variable, 63-65, 63-66
defined. 63-28
up_s_il_buff. OSI Layer 5 variable. 63-61.
63-62
defined. 63-25
up_s"'pdu_seg, OSI Layer 5 variable, defined,
63-24
up_s...pTtntv. OSI Layer 5 event. defined. 63-23

up_dl_il_buff, OSI Layer 2 variable. 63-38,
63-42. 63-44, 63-50
defined. 63-16

up_s"'prmtv_code, OSI Layer 5 variable, 63-65
defined. 63-25

up_dl"'pdu_seg, OSI Layer 2 variable, defmed,
63-15

up_sJ'rmtv...path. OSI Layer 5 variable. 63-61
defined. 63-25

up_dl"'pTmtv, OSI Layer 2 event. defined.
63-14

up_s_sdu. OSI Layer 5 variable. 63-61, 63-62
defined, 63-25

up_dl"'prmtv_code. OSI Layer 2 variable, 63-53
defined, 63-16

up_t_il_buff. OSI Layer 4 variable. 63-41,
63-57
defined, 63-22

up_dl...pTtntv...path. OSI Layer 2 variable. 63-49
defined. 63-16
up_dl_sdu. OSI Layer 2 variable. 63-42. 63-44,
63-50
defined, 63-16
up_n_il_buff, OSI Layer 3 variable. 55-7. 63-5.
63-8, 63-9, 63-10.63-11. 63-42. 63-54
defined. 63-19
up_n"'pdu_seg, OSI Layer 3 variable. 63-8
defined. 63-19
up_nJ'rmtv. OSI Layer 3 event, 55-7
defined. 63-17
up_n..,prmtv_code. OSI Layer 3 variable, 63-8,
63-57
defined. 63-19
up_nJ'rmtv"'path. OSI Layer 3 variable, 63-8,
63-53
defined. 63-19
up_n_sdu. OSI Layer 3 variable. 55-7, 63-8.
63-10. 63-42. 63-54
defined. 63-19

up_t..,Pdu_seg, OSI Layer 4 variable. defined.
63-22
up_tJ'rmtv. OSI Layer 4 event, defined. 63-20
up_t"'prmtv_code, OS! Layer 4 variable, 63-61
defined, 63-22
up_t...pTtntv"'path. OSI Layer 4 variable,63-57
defined, 63-22
up_t_sdu. OSI Layer 4 variable. 63-41. 63-57
defined. 63-22

w
window_color. Display Window variable. 61-4,
61-32. 61-33. 61-35
defined. 61-5
window_modifier. Display Window variable.
61-4. 61-32. 61-35
defined, 61-7
write aux, aux port 110 routine. 68-8. 68-9
defined, 68-7

Index to C Structures. Variab~t and Routines

x
X.21
events, fevar_eis_changed, 70-3
routines
ctl eia. 70-4
enter_calI..,phase, 70-9
enter_data..,phase, 70-9
set_ter_b, 70-8
x21 idle action, 70-6
x21-trammit call. 70-7
structUres. xmi~list. 70-1
variables
current_eia_leads. 70-3
previous_eia_leads. 70-3
X.25 Layer 2
events
bee error, 71-3
dee=:abort, 71-3
dee_bad_bce. 71-3
dee frame, 71-3
dee:Jood_bce, 71-3
dte abort, 71-3
dte:bad_bee, 71-3
dte frame. 71-3
dte:Jood_bcc. 71-3
frame sent, 71"";4
invalid_frame, 71-3
12_T1,71-3
nr_error, 71-3
ns error, 71-3
rC;d_frame. 71-3
routines
12Jive_data. 71-9
res end_frame , 71-10
reset_nr, 71-11
reset ns, 71-11
send-frame. 71-12
structures. send_frame_structure. 71-2
variables
12 current window edge. 71-5
12-enhance. 71-5 12-lower window edge, 71-5
12:resencCedge, 71-5
12_suppress. 71-5
12_upper_window_edge, 71-5
m frame addr t 71-4
m-frame-bee type. 71-4
m:frame:cntrl_byte_1. 71-4
m_frame"'pf. 71-4
m frame type. 71-4
rcvd frame addr. 71-4
rcvd-frame- bec type. 71-4
rcvd-frame-buff seg, 71-5
rcvd-frame- cntrl byte 1. 71-4

-

-

-

-

rcvd frame nr. 71-4
rcvd-frame-ns. 71-5
rcv(:frameJ,f. 71-4
rcvd_frame_sdu_offset, 71-5
rcvd frame sdu size, 71-5
rcvd:frame:type, 71-4
X.25 Layer 3
events
dce..,packet. 72-3
dte..,packet. 72-3
invalid..,paeket. 72-3
packet_sent, 72-3
pr_error, 72-3
ps_error. 72-3
rcvd..,packet, 72-3
routines
13_clear"'path, 72-11
13_give_data, 72-10
13 more to resend. 72-11
13-window empty. 72-13
13-window-full. 72-12
resend..,packet. 72-14
reset..,pr..,ps. 72-15
send..,paeket. 72-16
structure, send..,packet_structure. 72-2
variables
13 enhance, 72-7
13:suppress. 72-7
m"'packet_buff_seg, 72-5
m..,packet_cause. 72-4
m"'pseket_d, 72-3
m"'pscket_diss...code. 72-4
m"'packet_info_length, 72-5
m"'paeket_info_offset, 72-5
m..,packet_info..,Ptr. 72-6
m"'paeket_info_seg, 72-5
m"'paeket_lcn, 72-3
m"'paeket_lcnJTP, 72-3
m"'p3cket_length, 72-5
m"'paeket_m, 72-3
m..,paeket..,pr, 72-3
m"'pscket..,ps, 72-3
m"'paeket..,Ptr, 72-6
m...packet_q, 72-3
m"'paeket_sdu_offset. 72-5
m...packet_type. 72-4
m"'packet_type_byte. 72-4
rcvd device"'path. 72-7
rcvdJ,acket..,ptr, 72-6
rcvd...packet_type, 72-5
rcvd"'pkt_bufCseg, 72-6
rcvd"'pkt_cause, 72-4
rcvd"'pkt_d, 72-4
rcvd"'pkt_diagn, 72-4
rcvd..,pkt_info_length, 72-6
rcvd"'pkt_info_offset, 72-6

Index to C Structures, Variables. and Routines

rcvdykt_infoytr, 72-6
rcvdykt_info_seg, 72 ... 6
rcvdykt_lcn, 72-4
rcvd....Pkt_length. 72-6
rcvd....Pkt_m. 72-4
rcvd-pkt-pr, 72-4
rcvd""pkt..ps. 72-4
rcvd-pkt_q, 72-4
rcvd""pkt_sdu_offset, 72-6
rcvdykt_type_byte, 72-5

xl1_idle_action. X.21 routine. defined. 70-6

x21_uansmit_caU, X.21 routine, 70-1, 70-7
defined, 70-7
xmit list
ISDN structure. 76-3
defined. 76-1
transmit structure, 59-11
defined, 59-1
X.21 structure, 70-6. 70-7
defined. 70-1

Index to C Structures, Variables, and Routines



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : No
XMP Toolkit                     : Adobe XMP Core 4.2.1-c041 52.342996, 2008/05/07-21:37:19
Create Date                     : 2002:12:29 20:10:39Z
Creator Tool                    : Acrobat 4.0 Import Plug-in for Windows
Modify Date                     : 2016:11:09 18:24:07-07:00
Metadata Date                   : 2016:11:09 18:24:07-07:00
Producer                        : Adobe Acrobat 9.0 Paper Capture Plug-in
Format                          : application/pdf
Document ID                     : uuid:fda32f21-0312-954d-87ba-6b84814475c5
Instance ID                     : uuid:2cfc1ce1-3582-274b-88d6-9e1edb5a959a
Page Layout                     : SinglePage
Page Count                      : 724
Creator                         : Acrobat 4.0 Import Plug-in for Windows
EXIF Metadata provided by EXIF.tools

Navigation menu