I would like to convert this Tasm code to something
Masm can compile. Thanks.


DTA STRUC
RESERVED db 21 dup (?)
ATTRIBUTE db 0
TIME dw 0
DATE dw 0
DTA_SIZE dd 0
NAME_FOUND db 13 dup (?)
DTA ENDS
Posted on 2004-04-08 21:39:58 by skywalker
DTA struct
RESERVED byte 21 dup (?)
ATTRIBUTE byte ?
TIME word ?
DATE word ?
DTA_SIZE dword ?
NAME_FOUND byte 13 dup (?)
DTA ENDS

Not too sure if date and time is reserved words in masm. if they are, change them to something else.
Posted on 2004-04-08 21:50:41 by roticv

DTA struct
RESERVED byte 21 dup (?)
ATTRIBUTE byte ?
TIME word ?
DATE word ?
DTA_SIZE dword ?
NAME_FOUND byte 13 dup (?)
DTA ENDS

Not too sure if date and time is reserved words in masm. if they are, change them to something else.


Here is the code that Tasm uses to access the structure. I think that is where the problem is.
It's giving me an Undefined symbol at the test statment.


DTA STRUC
RESERVED db 21 dup (?)
ATTRIBUTE db 0
TIME dw 0
DATE dw 0
DTA_SIZE dd 0
NAME_FOUND db 13 dup (?)
DTA ENDS

sdir2: ; No match, so try sub-directories.
POP DX ; Restore DTA
PUSH DX
CALL BUILD_STAR_NAME ; Search for all directories
CALL FMATCH ; Get first entry
JC SDIR5 ; There are no entries
MOV SI,DX ; Put address of DTA into SI
TEST .ATTRIBUTE,10H ; Is it a directory entry?
JNZ SDIR4 ; Yes, then search sub-directory
Posted on 2004-04-08 22:18:21 by skywalker
It is not the problem with the structure



sdir2: ; No match, so try sub-directories.
POP DX ; Restore DTA
PUSH DX
CALL BUILD_STAR_NAME ; Search for all directories
CALL FMATCH ; Get first entry
JC SDIR5 ; There are no entries
MOV SI,DX ; Put address of DTA into SI
assume si:PTR DTA
TEST [SI].ATTRIBUTE,10H ; Is it a directory entry?
JNZ SDIR4 ; Yes, then search sub-directory
Posted on 2004-04-08 22:42:50 by roticv
Originally posted by roticv
It is not the problem with the structure



sdir2: ; No match, so try sub-directories.
POP DX ; Restore DTA
PUSH DX
CALL BUILD_STAR_NAME ; Search for all directories
CALL FMATCH ; Get first entry
JC SDIR5 ; There are no entries
MOV SI,DX ; Put address of DTA into SI
assume si:PTR DTA
TEST .ATTRIBUTE,10H ; Is it a directory entry?
JNZ SDIR4 ; Yes, then search sub-directory

Thanks for the help.
These are the last 2 error messages I am getting, both for NAME_FOUND.


CLD ; Set for increment
MOV SI,DX ; Put address of DTA into SI
ADD SI,OFFSET NAME_FOUND ; Set to start of sub-directory name
MOV DI,BX ; DS:DI -- 0 at end of path name


PNAME PROC NEAR

PUSH AX
PUSH DX
MOV DX,OFFSET PATH_NAME
MOV AL, ; Save character at end of path
MOV BYTE PTR ,0 ; Set for end of string
CALL pasciiz
MOV ,AL ; Restore character
POP DX ; Recover old pointer
PUSH DX
ADD DX,OFFSET NAME_FOUND
Posted on 2004-04-09 04:49:51 by skywalker