Thanks!
Since now, I tested easy68k both in real Windows machines and virtualized Windows under VirtualBox (Ubuntu and Mac). All these configurations worked perfectly.
A few days ago, a colleague executed easy68k on Windows 8 64 bits and he did not found any problem.
Actually, the machines that give me problems are running a remote Windows 8 64 bit virtualized under VMWare. So, the problem may be caused by the remote desktop, the VMWare or some combination of them. I don't know the details of this particular configuration. Maybe a colleague will sign in the forums and ask more "precise" questions

On the other hand, the problem seems to appear when using the mouse interrupt. I have an example code that combines graphics and mouse and it fully hangs the computer as soon as the mouse motion is detected. I'm not attaching this code because I think it is too long for a forum post.
The following example, which is much shorter, is aimed at printing the mouse position at the top-left corner of the screen. Under Windows 7 and VirtualBoxed XP it works perfectly, but using the remote-VMWare-thing the mouse coordinates are delayed. For example, if I stop moving the mouse, the coordinates keep moving a few seconds until they stop.
So, is there something special about the simulated interrupt management? Some buffer that may produce an overflow maybe? Do the simulated interrupts access the real ones in the Windows machine and require some special privilege?
Code:
ORG $1000
START:
move.l #ISR_MOUSE_MOVE, ($64) ; Associate ISR to level 1 interrupt. This is crucial: first put
; the ISR in the exceptions vector, then enable mouse interrupt.
; Otherwise, an error may happen if mouse moves before the ISR
; has been defined.
move.w #$0104, D1 ; Interrupt 1 when mouse moves
move.b #60, D0
trap #15 ; Enable interrupt
.LOOP: bra .LOOP ; Just loop and do nothing. Mouse is interrupt-driven.
MOVE.B #9,D0
TRAP #15 ; halt simulator
************************************************************
* FUNCTIONS *
************************************************************
*-----------------------------------------------------------
PRINT_COORDINATES:
* Prints the specified values in the top-left of the screen
* as "X: 1234, Y: 1234". Each number is print to fill 4
* characters.
* Pre: D3.L: Number to show after the "X:"
* D4.L: Number to show after the "Y:"
* Post: Numbers shown
* Modifies: A1, D0, D1, D2.
*-----------------------------------------------------------
eor.w D1, D1
move.b #11, D0
trap #15 ; Put text cursor to 0,0
lea .STR_X, A1
move.b #14, D0
trap #15 ; Print "X: "
move.l D3, D1
move.b #4, D2
move.b #20, D0
trap #15 ; Print the first number
lea .STR_Y, A1
move.b #14, D0
trap #15 ; Print "Y: "
move.l D4, D1
move.b #4, D2
move.b #20, D0
trap #15 ; Print the second number
rts
; Static data specific to this function
.STR_X: dc.b 'X: ',0
.STR_Y: dc.b ', Y: ',0
; No need to perform memory alignment after this line because
; these specific strings use 10 bytes and memory is aligned
; after them. Otherwise, explicit alignment must be performed.
*-----------------------------------------------------------
************************************************************
* ISR *
************************************************************
*-----------------------------------------------------------
ISR_MOUSE_MOVE
* This ISR is called when a MOUSE MOVE event is produced.
* Pre: D3.L: Number to show after the "X:"
* D4.L: Number to show after the "Y:"
* Post: Numbers shown
* Modifies: A1, D0, D1, D2.
*-----------------------------------------------------------
eor.b D1, D1
move.b #61, D0
trap #15 ; Query mouse
move.l D1, D3
andi.l #$0000FFFF, D3 ; Put the X coordinate in D3.L
move.l D1, D4
swap D4
andi.l #$0000FFFF, D4 ; Put the Y coordinate in D4.L
bsr PRINT_COORDINATES
rte
*-----------------------------------------------------------
* Variables and Strings
END START ; last line of source
Thank you very much for your help!