Re: A (mild-mannered) defense of RosAsm

From: Herbert Kleebauer (klee_at_unibwm.de)
Date: 03/03/04


Date: Wed, 03 Mar 2004 15:40:50 +0100


RoWsRaIrTiEo wrote:
>
> On Mon, 23 Feb 2004 03:38, Frank Kotler <fbkotler@comcast.net> wrote:
> >putz:
> > pusha
> >
> > xor eax, eax
> >.find_len:
> > cmp [esi + eax], byte 1
> > inc eax
> > jnc .find_len
> >
> > push dword 0
> > push dword num_chars
> > push eax
> > push esi
> > push dword STDOUT

Does this really work? I think you have to push a handle
to STDOUT and not STDOUT itself (=-11) onto the stack.
Use GetStdHandle to get the handle (as in your code for
getc below).

> > call [WriteFile]
> > popa
> > ret



Relevant Pages

  • Re: Macro2D
    ... mov, eax ... cmp eax, -1 ... push STD_INPUT_HANDLE ...
    (alt.lang.asm)
  • Re: Insert a byte
    ... push ebx ... mov ebx, dword ... cmp dword, 0 ... ..e0: xor eax, eax ...
    (alt.lang.asm)
  • ascii to st0
    ... push IDC_ARROW ... cmp eax, 0 ... mov ebp, esp ... cmp dword @Message, WM_CLOSE ...
    (alt.lang.asm)
  • Re: Interesting Web Site on Open Source Development
    ... mov D§esp 0DEADBEEF call Code04013A0 ... call Code0401100 push eax lea eax D§esp+014 push Data0402124 ... push eax call 'USER32.wsprintfA' add esp 0C push 030 lea ecx D§esp+014 push ecx ...
    (alt.lang.asm)
  • Re: Insert a byte
    ... mov, eax ... push STD_INPUT_HANDLE ... mov edx, ...
    (alt.lang.asm)