Now I got the clone int 80h syscall to run.
I hope I have enough computation time to handle that second process, that does now this event.
The real clone syscall is far away from what could be expected:
INT 80h clone syscall: rax clone_120 ( rbx= process flags, rcx= *stack )
Code:
mov rax,120 ; clone syscall
mov rbx,0x100 ; process flag, CLONE_VM
mov rcx,top_stack ; allocated space with brk_45, -8 to be save
int 80h
cmp rax,0
jg .parent ; if greater, then PID, TID of the child is returned
je .child ; if equal, 0 for the child is returned
call error ; error procedure
jmp .end
.child:
...
.parent:
...
It acts like fork.
If you want to use the slower "syscall" funktion and not int 80h then you have to take the c++ parameter for clone and you have to use a complicated abi.