File: entry.S

package info (click to toggle)
faumachine 20100527-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 53,836 kB
  • ctags: 20,552
  • sloc: ansic: 179,550; asm: 3,645; makefile: 3,611; perl: 2,103; sh: 1,529; python: 600; xml: 563; lex: 210; vhdl: 204
file content (86 lines) | stat: -rw-r--r-- 1,131 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
 * $Id: entry.S,v 1.22 2009-01-08 09:47:34 vrsieh Exp $
 */

#include "compiler.h"

.code16

#ifndef CONFIG_80286_SUPPORT
_C_LABEL(irq10): .globl _C_LABEL(irq10)
	pushw %ds
	pushw %es
	pushw %di
	pushw %si
	pushw %bp
	pushl %edx
	pushw %cx
	pushw %bx
	pushl %eax

	movw %ss, %ax
	movw %ax, %ds
	movw %ax, %es

	movl %esp, %edx		/* Save old %esp. */
	pushl %edx

	andl $0x0000ffff, %esp	/* Use 16bit stack pointer within VGABIOS! */
	andl $0x0000ffff, %edx
	pushl %edx
	ex_lcall int10
	addl $4, %esp		/* pop "regs" */

	popl %edx		/* Restore old %esp. */
	movl %edx, %esp

	popl %eax
	popw %bx
	popw %cx
	popl %edx
	popw %bp
	popw %si
	popw %di
	popw %es
	popw %ds

	iretw
#else
	.globl _C_LABEL(irq10)
_C_LABEL(irq10):
	pushw %ds
	pushw %es
	pushw %di
	pushw %si
	pushw %bp
	pushw %dx
	pushw %cx
	pushw %bx
	pushw %ax

	movw %ss, %ax
	movw %ax, %ds
	movw %ax, %es

	movw %sp, %dx		/* Save old %sp. */
	pushw %ss

	pushw %dx
	ex_lcall int10
	popw %dx		/* Restore old %sp. */

	addw $2, %sp		/* pop "regs" */
	movw %dx, %sp

	popw %ax
	popw %bx
	popw %cx
	popw %dx
	popw %bp
	popw %si
	popw %di
	popw %es
	popw %ds

	iretw
#endif