I cannot find an answer for this on SO so far, so here I am asking. I'm wanting to find a macOS equivalent for the interrupt system call 10h; i.e. converting this:
mov ah, 2
mov bh, 1
mov dh, 12
mov dl, 40
int 10h
Into something that won't segfault on a NASM compiled macOS 64-bit program.
I've been scouring this document: https://opensource.apple.com/source/xnu/xnu-1504.3.12/bsd/kern/syscalls.master but sys call 17 isn't the same as the linux one apparently, and I'm not sure what to search for outside of this (very new to asm).
This is what I've got so far;
mov dh, 5 ;Cursor position line
mov dl, 0 ;Cursor position column
mov ah, 0x02 ;Set cursor position function
mov bh, 0 ;Page number
mov rax, 0x02000000
add rax, 0x10
mov rdi, 1
syscall ;Interrupt call
So I was wondering; just how can I make the cursor move to the desired coordinates on macOS asm?