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
13 GLOBL apmjumpstruct+0(SB), $8
15 TEXT apmfarcall(SB), $0
17 * We call push and pop ourselves.
18 * As soon as we do the first push or pop,
19 * we can't use FP anymore.
23 MOVL BX, apmjumpstruct+0(SB)
24 MOVL CX, apmjumpstruct+4(SB)
26 /* load necessary registers from Ureg */
33 /* save registers, segments */
42 * paranoia: zero the segments, since it's the
43 * BIOS's responsibility to initialize them.
44 * (trick picked up from Linux driver).
61 CSOVERRIDE; BYTE $0xFF; BYTE $0x1D
62 LONG $apmjumpstruct+0(SB)
64 /* restore segments, registers */
75 /* store interesting registers back in Ureg */
84 ANDL $1, AX /* carry flag */