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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? ser.txt

?? 匯編編程藝術(shù)
?? TXT
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(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.

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线免费观看视频一区| 91.xcao| 日一区二区三区| 国产日韩欧美一区二区三区乱码| 在线精品视频免费播放| 欧美亚洲国产一区在线观看网站| 蜜臀av一区二区在线观看| 中文字幕一区视频| 欧美大白屁股肥臀xxxxxx| 在线欧美日韩精品| 不卡欧美aaaaa| 经典三级视频一区| 青青草原综合久久大伊人精品 | 一区二区三区自拍| 久久久亚洲精品一区二区三区| 欧美日韩1234| 91成人国产精品| 北条麻妃国产九九精品视频| 狠狠色丁香婷婷综合| 日韩国产欧美在线播放| 亚洲精品欧美综合四区| 国产精品乱子久久久久| 日本一区二区三区在线不卡| 久久亚洲私人国产精品va媚药| 4438亚洲最大| 欧美一区二区啪啪| 欧美日韩国产不卡| 欧美男男青年gay1069videost| 99久久国产综合精品色伊| 国产精品18久久久久久久久久久久 | 国产日韩精品视频一区| www国产成人免费观看视频 深夜成人网| 欧美精品v日韩精品v韩国精品v| 欧美色综合天天久久综合精品| 91麻豆成人久久精品二区三区| 成a人片亚洲日本久久| 国产999精品久久久久久绿帽| 粉嫩一区二区三区在线看| 国产精品一区二区在线看| 国产美女在线精品| 国产麻豆午夜三级精品| 国产成人h网站| 成人av电影在线网| av网站一区二区三区| 99久久综合色| 一本色道久久加勒比精品| 色综合色综合色综合色综合色综合 | 国产精品主播直播| 国产成人免费av在线| 盗摄精品av一区二区三区| 99久久综合99久久综合网站| 91美女片黄在线观看| 欧美自拍偷拍一区| 91 com成人网| 欧美精品一区二区在线播放| 久久精品人人做人人爽97| 国产精品欧美久久久久一区二区| 亚洲人妖av一区二区| 美洲天堂一区二卡三卡四卡视频| 看片网站欧美日韩| 国产成人亚洲综合a∨婷婷| 播五月开心婷婷综合| 色天天综合色天天久久| 91精品欧美一区二区三区综合在 | 欧美精品一区二区在线播放| 国产欧美一区二区在线| 亚洲乱码一区二区三区在线观看| 亚洲一区二区av在线| 蜜臀av性久久久久蜜臀aⅴ四虎| 国产精品综合久久| 一本大道久久a久久精二百 | 337p粉嫩大胆色噜噜噜噜亚洲| 久久久久国产精品麻豆| 亚洲欧美成aⅴ人在线观看| 天堂成人国产精品一区| 国产一区在线精品| 色欧美88888久久久久久影院| 91麻豆精品国产91| 国产精品美女久久久久aⅴ国产馆| 亚洲精品美国一| 久久国产精品99久久人人澡| 91丨国产丨九色丨pron| 日韩亚洲欧美一区| 中文字幕一区二区三区乱码在线| 亚洲成va人在线观看| 国产一区二区三区四| 欧洲亚洲国产日韩| 久久久九九九九| 亚洲成人午夜影院| 成人小视频在线| 欧美刺激午夜性久久久久久久| 亚洲视频每日更新| 久久99精品国产麻豆婷婷| 色香蕉成人二区免费| 欧美变态tickling挠脚心| 亚洲精品老司机| 国产v综合v亚洲欧| 日韩一二在线观看| 亚洲已满18点击进入久久| 国产麻豆9l精品三级站| 欧美一区二区观看视频| 亚洲在线免费播放| 成人毛片老司机大片| 日韩精品中文字幕在线不卡尤物 | 欧美一区二区私人影院日本| 中文字幕亚洲精品在线观看| 国产精品乡下勾搭老头1| 欧美一区二区播放| 亚洲国产美国国产综合一区二区| 成人福利在线看| 久久综合久久99| 日本欧美一区二区三区| 欧美午夜在线一二页| 亚洲日本va午夜在线电影| 欧美美女一区二区三区| 国产精品久久久久三级| 国产一区欧美日韩| 欧美二区三区的天堂| 亚洲.国产.中文慕字在线| 91日韩在线专区| 国产精品全国免费观看高清| 国产在线精品不卡| 精品国产乱码久久久久久久久| 日本va欧美va精品发布| 欧美乱妇一区二区三区不卡视频| 亚洲一区二区三区国产| 色欧美日韩亚洲| 亚洲伦理在线免费看| 色哟哟在线观看一区二区三区| 国产精品久久久爽爽爽麻豆色哟哟| 高清在线不卡av| 国产精品三级视频| 成人免费av在线| 国产精品免费视频网站| 成人精品电影在线观看| 国产精品色一区二区三区| 成人av午夜影院| 亚洲少妇屁股交4| 在线观看日韩毛片| 一区二区三区鲁丝不卡| 欧美综合在线视频| 五月综合激情网| 日韩欧美国产综合在线一区二区三区| 免费观看久久久4p| 久久影院午夜片一区| 国产在线观看免费一区| 国产日产欧美精品一区二区三区| 国产精品白丝jk白祙喷水网站| 中文字幕精品一区| 91丨九色丨尤物| 亚洲成人av在线电影| 欧美一级高清片| 久久国产精品色| 中文无字幕一区二区三区| 99热99精品| 天堂久久一区二区三区| 精品久久久久久久久久久久包黑料 | 亚洲人被黑人高潮完整版| 在线观看欧美精品| 男男gaygay亚洲| 中文在线一区二区| 一本一道久久a久久精品 | www激情久久| 成人国产精品免费网站| 一区二区三区久久久| 日韩免费观看高清完整版| 国产成人免费视频网站高清观看视频| 国产精品视频一区二区三区不卡| 欧美羞羞免费网站| 毛片不卡一区二区| 中文字幕日本不卡| 欧美理论在线播放| 国产福利91精品| 一区二区三区国产精品| 精品国产乱码久久久久久夜甘婷婷 | 久久国产人妖系列| 视频一区视频二区中文| 久久久91精品国产一区二区三区| 色欧美乱欧美15图片| 国产在线视频精品一区| 亚洲另类在线制服丝袜| 日韩区在线观看| 色菇凉天天综合网| 精品一区二区三区在线观看国产| 成人免费小视频| 日韩欧美不卡一区| 色老汉av一区二区三区| 麻豆精品视频在线| 夜夜嗨av一区二区三区| 久久午夜电影网| 欧美男男青年gay1069videost| 国产白丝网站精品污在线入口| 亚洲国产乱码最新视频| 亚洲国产电影在线观看| 日韩精品专区在线| 欧美视频你懂的| av高清久久久| 国产精品中文字幕欧美| 免费一级片91| 亚洲 欧美综合在线网络|