Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
36001fe6
Commit
36001fe6
authored
Jun 30, 2003
by
Jukka Heinonen
Committed by
Alexandre Julliard
Jun 30, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make timer IRQ handler regular builtin interrupt handler instead of
using an assembler stub.
parent
0643acd5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
33 deletions
+45
-33
dosexe.h
dlls/winedos/dosexe.h
+3
-0
interrupts.c
dlls/winedos/interrupts.c
+1
-1
module.c
dlls/winedos/module.c
+0
-32
timer.c
dlls/winedos/timer.c
+41
-0
No files found.
dlls/winedos/dosexe.h
View file @
36001fe6
...
...
@@ -264,6 +264,9 @@ void DOSVM_BuildCallFrame( CONTEXT86 *, DOSRELAY, LPVOID );
extern
void
SB_ioport_out
(
WORD
port
,
BYTE
val
);
extern
BYTE
SB_ioport_in
(
WORD
port
);
/* timer.c */
extern
void
WINAPI
DOSVM_Int08Handler
(
CONTEXT86
*
);
/* xms.c */
extern
void
WINAPI
XMS_Handler
(
CONTEXT86
*
);
...
...
dlls/winedos/interrupts.c
View file @
36001fe6
...
...
@@ -45,7 +45,7 @@ static const INTPROC DOSVM_VectorsBuiltin[] =
{
/* 00 */
0
,
0
,
0
,
0
,
/* 04 */
0
,
0
,
0
,
0
,
/* 08 */
0
,
DOSVM_Int09Handler
,
0
,
0
,
/* 08 */
DOSVM_Int08Handler
,
DOSVM_Int09Handler
,
0
,
0
,
/* 0C */
0
,
0
,
0
,
0
,
/* 10 */
DOSVM_Int10Handler
,
DOSVM_Int11Handler
,
DOSVM_Int12Handler
,
DOSVM_Int13Handler
,
/* 14 */
0
,
DOSVM_Int15Handler
,
DOSVM_Int16Handler
,
DOSVM_Int17Handler
,
...
...
dlls/winedos/module.c
View file @
36001fe6
...
...
@@ -152,37 +152,6 @@ static void MZ_FillPSP( LPVOID lpPSP, LPCSTR cmdtail, int length )
/* FIXME: more PSP stuff */
}
/* default INT 08 handler: increases timer tick counter but not much more */
static
char
int08
[]
=
{
0xCD
,
0x1C
,
/* int $0x1c */
0x50
,
/* pushw %ax */
0x1E
,
/* pushw %ds */
0xB8
,
0x40
,
0x00
,
/* movw $0x40,%ax */
0x8E
,
0xD8
,
/* movw %ax,%ds */
#if 0
0x83,0x06,0x6C,0x00,0x01, /* addw $1,(0x6c) */
0x83,0x16,0x6E,0x00,0x00, /* adcw $0,(0x6e) */
#else
0x66
,
0xFF
,
0x06
,
0x6C
,
0x00
,
/* incl (0x6c) */
#endif
0xB0
,
0x20
,
/* movb $0x20,%al */
0xE6
,
0x20
,
/* outb %al,$0x20 */
0x1F
,
/* popw %ax */
0x58
,
/* popw %ax */
0xCF
/* iret */
};
static
void
MZ_InitHandlers
(
void
)
{
WORD
seg
;
LPBYTE
start
=
DOSVM_AllocCodeUMB
(
sizeof
(
int08
),
&
seg
,
0
);
memcpy
(
start
,
int08
,
sizeof
(
int08
));
/* INT 08: point it at our tick-incrementing handler */
((
SEGPTR
*
)
0
)[
0x08
]
=
MAKESEGPTR
(
seg
,
0
);
/* INT 1C: just point it to IRET, we don't want to handle it ourselves */
((
SEGPTR
*
)
0
)[
0x1C
]
=
MAKESEGPTR
(
seg
,
sizeof
(
int08
)
-
1
);
}
static
WORD
MZ_InitEnvironment
(
LPCSTR
env
,
LPCSTR
name
)
{
unsigned
sz
=
0
;
...
...
@@ -213,7 +182,6 @@ static BOOL MZ_InitMemory(void)
DOSMEM_Init
(
TRUE
);
DOSDEV_InstallDOSDevices
();
MZ_InitHandlers
();
return
TRUE
;
}
...
...
dlls/winedos/timer.c
View file @
36001fe6
...
...
@@ -124,3 +124,44 @@ void WINAPI DOSVM_SetTimer( UINT ticks )
if
(
!
DOSVM_IsWin16
())
MZ_RunInThread
(
TIMER_DoSetTimer
,
ticks
);
}
/***********************************************************************
* DOSVM_Int08Handler
*
* DOS interrupt 08h handler (IRQ0 - TIMER).
*/
void
WINAPI
DOSVM_Int08Handler
(
CONTEXT86
*
context
)
{
BIOSDATA
*
bios_data
=
BIOS_DATA
;
CONTEXT86
nested_context
=
*
context
;
FARPROC16
int1c_proc
=
DOSVM_GetRMHandler
(
0x1c
);
nested_context
.
SegCs
=
SELECTOROF
(
int1c_proc
);
nested_context
.
Eip
=
OFFSETOF
(
int1c_proc
);
/*
* Update BIOS ticks since midnight.
*
* FIXME: What to do when number of ticks exceeds ticks per day?
*/
bios_data
->
Ticks
++
;
/*
* If IRQ is called from protected mode, convert
* context into VM86 context. Stack is invalidated so
* that DPMI_CallRMProc allocates a new stack.
*/
if
(
!
ISV86
(
&
nested_context
))
{
nested_context
.
EFlags
|=
V86_FLAG
;
nested_context
.
SegSs
=
0
;
}
/*
* Call interrupt 0x1c.
*/
DPMI_CallRMProc
(
&
nested_context
,
NULL
,
0
,
TRUE
);
DOSVM_AcknowledgeIRQ
(
context
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment