Hello. I am writing a program (laboratory work) in which an assembler insert is needed. I am not familiar with the assembler myself, so I could be mistaken with the wording.

In general, it is necessary for the assembler insertion to save a dump of the code segment to the hard disk.

On the Internet, I found a piece of a program that encrypts a code segment:

use32 ;ROR section mov ebx, ${start+pack_len-1} mov ecx, ${pack_len-1} ror_loop: mov al, byte [ebx] ror al, ${key_encode} mov byte [ebx], al cmp ecx, 0 jz stop_loop dec ebx dec ecx jmp ror_loop stop_loop: ;GO OEP push ${original_eop} ret 

The fact is that the assembler insertion, which I cited above, is used in the python program. Only, this insert encrypts the code segment, and I need it to save the code segment to the file. And since I have no experience at all in assembly language, I ask you to help.

Closed due to the fact that the essence of the question is incomprehensible to the participants insolor , torokhkun , cyadvert , zRrr , sercxjo 15 Nov '15 at 20:14 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • @Pinkibosh, According to the rules of the forum, questions should not be limited to solving or completing student assignments. Please clarify what you have done yourself and what did not work out. - ReinRaus
  • one
    @ReinRaus is a very interesting question. I just did not hear about translators with assembler inserts on FASM. - alexlz
  • @alexlz: What's the problem? Compile into the object file, connect at the linking stage, business. - VladD February
  • @VladD Apparently I am very behind the times. I always thought that the compiler, and not the linker, dealt with assembly inserts. - alexlz
  • @VladD wikipedia also lagged behind: Assembler insertion - alexlz

0