Question 1: Where the byte code is moved exactly? To the Heap, Stack or another region of the RAM?
The exact location generally depends on:
- the OS
- the amount of memory installed
- the program
- the history of memory allocation
It's rare for programs to run inside of other programs or to share stack and heap with one another and they usually have their own.
DOS simply finds a free block of memory, where the program can fit and loads it there, potentially slicing the block in two. AFAIR, there is a way to prefer lower or higher addresses, but that's pretty much it. Resident programs and drivers will obviously affect the location.
Question 2: How can the value be moved into eax? Does a mov-opcode exists for that?
This must have been a separate question. Yes, there is an instruction for mov eax, 5
on i80386+ CPUs.