#x86, (削除) 42 (削除ここまで) 40 bytes
x86, (削除) 42 (削除ここまで) 40 bytes
#x86, 256 bytes
x86, 256 bytes
#x86, (削除) 42 (削除ここまで) 40 bytes
#x86, 256 bytes
x86, (削除) 42 (削除ここまで) 40 bytes
x86, 256 bytes
.section .text
.globl main
main:
mov 0ドルxff, %eax
start:
push 20ドル # program length
pop %ecx # counter
mov $str, %edi # load string
loop:
scasb # cmpif edx,(al *edi== *(edi++))
jne loop1 # if (al == *(edi++))
mov 2,ドル %al # ret 2
end: ret
loop1:
loop loop # do while (--counter)
xor %eax, %eax # ret 0
jmp end
str: .byte 0x6a,0x14,0x59,0xbf,0xf4,0x83,0x04,0x08
.byte 0xae,0x75,0x03,0xb0,0x02,0xc3,0xe2,0xf8
.byte 0x31,0xc0,0xeb,0xf9
.section .text
.globl main
main:
mov 0ドルxff, %eax
start:
push 20ドル # program length
pop %ecx # counter
mov $str, %edi # load string
loop:
scasb # cmp edx, *edi
jne loop1 # if (al == *(edi++))
mov 2,ドル %al # ret 2
end: ret
loop1:
loop loop
xor %eax, %eax # ret 0
jmp end
str: .byte 0x6a,0x14,0x59,0xbf,0xf4,0x83,0x04,0x08
.byte 0xae,0x75,0x03,0xb0,0x02,0xc3,0xe2,0xf8
.byte 0x31,0xc0,0xeb,0xf9
.section .text
.globl main
main:
mov 0ドルxff, %eax
start:
push 20ドル # program length
pop %ecx # counter
mov $str, %edi # load string
loop:
scasb # if (al == *(edi++))
jne loop1
mov 2,ドル %al # ret 2
end: ret
loop1:
loop loop # do while (--counter)
xor %eax, %eax # ret 0
jmp end
str: .byte 0x6a,0x14,0x59,0xbf,0xf4,0x83,0x04,0x08
.byte 0xae,0x75,0x03,0xb0,0x02,0xc3,0xe2,0xf8
.byte 0x31,0xc0,0xeb,0xf9
Here I use the same strategy as others: Create a string copy of the program with unique bytes, then return 2 in al if the input al is in the string. If we allow ourselves to read code that is actually run, we get l4m2's solution .
Here I use the same strategy as others: Create a string copy of the program with unique bytes, then return 2 in al if the input al is in the string.
Here I use the same strategy as others: Create a string copy of the program with unique bytes, then return 2 in al if the input al is in the string. If we allow ourselves to read code that is actually run, we get l4m2's solution .