News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

mdir example reducing

Started by paranoidx, June 20, 2006, 05:53:43 PM

Previous topic - Next topic

paranoidx

I was snooping around the examples in masm32 distro and notice \masm32\exampl03\dir can be reduced a little further:

Starting Line:73 replace with

   jmp nxt
  @@:
    invoke FindNextFile,hSearch,ADDR wfd
    cmp eax, 0
    je lpOut
  nxt:
    invoke StdOut,ADDR wfd.cFileName
      mov al, [wfd.cFileName]
      cmp al, "."
      je nxt1
    invoke StdOut,ADDR spc
    invoke wsprintf,ADDR sizeBuffer,ADDR fMtStrinG,wfd.nFileSizeLow
    invoke StdOut,ADDR sizeBuffer
    invoke StdOut,ADDR bytes
  nxt1:
    invoke StdOut,ADDR lf
    jmp @B

  lpOut:
    invoke FindClose,hSearch

  TheEnd:

    ret

Main endp
end start