Fasm: Код (Text): InjectCode: call $+5 pop esi sub esi, $-InjectCode-1 push 0 lea eax, [esi+caption-InjectCode] push eax lea eax, [esi+text-InjectCode] push eax push 0 call [esi+p_MessageBox-InjectCode] retn 4 Masm: Код (Text): InjectCode: call $+5 pop esi sub esi, $-InjectCode-1 push 0 lea eax, [esi+(caption-InjectCode)] push eax lea eax, [esi+(text-InjectCode)] push eax push 0 call [esi+(p_MessageBox-InjectCode)] ;здесь компилятор выдает ошибку retn 4 Собственно как реализовать call [esi+p_MessageBox-InjectCode] в Masm, варианты типа: Код (Text): lea eax, [esi+(p_MessageBox-InjectCode)] call eax не предлагать
В случае масма, p_MessageBox в экзешнике может оказаться где угодно. Поэтому (p_MessageBox-InjectCode) получается релокабельным, в отличие от фасма, где все метки фиксированные.
Ошибка: error A2023: instruction operand must have size - по русскому же написано Решение нашел: Код (Text): call dword ptr [esi+(p_MessageBox-InjectCode)] В общем, тем можно закрыть, просто за морочился на работе. Всем спасибо.