📄 asm parallel port.htm
字号:
<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>Parallel Port Programming: x86 Assembly</title>
<link rel="stylesheet" href="ASM%20PARALLEL%20PORT_files/pstyle.css" type="text/css">
</head><body>
<center>
<h2>Parallel Port Programming: x86 Assembly</h2>
</center>
<p>Assembly language programming can often be complicated, but
writing to the parallel port in x86 asm isn't too bad. There is
a simple instruction called out. Its format is<br><br>
out accumulator, port<br><br>
The details of this instruction are explained in the comments
below. The program below simply writes the value of 48
to the parallel port.
</p>
<table class="ebox1">
<tbody><tr><td class="ebox2">
<pre>title Parallel Port Writer
; This program writes a single value to the parallel port.
; The out instruction is used. Its format is out accumulator, port
; Accumulator must be AL for 8-bit, or AX for 16-bit. Port may
; be a constant in the range of 0 - FF hex, or a value in DX from
; 0 and FFFF hex.
dosseg
.model small
.stack 100h
.code
main proc
mov al,48 ; 8-bit output value stored in al
mov dx,378h ; parallel port is 378 hex
out dx,al ; write it
mov ax,4C00h ; return to DOS
int 21h
main endp
end main
</pre>
</td></tr></tbody></table><br>
<hr>
<div class="navg">
<a href="http://www.mattjustice.com/parport/index.html">TOC</a> |
<a href="http://www.mattjustice.com/parport/par_vc.html"><< Back</a> |
<a href="http://www.mattjustice.com/parport/par_nt.html">Next >></a>
</div>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -