|
|
| version 1.2, 2004/08/02 11:48:14 | version 1.5, 2004/08/11 12:08:17 |
|---|---|
| Line 9 section .text | Line 9 section .text |
| global @z80x_interrupt2@4 | global @z80x_interrupt2@4 |
| global _z80x_nonmaskedinterrupt | global _z80x_nonmaskedinterrupt |
| global _z80x_execute | global _z80x_execute |
| global _z80x_step | |
| extern _z80core | extern _z80core |
| extern _z80dmap | |
| extern memfetch | extern memfetch |
| extern memrd16_ecx_ax | extern memrd16_ecx_ax |
| extern memwr16_ecx_dx | extern memwr16_ecx_dx |
| extern _cycles_main | extern _cycles_main |
| extern opcode_main | extern opcode_main |
| Line 29 _z80x_ableinterrupt: | Line 30 _z80x_ableinterrupt: |
| align 16 | align 16 |
| @z80x_interrupt@4: | @z80x_interrupt@4: |
| mov edx, _z80core | mov edx, _z80core |
| btr word [edx + R_Z80IFF], IFF_HALT | btr dword [edx + R_Z80IFF], IFF_HALT |
| jnc short .haltclr | jnc short .haltclr |
| inc word [edx + R_Z80PC] | inc word [edx + R_Z80PC] |
| .haltclr: or byte [edx + R_Z80IFF], ((1 << IFF_IRQ) | (1 << IFF_IFLAG)) | .haltclr: or byte [edx + R_Z80IFF], ((1 << IFF_IRQ) | (1 << IFF_IFLAG)) |
| Line 58 int_im1: Z80WORK byte 11 | Line 59 int_im1: Z80WORK byte 11 |
| align 16 | align 16 |
| @z80x_interrupt2@4: | @z80x_interrupt2@4: |
| mov edx, _z80core | mov edx, _z80core |
| btr word [edx + R_Z80IFF], IFF_HALT | btr dword [edx + R_Z80IFF], IFF_HALT |
| jnc short .haltclr | jnc short .haltclr |
| inc word [edx + R_Z80PC] | inc word [edx + R_Z80PC] |
| .haltclr: or byte [edx + R_Z80IFF], (1 << IFF_IFLAG) | .haltclr: or byte [edx + R_Z80IFF], (1 << IFF_IFLAG) |
| Line 77 int_im0: cmp cl, 0ddh | Line 78 int_im0: cmp cl, 0ddh |
| movzx eax, cl | movzx eax, cl |
| mov edi, edx | mov edi, edx |
| movzx edx, byte [_cycles_main + eax] | movzx edx, byte [_cycles_main + eax] |
| Z80WORK dx | Z80WORK edx |
| call dword [opcode_main + eax*4] | call dword [opcode_main + eax*4] |
| pop edi | pop edi |
| pop ebx | pop ebx |
| Line 99 _z80x_nonmaskedinterrupt: | Line 100 _z80x_nonmaskedinterrupt: |
| jmp memwr16_ecx_dx | jmp memwr16_ecx_dx |
| .cantnmi: ret | .cantnmi: ret |
| align 16 | |
| _z80x_execute push ebx | |
| push edi | |
| mov edi, _z80core | |
| .lp: inc byte [edi + R_Z80R] | |
| movzx ecx, word [edi + R_Z80PC] | |
| inc word [edi + R_Z80PC] | |
| call memfetch | |
| movzx edx, byte [_cycles_main + eax] | |
| Z80WORK edx | |
| call dword [opcode_main + eax*4] | |
| call _z80dmap | |
| mov eax, [edi + z80core_t.remainclock] | |
| cmp eax, byte 0 | |
| jg short .lp | |
| pop edi | |
| pop ebx | |
| ret | |
| align 16 | align 16 |
| _z80x_execute: push ebx | _z80x_step: push ebx |
| push edi | push edi |
| mov edi, _z80core | mov edi, _z80core |
| inc byte [edi + R_Z80R] | inc byte [edi + R_Z80R] |
| Line 109 _z80x_execute: push ebx | Line 128 _z80x_execute: push ebx |
| inc word [edi + R_Z80PC] | inc word [edi + R_Z80PC] |
| call memfetch | call memfetch |
| movzx edx, byte [_cycles_main + eax] | movzx edx, byte [_cycles_main + eax] |
| Z80WORK dx | Z80WORK edx |
| call dword [opcode_main + eax*4] | call dword [opcode_main + eax*4] |
| %if 0 | %if 0 |
| inc byte [edi + R_Z80R] | inc byte [edi + R_Z80R] |
| Line 117 _z80x_execute: push ebx | Line 136 _z80x_execute: push ebx |
| inc word [edi + R_Z80PC] | inc word [edi + R_Z80PC] |
| call memfetch | call memfetch |
| movzx edx, byte [_cycles_main + eax] | movzx edx, byte [_cycles_main + eax] |
| Z80WORK dx | Z80WORK edx |
| call dword [opcode_main + eax*4] | call dword [opcode_main + eax*4] |
| %endif | %endif |
| pop edi | pop edi |
| pop ebx | pop ebx |
| ret | jmp _z80dmap |
| ends | ends |