Asm
Db $50, $8 d, $80, $11, $44, $33, $00, $8 d, $80, $11, $44, $33, $00, $58
end;
This is to put a machine in the code, but now encountered a problem that is:
I need to put a period of assembly code, if converts into code, there may be thousands of bytes, c + + can be referenced by class, Delphi, please meet this kind of situation, how should I get?
Thank you!
CodePudding user response:
I'm afraid to write directly in the IDE is jammed, the Delphi and not very proficient in, only to ask teachersCodePudding user response:
Mainly is the assembly code into this one really don't know what to do, don't encapsulation dynamic library?CodePudding user response:
The teachers at??????CodePudding user response:
Write directly assembly instruction, such asAsm
Mov esi, eax
Mov edi, edx
.
end
CodePudding user response:
Do not know much about this part, but the original poster example just put the data, this is not a must in assembly of oh, whatever way should be the same effect, the key is how to obtain the starting address of the dataCodePudding user response:
Directly in the resources, the runtime is copied to the address, but I'm curious "inside the c + + can be referenced by class" is what the devil? To a chestnut ~ ~ ~CodePudding user response:
I probably understand, he means that byte too much input efficiency is too bad. Use tool to convert a with respect to OK, the file into a byte array of Delphi source codeCodePudding user response:
Modify the file format, can also as a kind of reference,With the masm32 compiled into a DLL, and then the normal calls,
Or
Fuck 996. Icu
CodePudding user response:
This kind of thing to say ah, did something similar,Write a binToPas tool can directly,
Any code or binary things into DB of asm instructions,
Of course, if several megabytes of data can be compiled, but had better not open the editor, will be very caton,
CodePudding user response:
Why does not directly define a INC file, the code organization into a byte array constants, use pointer to invoke the entrance is in:Const
MyASMData: array [0.. $3 FFFFFF] of BYTE=($XX, $XX... );
Unit program (XXX. Pas)
Implementation
{$INCLUDE MYASM. INC}
Var
AsmEntry00: Pointer=@ MyASMData; .
CodePudding user response:
Several methods can be upstairs, and put the assembler compiled into intermediate obj file, and then connect in DELPHICodePudding user response:
Tens of thousands of byte, or a single works,Are integrated together to compile a words, 10th floor method is good, the Include.