I would like to convert this code to something masm will compile.
I never even heard of nbasm.
It doesn't necessarily need to be a com file either.
The only change I have made so far is to move the data from the end of
the source and changed FullName.

Thanks.

; sfn.asm Nbasm code, Convert to masm code
;

.model tiny

.data

FileName db 'thisisalongfilename.extension',0
FDRec dw 00h,00h ; File attribs
FileCrt dw 00h,00h,00h,00h ; File Creation date
LastAcc dw 00h,00h,00h,00h ; Last Access
LastMod dw 00h,00h,00h,00h ; Last Modified
FileSizeH dw 00h,00h ; File Size Hi
FileSizeL dw 00h,00h ; File Size Lo
dup 8,? ; reserved
;FullName dup 260,? ; Full Long name
FullName db dup 260 (?) ; Full Long name


ShortName dup 14,? ; Short name


.code
push cs ; make sure es=ds=cs
push cs
pop ds
pop es
mov ax,714Eh
mov dx,offset FileName
mov di,offset FDRec
xor cx,cx ; <--- Use this for file names
;mov cx,0010h ; <--- Use this for directory names
mov si,01h
int 21h

mov si,offset ShortName
PLoop1: lodsb
or al,al
jz short PLoopD
int 29h
jmp short PLoop1
PLoopD: ret
Posted on 2004-04-19 13:24:35 by skywalker
Maybe the problem is regarded to the dup sintaxis? and probably a mark of end start and the label?s start: next to .code
Posted on 2004-04-21 12:53:59 by rea