Well I have no idea why they are preserving all of those registers manually, and also cannot see how this code would execute a software interrupt.
You can use the REGS union with the int86() family of functions. Those will automatically preserve the register values before the call and after, save for the explicit return registers like ax,bx,cx, and dx.
To execute an interrupt 10h
This will set the video mode to 13h or 320x200x256.
union REGS regs;
int86(0x10,& regs, & regs);
Now return values will be in the regs union. Some like to use inregs and outregs - two separate unions, but, personally, I find no use in doing that.
To execute an interrupt 67h
This will return the page frame segment of EMS in _BX, given that EMM386.EXE is there.
Now regs.x.bx will hold the page frame segment for EMS if _AH is 00. Just an example, more is needed to actually use EMS.
union REGS regs;
int86(0x67,& regs,& regs)
You can also do this:
I would not recommend this, though, as none of the register states are preserved before or after the interrupt. Even though _BX will hold the page frame segment (if _AH is 00h) if you do not assign _BX to your variable that will hold the segment, it is possible that _BX will not hold the value that you want.
unsigned int EMSsegment=_BX;
This may or may not work. Sometimes _BX will be used by other functions (a lot of times) and those functions will alter _BX. Since we are executing a printf prior to assigning _BX to our variable, it is possible that printf may have used _BX and thereby altered its contents. Most functions should preserve the registers that they use, however, I have had printf do this to me before when I was programming a mouse library way back when.
Best bet - use int86(), int86x(), etc., and the REGS union.
You can also execute interrupts via inline assembly, but I will not explain that here.
Also, if you are not programming in DOS, for instance, Visual C++, you cannot use interrupts. Windows does not allow software interrupts or direct interaction with hardware.