Post History
x86-32 assembly, 14 bytes Straightforward solution with custom calling convention: inputs in eax and ebx, output in eax. cmp opcode could be smaller if limited to 8-bit integers? 00000000 <add...
Answer
#1: Initial revision
# x86-32 assembly, 14 bytes Straightforward solution with custom calling convention: inputs in eax and ebx, output in eax. `cmp` opcode could be smaller if limited to 8-bit integers? ``` 00000000 <add225>: 0: 83 f8 02 cmp eax,0x2 3: 75 06 jne b <add> 5: 83 fb 02 cmp ebx,0x2 8: 75 01 jne b <add> a: 40 inc eax 0000000b <add>: b: 01 d8 add eax,ebx d: c3 ret ```