Table 10 Buffer Program Example - IBM 2250 3 Manual

Table of Contents

Advertisement

with buffer area N through N
+
51.
Regeneration for this 2250 starts from
location N. The display is then generated
and regenerated under control of the or-
ders and data read from the buffer as
described in the "Function" column of
Table 10.
Table 10. Buffer Program Example
Buffer
Location
Content
Function
N, N+l
2A/82
Start Regeneration Timer order.
N+2, +3
2A/02
Enter Graphic Mode, Absolute Vee-
tor order.
N+4, +5
B, 800
Blanked beam moved to position
N+6, +7
800
800X, SOOY, establishing starting
point for drawing box.
N+8, +9
UB, 2400
Unblanked beam moved to location
N+lO, +11
800
2400X, drawing bottom horizontal
line.
N+12, +13
UB, 2400
Unblanked beam moved to location
N+14, +15
2400
2400Y, drawing right vertical line.
N+16, +17
UB,
800
Unblanked beam moved to location
N+18, +19
2400
800X, drawing top horizontal line.
N+20, +21
UB, 800
Unblanked beam moved to location
N+22, +23
800
SOOY, drawing left vertical line and
completing box.
N+24, +25
B,
400
Blanked beam moved to position
N+26, +27
2800
400X, 2800Y, establishing starting
point for plotting characters.
N+28, +29
2A/44
Enter Character Mode Protected
Basic order.
N+30, +31
B/O
The word "BOX" followed by a space
N+32, +33
X/SP
is plotted.
N+34, +35
N/A
The word "NAME" is plotted.
N+36, +37
N+38, +39
SP/NULL
Space after "NAME"; NULL makes
next byte an even byte.
N+40, +41
2A/40 or 41
Enter Character Mode Fixed (Basic
or Large size) order (unprotected).
N+42, +43
SP/SP
Blank spaces for operator to key in
N+44, +45
SP/SP
box name. First character of name
N+46, +47
SP/SP
is keyed into location N
+
42, where
cursor is positioned (previously in-
serted by channel program); cursor
then moves to N
+
43.
N+48, +49
2A/FF
Transfer Unconditional order to lo-
N+50, +51
N
cation N, regenerating the display.
Example 2: Normal Light Pen Detect Operation -
2250 Equipped with Programmed Function Keyboard
A. Problem: With a light pen, delete a line from
the box drawn in Example 1.
B. Sequence:
1. At programmed function keyboard, the
operator inserts the proper overlay and
presses the key that indicates the delete
function to the program , causing an I/
0
interrupt with the Attention bit set in the
csw.
2. The program responds to the I/O inter-
rupt with a Read Manual Input command.
3. The 2840 responds to this command with
(1) a data byte that specifies to the pro-
gram that the interrupt was caused by the
programmed function keyboard, (2) the
code of the pressed key, and (3) the code
of the overlay.
(The Channel End and
Device End status bits signal the end of
this command.) The overlay and key are
associated with a CPU program routine.
This routine determines, from the com-
mand response information, that the op-
erator desires to delete a portion of the
display and will use the light pen to indi-
cate the specific portion to be deleted.
The program then waits for a light-pen
detect condition.
4. The operator activates the light pen on
the line to be deleted, initiating all asyn-
chronous status with the Attention and
Unit Check bits set in the CSW, causing
an I/
0
interrupt.
5. The program responds to this interrupt
with a Sense command.
6. The 2840 responds to the Sense command
with four bytes, which inform the CPU
that the light pen has been activated and
indicate the first of the four buffer loca-
tions at which the coordinates of the
selected line are stored. For example,
if the bottom horizontal line of the box
shown on Figure 16 activates the light
pen, buffer address N + 8 is returned to
the channel. (The Channel End and De-
vice End status bits signal the end of this
command.)
7. The CPU program determines, from the
sense data, the line to be deleted. One
method the program can use to delete the
line is to retransmit the byte in location
N + 8 (the first X byte), but with the
blanking bit set to 1, specifying a blanked
vector. In this way, the beam is properly
positioned to draw the right vertical line
of the box. The following command and
data sequence received by the 2840 could
be used:
a. Command: Set Buffer Address Register
and Stop, Address N + 8.
2840 Operations with the Channel
41

Advertisement

Table of Contents
loading

This manual is also suitable for:

2840 2

Table of Contents