News:

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

Read a file then build a frequency table

Started by Scalemail Ted, March 16, 2010, 02:25:53 PM

Previous topic - Next topic

dedndave

write it in binary just as it is
understand, though, you won't be able to recognize the ASCII characters in the binary file if you use "type" at the prompt
to verify the values are being written correctly, use a hex editor
i use HxD - a very nice free one by Mael Horz
http://mh-nexus.de/en/
it is available in installable and portable (for bootable CD) versions

Scalemail Ted


Scalemail Ted

ok... I have another question... I wanted to ask the user for the address to save the output file and then I wanted to ask then for a filename... then concanate the two ... I tried to create a var to store the first string then offset the edi but its not working... how do u concanate ???

donkey

To concatenate 2 strings you can do this (ANSI only)

mov edi,offset output
mov esi,offset string1
@@:
mov al,[esi]
mov [edi],al
inc edi
inc esi
test al,al
jnz @B

dec edi
mov esi,offset string2
@@:
mov al,[esi]
mov [edi],al
inc edi
inc esi
test al,al
jnz @B


Or if you want to use the API, PathAppend works well for your purposes and will add a backslash if necessary.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable