Ok kompilieren kann, so versuche ich, einige Code in der Montage zu montieren nasm -f elf final.asm
mit:Convert Anweisung in Assembler-Code LODs und stos so NASM
xor eax,eax
push eax
push dword(0x75792273)
push dword(0x70742027)
push dword(0x77777875)
push dword(0x20237678)
push dword(0x76727827)
push dword(0x27797175)
push dword(0x75711225)
push dword(0x72747676)
push dword(0x74231476)
push dword(0x70707470)
push dword(0x23247077)
push dword(0x78707822)
push dword(0x24711174)
push dword(0x22707373)
push dword(0x78717974)
push dword(0x75771777)
push dword(0x70777125)
push dword(0x73731472)
push dword(0x71277377)
push dword(0x79251822)
push dword(0x79707478)
push dword(0x78742779)
push dword(0x72727871)
push dword(0x71251475)
push dword(0x27247772)
push dword(0x79757479)
push dword(0x70227071)
push dword(0x77737420)
push dword(0x70251970)
push dword(0x74747127)
push dword(0x23277677)
push dword(0x79712024)
push esp
pop esi
mov edi,esi
mov edx,edi
cld
mov ecx,0x80
mov ebx,0x41
xor eax,eax
push eax
lods byte[esi]
xor eax,ebx
stos byte[es:edi]
loop 0xb7
push esp
pop esi
int 0x3
die in den folgenden Fehler führt:
final.asm:44: error: parser: instruction expected
final.asm:46: error: parser: instruction expected
Ich fand die Antwort auf diese Fehler unter: NASM: parser: instruction expected rep movs
Grundsätzlich besagt dies, dass die lods und stos Anweisungen sind nein t von NASM erkannt. Was bedeutet, dass ich sie in etwas konvertieren muss, das NASM erkennt, so dass ich das gleiche Ergebnis bekomme.
Meine Frage ist, was kann ich diese beiden Zeilen ändern, damit NASM es kompilieren kann, damit ich es schließlich debuggen kann.
Wechsel einfach 'lodsb' und' stosb' (keine Operanden). – Jester
Wenn ich das ausführen, bekomme ich: test.asm: 44: Fehler: ungültige Kombination von Opcode und Operanden test.asm: 46: Fehler: ungültige Kombination von Opcode und Operanden – ChrisMan
lodsb byte [esi] stosbybyte [es: edi] – ChrisMan