URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 1010 |
Rev 1765 |
.data
|
.data
|
ds:
|
ds:
|
.word 0
|
.word 0
|
es:
|
es:
|
.word 0
|
.word 0
|
fs:
|
fs:
|
.word 0
|
.word 0
|
gs:
|
gs:
|
.word 0
|
.word 0
|
|
|
.globl int86
|
.globl int86
|
int86:
|
int86:
|
.byte 0x2e
|
.byte 0x2e
|
push ds
|
push ds
|
pop %ds
|
pop %ds
|
.byte 0x2e
|
.byte 0x2e
|
push es
|
push es
|
pop %es
|
pop %es
|
.byte 0x2e
|
.byte 0x2e
|
push fs
|
push fs
|
pop %fs
|
pop %fs
|
.byte 0x2e
|
.byte 0x2e
|
push gs
|
push gs
|
pop %gs
|
pop %gs
|
|
|
.byte 0xcd
|
.byte 0xcd
|
int86_vec:
|
int86_vec:
|
.byte 0x03
|
.byte 0x03
|
ret
|
ret
|
|
|
.text
|
.text
|
.globl _int86x
|
.globl _int86x
|
_int86x:
|
_int86x:
|
movl 16(%esp), %eax
|
movl 16(%esp), %eax
|
|
|
movw 2(%eax), %cx
|
movw 2(%eax), %cx
|
movw %cx, ds
|
movw %cx, ds
|
movw 4(%eax), %cx
|
movw 4(%eax), %cx
|
movw %cx, es
|
movw %cx, es
|
movw 6(%eax), %cx
|
movw 6(%eax), %cx
|
movw %cx, fs
|
movw %cx, fs
|
movw 8(%eax), %cx
|
movw 8(%eax), %cx
|
movw %cx, gs
|
movw %cx, gs
|
|
|
jmp int86_common
|
jmp int86_common
|
|
|
.globl _int86
|
.globl _int86
|
_int86:
|
_int86:
|
movw %ds, %ax
|
movw %ds, %ax
|
movw %ax, ds
|
movw %ax, ds
|
movw %ax, es
|
movw %ax, es
|
movw %ax, fs
|
movw %ax, fs
|
movw %ax, gs
|
movw %ax, gs
|
jmp int86_common
|
jmp int86_common
|
|
|
int86_common:
|
int86_common:
|
pushl %ebp
|
pushl %ebp
|
movl %esp,%ebp
|
movl %esp,%ebp
|
pushl %ebx
|
pushl %ebx
|
pushl %esi
|
pushl %esi
|
pushl %edi
|
pushl %edi
|
pushf
|
pushf
|
|
|
movl 8(%ebp),%eax
|
movl 8(%ebp),%eax
|
movb %al,int86_vec
|
movb %al,int86_vec
|
|
|
movl 12(%ebp),%eax
|
movl 12(%ebp),%eax
|
movl 4(%eax),%ebx
|
movl 4(%eax),%ebx
|
movl 8(%eax),%ecx
|
movl 8(%eax),%ecx
|
movl 12(%eax),%edx
|
movl 12(%eax),%edx
|
movl 16(%eax),%esi
|
movl 16(%eax),%esi
|
movl 20(%eax),%edi
|
movl 20(%eax),%edi
|
movl (%eax),%eax
|
movl (%eax),%eax
|
|
|
push %ds
|
push %ds
|
push %es
|
push %es
|
call int86
|
call int86
|
pop %es
|
pop %es
|
pop %ds
|
pop %ds
|
|
|
pushf
|
pushf
|
pushl %eax
|
pushl %eax
|
movl %esp,%ebp
|
movl %esp,%ebp
|
addl $24,%ebp
|
addl $24,%ebp
|
movl 16(%ebp),%eax
|
movl 16(%ebp),%eax
|
popl (%eax)
|
popl (%eax)
|
movl %ebx,4(%eax)
|
movl %ebx,4(%eax)
|
movl %ecx,8(%eax)
|
movl %ecx,8(%eax)
|
movl %edx,12(%eax)
|
movl %edx,12(%eax)
|
movl %esi,16(%eax)
|
movl %esi,16(%eax)
|
movl %edi,20(%eax)
|
movl %edi,20(%eax)
|
popl %ebx /* flags */
|
popl %ebx /* flags */
|
movl %ebx,28(%eax)
|
movl %ebx,28(%eax)
|
andl $1,%ebx
|
andl $1,%ebx
|
movl %ebx,24(%eax)
|
movl %ebx,24(%eax)
|
movl (%eax),%eax
|
movl (%eax),%eax
|
|
|
popf
|
popf
|
popl %edi
|
popl %edi
|
popl %esi
|
popl %esi
|
popl %ebx
|
popl %ebx
|
popl %ebp
|
popl %ebp
|
ret
|
ret
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.