FPC compiles pusha/popa as a pushaw/popaw. Is it doing right? lazarus / 62-General ---------------------------------------------------------------------- Avinash · 2021-06-05 11:11 I would expect PUSHAD/POPAD from 32-bit compiler. ---------------------------------------------------------------------- marcov · 2021-06-05 12:34 They have the same opcode, so the meaning is probably set by the mode ?  That might be the disassembler at fault. (or whatever the backend assembler accepts, in the case of -a) ---------------------------------------------------------------------- Avinash · 2021-06-05 13:51 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$mode objfpc}{$asmmode intel}var L: LongInt;begin  asm    xor  eax,eax    //pusha    dec  eax    //popa    mov  L, eax  end;   WriteLn(HexStr(L, 8));end. FFFFFFFF Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$mode objfpc}{$asmmode intel}var L: LongInt;begin  asm    xor  eax,eax    pusha    dec  eax    popa    mov  L, eax  end;   WriteLn(HexStr(L, 8));end. FFFF0000 ---------------------------------------------------------------------- PascalDragon · 2021-06-05 14:56 Yes, this is by design. See this comment from the compiler's source: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i           { pushf/popf/pusha/popa have to default to 16 bit in Intel mode        (Intel manual and Delphi-compatbile) -- setting the opsize for        these instructions doesn't change anything in the internal assember,          so change the opcode }