setpath.asm
来自「开放源码的编译器open watcom 1.6.0版的源代码」· 汇编 代码 · 共 39 行
ASM
39 行
include ..\cwlib.inc
scode
;-------------------------------------------------------------------------
;
;Set current drive and path.
;
;On Entry:
;
;EDX - pointer to path string.
;
;On Exit:
;
;ALL registers preserved.
;
SetPath proc near
pushm eax,edx
push edx
mov dl,[edx]
cmp dl,61h ; 'a'
jb @@0
cmp dl,7Ah ; 'z'
ja @@0
and dl,5Fh ;convert to upper case.
@@0: sub dl,"A"
mov ah,0eh ;Set drive
int 21h ;Get number of logical drives
pop edx
mov ah,3bh
int 21h
popm eax,edx
ret
SetPath endp
efile
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?