Supposedly it would spit out 16bit executable code that can run on the 8086.
Am I correct in my assumption that with the proper build instructions I can get Zig to build me x86 16bit code that can run as BIOS Boot sector games run?
I’m not sure about it because any documentation I come across hints that the support if for i386 and that it can’t help to use 32bit pointers. Or that it expects that I’ll be running under UEFI and not the old BIOS.
zig uses LLVM so it supports everything LLVM supports which includes i386, zig’s custom x86 backend is only 64 bit atm, but it’s opt in so you don’t have to deal with that.
not sure what you mean regarding 32bit pointers
or what you mean regarding UEFI and BIOS
It’d be weird if you could. 16-bit x86 has never been a target of LLVM or GCC. The most you’ll get is the equivalent of the .code16gcc GNU AS directive, which essentially just tells the assembler to generate 16-bit machine code, but assume that the assembly code was originally intended for 32-bit output and to adjust assumptions accordingly (some minor adjustments to x86 opcode prefixes).
oops I didn’t read the post properly, I didn’t realise they were trying to build 16 bit code for 8086 via i386 16 bit mode. Regardless, I checked and LLVM doesn’t properly support i386 either.