A Linux syscall is very much like a regular function call except the call instruction is replaced by a syscall instruction. You call need to specify the syscall number in a the rax register.
If you want to do that on a Raspberry Pi, you can look for the aarch64 ABI specs.
Code4Food2020-05-07 08:33:41
man mmap
Code4Food2020-05-07 08:44:00
This is handled by the virtual memory system. The first time you read a byte in the file, the whole page will be brought into memory. No need for allocating a buffer separately.