]> git.proxmox.com Git - qemu.git/blame - tests/test-i386-vm86.S
user: Restore debug usage message for '-d ?' in user mode emulation
[qemu.git] / tests / test-i386-vm86.S
CommitLineData
3a27ad0b
FB
1 .code16
2 .globl vm86_code_start
3 .globl vm86_code_end
4
5#define GET_OFFSET(x) ((x) - vm86_code_start + 0x100)
6
7vm86_code_start:
8 movw $GET_OFFSET(hello_world), %dx
9 movb $0x09, %ah
10 int $0x21
11
12 /* prepare int 0x90 vector */
13 xorw %ax, %ax
14 movw %ax, %es
15 es movw $GET_OFFSET(int90_test), 0x90 * 4
16 es movw %cs, 0x90 * 4 + 2
3b46e624 17
3a27ad0b
FB
18 /* launch int 0x90 */
19
20 int $0x90
21
22 /* test IF support */
23 movw $GET_OFFSET(IF_msg), %dx
24 movb $0x09, %ah
25 int $0x21
26
5fafdf24 27 pushf
3a27ad0b
FB
28 popw %dx
29 movb $0xff, %ah
30 int $0x21
31
32 cli
5fafdf24 33 pushf
3a27ad0b
FB
34 popw %dx
35 movb $0xff, %ah
36 int $0x21
37
3b46e624 38 sti
5fafdf24 39 pushfl
3a27ad0b
FB
40 popl %edx
41 movb $0xff, %ah
42 int $0x21
3b46e624 43
3a27ad0b
FB
44#if 0
45 movw $GET_OFFSET(IF_msg1), %dx
46 movb $0x09, %ah
47 int $0x21
48
49 pushf
50 movw %sp, %bx
51 andw $~0x200, (%bx)
52 popf
53#else
54 cli
55#endif
56
5fafdf24 57 pushf
3a27ad0b
FB
58 popw %dx
59 movb $0xff, %ah
60 int $0x21
3b46e624 61
3a27ad0b
FB
62 pushfl
63 movw %sp, %bx
64 orw $0x200, (%bx)
65 popfl
66
67 pushfl
68 popl %edx
69 movb $0xff, %ah
70 int $0x21
71
72 movb $0x00, %ah
73 int $0x21
74
75int90_test:
5fafdf24 76 pushf
3a27ad0b
FB
77 pop %dx
78 movb $0xff, %ah
79 int $0x21
80
81 movw %sp, %bx
82 movw 4(%bx), %dx
83 movb $0xff, %ah
84 int $0x21
3b46e624 85
3a27ad0b
FB
86 movw $GET_OFFSET(int90_msg), %dx
87 movb $0x09, %ah
88 int $0x21
89 iret
3b46e624 90
3a27ad0b
FB
91int90_msg:
92 .string "INT90 started\n$"
5fafdf24 93
3a27ad0b
FB
94hello_world:
95 .string "Hello VM86 world\n$"
96
97IF_msg:
98 .string "VM86 IF test\n$"
99
100IF_msg1:
101 .string "If you see a diff here, your Linux kernel is buggy, please update to 2.4.20 kernel\n$"
102
103vm86_code_end: