Re: 16 bit debugging - options?
- From: Frank Kotler <fbkotler@xxxxxxxxxxx>
- Date: Wed, 20 Feb 2008 19:47:41 GMT
Pop Tart wrote:
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.
Well, you'll never get to int 80h *that* way! :)
I assumed I could run this 16 bit program in WinXP maybe that's my problem?
"Shouldn't" be... I whipped up a quick Nasm version and tried it in dosemu - carry flag set, ax = 7100h = not supported. I'd "expect" it to work in XP... (you don't need the "extended" version for these filenames, but it "ought to" work...)
I've compiled with ML, and linked with link16, and I've done this for other test programs (dos functions) while learning this.
Good. Getting *anything* to assemble, link, and run is a big hurdle sometimes!
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.
As I read RBIL, "infile.txt" must exist for dx = 1, try "or"ing it with 16 to open or create. (716Ch does not work with dosemu, but ah=6Ch does, and that's how *that* works, anyway)
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
I'll take your word for it on the command lines... When I (rarely) used MSlink, I just added commas until it shut up. :)
Here below, I have just the one functions, but the carry flag is set on the int21h call
Any ideas?
If the carry flag's set, ax should contain the error number. As an alternative to running it in a debugger, it isn't difficult to display the contents of ax... I'll include my Nasm "test" - shouldn't be difficult to paste the "display" routine into Masm... I don't think it'll even need alteration... (if it does, you can probably figure it out). You may have a "printint" (in Irvine's lib?) that you'd prefer.
Best,
Frank
; nasm -f bin -o test716c.com test716c.asm
org 100h
section .data
infilename db "infile.txt", 0
section .text
; mov ax, 716Ch
mov ah, 6Ch
mov bx, 0
mov cx, 0
mov dx, 10h | 1
mov si, infilename ; ("offset" for Masm)
int 21h
jc errer
mov ax, 4C00h
int 21h
errer:
mov cx, 4
top:
rol ax, 4
push ax
and al, 0Fh
add al, '0'
cmp al, '9'
jbe skip
add al, 7
skip:
int 29h
pop ax
loop top
mov ah, 4Ch
int 21h
.
- Follow-Ups:
- Re: 16 bit debugging - options?
- From: Pop Tart
- Re: 16 bit debugging - options?
- References:
- 16 bit debugging - options?
- From: Pop Tart
- Re: 16 bit debugging - options?
- From: Pop Tart
- 16 bit debugging - options?
- Prev by Date: [OT] for the close of all fission nuclear reactor in the world
- Next by Date: Re: 16 bit debugging - options?
- Previous by thread: Re: 16 bit debugging - options?
- Next by thread: Re: 16 bit debugging - options?
- Index(es):
Relevant Pages
|