OpenCores
URL https://opencores.org/ocsvn/zet86/zet86/trunk

Subversion Repositories zet86

[/] [zet86/] [tags/] [INITIAL/] [tests/] [i86/] [06_interrupt.s] - Blame information for rev 49

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 zeus
# Interrupt instruction testbench
2
#
3
# At the end (3737ns in rtl-model, 275.9us in spartan3),
4
#  %ax=0x1234, %bx=0x0ed7
5
#
6
# int   1, 2 (int 3)
7
# into  3
8
# iret  4
9
#
10
.code16
11
start:
12
movw $0, %dx
13
movw %dx, %ds
14
movw $0x1000, %sp
15
movw %sp, %ss
16
movw $0xebe0, (52)
17
movw $0xe342, (54)
18
 
19
movw $0x0eff, %ax
20
push %ax
21
popf
22
 
23
int $13                 # (1)
24
 
25
jmp *%ax
26
 
27
.org 0x0cd7
28
pushf
29
pop %bx
30
movw $0xebe0, (12)
31
movw $0xe342, (14)
32
 
33
int $3                  # (2)
34
 
35
movw $0x3001, (16)
36
movw $0xf000, (18)
37
 
38
into                    # (3) branch taken
39
hlt
40
 
41
.org 0x2000
42
pushf
43
pop %ax
44
clc
45
iret                    # (4)
46
 
47
.org 0x3001
48
pop %cx
49
movw $0x4002, %cx
50
push %cx
51
iret
52
 
53
.org 0x4002
54
movw $0x4ff, %dx
55
push %dx
56
popf
57
movw $0x5000, (16)
58
 
59
into                    # (3) branch not taken
60
movw $0x1234, %ax
61
hlt
62
 
63
.org 0x5000
64
hlt
65
 
66
.org 65520
67
jmp start
68
.org 65535
69
.byte 0xff

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.