I am trying to make my first program. Now is second day
and it won't work eny more and i have big headache.
It's purpose to be simple type command.

...Advice and help are welcome
Posted on 2001-11-11 15:35:56 by Torak
just had a quick look at the code. createfile returns -1 if it's unsuccessful so this is not correct:

.if eax==0 ; If we got open error
Posted on 2001-11-11 15:53:25 by Tola
I downloaded your code and got it working under FAsm.

Here is another problem:

invoke lstrlen, CmdLn
.if eax==1

If not args are supplied, CmdLn will be pointer to 0x00, so you should replace the 1 with a 0.

Also your error codes get stomped on at the end.
Posted on 2001-11-11 23:51:57 by eet_1024
I fix that createfile error cheking bug.

invoke lstrlen, CmdLn
.if eax==1

if i change this zero and write "T" won't work.

>Also your error codes get stomped on at the end

I fix this too, but now it seems to fail in ReadFile.
Posted on 2001-11-12 10:13:27 by Torak
Here is the working FAsm version. I used Olly Debug to trouble shoot your program.
Posted on 2001-11-12 16:19:07 by eet_1024
Yeah, Olly Debug is great - use it.
Posted on 2001-11-12 16:24:41 by bitRAKE
I solved it, i read line to line eet_1024 source code
and find it.

invoke ReadFile,hFile,pMem,FileSize-1,ADDR SizeRead, NULL
stdcall , , , , Bytes.Tx, 0

Of course that -1 isin't are permitted. I am slay of C.
But there is still that poor argument handling, that must
be fixed. Maby tomorrow.
Posted on 2001-11-12 17:55:49 by Torak
Yeah use ollydbg :cool:

Here's a REG file so that you can right-click on an exe file and debug it with ollydbg...
Posted on 2001-12-01 17:40:51 by grv575
Just another vote for Olly Debug...
Posted on 2001-12-02 03:05:06 by peterverstappen
I was looking for sam good debug program, people recomended me SoftICE but after installing it blocked my Win95 :mad: hooh as I was unable to put win98 (looooong story) I searched for some debugger, and luckuly I found this post. Olly debugger is all I need, really good debugy program.

Tnaks for this link guys. :alright:
Posted on 2001-12-07 20:18:15 by maksimov