Writing to a file without overwriting the existing data

Started by Trasher, July 29, 2005, 10:29:48 PM

Previous topic - Next topic

qWord

FPU in a trice: SmplMath
It's that simple!

fearless

You need the carriage return and line feed written at the end of each part of data (word or sentence) to tell any editor to start displaying your data on a new line. So you need to add a handy quick ref to CR LF, i use something like this:

.DATA
CRLF               db 13,10 ; this is carriage return and linefeed bytes

.CODE

; now you can write CR LF like:

Invoke WriteFile, hFile, ADDR txt, LENGTHOF txt, ADDR pWritten, NULL ; some text or word or sentence written out to file
Invoke WriteFile, hFile, ADDR CRLF, LENGTHOF CRLF, ADDR pWritten, NULL ; now we write CR LF

; continue, writing CR LF after if needed
ƒearless

FlySky


hutch--

Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php