Re: 16 bit debugging - options?



On Wed, 20 Feb 2008 03:52:41 +0000, Frank Kotler wrote:

Thanks Frank for all your help and suggestions!

I was able to get a copy of codeview, so I'll use that for the moment.

I still can't get past the first int 21h.

I assumed I could run this 16 bit program in WinXP maybe that's my
problem? I've compiled with ML, and linked with link16, and I've done
this for other test programs (dos functions) while learning this.

Maybe I don't understand the function 716Ch, I thought with the options I
was using, that it would open an existing for or create a file. I'm
assembling with

ml -c -omf -Fl -Zi main.asm

(using ml version 9, but I just got masm 6.11 and have tried it too)

and linking with

link16 main.obj,,NUL,,,/CODEVIEW

Here below, I have just the one functions, but the carry flag is set on
the int21h call

Any ideas?

;=========================================
TITLE Read a text file (main.asm)

..model small
..stack 200h
..386

..data
BufSize = 5000
infile BYTE "infile.txt",0
outfile BYTE "outfile.txt",0

inHandle WORD ?
outHandle WORD ?
buffer BYTE BufSize DUP(?)
bytesRead WORD ?

..code
main PROC
mov ax, @data
mov ds, ax
;open the input file
mov ax, 716Ch
mov bx, 0 ;mode = read only
mov cx, 0 ;normal attribs
mov dx, 1 ;action open
mov si, offset infile
int 21h
jc Quit
mov inHandle, ax

Quit:
mov al, 0
mov ah, 4Ch
int 21h
main ENDP
END main
;=======================================



--
Regards,
Pop Tart
.



Relevant Pages