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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? putcmos.asm

?? cmos編程....設計到一些底層的技術
?? ASM
字號:

;==============================================================


stack	segment stack		; keep MS link happy by providing null stack
stack	ends

CODE	SEGMENT PARA		; start off in code.

;==============================================================

data	segment byte		; provide a separate DATA segment
				; actually all come after the code
;==============================================================
;  V A R I A B L E S

BannerMsg	DB 13d,10d
		db '$'

UsageMsg	DB 'Insert the diskette you used for CMOSSave.',13,10
		DB 'then try:',13,10
		DB 'CMOSRest A:\CMOS.Sav',13,10
		DB 'or if the file is on hard disk try:',13,10
		DB 'CMOSRest C:\CMOS.Sav',13,10
		DB 'Read CMOS.TXT to find how to use it properly.',13,10
		db '$'

FileTroubleMsg	DB 'Error',7,13,10
		DB 'Cannot find/read the disk file.',13,10
		db '$'

WorkedMsg	DB 'CMOS successfully restored',13,10
		db '$'


FilenamePtr	DW	0
			; pointer to filename in command line

CMOSSize	DB	0
			; size of cmos in bytes

CMOSBuff	db 0	; dynamic buffer will grow to 128
			; it hangs out past the end of the program

data		ends

com	group	code,data	; force data segment to go at the end

	ASSUME	CS:com,DS:com,ES:com,SS:com
				; seg regs cover everything
	ORG	100H		; in Code segment

;==========================

Main	proc	far

;	M A I N L I N E   R O U T I N E
Start:
	lea	dx,BannerMsg	; display the banner
	Call	Say
	Call	Parse		; get filename from command line

	call	ReadCMOS	; read CMOS contents from file
	call	CalcCMOSSize	; it is 64 or 128 bytes long?
	call	PutCMOS 	; store buffer to CMOS

	lea	dx,WorkedMsg	; crow about success
	Call	Say
Done:
	mov	ax,4c00h
	int	21h		;normal termination

Main	EndP

;===============================================================

Trouble proc	near

FileTrouble:
	Lea	dx,FileTroubleMsg	; display file trouble
	Call	Say
	Jmp	Abort

abort:
				; error exit
	mov	ax, 4c04h	; ERRORLEVEL = 4
	int	21h		; DIE

Trouble endp

;===============================================================

MLeading	PROC	Near

;	Remove leading blanks
;	on entry BX is addr of string, CX its length
;	trims off any leading blanks, leaving result in BX CX
;	length may also be 0 or 1, but not -ve
;	If the entire string is blank the result is the null string
	mov	di,bx
	mov	al,20H		; AL = blank  -- the search char
	jcxz	mleading2	; jump if null string
	repe	scasb		; scan ES:DI forwards till hit non blank
				; DI points just after it (wrap ok)
				; cx IS ONE TOO SMALL, OR 0 IF NONE FOUND
	je	mleading1	; jump if entire string was blank
	inc	cx		; CX is length of remainder of string
mleading1:
	dec	di		; DI points to non-blank
mleading2:
	mov	bx,di		; put address back
	ret

MLeading	ENDP

;========================================

MTrailing	PROC	Near

;	Remove trailing blanks.
;	on entry BX is addr of string, CX its length
;	trims off any trailing blanks, leaving result in BX CX
;	length may also be 0 or 1, but not -ve
;	If the entire string is blank the result is the null string
	mov	di,bx
	add	di,cx		; calc addr last char in string
	dec	di
	mov	al,20H		; AL = blank  -- the search char
	jcxz	mtrailing1	; jump if null string
	std
	repe	scasb		; scan ES:DI backwards till hit non blank
				; DI points just ahead of it (wrap ok)
				; CX is one too small, or 0 if none found
	cld
	je	mtrailing1	; jump if whole string was blank
	inc	cx
mtrailing1:
	ret

MTrailing	ENDP

;========================================

Parse		PROC	NEAR
;	Parse the command line to remove lead/trail blanks from
;	the single drive parameter and terminate it by 2 nulls.
;	sample inputs
;	CMOSRest A:\CMOS.SAV
;	CMOSRest	B:\MySub\MyCMOS.SAV
;
;	When Done DS:BX points to start of string.
;	String will be terminated by 2 nulls
;	CX counts bytes in string exclusive of nulls
				; counted string at HEX 80 PSP
				; contains command line.
				; Preceeded by unwanted spaces.
				; possibly followed by unwanted spaces.
				; currently missing a trailing null.
	xor	ch,ch
	mov	cl,ds:80H
	mov	bx,81H
	call	Mleading	; get rid of leading blanks
	call	MTrailing	; get rid of trailing blanks
	mov	di,bx		; calc addr of byte just past end
	add	di,cx
	mov	word ptr [di],0 ; plop in pair of nulls after string
	mov	FileNamePtr,bx	; remember where filename was
	jcxz	SyntaxTrouble	; missing parm.
	ret

SyntaxTrouble:
	lea	dx,UsageMsg		; display usage message
	Call	Say
	Jmp	Abort

Parse		ENDP

;======================================

Say	Proc

;	on entry DX points to a string to display
	push	ax
	MOV	AH,9
	Int	21h
	pop	ax
	ret

Say	EndP

;======================================

GetCMOS Proc	Near

;	Get 128 byte contents of CMOS into a buffer.

	mov	cx,128		; count of times through loop
	lea	bx,CMOSBuff	; where to put the contents
	sub	al,al		; start offset in CMOS
GetLoop:
	Call	PeekCmos	; al=offset ah=contents
	mov	byte ptr[bx],ah
	inc	al
	inc	bx
	loop	GetLoop
	ret

GetCMOS EndP

;===============================================================


PutCMOS Proc	Near

;	Put 128-byte contents of buffer into CMOS.
;	do not touch the volatile bytes

	mov	cx,128		; count of times through loop
	lea	bx,CMOSBuff	; where to put the contents
	sub	al,al		; start offset in CMOS
PutLoop:
	call	Volatile	; test if this is a volatile byte
				; test offset in al
	jc	LeaveItAlone
	mov	ah,byte ptr[bx]
	Call	PokeCMOS	; al=offset ah=contents

LeaveItAlone:
	inc	bx
	inc	al
	loop	PutLoop
	ret

PutCMOS EndP



;===============================================================




;	Add to this list if you need more volatile bytes.
;	Remember the trailing h.

VolatileList	db	0ch,032h

VolatileCount	equ	$-VolatileList


Volatile	Proc	near

;	Is cmos offset in AL volatile?	If so set carry.
;	These bytes will be undisturbed.
;	Preserves all registers.
;	00..09, 0C and 32 are volatile, rest are not.
;	0A 0B 0D 0E 0F used to be considered volatile, now are not.
;	if cmos is small, all bytes past end are considered volatile

	cmp	al,CMOSSize		; bytes past end are volatile
	jae	IsVolatile
	cmp	al,09h
	jbe	IsVolatile		; early bytes are for timing
	push	cx
	push	di
	mov	cx,VolatileCount
	lea	di,VolatileList
	repne	scasb			; search till find a match
	pop	di
	pop	cx
	je	IsVolatile

IsNotVolatile:
	clc				; clear carry
	ret

IsVolatile:
	stc
	ret

Volatile	EndP


;===============================================================


CalcCMOSSize	Proc	near

;	Is CMOS 64 or 128 bytes long?
;	It is 64 if bytes at 10..2F match those at 50..6F.
;	Otherwise it is 128 bytes.
;	Preserves all registers.

	push	si
	push	di
	push	cx
	lea	si,CMOSBuff+10h
	lea	di,CMOSBuff+50h
	mov	cx,02fh+1-10h
	repe	cmpsb
	je	IsCMOS64

IsCMOS128:
	mov	CMOSSize,128	; differ, must be a big CMOS
	jmp	CalcCMOSSizeDone

IsCMOS64:
	mov	CMOSSize,128	; all same, small CMOS

CalcCMOSSizeDone:
	pop	cx
	pop	di
	pop	si

	ret

CalcCMOSSize	EndP


;===============================================================


PeekCMOS	proc	near

;	Reads one byte from cmos.
;	on entry al has offset desired
;	on exit ah has the contents of that byte.
;	preserves all registers

;	See page 5-81 IBM AT Tech ref BIOS listing for how to read CMOS
;	We always enable the NMI with bit 7 on.

	push	bx
	push	ax
	cli				; disable interrupts
	or	al,80h			; disable NMI
	out	70h,al			; output the byte address to CMOS
	jmp	$+2			; delay, safer than nop
	in	al,71h			; read the CMOS byte
	jmp	$+2			; delay, safer than nop
	mov	bl,al
					; re-enable the NMI
	mov	al,0dh			; point to battery status register
	out	70h,al			; leave pointing at a safe r/o register
	sti				; restore interrupts
	pop	ax
	mov	ah,bl
	pop	bx
	ret

PeekCMOS	EndP


;===============================================================


PokeCMOS	proc	near

;	Stuffs one byte into cmos.
;	on entry al has offset desired, ah has the value to stuff.
;	Preserves all registers.

;	See page 5-81 IBM AT Tech ref BIOS listing for how to write CMOS
;	We always enable the NMI with bit 7 on.

	push	ax
	cli				; disable interrupts
	or	al,80h			; disable NMI
	out	70h,al			; output the byte address to CMOS
	jmp	$+2			; delay, safer than nop

	mov	al,ah			; get contents
	out	71h,al			; poke the CMOS byte
	jmp	$+2			; delay, safer than nop
					; re-enable the NMI
	mov	al,0dh			; point to battery status register
	out	70h,al			; leave pointing at a safe r/o register
	sti				; restore interrupts
	pop	ax
	ret

PokeCMOS	EndP

;===============================================================


ReadCMOS	Proc	Near

;	Open a file read the CMOS into a buffer

	mov	dx,FileNamePtr	; DS:DX point to file
	xor	al,al		; AL=0 is attribute read/only
	mov	ah,03Dh 	; DOS open function
	int	21h
	jc	FileTrouble
	mov	bx,ax		; save handle
	mov	cx,128		; read 128 bytes
	lea	dx,CMOSBuff	; buffer address
	mov	ah,3fH		; DOS read
	int	21h
	jc	FileTrouble
	cmp	ax,128
	jne	FileTrouble
	mov	ah,3eh		; DOS close
	int	21h
	jc	FileTrouble
	ret

ReadCMOS	EndP



;===============================================================

CODE	ends			; end of code segment
	end	Start

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产91精品入口| 五月天婷婷综合| 555www色欧美视频| 免费在线观看日韩欧美| 91精品国产高清一区二区三区| 一区二区三区在线观看视频| 成人av免费在线| 亚洲美女免费在线| 欧美三级资源在线| 国产一区二区三区电影在线观看| 7777女厕盗摄久久久| 国产乱码精品一区二区三区忘忧草| 精品国产91亚洲一区二区三区婷婷 | 国产成人精品网址| 亚洲欧美激情在线| 日韩视频免费观看高清完整版在线观看| 琪琪久久久久日韩精品| 久久精品亚洲麻豆av一区二区| 不卡一区二区三区四区| 亚洲成人一区二区| 国产三级一区二区| 在线免费观看视频一区| 久草在线在线精品观看| 亚洲免费观看在线视频| 欧美一二三四在线| 日韩美女一区二区三区四区| 色吧成人激情小说| 国产 日韩 欧美大片| 秋霞午夜鲁丝一区二区老狼| 久久精品男人的天堂| 欧美精品丝袜中出| 一本色道久久综合亚洲aⅴ蜜桃 | 国产在线播放一区三区四| 亚洲愉拍自拍另类高清精品| 久久久久国产成人精品亚洲午夜| 在线国产电影不卡| 91一区二区三区在线观看| 久久激情综合网| 免费一区二区视频| 丝袜美腿亚洲色图| 日本伊人色综合网| 免费观看成人av| 毛片av一区二区| 日韩精品欧美精品| 视频一区二区三区中文字幕| 亚洲综合自拍偷拍| 亚洲成人av电影| 欧美日韩在线播放| 国产伦精品一区二区三区免费迷 | 日本麻豆一区二区三区视频| 久久99国产精品免费网站| 亚洲成人免费视频| 亚洲精品欧美在线| 亚洲品质自拍视频网站| 国产精品久久久久久户外露出| 欧美一级理论片| 欧美一卡二卡在线| 91精品国产aⅴ一区二区| 欧美日高清视频| 91精品国产综合久久精品性色| 久久久久久久久久久电影| 精品国产91乱码一区二区三区| 中文字幕欧美区| 亚洲高清在线视频| 成人精品小蝌蚪| 欧美日韩的一区二区| 亚洲国产精品高清| 亚洲高清免费视频| 国产成人精品亚洲日本在线桃色| 成人激情动漫在线观看| 在线观看日韩国产| 中国av一区二区三区| 亚洲一区二区影院| 国产高清亚洲一区| 欧美高清视频在线高清观看mv色露露十八 | 91蝌蚪porny| 国产精品久久久久一区二区三区| 国产美女娇喘av呻吟久久| 欧美老肥妇做.爰bbww视频| 国产精品丝袜久久久久久app| 久久精品999| 欧美大片拔萝卜| 亚洲va在线va天堂| 91久久奴性调教| 国产欧美一区二区三区在线老狼| 午夜精品成人在线视频| 在线观看av一区二区| 国产精品久久久久婷婷二区次| 韩国视频一区二区| 精品国产免费一区二区三区四区| 一区二区三区精品| 欧美日韩在线免费视频| 青青草97国产精品免费观看无弹窗版 | gogogo免费视频观看亚洲一| 国产成人精品亚洲午夜麻豆| 99久久99久久精品免费看蜜桃 | 91麻豆精品91久久久久同性| 国产目拍亚洲精品99久久精品| 亚洲综合在线视频| 日韩不卡手机在线v区| 成人丝袜视频网| 日韩精品一区二区三区视频| 亚洲特黄一级片| 久久电影网电视剧免费观看| 欧美性猛交xxxxxx富婆| 久久久高清一区二区三区| 婷婷综合久久一区二区三区| 国产91在线|亚洲| 精品国产91乱码一区二区三区| 亚洲国产日韩精品| av激情综合网| 国产亚洲成av人在线观看导航| 人人爽香蕉精品| 欧美日韩极品在线观看一区| 成人免费在线视频观看| 国产在线精品不卡| 欧美一区二区成人6969| 一个色妞综合视频在线观看| 波多野结衣亚洲一区| 久久精品在线观看| 九九九久久久精品| 日韩欧美国产精品| 日韩影院精彩在线| 91精品办公室少妇高潮对白| 国产精品成人在线观看| 国内精品嫩模私拍在线| 欧美一级日韩免费不卡| 日本aⅴ亚洲精品中文乱码| 欧美日韩成人一区二区| 亚洲国产成人av| 在线中文字幕一区| 亚洲综合激情小说| 欧美性色黄大片| 亚洲成人资源在线| 欧美人xxxx| 日欧美一区二区| 日韩欧美一卡二卡| 黄色资源网久久资源365| 精品黑人一区二区三区久久| 麻豆91小视频| 欧美变态tickling挠脚心| 免费成人在线播放| 精品国产免费人成在线观看| 精品一区二区三区在线观看| 精品国产一区二区三区久久久蜜月| 美美哒免费高清在线观看视频一区二区| 8v天堂国产在线一区二区| 美女任你摸久久 | 国产日韩欧美麻豆| 国产成人精品在线看| 国产精品嫩草99a| 99久久精品一区二区| 樱花草国产18久久久久| 欧美视频一区在线观看| 亚洲成av人片在www色猫咪| 欧美一区二区三区成人| 久久精品国产77777蜜臀| 国产嫩草影院久久久久| 91美女蜜桃在线| 五月天精品一区二区三区| 日韩视频永久免费| 国产麻豆精品视频| 亚洲欧美日韩国产手机在线| 欧美日韩一区二区三区四区| 麻豆精品一区二区| 国产日本欧洲亚洲| 在线欧美一区二区| 美女一区二区三区| 国产欧美精品一区二区色综合朱莉| av午夜一区麻豆| 午夜视频一区二区| 久久精品人人做人人爽人人| 99精品一区二区三区| 午夜欧美一区二区三区在线播放| 日韩欧美不卡在线观看视频| 成人激情动漫在线观看| 午夜欧美一区二区三区在线播放| 久久亚洲精品小早川怜子| 色呦呦网站一区| 久久精品国产第一区二区三区| 国产精品美女久久久久高潮| 欧美日韩一二三| 国产精品18久久久久| 一区二区国产盗摄色噜噜| 日韩欧美国产一区在线观看| 97国产精品videossex| 欧美a级理论片| 亚洲欧洲在线观看av| 欧美精品久久99| 不卡在线视频中文字幕| 久久精品免费看| 一区二区欧美精品| 国产午夜精品在线观看| 精品视频在线免费| 成人a级免费电影| 久久国产生活片100| 夜夜嗨av一区二区三区网页| 久久久蜜臀国产一区二区| 777久久久精品| 色综合久久99|