source code sir
.x64
.code
public _start
_start:
mov al,byte ptr [rip+8]
mov ax,word ptr [rip+0]
mov eax,dword ptr [rip+0]
mov rax,qword ptr [rip+8]
end
command line:
hjwasm -10 -nologo -elf64 -Fo=quiz.o quiz.hjwasm
--edited-- Added other example, maybe can help a bit
.x64
.code
public _start
_start:
lea rbx, [rip] ; RBX now points to the next instruction
nop
cmp byte ptr [rbx], 90h ; Should be equal!
;0000000000000000 <_start>:
; 0: 67 48 8d 1d 00 00 00 lea rbx,[eip+0x0] # 8 <_start+0x8>
; 7: 00
; 8: 90 nop
; 9: 80 3b 90 cmp BYTE PTR [rbx],0x90
This is as source used and disassembled code
#command line: as -o quiz.o quiz.asm
.intel_syntax noprefix
.text
.global _start
_start:
lea rbx, [rip] # RBX now points to the next instruction
nop
cmp byte ptr [rbx], 0x90 # Should be equal!
#0000000000000000 <_start>:
# 0: 48 8d 1d 00 00 00 00 lea rbx,[rip+0x0] # 7 <_start+0x7>
# 7: 90 nop
# 8: 80 3b 90 cmp BYTE PTR [rbx],0x90