jj
Quote from: crazyhorse on December 12, 2011, 07:59:12 AM
The following is a 16-bit code i'm trying to run on masm32.
I can't find the error, mind helping me out please :)
I get "There was an Error in Creating." when it runs. What is InputOutputCommand supposed to return in dx?
InputOutputCommand PROC
;;;;;;;;;;;;;;;;;;;;;;;;For the Input File Name;;;;;;;;;;;;;;;;;;;;
mov di, 81h
mov si, OFFSET InputFileName
mov al, 20h
repz scasb
To use a rep prefix you need to init CX, probably when the file is loaded CX=0 so no rep happens.
Try to check your filenames before using them.
InputOutputCommand PROC
;;;;;;;;;;;;;;;;;;;;;;;;For the Input File Name;;;;;;;;;;;;;;;;;;;;
mov di, 81h
mov si, OFFSET InputFileName
mov al, 20h
mov cx, 128 ; see Sinsi's post
push di ; you need that one, right?
repz scasb
pop di
jz FileMissing
...
FileMissing: stc
check=1
if check
mov dx, OFFSET InputFileName
mov ah, 9 ; display message the
int 21h ; traditional way
mov ax, 4c00h
int 21h
endif
ret
InputOutputCommand ENDP
Quote from: crazyhorse on December 12, 2011, 07:59:12 AM
jj
Where is the question, which has been answered by jj and sinsi?