I need TextFile algo, like GetText, OpenFile etc.
Posted on 2003-10-20 00:48:00 by realvampire
Here is the code, but it does not work.

CreateOffsetTable proc uses esi edi ebx lpSou:dword,lpTbl:dword,FileSize:dword,lnCnt:dword
;LOCAL rslt,Pos:dword

mov esi,lpSou
mov edi,lpTbl

xor ecx,ecx
mov [edi],ecx ; << 1st line at 0 offset.
add edi,4
mov bl,[esi]
cmp bl,10 ; << if 0a it mean end of Line
jnz go
inc eax
mov [edi],ecx ; place the offset to lpTable pointed by edi
add edi,4
inc esi
inc ecx
cmp ecx,FileSize
jl dloop

CreateOffsetTable endp

This code must able to place all line offset on a memory.
Posted on 2003-10-20 20:31:46 by realvampire

Here is the code, but it does not work.

I got such alot :grin:
Posted on 2003-10-20 22:49:18 by Ranma_at
to me it looks like your testing a string that ends with the return hex of 0a0d... but not all programs use 0a0d for the parsing of return... some only use one byte.. i dont know what your exactly trying to do though please explain more..
Posted on 2003-10-21 02:04:51 by devilsclaw
It only mark offset of a Line. It only for standard text format. I think it only use 0xd. not 0x0d0a.

It working now, I miss-offset buffered it.
Posted on 2003-10-22 19:29:38 by realvampire