Re: asm grep




"Frank Kotler" <fbkotler@xxxxxxxxxxx> wrote in message
news:Xpwdj.3630$tK5.681@xxxxxxxxxxx
The problem arises in that, in order to minimize checking "obvious
non-matches", I scasb for the first character of "needle", completely
ignoring "lines" (find the beginning/end of the line in which the match
was found only after finding a match). Seems to me this isn't going to
work if we want to print non-matching lines...

If you support LF, CRLF, but not CR, then scasb backwards for LF, i.e., 3
times for -B 2...

*or* report line-number
where a match is found, instead of "offset" (which seems useful to me).


It's probably easier to implement with a small loop now that you want to
track more than one item, especially since tracking multiple character
values doesn't fit well with single x86 instructions... I.e., you have a
trade-off between functionality vs. speed vs. size.


Rod Pemberton

.



Relevant Pages

  • Re: Search Array
    ... Is there a SIMPLE way to see if the array contains a string while ignoring case, without writing my own loop? ... I don't mind writing my own loop but if there's already something to do this, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: error reading from socket
    ... I have a problem reading ... from the socket. ... You are ignoring the return value of soc->recv, ... I am assuming that I need a loop, but I cannot figure out which one. ...
    (comp.unix.solaris)
  • Re: Search Array
    ... Is there a SIMPLE way to see if the array contains a string while ignoring case, without writing my own loop? ... I don't mind writing my own loop but if there's already something to do this, ... I've found all sorts of complex stuff but nothing to perform this rather trivial task. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: xslt I get multiple values in my variable
    ... > like it has gone through my loop and added some white space. ... Using XPath to select the specific elements or attributes you want ... and ignoring the rest is much faster and simpler than loops. ... XML FAQ: http://xml.silmaril.ie/ ...
    (comp.text.xml)