Re: 16 bit debugging - options?



Pop Tart wrote:

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

http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/win9x/95func_2i3s.asp

was using, that it would open an existing for or create a file. I'm
assembling with

Here in XP it works, but only if the file alread exist:

0100: b8 716c move.w #$716c,r0 ; create or open file
0103: bb 0000 move.w #0,r3 ; ModeAndFlags: read only
0106: b9 0000 move.w #0,r2 ; Attribute: read and write
0109: ba 0001 move.w #1,r1 ; Action: open an existing file
010c: be 0122 move.w #infile,r5 ; Filename
; move.w #0,r6 ; AliasHint
010f: cd 21 trap #$21

0111: ba 012d move.w #text1,r1
0114: 73 03 bcc.b _10
0116: ba 013b move.w #text2,r1
0119: b4 09 _10: move.b #$09,m0
011b: cd 21 trap #$21

011d: b8 4c00 move.w #$4c00,r0
0120: cd 21 trap #$21

0122: 69 6e 66 69 6c 65
0128: 2e 74 78 74 00 infile: dc.b "infile.txt",0
012d: 63 61 72 72 79 20
0133: 63 6c 65 61 72 0d
0139: 0a 24 text1: dc.b "carry clear",13,10,"$"
013b: 63 61 72 72 79 20
0141: 73 65 74 0d 0a 24 text2: dc.b "carry set",13,10,"$"
.