NASM: parser: instruction expected rep movs

后端 未结 3 1757
故里飘歌
故里飘歌 2021-01-22 04:33

I\'ve been turning an executable into some NASM shellcode (for windows if it\'s relevant) but i\'m encountering \"error: parser: instruction expected\" errors all over the place

3条回答
  •  粉色の甜心
    2021-01-22 05:25

    I would make sure to initialize ECX to string length for rep instruction, initialize EDI and ESI to destination and source string respectively, make sure direction flag is set accordingly then:

    label_0000641:
    lea    edi,[esp+0x164] ;initializing destination?                   
    label_0000648:
    rep movsd
    label_000064a:
    and    DWORD [esp+0x168],0x0    
    

提交回复
热议问题