PE> 002c 8a 01 L2 mov al,[ecx]
PE> 002e 88 02 mov [edx],al
PE> 0030 41 inc ecx
PE> 0031 42 inc edx
PE> 0032 3c 0a cmp al,0aH
PE> 0034 75 f6 jne L2
MP> This is untested. This assumes ds=es and that they are loaded with
MP> the correct values.
MP> cld
MP> mov al,0ah
MP> mov edi,[u]
MP> mov ecx,-1
MP> repne scasb
MP> not ecx
MP> mov edi,[t]
MP> mov esi,[u]
MP> rep movsb
MP> mov [t],edi
MP> when finished t will point to the byte after the line feed. The code
MP> might have to save some registers depending on how you're using the code.
I see that you are doing 2 rep*'s. I was wondering if there was a
way of using just the rep movsb? I can GUARANTEE that there is a
newline character to end the search.
If it requires two moves, that may end up being longer than the
"single move" but done manually in the code that I have posted above.
What do you reckon?
MP> Also under os2 what is in the segment registers, does ds=es or what as
MP> ds and es must contain the selector of the data to be searched. I'll need
I think ds = es = fs, but I'm not sure. I think only two segments
are used, one code segment and one data segment. In fact, even
they may be set to the same thing too. Hopefully someone with more
OS/2 knowledge will jump in here. But I can search those things out
later.
MP> more
MP> details if you want fully working code as edi and ecx might have a variable
MP> in it. Are you going to make it inline assembly.
I don't know yet about the inline assembly, I'll play that by ear.
First of all I want to determine whether it is actually worth the
effort, assuming an average of 30 characters/line, to switch to
assembler.
BFN. Paul.
@EOT:
---
* Origin: X (3:711/934.9)
|