亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ser.txt

?? 匯編編程藝術(shù)
?? TXT
?? 第 1 頁 / 共 2 頁
字號(hào):
Interrupt-Driven Serial Port I/O Package
========================================

One major problem the the PC's BIOS is the lack of good interrupt driven
I/O support for the serial port.  The BIOS provides a mediocre set of polled
I/O facilities, but completely drops the ball on interrupt driven I/O.

This set of routines in the standard library provides polled I/O support
to read and set the registers on the 8250 (or other comparable chip, e.g.,
16450) as well as read and write data (polled).  In addition, there are
a pair of routines to initialize and disable the interrupt system as well
as perform I/O using interrupts.

Typical polled I/O session:

1. Initialize chip using polled I/O routines.
2. Read and write data using ComRead and ComWrite routines.

Typical interrupt driven I/O session:

1. Initialize chip using polled I/O routines.
2. Read and write data using ComIn and ComOut routines.

Of course, all the details of serial communications cannot be discussed
here- it's far too broad a subject.  These routines, like most in the
library, assume you know what you're doing.  They just make it a little
easier on you.  If you don't understand anything about serial communications,
you *might* be able to use these routines, but they were not written with
that audience in mind.  There are several good references on serial communi-
cations; "C Programmer's Guide to Serial Communications" comes to mind.  If
you've never looked at the 8250 or comparable chips before, you might want
to take a look at a reference such as this one if the routines in this
section don't make much sense.

Note: This routines are set up to use the COM1: hardware port.  See the
source listings if you want to access a different serial port.  Perhaps in
a future release we will modify this code to work with any serial port.


Routine:  ComBaud
-----------------

Author:		      	Randall Hyde

Category:		Serial Communications

Registers on entry:   	AX-	BPS (baud rate): 110, 150, 300, 600, 1200,
						 2400, 4800, 9600, 19200

Registers on return:  	None

Flags affected:       	None

Example of Usage:
			mov	ax, 9600	;Set system to 9600 bps
			ComBaud
Description:

ComBaud programs the serial chip to change its "baud rate" (technically,
it's "bits per second" not baud rate).  You load AX with the appropriate
bps value and call ComBaud, as above.  Note: if AX is not one of the legal
values, ComBaud defaults to 19.2kbps.

Include:	ser.a or stdlib.a

Routine:  ComStop
-----------------

Author:		      	Randall Hyde

Category:             	Serial Communications

Registers on entry:   	AX-	# of stop bits (1 or 2)

Registers on return:  	None

Flags affected:       	None

Example of Usage:
			mov	ax, 2		;Set system to send 2 stop bits
			ComStop
Description:

ComStop programs the serial chip to transmit the specifed number of stop
bits when sending data.  You load AX with the appropriate value and call
ComStop, as above.  Note that this only affects the output data stream. The
serial chip on the PC will always work with one incoming stop bit, regardless
of the setting.  Since additional stop bits slow down your data transmission
(by about 10%) and most devices work fine with one stop bit, you should
normally program the chip with one stop bit unless you encounter some
difficulties.  The setting of this value depends mostly on the system you
are connecting to.

Include:	ser.a or stdlib.a

Routine:  ComSize
-----------------

Author:		      	Randall Hyde

Category:             	Serial Communications

Registers on entry:   	AX-	# of data bits to transmit (5, 6, 7, or 8)

Registers on return:  	None

Flags affected:       	None

Example of Usage:
			mov	ax, 8	;Set system to send 8 data bits
			ComSize
Description:

ComSize programs the serial chip to transmit the specifed number of data
bits when sending data.  You load AX with the appropriate value and call
ComSize, as above.  The setting of this value depends mostly on the system
you are connecting to.

Include:	ser.a or stdlib.a

Routine:  ComParity
-------------------

Author:		      	Randall Hyde

Category:             	Serial Communications

Registers on entry:   	AX-    Bits 0, 1, and 2 are defined as follows:
			       bit 0- 1 to enable parity, 0 to disable.
			       bit 1- 0 for odd parity, 1 for even.
			       bit 2- Stuck parity bit.  If 1 and bit 0 is 1, then the parity bit
				      is always set to the inverse of bit 1.

Registers on return:  	None

Flags affected:       	None

Example of Usage:
			mov	ax, 0	;Set NO parity
			ComParity
			 .
			 .
			 .
			mov	ax, 11b	;Set even parity
			ComParity
Description:

ComParity programs the serial chip to use various forms of parity error
checking.  If bit zero of AX is zero, then this routine disables parity
checking and transmission.  In this case, ComParity ignores the other
two bits (actually, the 8250 ignores them, ComParity just passes them
through).  If bit zero is a one, and bit two is a zero, then bit #1
defines even/odd parity during transmission and receiving.  If bit #0
is a one and bit two is a one, then the 8250 will always transmit bit #1
as the parity bit (forced on or off).

Include:	ser.a or stdlib.a

Routine:  ComRead
-----------------

Author:		      	Randall Hyde

Category:             	Serial Communications

Registers on entry:   	None

Registers on return:  	AL-	Character read from port

Flags affected:       	None

Example of Usage:
			ComRead
			mov	Buffer, al

Description:

ComRead polls the port to see if a character is available in the on-chip
data register.  If not, it waits until a character is available.  Once
a character is available, ComRead reads it and returns this character in
the AL register.

Warning: do *not* use this routine while operating in the interrupt mode.
This routine is for polled I/O only.

Include:	ser.a or stdlib.a

Routine:  ComWrite
------------------

Author:		      	Randall Hyde

Category:             	Serial Communications

Registers on entry:   	AL-	Character to write to port

Registers on return:  	None

Flags affected:       	None

Example of Usage:
			mov	al, 'a'
			ComWrite

Description:

ComWrite polls the port to see if the transmitter is busy.  If so, it waits
until the current transmission is through.  Once the 8250 is done with the
current character, ComWrite will put the character in AL into the 8250
transmit register.

Warning: do *not* use this routine while operating in the interrupt mode.
This routine is for polled I/O only.

Include:	ser.a or stdlib.a

Routine:  ComTstIn
------------------

Author:		      	Randall Hyde

Category:             	Serial Communications

Registers on entry:   	None

Registers on return:  	AL=0 if no char available, 1 if char available

Flags affected:       	None

Example of Usage:

		Wait4Data:	ComTstIn
				cmp	al, 0
				je	Wait4Data

Description:

ComTstIn polls the port to see if any input data is available.  If so,
it returns a one in AL, else it returns a zero.

Warning: do *not* use this routine while operating in the interrupt mode.
This routine is for polled I/O only.

Include:	ser.a or stdlib.a

Routine:  ComTstOut
-------------------

Author:		      	Randall Hyde

Category:             	Serial Communications

Registers on entry:   	None

Registers on return:  	AL = 1 if xmitr available, 0 if not

Flags affected:       	None

Example of Usage:

		WriteData:	<Do Something>
				ComTstOut
				cmp	al, 0
				je	WriteData
				mov	al, 'a'
				ComWrite

Description:

ComTstIn polls the port to see if the transmitter is currently busy.  If so,
it returns a zero in AL, else it returns a one.

Warning: do *not* use this routine while operating in the interrupt mode.
This routine is for polled I/O only.

Include:	ser.a or stdlib.a

Routine:  ComGetLSR
-------------------

Author:		      	Randall Hyde

Category:             	Serial Communications

Registers on entry:   	None

Registers on return:  	AL = LSR value

Flags affected:       	None

Example of Usage:

			ComGetLSR
			<do something with value in LSR>
Description:

Reads the LSR (line status register) and returns this value in AL.  The
LSR using the following layout.

 Line Status Register (LSR):

 bit 0-	Data Ready
 bit 1-	Overrun error
 bit 2-	Parity error
 bit 3-	Framing error
 bit 4-	Break Interrupt
 bit 5-	Transmitter holding register is empty.
 bit 6-	Transmit shift register is empty.
 bit 7-	Always zero.

Warning: In general, it is not a good idea to call this routine while
the interrupt system is active.  It won't hurt anything, but the value
you get back may not reflect properly upon the last/next character you
read.

Include:	ser.a or stdlib.a

Routine:  ComGetMSR
-------------------

Author:		      	Randall Hyde

Category:             	Serial Communications

Registers on entry:   	None

Registers on return:  	AL = MSR value

Flags affected:       	None

Example of Usage:

			ComGetMSR
			<do something with value in MSR>
Description:

The MSR (modem status register) bits are defined as follows:

 Modem Status Register (MSR):

 bit 0-	Delta CTS
 bit 1-	Delta DSR
 bit 2-	Trailing edge ring indicator
 bit 3-	Delta carrier detect
 bit 4-	Clear to send
 bit 5-	Data Set Ready
 bit 6-	Ring indicator
 bit 7-	Data carrier detect


Warning: In general, it is not a good idea to call this routine while
the interrupt system is active.  It won't hurt anything, but the value
you get back may not reflect properly upon the last/next character you
read.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一区一区| 91九色最新地址| 日韩一区二区免费在线观看| 亚洲午夜久久久久久久久久久| 成人动漫视频在线| 亚洲日本护士毛茸茸| 色激情天天射综合网| 一区二区三区四区不卡视频| 欧美三级日韩三级| 日本美女一区二区三区| 精品国免费一区二区三区| 国产一区二区伦理| 国产精品美女一区二区| 91亚洲精品乱码久久久久久蜜桃| 一区二区三区在线播放| 91麻豆精品国产无毒不卡在线观看 | 欧美精品一区二区三区四区 | 樱花影视一区二区| 欧美日韩mp4| 激情成人综合网| 亚洲欧洲精品一区二区三区| 91电影在线观看| 美腿丝袜一区二区三区| 国产欧美综合在线观看第十页| 99综合影院在线| 日本三级亚洲精品| 欧美国产精品一区| 欧美日本一区二区三区四区| 麻豆成人久久精品二区三区红| 中文字幕 久热精品 视频在线| 欧美视频一区二区三区四区| 韩国精品久久久| 亚洲激情成人在线| 亚洲精品一区二区三区精华液| www.欧美.com| 免费精品99久久国产综合精品| 日韩一区在线免费观看| 日韩一区二区视频在线观看| 成人一区在线看| 蜜臀久久99精品久久久画质超高清 | 欧美日韩黄色影视| 成人激情av网| 九色综合狠狠综合久久| 亚洲综合偷拍欧美一区色| 久久综合五月天婷婷伊人| 在线欧美日韩国产| 成人黄页毛片网站| 六月丁香婷婷久久| 亚洲风情在线资源站| 久久久久久久久久久久电影| 欧美性色黄大片手机版| 成人激情校园春色| 国产中文字幕精品| 日本91福利区| 亚洲大片免费看| 亚洲伦理在线精品| 国产精品毛片a∨一区二区三区| 欧美一区二区三区视频免费播放| 91麻豆.com| www.欧美日韩| 成人黄动漫网站免费app| 激情五月播播久久久精品| 亚洲成人av一区二区三区| 亚洲日本在线a| 国产精品国产三级国产aⅴ中文| 精品电影一区二区| 欧美sm极限捆绑bd| 91精品婷婷国产综合久久竹菊| 91黄视频在线观看| 91在线观看下载| aaa国产一区| 99久久国产综合色|国产精品| 国产999精品久久久久久绿帽| 韩国精品在线观看| 国产在线播放一区二区三区| 久久国产婷婷国产香蕉| 久久国产精品免费| 精品一区二区国语对白| 老司机午夜精品| 国内不卡的二区三区中文字幕| 久久成人精品无人区| 蜜桃一区二区三区在线| 久久精品国产精品亚洲精品| 日本aⅴ亚洲精品中文乱码| 日本女人一区二区三区| 美腿丝袜亚洲三区| 国产一区二区女| 成人国产精品免费观看视频| 91视视频在线观看入口直接观看www | 蜜臀av国产精品久久久久| 久久精品国产成人一区二区三区| 久久9热精品视频| 国产福利不卡视频| 成人黄色电影在线| 日本乱人伦一区| 欧美日韩在线播放三区| 欧美一区午夜精品| 精品国产成人系列| 国产精品久久久久久久久免费樱桃| 国产精品久久久久久亚洲伦 | 国产欧美中文在线| 亚洲精品中文字幕乱码三区| 亚洲综合激情另类小说区| 亚洲444eee在线观看| 六月丁香婷婷久久| 成人av网站免费观看| 色94色欧美sute亚洲13| 欧美一区二区性放荡片| 国产日韩欧美综合一区| 亚洲男女一区二区三区| 日韩av二区在线播放| 国产成人免费9x9x人网站视频| 91视频在线观看| 日韩欧美你懂的| 中文字幕日韩一区| 欧美aⅴ一区二区三区视频| 国产伦精品一区二区三区免费迷 | 不卡的av电影在线观看| 欧美日韩一区二区在线视频| 精品成人一区二区三区| 亚洲视频一区在线| 蜜臀久久99精品久久久久久9| 丰满少妇在线播放bd日韩电影| 欧美伊人久久大香线蕉综合69| 精品少妇一区二区三区视频免付费 | 免费不卡在线观看| av电影在线观看不卡| 欧美一区二区三区播放老司机| 国产欧美精品国产国产专区| 亚洲18女电影在线观看| 国产成人自拍高清视频在线免费播放| 日本黄色一区二区| 国产香蕉久久精品综合网| 偷拍自拍另类欧美| 91热门视频在线观看| 欧美精品一区二区不卡 | 欧美激情在线看| 日本午夜一区二区| 一本一道波多野结衣一区二区| 精品电影一区二区| 日韩电影网1区2区| 91九色最新地址| 最新热久久免费视频| 国产一区二区福利| 精品国产sm最大网站免费看| 亚洲国产精品自拍| 一本到不卡免费一区二区| 国产午夜精品久久久久久免费视| 日韩av二区在线播放| 欧美色区777第一页| 亚洲欧美偷拍三级| 国产不卡一区视频| 2020国产精品自拍| 蜜桃视频在线一区| 555www色欧美视频| 婷婷六月综合亚洲| 精品视频免费看| 亚洲chinese男男1069| 色欧美乱欧美15图片| 国产精品久久久久久久久晋中 | 国内久久精品视频| 欧美大度的电影原声| 丝袜亚洲另类丝袜在线| 欧美色图天堂网| 亚洲综合色丁香婷婷六月图片| av激情亚洲男人天堂| 国产精品大尺度| av中文字幕一区| 亚洲三级在线观看| 91高清视频免费看| 亚洲午夜av在线| 欧美日韩精品综合在线| 亚洲一区二区免费视频| 欧美视频一区在线观看| 亚州成人在线电影| 日韩欧美国产三级电影视频| 美女脱光内衣内裤视频久久网站| 日韩一区二区三区电影| 国产一区二区福利视频| 中文字幕精品在线不卡| 不卡在线观看av| 亚洲自拍偷拍av| 在线播放中文字幕一区| 蜜臀av性久久久久蜜臀aⅴ| 久久先锋影音av| 99久久精品国产导航| 亚洲一区二区影院| 日韩欧美视频在线| 成人午夜av电影| 亚洲最大色网站| 91精品国产综合久久久久久久| 精品综合久久久久久8888| 欧美激情一区二区三区蜜桃视频| 色婷婷亚洲一区二区三区| 亚洲福利视频导航| 精品av久久707| av在线不卡电影| 午夜精彩视频在线观看不卡| 欧美不卡123| 99精品视频一区|