hello Exophase
yes i want to write a program to do it automatically for example when i dissasemble a game i will have it's assembly code i want to translate it c++ for example
If you just want a one to one conversion you can change each instruction to something similar for C++ or some other different semantic representation than the "standard" ASM mnemonics for chip-8. Since you just want it to annotate disassembly it doesn't have to work as code per-se, that's a much harder (and probably generally unsolvable) problem. It also doesn't have to really fit C++ code exactly for every instruction. But unless chip-8 assembly is confusing to you for some reason this isn't going to add anything.
You'd have to decode the instruction just like you do in the emulation, then print a string using the instruction parameters... honestly this is such a simple concept that it's hard to really know how much more to explain.
But what you're probably asking for is a way to convert several instructions into higher level C++ representations. This is called "decompilation", although in this case it'd be applied to code that was never high level to begin with. This is a very open ended problem that is difficult to even do small amounts of. If you try to do this you'll probably be in way over your head.. and if you don't realize why this is too difficult a task to work on right now then you're probably even worse off..