News:

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

C:\masm32\examples\exampl11\fileio\append

Started by askm, March 13, 2007, 12:47:26 AM

Previous topic - Next topic

askm

This append.exe generated errors and shutdown on this Windows 2000.

PPfileio.exe ran OK.

MichaelW

There is a small error in append.asm.

Change:
mov wcnt, fwrite(hFile,ADDR txt,len(txt))
To:
mov wcnt, fwrite(hFile,txt,len(txt))

And build it as a console app and it should work OK. The first version would be correct if txt were a local string, but since it's actually a local dword that contains the address of the string, the ADDR is not correct. See the sas macro in macros.asm.
eschew obfuscation

hutch--

Michael,

Thanks, I vaguely remember writing the example with "txt" in the data section to get it working then shifting it to the macro "sas" but I apparently did not check the results after.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php