
TABLE
OF
CONTENTS
CHAPTER
1
INTRODUCTION
MICRONEYE
BULLET . . . • •
MICRONEYE
CAMERA
. . • . .
IS32
OPTICRAM . . . .
. . . . . . . . . . .
·
1-1
·
1-1
·
1-2
CHAPTER
2 TECHNIQUES
FOR
OPERATING
THE
MICRONEYE
FOCUS
AND
F-STOP
ADJUSTMENTS
..••.....
2-1
CLOSE-UP RING . . . . . . . . • • • . • . . • . .
2-1
LIGHTING CONSIDERATIONS .
..
..•.
2-2
CHAPTER
3 USING
THE
MICRONEYE
WITH
THE
APPLE
· . . .
..
.
3-1
DISKETTE . • . .
3-2
. .
'"
...
3-3
. . • . . . . .
..
3-11
. . . . . . . .
..
3-12
3-14
3-15
• • •
••
3-16
INSTALLATION
AND
SET
UP
FILES
INCLUDED
ON
YOUR
MICRONEYE
THE
MICRONEYE
PROGRAM
THE
COMMANDER
PROGRAM
. • .
THE
GREYPIC
PROGRAM
• • • .
THE
GREYSCREEN
PROGRAM
THE
ENHANCED
EYE
PROGRAM
• .
THE
GREY16
PROGRAM
..•
CHAPTER
4
USING
THE
MICRONEYE
WITH
THE
IBM
PC
,
CREATING A
BOOTABLE
DISKETTE
INSTALLATION
AND
SETUP • • .
FILES
INCLUDED
ON
YOUR
MICRONEYE
THE
MEYE
PROGRAM
• . . •
DISKETTE
•
4-1
4-2
•
4-4
4-4
CHAPTER
5
USING
THE
MICRONEYE
WITH
THE
COMMODORE
64
INSTALLATION
AND
SET
UP
FILES
INCLUDED
ON
YOUR
MICRONEYE
THE
MICRONEYE
PROGRAM
. • • • •
THE
ASSEMBLY
LANGUAGE
CONNECTION
·
..
....
5-1
DISKETTE • • • •
5-2
· . . . . . . . .
5-2
(MEYE6510.EX)
••
5-7
CHAPTER
6
USING
THE
RS-232
MICRONEYE
CAMERA
HARDWARE
REQUIREMENTS
SOFTWARE
• • • • • . • •
. . . .
..
..
6-1
. . . . . . . . . .
6-2
CHAPTER
7
HOW
YOUR
COMPUTER
TALKS
TO
THE
MICRONEYE
MICRONEYE
VERSIONS • .
••
•••.••••••
7-1
THE
SERIAL
CONNECTION
• • • . •
••
•
7-2
COMMAND
DEFINITIONS
•
•.
••••••
••
7-3
EFFECTS
OF
COMMAND
MODE
COMBINATIONS • • • • • • •
7-6
RECOMMENDED
MICRONEYE
COMMAND
SEQUENCES •
7-8

APPENDIX A
BAUD
RATE
MODIFIFICATION
APPENDIX B
TRANSMISSION TIME CONSIDERATIONS
APPENDIX C
TROUBLESHOOTING
APPENDIX D
IS32
OPTICRAM TECHNICAL INFORMATION
OPERATION . . . . . . • • .
IS32
TECHNICAL
SPECIFICATIONS
. . •
TOPOLOGY
•
..
...•...
· . . . . . .
D-1
· . . . . . .
D-
3
· . . . . . .
D-
4
APPENDIX E
ANNOTATED
ASSEMBLY
LANGUAGE
DRIVER
FOR
THE
IBM
PC
APPENDIX F
GUIDE
TO
OPTICS SELECTION
AND
LIGHTING TECHNIQUES
• •
F-1
•
F-4
F-17
LIGHTING CONSIDERATIONS
FOR
THE
IS32
OPTICRAM
OPTICS
. . . . . . . .
..
.....••
OTHER
CONSIDERATIONS . • . • • . • • . . • • . .
APPENDIX G
HARDWARE
DESCRIPTION
TIMING GENERATION
CIRCUIT
• • • • • • • • • • • • G-1
COMMAND
RECEIVER
CIRCUIT
• • • • • • • • • • • . •
G-2
ADDRESS
REGISTERS . . • • • . • • • • • • • . • .
G-3
ADDRESS
DESCRAMBLE,
SOAK/,
AND
DIN/DOUT
CIRCUITS.
G-4
TRANSMITTER
AND
INTERRUPT
GENERATOR
CIRCUIT
• • •
G-6
ADDER
AND
END-OF-FRAME
CIRCUIT
• • . • • • • • • •
G-8
APPENDIX H
MICRONEYE
APPLICATIONS SUBROUTINE LIBRARY DESCRIPTIONS
(C)
Copyright
Micron
Technology,
Inc.
1983
6253
Oct
1984

TECHNIQUES
FOR
OPERATING
THE
MICRONEYE
CLOSE-UP
RING
the
lens
onto
the
MicronEye).
For
viewing
objects
at
close
range
it
is
recommended
that
the
user
purchase
a
close-up
lens.
Since
the
MicronEye
utilizes
a
standard
C-mount
lens,
most
camera
retailers
provide
a
wide
assortment
of
special
purpose
lenses
directly
compatible
with
the
MicronEye.
2.3
LIGHTING CONSIDERATIONS
The
MicronEye
requires
a
high
contrast
scene
in
order
to
image
the
object
onto
the
OpticRAM.
Unlike
a
TV
camera
which
can
respond
to
shades
of
gray,
the
OpticRAM
is
a
digital
device
where
each
picture
element
will
only
respond
to
a
black
and
white
representation
of
a
scene.
All
portions
of
the
scene
lighter
than
an
arbitrary
threshold
are
considered
white
and
all
portions
of
the
scene
darker
than
the
threshold
are
considered
black.
If
the
exposure
time
is
increased
more
of
the
scene
falls
on
the
white
side
of
the
threshold
barrier.
As
the
exposure
time
is
decreased
more
of
the
scene
falls
on
the
black
side
of
the
threshold
level.
The
threshold
level
can
be
affected
in
one
of
three
ways:
(1
)
changing
the
exposure
time;
(2)
changing
the
f-stop
on
the
lens;
and
(3)
changing
the
light
on
the
scene
itself.
Doubling
the
exposure
time
is
the
same
as
opening
the
f-stop
by
one
stop
(changing
the
f-stop
to
the
next
smaller
number)
or,
in
other
words,
doubling
the
amount
of
light.
For
optim~m
results
from
your
MicronEye,
careful
consideration
must
be
paid
to
lighting.
In
general,
arbitrary
lighting
of
the
environment
will
not
produce
optimum
results
as
it
may
result
in
low-contrast
images,
reflections,
shadowing
and
extraneous
details.
A
good
lighting
system
illuminates
the
scene
so
that
the
complexity
of
the
image
is
minimized
while
the
information
required
for
inspection
or
manipulation
is
enhanced.
2.3.1
Front
Lighting
A
front
lit
scene
(where
the
MicronEye
is
on
the
same
side
of
the
scene
as
the
light
source
or
ambient
light)
sometimes
lacks
adequate
contrast.
Front
lighting
with
a
diffused
light
source
can
often
be
used
to
increase
the
contrast
in
a
scene.
If
defects
or
points
of
interest
are
to
be
emphasized,
side
lighting
such
that
the
defects
Qr
points
of
interest
cast
a
shadow
or
appear
brighter
through
increased
reflectivity
may
be
used.
2-2

USING
THE
MICRONEYE'WITH
THE
APPLE
FILES
INCLUDED
ON
YOUR
MICRONEYE
DISKETTE
3.2
FILES
INCLUDED
ON
YOUR
MICRONEYE
DISKETTE
To
assist
you
in
MicronEye,
both
source
your
diskette.
A
catalog
your
diskette
follows:
developing
personal
applications
for
the
listings
and
programs
have
been
included
in
and
brief
description
of
the
files
found
on
APPLES
OFT
CATALOG
A
045
MICRONEYE
A
012
COMMANDER
A
014
GREYPIC
A 011
GREYSCREEN
A 011
ENHANCED
EYE
A
003
SLIDE
SHOW
T
033
T.CAMASM
B
006
CAMASM
T 011
T.EPRINT
B
003
EPRINT
T
029
T.GREYASM
B
005
GREYASM
T
018
T.GSCRASM
B
003
GSCRASM
T 041 T.ENHANCER
B
006
ENHANCER
T
002
EYEPARMS
B
008
MEYEAPP
T
034
T.MEYEAPP
A
007
GREY16
B
006
GREY16-48K
B
007
GREY16-64K
B
034
BAMBI
B
034
BAMBI
AND
FLOWER
B
034
ROBOTARM
B
034
WINNIE
B
034
BEARS
PASCAL
DIRECTORY
MIGRONEYE.CODE
19
COMMANDER.
CODE
4
GREYPIC.CODE
12
CAMASM.CODE
9
GREYASM.CODE
6
SCREENIO.CODE 7
MICROCAM.TEXT
30
COMMANDIT.TEXT
6
GREYPIC.TEXT 10
CAMASM.TEXT
26
GREYASM.TEXT
16
SCREENIO.TEXT
10
(MICRONEYE
program
as
discussed
below)
(COMMANDER
program
as
discussed
below)
(GREYPIC
program
as
discussed
be~ow)
(GREYSCREEN
program
as
discussed
below)
(ENHANCED
EYE
program
as
discussed
below)
(runs
GREYSCREEN
pictures
on
this
disk)
(source
for
CAMASM)
(6502
routines
for
MICRONEYE
and
CAMASM)
(source
for
EPRINT)
(6502
Epson
screendump
routine)
(source
for
GREYASM)
(6502
routines
for
GREYPIC)
(source
for
GSCRASM)
(6502
routines
for
(GREYSCREEN)
(source
for
ENHANCER)
(6502
routines
for
ENHANCED
EYE)
(parameter
file
for
MICRONEYE)
(6502
routines
for
APPLICATIONS SUBROUTINES)
(source
for
APPLICATIONS SUBROUTINES)
(16
shades
of
grey
program,
BYTE
Oct
'83)
(6502
routines
for
GREY16
on
a 48K
Apple)
(6502
routines
for
GREY16
on
a 64K
Apple)
(picture
created
using
GREYSCREEN)
(picture
created
using
GREYSCREEN)
(picture
created
using
GREYSCREEN)
(picture
created
using
GREYSCREEN)
(picture
created
using
GREYSCREEN)
(MICRONEYE
program
as
discussed
below)
(COMMANDER
program
as
discussed
below)
(GREYPIC
program
as
discussed
below)
(6502
routines
for
MICRONEYE/COMMANDER)
(6502
routines
used
by
GREYPIC)
(Screen
handling
library
code
file)
(Source
code
for
MICRONEYE)
(Source
code
for
COMMANDER)
(Source
code
for
GREYPIC)
(Source
code
for
CAMASM)
(Source
code
for
GREYASM)
(Source
code
for
SCREENIO)
3-2

USING
THE
MICRONEYE'WITH
THE
APPLE
THE
MICRONEYE
PROGRAM
3.3.3.11
SAVE
PICTURE
TO
DISK -
Typing
an
"s"
when
the
camera
is
operating
tells
the
computer
to
save
the
current
picture
to
disk.
The
computer
will
prompt
for
a
filename
and
attempt
to
save
the
picture
to
disk.
If
an
error
is
encountered
in
attempting
to
save
the
picture
(usually
due
to
insufficient
disk
space)
then
a
message
is
displayed.
Otherwise
the
picture
is
stored
to
disk.
(Applesoft
only.)
Normally,
the
MicronEye
program
will
compress
the
picture
before
storing
it
to
disk.
Although
this
saves
a
lot
of
disk
space,
the
pictures
saved
are
incompatible
with
commercially
available
graphics
manipulation
packages
and
screen
dump
programs.
If
you
prefer
that
the
MicronEye
program
store
pictures
in
a
conventional,
non-compressed
format
then
perform
the
following
sequence
of
DOS
and
Applesoft
commands:
LOAD
MICRONEYE
2027
FF = 1
SAVE
MICRONEYE
The
Pascal
version
of
MicronEye
saves
pictures
in
compressed
format
only.
This
is
because
a
standard
format
for
a .FOTO
file
has
not
been
defined
by
Apple
or
other
graphics
software
companies.
3.3.3.12
TRACK
EXPOSURE
TIME USING
AUTO
,LIGHT
LEVEL
ADJUST
-
The
auto-adjust
mode
is
selected
by
typing
a
"T".
When
auto-adjust
is
selected
as
a
real-time
option,
the
computer
will
use
the
light
level
of
the
current
picture
as
the
ideal
light
level.
The
light
margin
is
the
acceptable
level
of
deviation
from
the
ideal
light
level
and
should
have
been
set
previously
from
the
MICRONEYE
SETUP
screen.
After
each
picture
is
received
from
the
MicronEye,
the
computer
determines
if
the
light
level
was
within
the
established
bounds.
If
not,
the
computer
will
increase
or
decrease
the
exposure
time
of
the
next
picture
to
try
and
get
back
to
an
acceptable
light
level.
The
auto-adjust
mode
is
intended
for
applications
where
the
MicronEye
is
focused
on
a
fixed
or
semi-fixed
scene.
3.3..4
SAVE
CURRENT
CAMERA
SETUP
Selecting
this
option
from
the
main
menu
tells
the
computer
to
save
the
currently
defined
setup
as
the
setup
the
computer
should
initially
use
when
starting
the
MicronEye
program.
The
setup
variables
that
are
stored
include
PICTURE
SIZE,
PICTURES
PER
SCREEN,
EXPOSURE
METHOD,
EXPOSURE
TIME,
READOUT
SETTING, LIGHT LEVEL, LIGHT
MARGIN,
MICRONEYE
SLOT,
and
BAUD
RATE.
The
setup
is
saved
to
a
file
called
EYEPARMS.
3-10

USING
THE
MICRONEYE'WITH
THE
IBM
PC
FILES
INCLUDED
ON
YOUR
MICRONEYE
DISKETTE
4.3
FILES
INCLUDED
ON
YOUR
MICRONEYE
DISKETTE
To
assist
you
in
MicronEye,
both
source
your
diskette.
A
catalog
your
diskette
follow:
developing
personal
applications
for
the
listings
and
programs
have
,been
included
in
and
brief
description
of
the
files
found'
on
MOVDOS.BAT
MICRONEY.BAT
MEYEDRVR.ASM
MEYEDRVR.BAS
MEYE.BAS
MEYECOMP.BAT
MEYESAVE.BAS
MEYEPARMS
MEYE88.ASM
MEYE.EXE
MEYEC.BAS
MEYEDRVC.ASM
MEYEC.OBJ
MEYEDRVC.OBJ
MEYE88.0BJ
MEYEC.BAT
LCS.BAT
(Command
file
to
create
bootable
diskette)
(Command
file
to
invoke
the
MEYE
program)
(Source
file
for
8088
MicronEye
routines)
(BLOADable
8088
routines
for
the
MicronEye)
(BASIC
MEYE
program
described
below)
(Command
file
to
assemble
MEYEDRVR)
(BASIC
program
used
by
MEYECOMP)
(Optional
parameter
file
for
MEYE)
(MicronEye
Applications
Library
assembly
language
routines)
(Compiled-BASIC
version
of
the
MicronEye
program)
(ASCII
version
of
MEYE.BAS
to
work
with
compiled-BASIC
(Assembly
language
driver
for
the
MicronEye)
(Linkable
object
module
version
of
MEYEC.BAS)
(Linkable
object
module
version
of
MEYEDRVC.ASM)
(Linkable
object
'module
version
of
MEYE88.ASM)
(Batch
file
used
to
create
MEYE.EXE)
(Sample
batch
file
to
link
user
program
with
MEYE88)
4.4
THE
MEYE
PROGRAM
The
MICRONEYE
program
lets
a
non-technical
user
harness
a
great
deal
of
the
MicronEye's
power.
The
program
incorporates
the
ability
to
show
pictures
transferred
from
the
MicronEye
onto
your
computer's
screen,
save
pictures
to
diskette
for
future
use,
and
print
pictures
to
a
graphics
printer.
Run
the
program
by
simply
typing
MICRONEYE
or
MEYE
in
response
to
the
system
prompt.
4-4

USING
THE
MICRONEYE
WITH
THE
COMMODORE
64
FILES
INCLUDED
ON
YOUR
MICRONEYE
DISKETTE
5.2
FILES
INCLUDED
ON
YOUR
MICRONEYE
DISKETTE
To
assist
you
in
MicronEye,
both
source
your
diskette.
A
catalog
your
diskette
follows:
developing
personal
applications
for
the
listings
and
programs
have
been
included
in
and
brief
description
of
the
files
found
on
2
MICRONEYE
12
MEYE6510.EX
50
MEYE;.
SRC. 1
39
MEYE.SRC.2
22 MEYE.SRC.3
10
EXAMPLE
8 MEYE.BIN
28 MEYE.OBJ
2
MEYE.MAIN
3
MEYE.MACROS
6 MEYE.RLE
9
MEYE.ENHANCE
4 MEYE.VARIABLES
13
MEYE.ROUTINES
(Sample
BASIC
program
using
MEYE
(Assembly
language
,routines
di
(Source
listing
part
1
for
MEYE6
(Source
listing
part
2
for
MEyE6
(Source
listing
part
3
for
MEYE6
(Sample
BASIC
program
using
MEYE.BIN)
(Routines
described
in
Appendix
H)
(Object
code
for
MEYE.BIN)
(Subfile
of
MEYE.BIN)
(Subfile
of
MEYE.BIN)
(Subfile
of
MEYE.BIN)
(Subfile
of
MEYE.BIN)
(Subfile
of
MEYE.BIN)
(Subfile
of
MEYE.BIN)
5.3
THE
MICRONEYE
PROGRAM
The
MICRONEYE
program
lets
a
deal
of
the
MicronEye's
power.
to
show
pictures
transferred
from
screen,
save
pictures
to
disk
for
Epson
or
Gemini
graphics
printer.
non-technical
user
harness
a
great
The
program
incorporates
the
ability
the
MicronEye
onto
your
computer's
future
use,
and
print
pictures
to
an
To
execute
the
MICRONEYE
program,
type
LOAD
"MICRONEYE"
,8
(followed
by
the
RETURN
key)
and
then type
RUN.
The
program
will
load
the
assembly
language
routines
(MEYE6510)
for
the
MicronEye
from
disk.
Once
the
routines
have
been
loaded,
the
Commodore
64's
screen
immediately
turn
white
and
the
MicronEye
will
begin
sending
pictures
to
the
computer.
You
will
see
on
the
top
two
lines
of
the
display
the
current
operating
mode
of
the
MicronEye.
When
the
program
begins
execution
the
mode
display
should
read
"B&W
1-PICTURE
NORMAL".
The
second
line
of
the
display
should
read
"SOAK
TIME:
350".
Between
pictures
from
the
Micr~nEye,
the
computer
checks
for
commands
entered
by
the
user
on
the
keyboard.
Because
the
MicronEye
must
operate
with
the
interrupts
turned
off
on
the
Commodore
64,
the
computer
might
not
notice
a
key
being
pressed
unless
you
keep
the
key
pressed
down a
bit
fonger
than
you
may
be
accustomed.
As
you
work
with
the
MicronEye
you
will
acquire
a
feel
for
how
long
to
keep
the
5-2

APPENDIX B
TRANSMISSION TIME CONSIDERATIONS
The
following
table
outlines
the
milliseconds
required
to
send
an
image
from
the
MicronEye
to
the
computer
as
a
function
of
rows,
bytes
per
row
and
baud
rate.
The
table
may
prove
useful
in
doing
exposure
time
calculations.
The
times
are
calculated
using
the
following
equation:
TIME =
(ROWS
x BYTES-PER-ROW x
10000)
/ BAUD-RATE
TRANSMISSION
RATE
TABLE
The
following
table
is
provided
as
an
aid,
to
the
programmer
by
listing
all
row
and
column
combinations
(excluding
send
and
soak
bits).
BYTES
BAUD
RATE
ROVJS
PER
ROW
300
9600
19200
76800
153600
-------
-----
-----
------
64 16
34133
1067
533
133
67
64 19
40533
1267
633
158
79
64 32
68267
2133
1067
267
133
64
37
78933
2467
1233
308
154
128
16
68266
2133
1067
267
133
128
19
81066
2533
1267
317
158
128
32
136533
4255
2133
533
.
267
128
37
157867
4933
2467
617
308
128
64
273067
8533
4267
1067
533
128
73
311466
9733
4867
1217
608
256
32
273067
8533
4267
1067
533
256
37
315733
9867
4933
1233
617
256
64
546133
17066
8533
2133
1066
256
73
622933
19466
9733
2433
1217
B-1

07
--------
Ao(S)
1832
OPTICRAM
TECHNICAL
INFORMATION
TOPOLOGY
D.3.3
Cell
Placement
Grid
The
cell
placement
grid
is
shown
on
page
D-6.
For
a
single
array,
there
are
a
total
of
129
rows
and
514
columns.
Only
the
corners
of
the
array
are
shown.
The
placement
grid
indicates
where
the
information
from
each
cell
in
the
OpticRAM
should
be
mapped.
For
instance,
if
the
cell
at
address
Row
1,
Column
1,
in
the
OpticRAM
is
read,
the
value
(a
1
or
0)
should
be
placed
in
the
placement
grid
at
location
X=2,
Y=3.
When
every
cell
has
been
read
and
the
values
placed
in
the
appropriate
locations,
about
half
of
the
grid
remains
empty.
We
will
call
these
empty
locations
"space
pixels."
The
space
pixels
can
be
set
all
high
or
all
low
to
provide
a
light
or
dark
background
for
the
image.
Another
alternative
is
to
set
each
space
pixel
to
the
level
that
agrees
with
the
majority
of
its
nearest
neighbors.
For
example,
let's
say
the
pixel
at
grid
locations
X=2,Y=2
(R1
C1)
and
X=3,Y=1
(Rl
CO)
are
high,
and
the
pixel
at
grid
location
X=3,Y=3 (R3
CO)
is
low.
These
are
the
three
nearest
neighbors
of
grid
location
X=3,Y=2.
The
majority
of
these
nearest
neighbors
is
high,
so
the
previously
empty
grid
location
X=3,Y=2
is
set
high
also.
This
technique
can
be
applied
to
all
empty
grid
locations
except
those
near
the
edge
of
the
array.
A
modified
technique
can
be
used
for
these
edge
space
pixels,
although
there
is
less
optical
data
to
work
with.
Another
alternative
is
to
simply
not
use
the
edge
rows
and
columns.
Having
the
cells
laid
out
in
the
1832
the
way
they
are,
gives
the
1832
much
greater
resolving
power
than
if
the
cells
were
laid
out
linearly.
LOGICAL EQUIVALENT OF TOPOLOGY MAP
ROW
COLUMN
M8B
07
°4--------
°3
------'----
L8B
00
-t---------
AS(10)
02
A6(13)
-t--------
A6(13)
01
~-
AS(10)
D--
A7(9)
00
~
A7(9)
1832
Optic
RAM
Address Descramble Logic.
Figure
D-1.
D-5

1832
OpticRAM™
Topological Information
UPPER
ARRAY
I
~
876.8 microns
~I
LOWER
ARRAY
XO
AO
CO
A2
co
A'
co
A124
CO
AI26
co
RI29
co
A13'
co
Fl2S'
co
R253
co
R255
co
"
X2
RI
CI
R3
CI
• A123
CI
RI25
C1
Rll7
CI
R12S
CI
RIJO
CI
R132.
CI
A252
CI
R254
CI
XJ
AI
co
r,3
co
A5
•
co
AI25
co
R127
co
A128
co
AIJO
co
•
R250
co
R252
co
R254
co
X4
RO
C2
A2
C2
A'
C2
A12"
C2
R126
C2
R129
C2
R131
C2
",
"
R251
C2
R253
C2
R255
C2
X5
RO
CI
R2
CI
A'
CI
R12'
C,
R126
Cl
AI29
CI
R131
Cl
•
R25J
Cl
R255
C,
X6
X7
AI
C2
Rl
CJ
R3
C2
RJ
CJ
A5
"
C2
•
A12J
"
CJ
RI25
C2
R125
CJ
RI27
C2
R127
CJ
R128
CJ
R128
C2
R1JO
CJ
A,JO
C2
A1J2
CJ"
•
•
• R250
C2
R252
C3
Rm
C2
R25'
CJ
R254
C2
-
-
-
-
R255
C5
R255
CJ
R255
C6
R255
c,
R25J
C5
•
R253
CJ
R25J
C6
R25J
c.
R251
C5
R25'
CJ
A25'
C6
R251
c'
•
•
..
•
•
•
•
RIJt
C5
•
•
RUI
CJ
•••
o&.{te~
$
tJ$l01!1@00
RIJ1
c'
RtJI
C6
•
R129
C5
R129
CJ
R129
C.
R129
C6
•
AI28 RIJO
RtJ2
R252 R254
~ ~
~.
~ ~
•
R128 RIJO • R250 R252 R254
c'
C4
C4
C4
C4
II)
c:
e
o
'E
~
...
...
..
R126
C6
R126
c'
"
..
RI26
C5
R126
CJ
"
..
"
"
R12'
C6
R12d
C'
Rl24
C5
Rll4
CJ
..
" "
"
"
R'
C6
A'
c'
"
. "
R'
C3
R'
C5
R2
c.
R2
C6
RJ
C,
R,
C5
A2
CJ
R2
C5
RO
C'
RO
C6
Al
C'
..
RO
C5
•
RJ
RI2J
R125
Rt27
C5
GC5
C5 C5
•
R5 • R125 RI27
c.
c'
c.
I--!---!I---+--l--+--
X8
XIO
X1l
XI2
X9
RO
CJ
X1J
o
o
X505
RO
C251
X506
A2
C251
AI
C25J
R'
C251
RJ
C25J
"
R12A
C251
•
Rl23
C253
R126
C251
R125
C25J
R127
C253
RI28
C25J
A129
C251
RtJO
C253
Fl131.
C251
•
•
A25'
C25'
A252
C25J
A25J
C251
A25'
C25J
R255
C251
X507
AI
C252
RJ
C252
~~52
"
"
RI25
C252
R127
C252
R128
C252
AI30
C252
•
•
A250
C252
A252
C252
R25'
C252
X508
X509
~~5J
AO
C254
R2
C253
A2
C25.
A'
C25J
R.
C254
"
R124
C254
R124
C253
RI26
C25J
R126
C254
A129
C254
AI29
C25J
R131
C254
A1Jl
C25J"
•
A251
•
C25'
A251
C25J
A25J
C254
A25J
C25J
A255
C25'
R255
C25J
-
X510
Al
C255
AJ
C255
R12J
• C255
RI25
C255
R'27
C255
A128
C255
A1JO
C255
•
"
A252
C255
R25'
C255
X511
RI
C254
RJ
C254
R5 "
C254
R125
C254
R127
C254
AI28
C254
AI30
C254
•
A250
C25'
A252
C25'
A25'
C254
X512
Y12' YI25 Y126
Y127
YI28
.-.
Y'2J
Y12'
Y125 Y126 Y127 Y128
PIN
16
~
X51J
AO
C255
YO
Yl
R2
C255
Y2
A'
C255
YJ 'r4
Y5
R124
C255
RI26
C255
YO
YI
AI29
C255
Y2
AIJI
C255·
Y3
Y4
•
R251
C255
A25J
C255
A255
C255
fo--
PIN
1
I---
(REV 11-83)
Rl
R3
CO
CO
RO
R2
C2
C2
R2
Cl
Rl
C3
Rl
R3
C2
C2
==>

I
TECHNOLOG~INC
ALGORITHM
FOR
TRANSFORMING
THE
OPTICRAM
256
X
128
IMAGE
INTO
THE
PROPER
512
X
128
ARRAY
SPACE.
(*
described
in
psuedo-PASCAL
terms.
For
purposes
of
simplicity
we
assume
that
bits
are
individually
access~ble.
Implementation
on
most
computers
will
require
bit-twiddling
to
simulate
the
effect
of
what
is
shown
below.
This
algorithm
is
accurate
for
the
lower
array
which
is
the
array
used
when
ONE-ARRAY
mode
is
used
on
the
MicronEye.
The
changes
to
be
used
when
transforming
the
upper
array
are
noted
parenthetically.
*)
VARIABLE DECLARATIONS
grid
ARRAY
[0.•513,0••128]
OF
bits;
optic
ram:
ARRAY
[0.•255,0.127]
.
OF
bits;
x,x3,-
y,
col
ctr,
row-ctr
:
INTEGER;
PROCEDURE
TRANSFORM;
BEGIN
FOR
row
ctr
:=
°
TO
127
DO
FOR-col
ctr
:= °
TO
255
DO
BEGIN
IF
ODD(row
ctr)
THEN
IF
ODDTcol_ctr)
THEN
BEGIN
Y
:=
row
ctr
+
1;
x := 2
*-col
ctr
+
3;
(*
upper
array
is
2*col_ctr*)
END
ELSE
BEGIN
Y
:=
row
ctr;
x := 2
*-col
ctr;
(*
upper
array
is
2*col
ctr
+
3*)
END
-
ELSE
(*even
row*)
IF
ODD(col_ctr)
THEN
BEGIN
Y :=
row
ctr;
x :=~*-col
ctr;
(*
upper
array
is
2*col
ctr
+
3*)
END
-
ELSE
(*even
column*)
BEGIN
y
:=
row
ctr
+
1;
x
:=
2
*-col
ctr
+
3;
(*
upper
array
is
2*col_ctr*)
END;
grid[x,y]
:=
optic_ram[col_ctr,row_ctr];
END;
end
of
transform
procedure
*)
TN-l-A

The
!BM
Personal
Computer
Assembler
03-22-84
XICRDNEYE
ASSEMBLER
ROUTINES
{MEYEDRVR}
TITLE
M!CRONEYE
ASSEMBLER
ROUTINES
(MEYEDRVR)
PAGE
84~132
,SALL
CGMMENT
~
MEYEDRVR--MODULE
DESCRIPTION
for
gettr~~sa;r~~~~em~;~;et~;k~fc;;~~y~ft~lih;h~r~~~i~~a~~g;rr;n~~:;~~s
of
the
IBM
PC.
The
routine
is
asse~bled
toberelocatable,
Because
the
routine
nor~allv
resides
within
the
BAS!C
wor~~spac~~
the
fif~t
Dartofthe
BASIC
Droqram
locates
these
routinesashiOhinthe'
BASIC
~egmentaspoisibl~.
Although
the
program
makes
certai~
that
there
is
enou"h
room
initially
for
both
the
assemblt
language
routines
and
the
BASIC
proqram,
thereisno
assurance
that
.he
declarationoflarge
amounts
of
data
space"
will
not
overlap
the
aachine
language
programs.
There
are
4
asselblvroutines
availabletothe
user--
fAR"CALC.
S
"R"~UDUM"
V"""sr~
-n"
G~T~I"
"'"M"AL"
·-~e-
t"-
cet""p
--r-meter- "
Llt
...
l,
r,r~
ArC:'I..,n
dl\.:
.....
,r
..
~.
rHrln~H
1.-
t.='n..
~
H~., U
tJ~
Dill..
l~
selectedatthe
lain
lenu
and
calculates
the
commands
that
GETCALC
will
send
the
MicronEye
and
the
numberofbytes
the
MicronEye
will
return.
SCREENDUM?
dumps
the
current
picturetoan
IDMorEpson
printer.
XFERSCR
moves
the
pictureinthe
WORKMAP
areatothe
screen.
The
proper
calling
sequence
fromaBASIC
programisas
follows:
DEF
SEG=~Hxxxx
'where
xxxx
specifies
the
assembler
routine
address
BlDAD
"HEYEDRVRn.O
GErPIC
= 0 "
PARMCALC
=6
SCRDU"?=12
SCRXFER
=
16
DATA.
AREA
=
20
·
CALL
SCREENDUMP
·
CALL
GETPIC(screen_start,white_pct,key_value}
·
CALL
XFERSCR
All
variablesinthe
argument
list
are
assumedtobeoftype
lNTEGER.
The
variables
are
definedasfollows:
PIC
TYPE--determines
the
formatofthe
image
transmitted
from
-
the
MicronEye.
The
following
are
valid
commands:
o-
12Bx64
picture
(black&white)
1 -
512
x64picture
(wI
smoothing)
2 -
512x64
picture
(oreyl
3 -
512
x
12B
picture
(olack~white)
4 -
640
x
12B
picture
(wI
smoothing)
5 -
640
x
12B
picture
(grey)
The
command
byte
sent
this
routineisnot
the
sameasthe
control
byte
senttothe
MicronEve.
For
a
complete
descriptionofthe
HicronEye
confrol
byte
refertothe
Operator's
manual.
PICS
PER
SCREEN--If
set
to2then
both
blocksofimage
sensors
-
on
fhe
OpticRAM
willbetransmitted
from
the
MlcronEye.
The
blocks
(or
arrays)
are
separatedbya
dead
zone
so
the
displayed
picture
Hill
appeartobe
split-screen.
EXIT
AT
EOF
--
If
true
(an
odd
number)
then
controlisreturned
to
- -the callino
programatthe
endofeach
picture
trans~ission.
Otherwise,
Jplctures
are
continually
processed
untilakey
is
pressed.
EXPOSE
TIME--the
numberofmilliseconds
for
which
the
image
should
-beexposed.
SCREEN
START--The
bvte
positiononthe
screen
pa?e
at
which
the
-
picture
shoulo
start.
This
positionisca.culated
as:
(ROW*801+(COLUMN/B).
Row
mustbean
even
number
between0and
134.
Column
must
be
between0and
512
and
divisible
by.
B.

The
IBM
Personal
Comguter
Assembler
03-22-84
M1CRGNEYE
ASSEMBLER
KuUTINES
!MEYEDRVR)
PAGE
1-2
~HITE
pel
-- A
value
between0and
100
that indicates
the
-
appfoxi~ate
percentofthe
current
picture
thatiswhite.
KEY
VALUE--At
the
beginninoofeach
FRAMEGRAB
this
variable
is'
set
-
to
zero.Ifduring
the
FRAMESRAB
a
key
is
pressed~
then
the
ASCI!
valueofthe
key
is
placedinthe
LSBofkey_value,
For
CU=tD~
applications
you
may
wishtoincreaseordecrease
the
size
Or
the
buffers
usedtocreate
picturesofeachofthe
supported
ty~es.
lhe
tahle
helow
shows
the
byte
requirEments
for
the3buffers
B!T~A?,
dITMAPB,
and
WORKMAP
when
Jsina
each
picture
type.
As
shipp~d.
WORKMAPissetto10240
bytes.
BiTMAP
10240
bytes
and
BITMAPB
4096
bvt~s.·
With
suchaconfiguration
the
BASIC
pro~ram
MEYt
allows
single
array
pcitures
for
all 6 picture
types,
but
supports~array
mode
for
only
the
first
three
picture
types
(64
row
pictures).
BUFFER
SIZE
REQUIREMENTS
FOR
EACH
PICTURE
TYPE
----------------------------------------------
BYTES
WHEN
USING
PICTURE
TYPE
BUFFER
NAME
1
AnR~V
2
ARRAYS
n.....
------------
-----------
-------~
128
x
J R
(BfWl
WORK
MAP
1024
2048
O~
512
x
64
iBfW)
BITMAP
1024
2048
WORK
MAP
4096
8192
512
y,
64
(GREY)
BITMAP
1024
2048
BITMAPB
1024
2048
WORKMAP
4096
8
1Qn
.
,~
512
x
128
(BfWl
BITMAP
4096
*
WORKMAP
8192
*
640
y,
128
(BfW)
BITMAP
4096
*
WORKMAP
102~0
*
640
y,
128
(GREY)
BITMAP
10240
*
BITMAPB
4096
*
WORKHAP
10240
*
*
2-array
modeisnot
supportedbythis
software
H~hen
working
with
the
y,128
pictures.
Firstly~
buffer
space
required
was
prohibitive
for
users
with
less
than
19~K
of
memory.
Secondly,aseparate
set
of
routinestohandle
the
enhancementofthe
top
array
(only
the
bottom
arrayisusedini-array
mode)
wouldberequired
because
pixel
placement
is a
mirror
imageofwhatisdoneinthe
bottom
array.
In
other
words.
in
the
top
arrayoneven
rows
you
woulddowhat
was
aoneonodd
rows
in
the
bottom
array
except
that
the
bytes
that
are
moved
one
row
away
stay
where
they
are
and
the
bytes
that
normally
stay
where
they
are
move
one
row
away.
NOTE:
RS-232
users
who
are
referringtothis
cedetodevelop
code
for
other
computers
shouldbeaware
that
the
data
lines
for
the
IBM
interface
have
been
flippedtoaccomodate
the
IBM
PC's
method
of
graphics
display.
All
status. control.
and
data
registers
associated
with
the
MicronEye
interfaceonthe
IBM
version
are
exactly
backwardsofthe
status, control.
and
data
registers
emeloyedbythe
RS-232
interface.
In
otner
words.
when
the
IBn
writesaCO
hex
(11000000
binary)tothe
cont~ol
register.
RS-232
MicronEye
users
will
wanttowritea03
hex
(00000011
binary).
By
the
same
token
data
received
from
the
MicronEyeisbackwards.
In
the
IBM
the
most
significant bitofeach
byte
received
corresponds
to
the
left~ost
of
the
eight
pixelsinthe
image.Inthe
RS-232
the
least significant bitofeach
byte
correspondstothe
leftmost
pixel.
The
AppleIIand
Commodore64versionsofthe
MicronEore
are
similar
in
this
respecttothe
RS-232
version.
The
TRS-80Coor
Computer
interfacetothe
MicronEye
uses
the
same
bit orientationasthe
IBM
PC.
I
I
SUB
TTL
MAIN
SUBROUTINES
AND
DATA
DECLARATIONS

The
IBM
Personal
Gornnuter
AssEmbler
03-22-84
MICRONEYE
ASSEMBLER
R5uTINES
{MEYEDRVR}
PAGE
1-3
MAIN
SUBROUTINES
AND
DATA
DECLARATIONS
0014
0400
0016
0000
0018
0000
001A
0000
00lC
0040
001E
0010
(1020
0001
0022
28AO
(
;cal~ulate
parameters.
based
on
pictype,
;
plcs_per~screen,exlt_at_eQf!
and
;
EXpDse_tlfi!e.
iprints
pictureonscreen.
uses
bitmap
;
i~age
rather
than
screenassource.
;get
pictufe(s)
trom
the
MicronEye
;ffioves
bitmap
pictureatWORKMAPtoscreen
1024
o
o
,0
b4
16
1 ,
10400
DUP
(?J
;use
16000
for
2-array
pictypes
3-5
FAR
SETPle
6
FAR
peAle
8
FAR
MOVESCR
FAR
SCRDUMP
PAGE
CBEG
SEGMENT
PARA
PUBLIC
ASSUME
CS:CSEG,DS:CSE6,ES:NOTH1NG
.
!
SEIPleT
PHOC
,ur:
.:nr
GPICX:RET
GET?1CT
END?
j
PAR~~CLC
PHOC
JMP
FARMX:RET
PARMele
END?
i
PICDUMP
PROC
CALL
RET
PleDUMP
ENDP
;
SCRXFER
PROC
CALL
RET
SCRXFEF:
ENDP
i
MAPBYTES
DW
KEY
VALUE
DW
PICTYPE
DW
SCREEN
STARTDW.
SCR
ROWCT
DW
SCR-COlCT
DW
ARRHYCT
DW
WORKMAP
DB
EB
6303
F:
~"
l"D
CA
GOOE
,..n
17n,..
rl
::0
0,)0::
r.
CB
OOOC
OOOC
OOOF
0010
OC06
(lOOt,
0009
0000
0000
0003
')0%
0010
0010
0013
0014
(I00C
28C2
28AO
(
??
BITMAP
DB
10400
DUP
(?)
;use
16000
for
2-array
pictype
5
5162
1000
(
??
BITMAPB
DB
4096
DUP
(?)
;use
8192
for
2-array
pictype
2 & 5
i
'~J..."
0318
CONTROL
DW
318H
icaillera
control
port
c.~.:
6164
0318
STATUS
DW
318H
jcaiera
status
port
6166
0319
DATAlN
DW
319H
icailiera
data-from
port
I
~
! Q
()~(n
DATAOUT
DW
319H
jcailiera
data-to
port
o.o~
~,'1
7
11lt\
0000
EXITEDF
DW
0
C..OH
If'!"
1)1
?'"
EXPOSE
TIME
OW
300
O!O~
H.l..
616E
0000
WHITE
PCT
OW
0
h171'
1B
COMMA~D
DB
IBH
w., u
6171
????
ROWCTR
DW
?
6173
????
COLCTR
DW
?
6175
00
BITCT
DB
0
6176
0000
WOF;DCT
DW
0
6178
????
WHITECT
DW
?
617A
0400
TOTBYTES
DW
1024
.
!
6
17
1'
0400
0400
0400
1000
TOT
TAB
OW
1024,1024~1024,4096,4096,4096
.,
w
-
1000
1000
6188
0040
0040
0040 0080
ROWCT
-
TAB
DW
64,64,64,128,128,128
0080
0080
6194
0010
0040
0040
0040
COLCT
-
TAB
DW
16,64,64,64,80,80
0050
0050
~
61AO
0400
1000
1000
2000
BYTES
-
TAB
OW
1024,4096,4096,8192,10240,10240
2800
2800
61AC
001B 001B
001B
001F
CMD-TAB
DW
1BH,lBH,lBH,lFH,lFH,lFH
001F
001F
;
61B8
0000
PAT
OW
0
61BA
00 05
OF
00
50
0"0"
DPAT
DB
~
0"
r"lFJ.J0O"{IH'
O"O"H
O"rH
r"l
fll:O"
"FO"H
'\1"1:1.1
oJ,J
.
,..I,'
...
",
,tJVI,..
J.J
,~r
,\"',J,
n,vtJ,,\..r,
II
5F
00
FO
F5
-r
rr
6
1
r"f:
00
OF
FO
FF
CPAT
DB
O.OFH.OFOH.OFFH
!1..,J
'IrQ
184108
00
1"1"
GRSETUP
DB
lSH,4lH,8H~ODH.OFFH
;
8/72"
,.
spacing
0 •
..,.
rr
11ne
61CE
I"
.,.'"
00
FF
TEnSET
DB
1BH.32H.ODH.OFFH
;
6 linesl:n
spaClng
.Il
.)J.,
6102
00
OAIB4B
GUN
DB
ODH;OAH;lBH~4BH
;
60
dots/in
graphics
6106
0000
FFFF
GRlEN
DW
OH.OFFFf=H
61DA
11"\111
H
if1•.,
".
624A
F:
"'1'
DW
PICA,PICB,PICC,PlCD,PICE,PICF
0':'10
0':'11
1\
r.w

The
IBM
Personal
COmputer
Assembler
03-22-84
PAGE
1-4
MICRONEYE
ASSEMBLER
ROUTINES
{MEYEDRVR)
MAIN
SUBROUTINES
AND
DATA
DECLARATIONS
6253R6:56R625C
R
blEb
673AR674A
R
61EA
????
,..nt'.'.,·"''''''''
OlJt1t,r
11\
MAPADR
DW
DW
SOAK,GREYSOAK
? '
SETP!e
ROUTINE
jget
picture
Trom
thE
MicfonEye
The
IBM
Persunal
COffiDuter
Assembler
03-22-84
M!CRONEYE
ASSEMBLER
ROUTINES
(MEYEDRVR)
SErPIC
ROUTINE
jformat
routine
for
512Yo128
B&W
picture
jformat
routine
for
512Yo128
smoothed
picture
iformat
routine
for
512Yo128
grey
picture
j
no
forluattingneeded
for
128x64
BH!
pi
cture
jformat
routine
for
512x64
smoothed
picture
iformat
routine
for
512x64
grey
picture
iinitialize
comru
link
jset
Ur,EStopointtodata
segment
of
i
cal.ln~
prograF..
iset
upD~tobethe
sarneasthe
code
segment
jsave
calling
environment
;get
addressofkey
value
variable
jget
ad~res5
of
whlfe_pct
variable
in
;
call1ng
prooram
jrestore
environment
before
returning
j
(note
thatDSof
calling
pronraruisbeing
used
.
to
,,,,,in" \1,1"" to WH'lJ:'
pr1
-nd
k'EY
1,1/\'LPJ:'
,
w""''''''.,;"l
IW..WI;'..
H'
i ,
...
I
WI
d.
1\
In
U...
jofcall1i:g
programs)
- -
;get
SCREEN_START
address
from
stack
;get
SCREEN_START
value
2-1
jdoes
everything
necessarytoget
picture
;preserve
stack
ptrinBP
SMOOTHS
SREYSQAK
GREYGRAB
GREY
ADD
ENHANCE
ENHANCE2
FILLIN2
GREYSoAK
GREYGF:AB
ENHANCE2
ENHANCES
GREYADD2
F!LLIN2
DS
[Sn,AX
rDILBX
BP
,
GPIC)
AX,100
\J!HlTECT
TOTBYTES
WHITE
PCT
AX
B
y
n:17
\IAl
UE
HjjIU.., f't11.
Dr
6[B~J
"I'nrBPl
iJ
110
..
'I
..
ES'
PAGE
FRAM£SRAB
;get
picture
from
MicronEye
BX,PICTYPE
jselect
picture
formatting
routine
based
BX;l
j
on
pictype
WORD
PTR
P1C£BXJ
MOllESCR
;moved
formatted
picturetoscreen
EXITEDF.l
iif
exitatedf
set
then
preparetoexit
DONE
' - -
KEY
VALUE,O
RESTART
iotherwisegoget
another
picture
..
NEAR
SP
llP
"P
.',
'~,
DS'
ES
hV
nr"
Ht"J"O
ES.AX
AX;CS
DS.AX
DL
l(HBPJ
AX;ES:
rDn
SC~:EEN
START,
AX
ACIACLR
'
RET
JMP
CALL
CALL
JM?
JMP
CALL
JMP
.
CALL
CALL
CALL
CALL
CALL
JMP
ENDP
MOll
MUL
DIV
MoV
MOll
MOV
i10V
POP
POP
MOV
MDV
PDP
JMP
GETPIC
;
PICF:
j
PICA:
PIca:
PICC:
DONE:
PASE
SETPIC
PROC
PUSH
HOV
PUSH
PUSH
MOV
KoV
MOV
MoV
MOV
MOV
MOll
CALL
RESTART:
CALL
MOV
SHL
CALL
CALL
TEST
JNZ
CMP
JE
C3
l"Q
"74
"
61
Olf,t
f'\
£8
674A
R
ES
63C9
R
£9
65BD
R
E9
MAE
R
E8
6b9B
R
E9
6609
R
£8
674A
R
ES
b3C9
R
EB
669B
R
EB
668F
R
ES
b6F3
F:
E9
6609
R
B8
0064
F7266178
R
F7
36
617.~
R
1\7
J t
If-
Ii
:"'11.'\
O!Cc:.
n
8B1E0016
R
8B
7E
06
8B7608
07
lF
89
04
89
iD
5D
£9
0003
R
E8
63D2
F:
83
IE
0018
R
D1
E3
FF9761DA
F:
E8
638E
F:
F7
06
6161\R0001
75
07
833E0016R00
74
El
6246
/
l'U'"
Ct.'!
I
624A
624D
6250
6253
6256
6259
625C
625F
6262
6265
6268
62bB
if'll'"
:It.Cl:
623C
loj"Y'ii
O';;'
..
\J)
j"':""",
o..::~.::.
6240
6242
6243
,.
....
~i;
O,i..",\.,;'.
i
"',7.1
O";'J.O
6:39
biEe
b1Ee
blED
61EF
61FO
06
61Fl3CD8
8E
CO
r\t"
,..'"
OL,
",0
8E
D8
sa
7E
OA
26:8805
A3
001A
R
E8
6715
F:
SUBTTL
PARMCALC--Determine
picture
characteristics

The
IEM
Personal
Computer
Assembler
03-22-84
PAGE
2-2
MICRONEYE
ASSEMBLER
ROUTINES
(MEYEDRVRl
PARMCALC--Determine
picture
characteristics
PAGE
clipped
pic
size
maxis16000
jsave
environment
iget
exiteof
off
stack
irestore
environment
lifwehave
chosen
pictypes
3-5
then
only
i
allow!
array
mode
ireturntoPARMCALC
shell
(doing
things
this
forces
the
needed
FAR
returnl
isetupEStopointtocalling
routine's
;
data
segment
isetupDStobe
the
sameasthis
routine's
;
code
seglvent
;get
pictype
off
stack
;get
arrayct
off
stack
;get
exposetime
off
stack
;transfer
parameters
from
registers
iif
arrayct=2then
i alter
command
byte
for2arrays
i
double
total
bytes
;
double
row
ct
i
double
clipped
nic
size
i
may.
rOHct
IS
200
NEAR
r,p
D.
BP,SP
DS·
SCR
ROWCT,AX
MAPF.YTES,tx
TOTEYTES;BX
ES
.
DS
BP
PARM)
..
"
::;J
AX,DS
ES;AX
AX~CS
DS;AX
DJ;
12rBP]
BX~
ES:
rD!]
PII.TYPE,EX
DI,10rBPJ
AX;Es:rDIJ
ARRA'{CT
,AX
PICTYPE;2
NOTWO
.
ARRAYCT,I
DI.
SrEP)
AX;Es:rDIJ
EXlTEOF,
AX
DI,
MEP)
AX,ES:
rDIJ
EXPOSE
TIME,AX
EX,l
- .
iword-adjustBXfor
table
lookups
AX,COLCT
TAB[EX]
SCR
COLcT,AX
iget
rowct
for
this
pictype
AX,eND
TAB[BXJ
.
COMMANDtAL
iget
MicronEye
command
byte
for
this
pictype
AX,ROWC
_TABrBX]iget
column
bytesctfor
this
pictype
CX,BYTES
TAB[BXJiget
clipped
pic
sizeinbytes
for
this
pictype
DX,
T~T_T~BrBX]
;get
total
bytes
for
this
pictype
.
BX,D"
DX,ARRAYCT
DX
DX,I
NO~ARRAY
COMMAND,20H
EX,l
AX,1
CX;
1
AX,200
RO~OK
AX,200
CX;16000
N02ARRAY
CX,16000
PROC
PUSH
MOV
PUSH
PUSH
MGV
MDY'
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
CMP
JLE
tiD'll
notwo:
MOV
MOV
MOl}
MOV
MOV
MOV
SHL
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
DEC
AND
"
uL
ADD
SHL
SHL
SHL
CMP
JLE
MOV
roV/ok:
CMP
JLE
MOV
N02ARRAY:
MOV
MOV
MOV
POP
POP
POP
JMP
PCALC
ENDP
A3
001C
R
89OE0014
R
89IE617A
R
(17
IF
5D
E9
0009
R
55
38
EC
lE
06
n,.,
'"!.n
C\"
.Jc
8E
CO
8e
ca
8E
D8
SB
7E
or
"\,
I
I'U'
f n
'::'0.
CD
UJ
89IE0018
R
8E
7E.
OA
26:as05
A3
0020
R
S33E001SR02
7E
06
C7060020R0001
8E7E08
26:BE05
A3
616A
R
S87E06
26:BB05
A3
616C
R
Dl
E3
SB876194
R
A3
001£
R
SE8761AC
R
A2
6170
R
83 87
6188
R
8ESF61AO
R
as97bi7e
R
88
DA
8E160020
R
4A
SlE20001
74
1C
SO066170R20
Dl
E3
Dl
EO
D1
El
3D
OOCS
7£
03
Ba
(loea
81F93E80
7E
03
89
~,E80
626£
i"'/~
e..:o::
626F
'I"\~t
b..::..:
!
6272
,""..,..,-
c..:;,)
;".,C'
0':'1";
/.,-,.,.
01./
I
6279
627B
627E
6281
I~nr
0-,0';
1l"\Mn
0.:00
;:o,nn
Ci,ot\
628£
''''"7
0':7,'
6295
629B
629E
62Al
62A4
62A7
62AA
62AD
62AF
62B3
62B6
628A
62BD
62C1
62C5
'
.....
r"
O':w7
62CB
62CF
62DO
62D4
,,,,,/
O,Ll!O
62DE
62DD
62DF
62El
62E4
;"1'"'1
0"'::'0
r"'.lr"n
0"::'7
62ED
62EF
62F2
62F2
62F5
62F9
62FD
62FE
62FF
6300
6303
SUBTTL
SCREENDUMP
ROUTINE
-- prints
imageinWORKMAP
buffer

The
IBM
Personal
Computer
Assembler
03-22-84
PAGE
4-1
MICRONEYE
ASSEMBLER
ROUTINES
(MEYEDRVRl
FRAMEGRABEER
ROUTINES--gets
image
from
MicronEye
izero
keyvalue
jdisable
interrupts
during
orab
jtell
MicronEyetosend
picture
(w/o
soak)
jequate
extra
segment
and
data
segment
jifweuse
two-arrays
and
the
256x128
picture
i
we
haveasmall
problem.
The
descramble
due
j
to
topology
actsonthe
top
array
exactly
;
OPPosItetowhatweare
used
to.
So
even
j
rows
needtobe
processed
like
odd
and
j
vice·versa.
the
qUick
and
dirty
fixisto
i
scoot
the
entire
top
array
up
one
row.
;
zero
Hhi
teet
jset
direction
regtoforward
movelent
isetuptimeout
register
for
byte
receipt
iif
byte
not
available
after
15
;
checks
thenweassume
the
MicronEye
is
j
done
sending
;when
byte
has
comewepointDXto
j
DATAINand
get
the
byte
and
then
j
repaintDXat
the
status register
jput
the
byteinthe
buffer
jincreaent
whitectifhigh
bitofbyte
j
was
white
!g~.~a~~
;nd
t~y
an~
get
another
byte
,
tub
b
.he
.lffieou.
decremmter
jifwehave
timed
out
thenwecheck
and
j
seeifwe
gotasmany
bytesaswe
had
j
hopedtoget
;if
not
enough
bytes
~eceived
then
we
j
beeptoshow
our
dlSgust
jreenable
interrupts
itell
MicronEyetorefresh
w/o
send
iif
keyisavailable
from
keyboard
buffer
'j
then
get
the
key,
putinKey.value
AH,l
16H
NOKEY
AH,O
16H
KEY
VALUE,AX
KEYCHK
AL
1
WHiTECT,
0
NFBYT
RECHK
AX.DI
AV'
nv
Nt.,
OIl
AX.20
tHO
B
l"l=P
1:.
••
INTDN
AH,COMMAND
AH',80H
SENDCMD
COMMAND,3FH
NTA
DI,MAPADR
S1,
DI
SI;32
CX.2048
MOVSW
KEYCHK
CX,15
AL,DX
AL
1
Dt~CHK
roy
lI"
AL,DX
DX
nto:
nta:
.
,
keychk:
MOV
INT
JZ
MOV
INT
MOV
JMP
nokey:
RET
;
FF:AMESRAB
ENDP
PAGE
+
ASSUME
ES:CSES
GREYGRAB
PROC
NEAR
MOV
Dl,OFFSET
BITMAPB
MOV
BX;2
;tnis isanalternate
entry
for
the
JMP
FG2
;
framegrab
routifle
which
sends
the
image
GREYGRAB
END?
;
to
the
BITMAPS
buffer
and
uses
8REYSOAK
; ;
to
make
forashorter
than
normal
sDaktime
FRAMEGRAB
PROC
HEAR
MDV
KEY
VALUE.O
MOV
EX.
U .
CMP
PICTYPE~O
jaIl
pictures
but
pictype0framegrab
JNE
SETBMP
j
to
the
BITMAP
buffer
which
grabs
to
MOV
DI,OFFSET
WORKMAP
JMP
FG~
j
the
WORKMAP
buffer.
This
allows
the
SETBMP:
MOV
DI.OFFSET
BITMAP;
formatted
picturetoalways
endupin
fg2:
MOV
AH;COMMAND
jtell
MicronEyetosoak
w/o
send
MOV
MAPADR.DI
DR
AH.OCOH
CALL
SENDeMD
CALL
WORD
PTR
SOAKPTR[BXl
;soak
for
specified
expose
time
MOV
EX,DI
;save
start
address'ofbuffer
for
cDmpare
CALL
KEVCHK
CALL
INTDFF
MOV
AH.CDMMAND
CALL
SENDCMD
MOV
DX,STATUS
MOV
AX.
DS
MOV
ES;AX
MOV
WH!TECT,
0
CLD
nfbyt:
MOV
rechk:
IN
SHL
JNC
INC
IN
DEC
STOSB
SHL
ADC
JMP
dnchl::
LOOP
MOV
SUB
CMP
JG
CALL
CALL
MOV
OR
CALL
eMP
JNE
MOV
MOV
ADD
MOV
REP
CALL
RET
''''r''n
0,;,1.,7
63C9
63CC
'-,r"'''
J,\I.,'
63D2
63D2
63D2
"..,
06
0016
R
0000
1.,;
J"'''f\
T",r,
0000
C",\ti'J.
D;:
63DB
n~
':H:.
0018
n
00
0.,)
r,
63EO
..,,,
(,1
i J
.'0
63£2
SF
0022
R
63E5
1:""
04
90
_ll
63E8
SF
28C2
R
63EB
nt.
'"
6170
R
OH
LO
l":,,r-r
89
3E
6lEA
r,
C0c.r
r.
6"n
80
"r
CO
,).
v
l..w
63Fb
I:"n
6720
n
_0
r.
I .....
r-n
rol:"
97
l(r:'
R
b':"7
••
C~
...
O
,,,,r-n
8E
DF
o
...
\rM
6,1:"1:"
E8
6464
R
6402
E8
6768
n
r.
6405
8A
26
6170
r.
r.
6409
E8
6720
R
MOe
8B
16
6164
R
6410
8C
D8
6412
BE
CO
6414
C7
06
6178
R
0000
MIA
ror
'w
641B
B9
OOOF
641E
EC
641F
DO
EO
6421
.,.,
on
t
...
\
6"""
42
.~J
b424
FI'
I:,l"
lA"C
4A
0'1';..1
6426
AA
11M
'II""
DO
EO
O.L/
6429
83
16
6178
R
00
b42E
ron
I:"n
I:.ll
_1:1
6''.n
E2
EC
'1
vv
6432
8B
C7
6434
"n
r"
LD
~b\
1••"'"/
3D
0014
01"
...
\0
1""'/"1
7F
03
0'tJ7
643B
E8
67SA
"
r.
b43E
ron
6761
"
1:.0
r.
6441
M.'
')1
6170
r,
OM
..0
r.
6445
80
"",
80
l..l..
6448
ron
6720
R
co
I i
..
~r,
80
~.
bPI)
R
3F
o't'tl)
J.
./v
6450
75
DE
6452
8B
3E
61EA
R
b456
8E
F7
6458
83
C6
20
645B
B9
0800
64SE
l=~
I
A"
1 ....
\/
.oJ
6460
ES
6464
R
'f-'"
C3
c.OJ
6464
B4
01
6466
CD
16
64687409
~
646A
B4
00
646C
CD
16
6"1"
.
.,
0016
R
'101:
H,)
6471
EE
ro.
.1
6473
,,"'
l..,)
6474
SUBTTL
EXPANSION
ROUTINE
for
512x64
picture

The
IBM
Personal
Computer
Assembler
03-22-84
PAGE
4-2.
MJCRONEYE
ASSEMBLER
ROUTINES
(MEYEDRVR)
EXPANSION
ROUTINE
for
512x64
picture
AX.DS
ES;AX
DI~OFFSET
WDRKMAP
SI,DFFSET
BITMAP
BX;
TDTBYTES
;doawordata
time
to
BX.1
j .
speed
thi
ngs
up
WORDCT,BX
;spread
out
byte
4x
isetupbit ctr!2bits/pass)
ithis
stretches
the
iffia~e
fro!·
a
i
128
x
64
imagetoa
~12
x
64
image
;
which
goesalong
waytocorrect
the
i
aspect
ratio.
ES
nbitc
WORDCT
NWORDC
AL,AH
DX,AX
cx;a
BX,O
1'\v· 1
lJ/l,
..
BX;1
DX;1
BX,1
AL;CPAHBXJ
NEAR
.."
1:0
PAGE
SMOOTHB
F'ROC
PUSH.
PUSHF
CLD
MOV
MOV
MOl,}
MDV
MOV
SHR
MOV
nf/ordc:
LODSW
XCH6
MOV
MOV
nbi
tc:
MOV
SHL
RCL
SHL
RCL
MOV
STOSB
LOOP
DEC
JNZ
POPF
POP
RET
SMOOTHB
ENDP
SUB
TTL
ENHANCE
ROUTINE
for
512x128
picture
6474
6474
06
l!""Te
n,..
O~:.J
7~
J
!l~'
1='''
0';10
,"
6477BeDB
6479BECO
647BBF0022
R
647£BE28C2
H
6481BB1E
617A
R
6485D1EB
64B789IE
6176
R
648B
AD
M8C86C4
648E8BDO
6490B90008
6493
BoB
0000
6496D1E2
6498
D1
D3
649AD1E2
649CD1D3
649ESA87
61C5
R
64A2
AA
64A3£2EE
64A5FFOE
6176
R
64A975EO
641\B
9D
64AC
07
64AD
C3
64AE

PAGE
The
IBM
Personal
Computer
Assembler
03-22-84
MICRONEYE
ASSEMBLER
ROUTINES
(MEYEDRVR)
ENHANCE
ROUTINE
for
512
x
4-3
128
picture
NEAR
;this routine
takes
the
256x128
image
from
;
the
MicronEye
and
convertsittoa512
x
CLEARW
;
128
i:l':age
rllth
properly
placed
pixels.
SI,OFFSET
BITMAP;zero
out
WORKMAP
buffer,
DointSI(source
DI,OF.FSET
WORKMAP
;index)tothe
256x128'
array,
andDIto
AX.SCR
ROWer
;
the
512x128
array
AX;1
- jsetuprowctrtobe
half
the
number
of
~ows
RDWCTR.AX;becauseweprocessinEven/odd
raw
paIrs
COLCTR;32
;set
tiD
colctrto32
bvtes/rowtodo
even
row
.
;get
byte
from
source
and
increment
source
idx
BX.O
izeraBXand
DX--BXwill
catch
the
odd
bits
OX;
BX
;
andOXwi11catch
the
even
bits
AL;
1 ;
shifthi
gh-orderbit (7) i
ilto
BX
BX;l
AL,l
;shift bit 6
into
OX
DX;l
CX;3
isetupto
shift
other
6 bits-- 3
odd,3even
!il/.rw
0'111::
64AE
/!l{\r'"
C"tHr
6482
/ A r,1:
0'!l).J
64B8
,
.4"'di
O'!t·l)
64BD
64CO
64C6
64C7
64CA
64CC
b4CE
64DO
b
Jn
?
b4D4
64D7
64D7
64D9
MDB
64DD
64DF
64El
64E3
64E5
ME7
64E9
64EB
64ED
MEF
64F1
64F3
64F5
MF8
MFB
64FF
6501
6507
6508
650B
650D
650F
I&:'4
t
O.Jll
Ie"·'"
C~J.")
6515
!t:'u',
O,J!O
6518
651A
651C
6e:n:
6520
6522
6524
6526
6528
652A
652C
652E
6530
6532
.fe''']'!
C"hJ~
6536
6537
~
6539
653B
653D
.1'='"11""
Ol>l
...
\f"
6542
6545
6546
6548
654A
654D
6550
6554
6556
I!':g"!\
(l,J.J11
Fe
,-n
I
C','~
I"'l
:::'0
O.JHJ
r.
BE
28C2
R
SF
0022
R
Ai
00lC
R
Dl
E8
A3
6171
R
C7066173R0020
,
...
,...
HL.
BB
0000
as
D3
DO
EO
Dl
D3
DO
EO
D1
D2
B9
0003
D
1
~.,.
.
~,)
ft.
i"""
1I!
::,)
01
E3
DO
EO
01
D3
Dl
£2
Dl
E2
Dl
E2
DO
EO
Dl
D2
l""F\
~J\
::..: ~M
D1
E2
36
F2
86
FB
09
15
095D40
n,\
r7
(J'1
c""
....
,
",.i-
FFOE6173
R
75
C5
C7066173R0020
AC
aa
0000
8B
D3
DO
EO
Dl
D3
DO
EO
Dl
D2
B9
0003
D1
E3
D1
E3
D1
E3
DO
EO
D1
D3
D1
E2
D1
E2
Dl
E2
DO
EO
D1
02
E2
Eli
D
1 l:""
.
~,)
D1
E3
D1
E3
01
EA
9F
01
EA
86
F2
86
F8
09
ID
095540
8B
0000
9E
Dl
DB
Dl
EB
087D42
83C702
FF
OE
6173
R
"'if::
1"'11
f,J
o.
FFOE6171
R
75
44
r"fft/'\I""
rHO::
ENHANCE
PROC
CLD
CALL
MOV
MOV
MOl)
1"\1
Hi
on:"
NOV
newrDW:
MOV
eVfOW:
LDDSB
MOV
MOV
SHL
RCL
SHL
RCL
MOV
nevbyt:
SHL
SHL
SHL
"'HI
::1m.
RCL
SHL
SHL
SHL
SHL
RCL
LOOP
SHL
XCHS
XCHG
OR
OR
ADD
DEC
JNZ
MOV
oddrow:
LODSB
MOV
MOV
SHL
RCL
SHL
RCL
MOV
nodbyt:
SHL
SHL
SHL
SHL
RCL
SHL
SHL
SHL
SHL
RCL
LOOP
SHL
SHL
SHL
SHR
LAHF
SHR
XCHG
XCH6
OR
OR
MOV
SAHF
RCR
SHR
OR
ADD
DEC
JNZ
DEC
JNZ
BX.l
BX;
1
BX.l
ALI
BX;l
OX;l
DX;l
DX;l
AL.l
DX;1
NEVBn
DX
1
DH:DL
BH;BL
[DD,
DX
64[OlJ
BX
D1,2
'
COLCTR
EVROW
COLCTR,32
BX,O
DX,BX
AL;l
BX,l
AL,1
DX;l
CX;3
BX,l
BX;l
BX,l
AL,1
BX.1
OX;1
DX;l
DX,l
AL;l
DX,1
NOnBYT
BX,l
BX.l
BX;1
DX,l
OX.l
DH;OL
BH,BL
[DlJ,BX
64[D!J,
DX
BX,O
EX,l
llY' 1
...·uq.4
66tDIJ.BH
D!,2.
COLCTR
ODDROW
RoweTR
NEWRWJ
ithe
even
bitsgointo
theBXregister
such
i
that
the
final
bit
pattern
is:
i
OOOxOOOxOOOxOOOx
where
the
x's
correspond
to
i 7 5 3 1 bit
positions.
;
;the
odd
bitsgointo
theDXregister
such
;
that
the
final
bit
pattern
is:
;
OOxOOOxOOOxOOOxO
; 6 4 2 0 bit
positions
;
;
;afterweflip
ser.onBX
andDXto
get
bytes
in
;
proper
order,weOR
the
pattern
with
,he
; bits
alreadyatthe
destlnationofthe
two
;
words.
; .
iafter
completing
the
even
rowwego
onto
;
the
next
row
whichisan
odd
row
iwe
get
the
byte
and
setuptheBXand
DX
; registersasbefore.
This
ti~e
however
;
we
are
~oing
to
use
a slightly different
; bit
pat,erntoget
things
into
their
proper
places
;theBXreQister
should
endupwith
the
;
following
bit pattern:
i
xOOOxOOOxOOOxOOO
j 7
531
itheDXregister
should
endupwith
the
;
following
bit pattern:
i
OOOOOxOOuxOOOxOO
OxOO
; 6 4 2 0
;since
not
all
the
pattern
fits
intoDXwe
do
;
sOle
fancy
footwork
;the
net
resultofallofthis is
that
we
;
have
some
bit
patterns
that
can
nowbeput
i
into
the
output
array.
iyou
can
see
that
afterwehave
done
this
for
;
every
rowinthe
array,
1/2
the
bitsinthe
;
512x128
array
(except
for
someofthe
edge
;
pixels)
willbefilledin•
iThisisthe
fill-in
algorithm
mentioned
j
in
the
manual.
There
are
probably
other

4-4
The
IBM
Personal
Computer
Assembler
03-22-84
M1CRONEYE
ASSEMBLER
ROUTINES
(MEYEDRVRl
ENHANCE
ROUTINE
for
512x128
picture
655C
C7
06
61B8
H
6666
FILL!N:
MDV
!r::lt""t
...
,...
0022
F:
MOV
0..:0":
Dr
felCO
BE
l)O20
filn:
MOl)
c~o'"'
6568
",.,
05
fi 1
p;
MOV
OD
656A
88
9D
0080
MOV
fe'r,-
...
,.,
.,.,
40
MOV
o~oc
CD
'lJJ
.'r:"'Tt
BE
D1
MOV
Ct.!.!
l
.'1:'~7
D1
El
"~I
0..;/
...
\
O
..
~
6575
D1
EA
SHF:
jC''''1~
OB-
,"",
OR
J..
l!
.:
L.H
,e.,.n
88
D1
MDV
O":i7
657B.
23
DO
AND
657D
...
.,
".,
AND
k'-'
I...:
657F
...
.,
eB
AND
..:..:
6581
OB
Cl
OR
6583
OS
""1
OR
I.":
I
cone
...
.,
06
61B8
F:
AND
O.JctJ
..:,)
6589
09
45
40
OR
658C
n.,
".,
02
ADD
0,)
1,1
658F
4E
DEC
6590
.,~
D6
JNZ
I..:
6592
B8
FFFF
MOV
6595
."
06
/
4nn
R
XOR
-'j
OjDO
6599
81
FF
IFC2
n
CMP
r,
659D
7C
r'
JL
wO
659F
C3
RET
65AO
E9
64CO
R
NEWRWJ:
JMP
Ie,.,.,
ENHANCE
ENDP
0":11')
;
65A3
CLEARW
PROC
65A3
HI:"
0022
,.,
MOV
r.
65A6
EB0490
JMP
65A9
SF
""Q"''''
R
CLEARS:
MOV
":w\''':
65AC
FC
cw:
CLD
65AD
nT',
OE
1)014
R
MOl}
0.0
!1:''''1
D1
E9
SHR
O":D.
65B3
8C
D8
MOV
6585
8E
CO
NOV
65B7
B8
0000
NOV
658A
F3/
AB
REP
65BC
r"
RET
w,)
658D
CLEARW
ENDP
SUBHL
PAT,6666H
;
approaches
towards
creatin9a512x128
DI.OFFSET
WORKMAP;array
form
the
256x128
Imaqe
fro~
the
SI~32
;
Mic:roneye.
.
l,y
rnl'
Hllt1.JJ.£,J
BX;
128[DIJ
eX;64[D1J
DX;eX
eX;l
OX'
1
""'''X
l.d"U
I
OX;
ex
DX,AX
AX;BX
CX,BX
AX;CX
AX.DX
AX;PAT
64tDIJ,AX
DI,2
SI
"1
AX.~FFFFH
PA'r,AX
DI.a096+0FFSET
WORKMAP
filn
NHlROW
NEAR
ithe
CLEARW
routine
zeroes
the
WORKMAP
buffer
DI,OFFSET
WORKMAP
.
CWo
ithe
CLEARG
routine
zeroes
the
BITMAP
buffer
DI,OFFSET
BITMAP
inote
that
onlyanarea
corresponding
CX,MAPBYTESiin
size
to,fhe
current
picture
type'
CX,l
j
iscleared
AX~DS
;setuptheESregistertopointtothe
ES.AX
i
data
segment
AX'Q
iselect
the
valuetobe
reflicated
thru
mef.Dry
STOSW
ithis
command
singlehandedyzeroes
the
desired
;
memory
area
GREY
ADD
ROUTINE
for
512x64
i~age

4-5
PASE
The
IBM
Personal
Computer
Assembler
03-22-84
MICRONEYE
ASSEMBLER
ROUTINES
{MEYEDRVRl
SREYADO
ROUTINE
for
512Yo64
image
jsetupcountofwordstobe
~rocessed
tiEAR
;setuploop
ctr,wede
2 bits
per
pass
;word
from
first
imageinAX
(OFFSET
BITMAPB-OFFSET
BITMAP)[SIJ
;corresponding
word
frow
second
image
in
DX
;realign
byte
sex
for
proper
shifting
JBXisgoingtobe
builtupto
contaIn
a
;
~tr
to
the
proper
patterntorepresent
j • setsof4-bit
black,
white,orprey
blobs
j
dependingonthe
valuesofcorresponding
;
pixelsinthe
two
iIDages
jthlSisdonebyshiftino a
pixel
outAXand
;
DX
and
puttino
the
su~
inDXcreating
the
; first 4-bit
bfob's
ptr
(O=black,
l=grev,
;
2=white);weshift
the
su~
over
two
bits,
;
take
the
next
pixel
out
ofAXand
DX,
sum
;
them
and
put
tnat
suminBXaswell
jthe
result is a
ptr
into
DPAT
that
will
return
a
double
blob
thatisthen
put
into
the
destination
buffer
65BD
65BD
FC
653EBE28C2
F:
b~C
1 .
F.F
(1(122
R
·65C4SBlE
617A
R
65C8DlEB
65CA89lE
6176
R
65eE390008
65D18304
65D3SB94
2SAO
65D7
86
C4
65D9
Sb
Db
65DBBE0000
65D£DlEO
65EO
80
03 00
65E3
01
E2
65E580D3
00
65E8D1E3
65EA01E3
b5ECD1EO
65EE80D3·00
65F
1
01
E2
65F380D3
rj(l
65F6SABF
blBA
R
65FA883D
65FC
47
65FDE2DC
65FF83C6
02
6602FFOE
6176
R
6606
75
C6
6608
C3
6609
PAGE
GREY
ADD
PHOC
CLD
MOV
MOl,)
MOV
SHR
MOV
nword:
MOV
MOV
MOV
XCHG
XCHS
nbitd:
NOV
SHL
ADC
SHL
ADC
SHL
SHL
SHL
ADC
SHL
ADC
MOV
NOV
INC
LOOP
ADD
DEC
JNZ
RET
GREY
ADD
ENDP
;set
forward
direction
SI,OFFSET
BITMAP
juse
BITMAP
as
source
and
WORKMAP
as
DI.OFFSET
WORKMAP
ithe
destination
BX;
TOTBYTES
QV
.
~
.,I..l
WORDCT,BX
r
v
"
...
'1'1,0
Ax~tS!}
OX;WORD
PTR
"I .
li~
H",
1
,",
DLDH
BX;O
AX.l
BL
o
0
oDX;
1
BL;O
BX,l
BX.l
AX~l
BL;O
DX.l
BL;O
BH.
DPAHBXJ
[Dll.
BH
n'
0
w!
NBITD
S1
?
WO~:DcT
t~WORD
SUBTTL
FILLIN
ROUTINE
FOR
640x128
picture