2023-05-18 02:52:11 Well honestly it might be better to do the BSD's as hosted by C, i.e. have a main() function that calls the interpreter and passes the arguments. Then we can actually rely on stable ABI and use (almost?) the same code for all of them 2023-05-18 02:52:26 And then have a separate assembly file with most of the code in it that just calls out to C functions 2023-05-18 02:52:48 With Linux at least we're using a stable, well-documented ABI 2023-05-18 02:53:54 But technically you could use this for Linux as well, I suppose, so then we just have one 'unix' AMD64 port, consisting of two files 2023-05-18 02:54:24 You could write all the assembly in the same file but that would be very ugly 2023-05-18 02:54:38 (in the C file) 2023-05-18 02:56:54 Most of the registers I've used for VM state are preserved by SysV (by design, I think it's just rax that isn't, to allow easier calling of external functions if that was ever wanted) 2023-05-18 02:58:15 So then it's just stuff like the parameters for the I/O functions that need fixing/preserving (as you did for freebsd) 2023-05-18 09:26:04 I'll work on this, but probably not until the weekend