home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
UTILS2
/
LPTMON10.ZIP
/
LPTMON.DOC
< prev
Wrap
Text File
|
1994-01-16
|
4KB
|
107 lines
LPTMON version 1.0
By Celso Minnitti Jr. Public domain software. Copy freely.
LPTMON10.ZIP has these files:
╔═───────────────────────────────────────────────────═╗
│ LPTMON.ASM 8086 Assembly language source code │
│ LPTMON.COM Executable program │
│ LPTMON.DOC This document │
│ L.BAT Batch to compile and link LPTMON.ASM │
╚═───────────────────────────────────────────────────═╝
Introduction
────────────
LPTMON is a Terminate and Stay Resident (TSR) program that will
display the values of the ports 378h (data port), 379h (status port),
3FAh (control port), and how many times an IRQ7 has been occured so the
user can monitor a printer at LPT1. I am including the full source code
of LPTMON so you can change it as you like.
Port 378h printer data output
─────────────────────────────
│7│6│5│4│3│2│1│0│
│ │ │ │ │ │ │ └──── data bit 0, hardware pin 2
│ │ │ │ │ │ └───── data bit 1, hardware pin 3
│ │ │ │ │ └────── data bit 2, hardware pin 4
│ │ │ │ └─────── data bit 3, hardware pin 5
│ │ │ └──────── data bit 4, hardware pin 6
│ │ └───────── data bit 5, hardware pin 7
│ └────────── data bit 6, hardware pin 8
└─────────── data bit 7, hardware pin 9
Port 379h printer status register
─────────────────────────────────
│7│6│5│4│3│2│1│0│
│ │ │ │ │ │ │ └──── 1 = time-out
│ │ │ │ │ └─┴───── unused
│ │ │ │ └──────── 1 = fault, pin 15
│ │ │ └───────── 1 = on-line, pin 13
│ │ └────────── 1 = paper end (out of paper), pin 12
│ └─────────── 0 = Acknowledge, pin 10
└──────────── 0 = busy, pin 11
Port 37Ah printer control register
──────────────────────────────────
│7│6│5│4│3│2│1│0│
│ │ │ │ │ │ │ └──── 1 = output data to printer, pin 1
│ │ │ │ │ │ └───── 1 = auto line feed, pin 14
│ │ │ │ │ └────── 0 = initialize printer, pin 16
│ │ │ │ └─────── 1 = select input, pin 17
│ │ │ └──────── 0 = IRQ disable,1=IRQ enable for ACK
└─┴─┴───────── unused
Signal Name 25-Pin Connector Description
─────────── ──────────────── ────────────────────────────────────────
Strobe 1 Output signal indicating the eight
data lines can be read
Data bit 0-7 2-9 Five volts = logical one
Zero volts = logical zero
Acknowledge 10 Input signal indicating data received
Busy 11 Input signal indicating do NOT transmit
Paper end 12 Input signal indicating printer is
out of paper
On-line 13 Input signal indicating printer is
on-line, ready to receive
Auto line feed 14 Output signal selecting the line-feed
option. If the signal is low, the
printer is commanded to automatically
feed one line when it detects a carriage
return; If the signal is high, an
explicit line-feed character is required
Fault 15 Input Status indicating an error
Initialize printer 16 Output signal resetting the printer to
its default operating parameters
Select input 17 Output signal to switch the printer on
and off line
Ground 18-25 Ground
How to contact the Author
─────────────────────────
If you have any comments or suggestions about LPTMON you can reach
me at 617-235-4018 or write to:
Celso Minnitti Jr
139 Linden St
Wellesley, MA 02181