100% found this document useful (1 vote)
4K views

Parallel Port Interfacing Using Assembly Language

This document discusses parallel ports and interfacing with them using assembly language. It defines parallel ports and their addresses, describes their pinouts, and discusses how to install a user port driver to allow user-mode programs access to I/O ports. It provides an example assembly language program that outputs a bit to parallel port address 378h.

Uploaded by

amon_abilar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPS, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
4K views

Parallel Port Interfacing Using Assembly Language

This document discusses parallel ports and interfacing with them using assembly language. It defines parallel ports and their addresses, describes their pinouts, and discusses how to install a user port driver to allow user-mode programs access to I/O ports. It provides an example assembly language program that outputs a bit to parallel port address 378h.

Uploaded by

amon_abilar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPS, PDF, TXT or read online on Scribd
You are on page 1/ 21

Parallel Port Interfacing

using Assembly
Language
Computer port (hardware)

• A 'port' serves as an interface


between the computer and other
computers or peripheral devices.
• A port is a specialized outlet on a
piece of equipment to which a plug
or cable connects.
Example ports

USB
Example ports

FireWire
Example ports

Ethernet
port
Example ports

Serial
Port
Example ports

Parallel
Port
Example ports

PS/2
Connector
Example ports

VGA
Connector
Electrical signal transfer
Electronically, hardware ports can almost
always be divided into two groups based on
the signal transfer:
•Serial ports send and receive one bit at a
time via a single wire pair (Ground and +/-).
•Parallel ports send multiple bits at the
same time over several sets of wires.
Electrical signal transfer
Parallel Port

• a type of interface found on


computers for connecting various
peripherals.
• is a parallel communication physical
interface.
• is also known as a printer port
Parallel Port Addresses
When the computer is first turned on, BIOS (Basic
Input/Output System) will determine the number of
ports you have and assign device labels LPT1, LPT2 &
LPT3 to them. Usually the address for LPT1 is 378h.

PORT Name PORT Address


LPT1 0x3BC (956)
LPT2 0x378 (888)
LPT3 0x278 (632)
Parallel Port Addresses
To know your Parallel Port address, do
the following:
Go to Start > Control Panel > System >
‘Hardware’ Tab > Click on Device Manager
> Look for ‘Ports’ in the device list > Double
click on LPT1 > Click on the ‘Resources’
Tab. In that you can see the starting
address of I/O Range.
Parallel Port Pins
Circuit Diagram
CPU Modes
Kernel Mode
In Kernel mode, the executing code has
complete and unrestricted access to the
underlying hardware.
User Mode
In User mode, the executing code has no
ability to directly access hardware or
reference memory.
User Port Driver
• is a kernel mode driver for Windows
NT/2000/XP/Vista/Win7 that gives
usermode programs access to I/O ports.
• from Tomas Franzon.

Download Site:
http://hem.passagen.se/tomasf/UserPort/
UserPort.zip
UserPort Installation

• Copy UserPort.SYS to %WINDIR


%\SYSTEM32\DRIVERS
• Start UserPort.EXE
• add the addresses you want and remove
the others
• click on start
Programming
.model tiny
.code
main:
mov al, 00000001b
mov dx, 378h
out dx, al
mov ax, 4c00h
int 21h
end main

You might also like