News:

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

Inserting text, how is it Usually done ?

Started by Rainstorm, May 02, 2007, 01:03:09 AM

Previous topic - Next topic

Rainstorm

Hi,

Suppose I load a text file into memory, & then need to insert text at certain points in memory, How is this usually done ?
do you just move all the following bytes forward as you insert ?
would appreciate any small code examples also..

Thank you.

hutch--

In most cases you write the result to a new buffer. Copy up to the insertion point, write your insert data then write the rest from the original data. There are variations if the original source buffer is big enough, copy the data from the insertion point to a temp buffer, insert you data at the insertion point then write the data in the temp buffer after it.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Rainstorm