2 * Far call, absolute indirect.
3 * The argument is the offset.
4 * We use a global structure for the jump params,
5 * so this is *not* reentrant or thread safe.
10 #define SSOVERRIDE BYTE $0x36
11 #define CSOVERRIDE BYTE $0x2E
12 #define RETF BYTE $0xCB
14 GLOBL apmjumpstruct+0(SB), $8
25 TEXT apmfarcall(SB), $0
27 * We call push and pop ourselves.
28 * As soon as we do the first push or pop,
29 * we can't use FP anymore.
33 MOVL BX, apmjumpstruct+0(SB)
34 MOVL CX, apmjumpstruct+4(SB)
36 /* load necessary registers from Ureg */
43 /* save registers, segments */
52 * paranoia: zero the segments, since it's the
53 * BIOS's responsibility to initialize them.
54 * (trick picked up from Linux driver).
74 CSOVERRIDE; BYTE $0xFF; BYTE $0x1D
75 LONG $apmjumpstruct+0(SB)
77 /* restore segments, registers */
88 /* store interesting registers back in Ureg */
97 ANDL $1, AX /* carry flag */