I rarely use assembly so I ended up getting this wrong somehow, would also like to just dump all registers into the 'dst' parameter, as for the reason I made this, had an idea to use executed instruction count for pseudo random numbers and the BIOS RTC will be my fallback option, I haven't found any instructions providing an instruction execution count as yet however so I welcome help in that regard too.
Code:
#include <inttypes.h>
#include <string.h>
typedef intmax_t asm_registers_t[0x10];
inline void bios(
asm_registers_t *dst,
unsigned char interrupt, unsigned char ah, unsigned char al )
{
(void)memset( dst, 0, sizeof(asm_registers_t) );
asm( "mov %ah,%1", ah );
asm( "mov %al,%1", al );
asm( "int %1", interrupt );
}