// This example dumps buffer data. cVMMPhysModel buffer = thisDocument.Buffer.getModel("physicalBuffer"); int iStartAddr = 0x13; int iEndAddr = 0x200; // Display address, then buffer data. for (int iAddr = iStartAddr; iAddr < iEndAddr; ++iAddr) print(MTR("%iAddr% %data%") << iAddr << buffer.getByte(iAddr)); // One byte per line - data only.
for (int iAddr = iStartAddr; iAddr < iEndAddr; ++iAddr)
print(buffer.getByte(iAddr));
// Display chunks of 16 bytes as hex dump.
for (int iAddr = iStartAddr; iAddr < iEndAddr;)
{
string s = MTR("%addr") << iAddr;
for (int i = 0; i < 16; ++i)
{
if (iAddr >= iEndAddr)
break;
s += " ";
s += message("%d%") << buffer.getByte(iAddr++);
}
print (s);
}
string sDocument = "document0";
string sBuffer = "physicalBuffer";
string sFileName = "test.hex"; gxPatchBuffer(sDocument, sBuffer, sFileName, gxBFAuto);
See also:
gxImportProject, gxExportProject, gxLoadBuffer