I can't figure out how to copy what's after the period into extension.
Thanks.


extension db 10 dup(?)
.....

; Deal with periods in sub-directory names
;
; c:\work.1\temp\test.asm
;
chk_path:
lea si,
xor cx,cx
mov di,si
mov cl,

mov al,'\'
; c:\work.1\temp\test.asm
add di,cx
std ; scan from right to left <------
dec di
repne scasb ; zero flag set if "\"
push cx

xor di,di
xor si,si
lea si,
pop cx
add si,cx
xor cx,cx
cld ; scan from left to right
mov di,si
mov cl,

mov al,'.' ; if there is a period, everything
; after is the file extension
repne scasb ; Zero flag set if "."
; At this point, cx is pointing to the
; period in the file extension
Posted on 2003-03-10 13:09:24 by skywalker