I have a String Replacing Routine that i need to make and I am looking/wondering if there is a push statement that will just push one byte of data.. I tried pushing ah but it pushed a whole 3 bytes of data onto the stack.

Is there a Push Function to do that? or is there something else that I might be able to do?
Posted on 2002-04-14 14:51:46 by Volcano_88101
There's only a push word and push dword.
You can do this:

mov [esp], ah
sub esp, 1

However I don't recommend using the stack to store bytes, as it's best to keep the stack pointer aligned to 4 bytes. You can probably find a better solution for storing the bytes.

Posted on 2002-04-14 15:41:50 by Thomas
Yeah i think I will just overwrite my old string. Its just that i dont like having a memory leak and i think that will pose as a memory leak so i wnated to allocate space for the new string and then copy the new string but since you would never know how much space was going to be usedthe only way to do it would be to push or pop .. and then allocating the space and then copying the data....

More Thinking is required

:o :o :stupid:
Posted on 2002-04-14 15:48:42 by Volcano_88101