If you compile, link and run something like this:
global _start
section .text
_start:
jmp message
proc:
...
message:
call proc
msg db " y0u sp34k 1337 ? "
section .data
Yes, they are translated to addresses. There are different jmp
instructions for relative or absolute jumps or far or near jumps. The assembler will choose one of them (e.g., the shortest one) and translate the mnemonic (jmp
) to the corresponding machine code.
They have relative addresses. The assembler produces an object file, which contains relocatable code and data. It can be combined with other object files by a linker to finally yield an executable. The executable in the end has absolute addresses1.
No. Every process has its own virtual address space, so each process's very first address is 0x00
. The addresses used in an executable are virtual too, so they map to arbitrary physical addresses.
Besides, it's obviously required that the PCs have
1 Technically, that's not true. The image may be relocated at load time.