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

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

?? checkpat.asm

?? 這個是c版本的是我找了半天才找的
?? ASM
?? 第 1 頁 / 共 2 頁
字號:
	mov	ax,ds
	mov	es,ax
;
;	find the end of the string
;
	xor	ax,ax
	mov	cx,-1
	repne scasb
	mov	si,di
	pop	es
	pop	di
	not	cx
	dec	cx
	jnz	has_fnp		; continue if there's more in the string
	add	sp,2
	stosb			; terminate path string
	jmp	check_fname	; exit if no path or filename
;
;	search from the end for slash/backslash
;
has_fnp:
	sub	si,2		; last char of string
	mov	bx,5c2fh	; the two slashes
	std			; backwards scan
;
spath:
	lodsb
	cmp	al,bl
	je	pfound
	cmp	al,bh
	je	pfound
	loop	spath
;
;	no slash/backslash -> no path given
;
	cld
	pop	si
	xor	cx,cx
	jmp	short cfname
;
longpath:
	mov	ax,ERR_PATHLEN
	jmp	error_exit
;
;	copy the path (note: CX has length of path including slash)
;
pfound:
	cld
	pop	si
	cmp	cx,MAXPATH
	ja	longpath
	or	flags,HAS_PATH		; we have a path
	ldes	di,path
	IFDEF	PASCAL
	inc	di
	ENDIF
	push	cx
	rep movsb
	pop	cx
;
;	check for special filenames '.' and '..', and add them to
;	the path if present.
;	The special form that adds a '.' for every level further down
;	the tree is recognized, and translated into the DOS-form '..\'
;
cfname:
	cmp	byte ptr [si],'.'
	jne	path_finished
	cmp	byte ptr [si+1],'.'
	je	is_special
	cmp	byte ptr [si+1],0
	jne	path_finished
;
is_special:
	or	flags,HAS_PATH		; we have a path
	mov	bx,MAXPATH
	sub	bx,cx
	mov	cx,2
	lodsb
;
copy_special:
	or	bx,bx
	jz	longpath
	dec	bx
	stosb
	lodsb
	or	al,al
	jz	special_finished
	cmp	al,'.'
	jne	badname
	loop	copy_special
;
add_special:
	sub	bx,3
	jle	longpath
	mov	al,'\'
	stosb
	mov	al,'.'
	stosb
	stosb
	lodsb
	or	al,al
	jz	special_finished
	cmp	al,'.'
	jne	badname
	jmp	add_special
;
badname:
	mov	ax,ERR_FNAME
	jmp	error_exit
;
special_finished:
	dec	si
	mov	al,'\'
	stosb
;
;	now copy the filename and extension (limited to 8/3 chars)
;
path_finished:
	xor	al,al			; terminate path
	stosb
;
	mov	bx,2a3fh		; the two wildcards '*' and '?'
	ldes	di,fname
	IFDEF	PASCAL
	inc	di
	ENDIF
	mov	cx,8			; max 8 for name
;
cfnloop:
	lodsb
	or	al,al			; end of string?
	jz	cfndot
	cmp	al,'.'
	je	cfndot
	jcxz	cfnloop			; skip if 8 chars copied
	stosb
	dec	cx
	or	flags,HAS_FNAME
	cmp	al,bl			; check for wildcards	
	je	fnwild
	cmp	al,bh
	jne	cfnloop
;
fnwild:
	or	flags,HAS_WILD
	jmp	cfnloop
;
cfndot:
	mov	ah,al			; save terminator (0 or '.')
	xor	al,al
	stosb				; terminate filename
	or	ah,ah
	jz	no_ext			; jump if at end of string
;
;	extension present, copy it.
;
	or	flags,HAS_EXT
	ldes	di,ext
	IFDEF	PASCAL
	inc	di
	ENDIF
	mov	cx,3
	mov	al,ah
	stosb				; store '.' as first ext char
;
cextloop:
	lodsb
	or	al,al
	jz	cextend
	stosb
	cmp	al,bl			; check for wildcards	
	je	extwild
	cmp	al,bh
	jne	cextcont
;
extwild:
	or	flags,HAS_WILD
;
cextcont:
	loop	cextloop
;
cextend:
	xor	al,al
	stosb				; terminate extension
;
;
no_ext:
	test	flags,HAS_PATH
	jz	check_fname
;
;	A path was specified, check it:
;	Change the current directory to the one specified. 
;	If valid, read back the new directory string 
;	(which has '.' and '..' resolved).
;	In any case, restore the current directory.
;
	ldes	di,fullpath	; make path string from drive and path
	IFDEF	PASCAL
	inc	di
	ENDIF
	ldds	si,drive
	IFDEF	PASCAL
	inc	si
	ENDIF
	call	@strcpy
	ldds	si,path
	IFDEF	PASCAL
	inc	si
	ENDIF
	call	@strcpy
	cmp	byte ptr es:[di-2],':'	; root dir ?
	je	no_slstrip		; then don't strip backslash
	mov	byte ptr es:[di-1],0	; else remove trailing '\'
;
no_slstrip:
	xor	cx,cx		; cx is 'path ok' flag (init to not ok)
	ldds	dx,fullpath
	IFDEF	PASCAL
	inc	dx
	ENDIF
	ldes	di,path
	IFDEF	PASCAL
	inc	di
	ENDIF
	mov	ah,3bh		; change current directory
	int	21h
	mov	ds,dseg
	jc	rest_path	; skip dir reading if invalid
	cmp	fail,0
	jne	rest_path
;
;	read back path
;
	ldds	si,path
	IFDEF	PASCAL
	inc	si
	ENDIF
	inc	si		; leave space for leading '\'
	mov	ah,47h		; get current directory
	mov	dx,drv		; drive number
	int	21h
	mov	ds,dseg
	jc	rest_path	; shouldn't happen, but...
	cmp	fail,0
	jne	rest_path
;
	mov	byte ptr es:[di],'\'	; prefix with '\'
	xor	ax,ax
	mov	cx,-1
	repne scasb			; find end of string
	not	cx
	cmp	cx,2
	je	rest_path		; don't append trailing '\' if root
	mov	byte ptr es:[di-1],'\'
	stosb				; terminate
;
rest_path:
	mov	dx,offset dfltpath
	mov	ah,3bh
	int	21h
;
;	was the path ok?
;
	or	cx,cx
	jnz	check_fname
;
;	exit if not
;
	mov	ax,ERR_PATH
	jmp	error_exit
;
;	the path was ok, now check the filename if it doesn't contain
;	wildcard chars.
;
check_fname:
	test	flags,HAS_WILD
	jz	checkfn1
	jmp	ready
;
checkfn1:
	ldesf	di,fullpath	; make full path string
	IFDEF	PASCAL
	inc	di
	ENDIF
	lddsf	si,drive
	IFDEF	PASCAL
	inc	si
	ENDIF
	call	@strcpy
	ldds	si,path
	IFDEF	PASCAL
	inc	si
	ENDIF
	call	@strcpy
	test	flags,HAS_FNAME OR HAS_EXT
	jnz	checkfn2
;
;	No filename, get the attribute of the directory
;
	or	flags,IS_DIR
	dec	di
	mov	byte ptr es:[di],0	; clear trailing '\'
	dec	di
	cmp	byte ptr es:[di],':'	; root dir?
	je	no_dirchk		; then don't get attribute
	ldds	dx,fullpath
	IFDEF	PASCAL
	inc	dx
	ENDIF
	mov	ax,4300h	; get attribute
	int	21h
	mov	ds,dseg
	jc	no_attrib	; shouldn't happen
	cmp	fail,0
	jne	no_attrib
	mov	ax,flags
	mov	ah,cl
	and	ah,7fh
	mov	flags,ax
no_dirchk:
	jmp	ready
;
no_attrib:
	mov	ax,ERR_PATH
	jmp	error_exit
;
checkfn2:
	ldds	si,fname
	IFDEF	PASCAL
	inc	si
	ENDIF
	call	@strcpy
	ldds	si,ext
	IFDEF	PASCAL
	inc	si
	ENDIF
	call	@strcpy
;
	mov	ah,2fh		; get current DTA
	int	21h		; ES:BX has current DTA
	push	bx
	push	es
;
	mov	ds,dseg
	mov	dx,offset dfltpath
	mov	ah,1ah		; set DTA
	int	21h
;
	ldds	dx,fullpath
	IFDEF	PASCAL
	inc	dx
	ENDIF
	mov	cx,10110B	; search all except label
	mov	ah,4eh		; search for first
	int	21h
	mov	ds,dseg
	jc	no_file
	cmp	fail,0
	jne	no_file
;
	mov	ax,flags
	mov	ah,dfltpath+15h	; file attributes into upper byte of flags
	test	ah,10h		; subdirectory?
	jz	no_subdir
;
;	The filename specifies a subdirectory. Append it to the path.
;
	test	inflags,INF_NODIR
	jnz	no_file
	ldesf	di,path
	IFDEF	PASCAL
	inc	di
	ENDIF
	mov	cx,-1
	xor	ax,ax
	repne scasb
	dec	di
	mov	si,offset dfltpath+1eh
	call	@strcpy
	mov	al,'\'
	stosb
	xor	al,al
	stosb
	ldes	di,fname
	IFDEF	PASCAL
	inc	di
	ENDIF
	stosb
	ldes	di,ext
	IFDEF	PASCAL
	inc	di
	ENDIF
	stosb
	mov	ax,flags
	mov	ah,dfltpath+15h	; file attributes into upper byte of flags
	and	ah,7fh		; make sure it's positive
	and	al,NOT (HAS_FNAME OR HAS_EXT)
	or	al,HAS_PATH
	mov	flags,ax
	jmp	short no_file
;
no_subdir:
	or	al,FILE_EXISTS
	and	ah,7fh		; make sure it's positive
	mov	flags,ax
;
no_file:
	pop	ds
	pop	dx
	mov	ah,1ah
	int	21h		; restore DTA
;
ready:
	ldesf	di,fullpath	; make full path string
	IFDEF	PASCAL
	inc	di
	ENDIF
	lddsf	si,drive
	IFDEF	PASCAL
	inc	si
	ENDIF
	call	@strcpy
	ldds	si,path
	IFDEF	PASCAL
	inc	si
	ENDIF
	call	@strcpy
	ldds	si,fname
	IFDEF	PASCAL
	inc	si
	ENDIF
	call	@strcpy
	ldds	si,ext
	IFDEF	PASCAL
	inc	si
	ENDIF
	call	@strcpy
	mov	ds,dseg
	mov	ax,flags
;
error_exit:
	mov	ds,dseg
	cmp	fail,0
	je	nofail
	mov	ax,ERR_CRITICAL
;
nofail:
	push	ax
	cmp	ax,0
	jge	no_error
	ldesf	di,fullpath
	mov	word ptr es:[di],0
;
no_error:
	lds	dx,save24
	mov	ax,2524h
	int	21h
	IFDEF	PASCAL
	ldesf	di,drive
	call	@strlen
	ldes	di,path
	call	@strlen
	ldes	di,fname
	call	@strlen
	ldes	di,ext
	call	@strlen
	ldes	di,fullpath
	call	@strlen
	ENDIF
	pop	ax
;
	ret
;
checkpath endp
;
;
;e Returns TRUE if a file with name 'fname' exists.
;d Liefert TRUE wenn eine Datei mit dem Namen 'fname' existiert.
;
	IFDEF	PASCAL
	IFDEF	FARCALL
exists	PROC far uses ds, fname: dword
	ELSE
exists	PROC near uses ds, fname: dword
	ENDIF
	ELSE
exists	PROC	uses ds, fname: ptr byte
	ENDIF
;
	IFDEF	TC_HUGE
	mov	ax,SEG my_data
	mov	ds,ax
	ENDIF
;
	IFDEF	PASCAL
	ldds	si,fname
; for pascal, zero-terminate input string
	lodsb
	mov	bl,al
	xor	bh,bh
	mov	[si+bx],bh
	mov	dx,si
	ELSE
	ldds	dx,fname
	ENDIF
;
	mov	ax,4300h	; get file attributes
	int	21h
	mov	ax,0
	jc	exists_end
	test	cx,10h		; directory?
	jnz	exists_end
	inc	ax
;
exists_end:
	ret
;
exists	endp
;
	end

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久www成人免费无遮挡大片| 国产精品每日更新在线播放网址| 成人激情视频网站| 亚洲蜜臀av乱码久久精品| 久久新电视剧免费观看| 在线亚洲免费视频| 国产成人在线免费| 九色综合狠狠综合久久| 午夜影视日本亚洲欧洲精品| 国产精品久久国产精麻豆99网站| 欧美精品久久天天躁| 99久久精品情趣| 国产老妇另类xxxxx| 秋霞成人午夜伦在线观看| 18成人在线观看| 久久精品一区二区| 日韩欧美一区中文| 欧美色视频在线观看| 97久久超碰国产精品电影| 福利91精品一区二区三区| 免费国产亚洲视频| 亚洲一区二区美女| 亚洲精品视频一区| 亚洲欧洲国产日本综合| 欧美国产日韩一二三区| 日韩欧美国产精品| 日韩精品一区二区三区swag| 在线不卡中文字幕| 在线电影一区二区三区| 色猫猫国产区一区二在线视频| 成人精品免费网站| 懂色av一区二区夜夜嗨| 成人免费的视频| 成人激情电影免费在线观看| 国产成人日日夜夜| 国产不卡一区视频| 国产夫妻精品视频| 国产超碰在线一区| va亚洲va日韩不卡在线观看| 成人黄色在线视频| 成人精品免费看| 99免费精品在线观看| 91在线免费播放| 色猫猫国产区一区二在线视频| 91一区二区三区在线播放| 91视频www| 欧美日韩三级视频| 欧美一区二区三区在线| 欧美丰满一区二区免费视频 | 国产a精品视频| 国产激情一区二区三区四区 | 成人精品免费看| 不卡影院免费观看| 在线日韩一区二区| 欧美高清www午色夜在线视频| 91精品国产综合久久久久久漫画| 欧美日韩高清一区二区不卡| 91精品国产欧美日韩| 久久亚洲精精品中文字幕早川悠里| 欧美不卡视频一区| 中文字幕成人av| 亚洲小少妇裸体bbw| 日本美女一区二区| 黑人精品欧美一区二区蜜桃| 国产黄色精品视频| 一本到不卡免费一区二区| 欧美色网站导航| 欧美刺激午夜性久久久久久久| 久久久久久久电影| 亚洲精品久久久蜜桃| 奇米影视一区二区三区| 国产盗摄视频一区二区三区| 成人国产精品免费观看视频| 欧美亚洲一区三区| 26uuu国产在线精品一区二区| 中文字幕国产一区| 亚洲高清久久久| 国产精品2024| 欧美日韩一区二区三区高清| 久久先锋影音av鲁色资源| 亚洲三级免费电影| 精品制服美女丁香| 91免费精品国自产拍在线不卡| 在线免费观看日韩欧美| 欧美成人性福生活免费看| 亚洲欧美一区二区视频| 日本午夜一本久久久综合| 国产精品一二三四区| 欧美日韩精品二区第二页| 国产农村妇女毛片精品久久麻豆| 亚洲色图制服丝袜| 久久99精品国产麻豆不卡| 在线观看视频一区| 久久久久国产精品麻豆ai换脸| 亚洲自拍偷拍麻豆| 国产精品1024| 日韩精品一区二区三区视频| 一区二区三区国产精品| 国产精品白丝jk白祙喷水网站| 欧美日韩在线一区二区| 国产精品黄色在线观看| 亚洲电影激情视频网站| 粉嫩高潮美女一区二区三区| 91精品国产麻豆| 亚洲自拍与偷拍| 99久久婷婷国产综合精品| 精品国产一区二区三区不卡| 午夜精品一区二区三区三上悠亚 | 欧美一区二区三区爱爱| 亚洲欧洲日本在线| 国产一区二区精品久久91| 欧美日本在线看| 亚洲制服丝袜av| 91伊人久久大香线蕉| 国产精品三级av在线播放| 精品一区二区在线看| 在线播放日韩导航| 亚洲一区二区三区中文字幕| 99久久99久久精品国产片果冻| 久久免费看少妇高潮| 免费高清不卡av| 欧美日韩亚州综合| 亚洲欧美日本在线| 色综合久久中文综合久久97| 国产精品久线在线观看| 国产精品99久久久久久似苏梦涵 | 日日夜夜精品视频免费| 色综合天天综合网国产成人综合天| 国产色一区二区| 国产不卡视频一区二区三区| 精品久久久久99| 狠狠色2019综合网| 久久嫩草精品久久久精品一| 狠狠色伊人亚洲综合成人| 精品国产露脸精彩对白| 久久精品国产99| 久久久久久免费网| 高清不卡一区二区在线| 久久九九国产精品| 成人国产视频在线观看| 中文字幕中文字幕在线一区| 99riav久久精品riav| 国产精品成人网| 色视频欧美一区二区三区| 亚洲国产日韩a在线播放性色| 欧美精品亚洲二区| 日韩电影在线观看网站| 日韩视频免费观看高清完整版| 极品美女销魂一区二区三区 | 国产午夜精品理论片a级大结局| 国产成人免费xxxxxxxx| 亚洲欧美综合色| 在线免费精品视频| 日本vs亚洲vs韩国一区三区 | 狂野欧美性猛交blacked| 精品国产污污免费网站入口| 国产高清视频一区| 国产精品久久久久久久久果冻传媒| 91在线精品秘密一区二区| 亚洲成av人片一区二区三区| 日韩免费视频一区二区| 激情综合五月天| 综合激情成人伊人| 欧美日本国产一区| 精品一区二区三区免费| 国产精品天天看| 欧美精品第一页| 国产一区 二区 三区一级| 亚洲丝袜自拍清纯另类| 91精品国产高清一区二区三区蜜臀| 精品一区二区成人精品| 中文字幕亚洲综合久久菠萝蜜| 欧美日韩小视频| 国产成人亚洲综合a∨婷婷图片| 亚洲欧洲www| 日韩欧美国产综合| 色悠悠亚洲一区二区| 免费观看30秒视频久久| 国产精品久久久久久户外露出 | 欧美电影免费观看高清完整版在线观看 | 精品国产乱码久久久久久久久| 成人国产电影网| 捆绑调教美女网站视频一区| 国产精品久久久久7777按摩| 欧美一区二区网站| 99久久精品国产网站| 丝袜亚洲另类欧美| 日韩一区在线免费观看| 日韩欧美不卡一区| 一本色道久久综合精品竹菊| 精品一区二区三区av| 一区二区三区色| 久久精品视频一区| 91麻豆精品国产91久久久更新时间| 风流少妇一区二区| 另类小说欧美激情| 亚洲国产成人porn| 日本一区二区动态图| 欧美不卡视频一区| 欧美精品v日韩精品v韩国精品v|