Für dieses Forum muß Javascript im Browser aktiviert werden!
Kommentar: Einfügen von HTML im Kommentar: Link einfügen: <a href="LINKURL" target="_blank">LINKTITEL</a> Bild einfügen: <img src="BILDURL"> Text formatieren: <b>fetter Text</b> <i>kursiver Text</i> <u>unterstrichener Text</u> Kombinationen sind auch möglich z.B.: <b><i>fetter & kursiver Text</i></b> C2 Quellcode formatieren: <code>Quellcode</code> ASM Quellcode formatieren: <asm>Quellcode</asm> (Innerhalb eines Quellcodeabschnitts ist kein html möglich.) Wichtig: Bitte mache Zeilenumbrüche, bevor Du am rechten Rand des Eingabefeldes ankommst ! > Hallo Philippe, > > > One of my customers have a CC2 unit built by a sub-contractor. > > They have *only* some kind of backup in the form of a .vmc file. > > What can we do with only this file? > > I guess that we cannot "disassemble" this file to retreive the source code? > > the vmc-file contains no source code. This file contains VM-Tokens (like assembler). > You can download the file to the CC2 using the CC2Net.de-Download-Tool. > > It is possible to decompile a vmc, but there is no special software. > This must be done by hand. All VM-Codes are listed in the module vmcode.c2. > You must also know all four types of VM-Codes. (see manual) > VM-Codes can be 16 or 32 Bit. (one or two words in vmc-file) > The vmc-file contains a header and two sections. > > Header: > first line: "CC2VMC" > second line: count VM-Constants in bytes > third: count VM-Code in words > > Sections: > First: constants as byte-values > They are used for constants greater 16Bit, constant arrays, strings and thread-definition. > > Second: VM-Code as word-values > > But with decompiling a vmc-file you won't get the source code. > You would only get a kind of pseudo-source looking like Assembler. > e.g. "load byte addr 65 to stack", "load int addr 20 to stack", > "add last two values in stack as int and store the result to stack", > "store last int of stack to int addr 20" > In C2 it could look like that: > x=y+x; > > > Regards, > André