| version 1.5, 2003/12/08 00:55:31 | version 1.7, 2003/12/25 20:30:22 | 
| Line 3 | Line 3 | 
 | #include        "i286x.h" | #include        "i286x.h" | 
 | #include        "i286xadr.h" | #include        "i286xadr.h" | 
 | #include        "i286xcts.h" | #include        "i286xcts.h" | 
 | #include        "memory.h" |  | 
 | #include        "i286x.mcr" | #include        "i286x.mcr" | 
 | #include        "i286xea.mcr" | #include        "i286xea.mcr" | 
 |  |  | 
| Line 76  I286 _lgdt(void) { | Line 75  I286 _lgdt(void) { | 
 | mov             word ptr (i286core.s.GDTR+2), ax | mov             word ptr (i286core.s.GDTR+2), ax | 
 | add             bp, 2 | add             bp, 2 | 
 | lea             ecx, [edi + ebp] | lea             ecx, [edi + ebp] | 
| call    i286_memoryread_w | call    i286_memoryread | 
| mov             word ptr (i286core.s.GDTR+4), ax | mov             byte ptr (i286core.s.GDTR+4), al | 
 | ret | ret | 
 | align   4 | align   4 | 
 | register_eareg16: | register_eareg16: | 
| Line 102  I286 _lidt(void) { | Line 101  I286 _lidt(void) { | 
 | mov             word ptr (i286core.s.IDTR+2), ax | mov             word ptr (i286core.s.IDTR+2), ax | 
 | add             bp, 2 | add             bp, 2 | 
 | lea             ecx, [edi + ebp] | lea             ecx, [edi + ebp] | 
| call    i286_memoryread_w | call    i286_memoryread | 
| mov             word ptr (i286core.s.IDTR+4), ax | mov             byte ptr (i286core.s.IDTR+4), al | 
 | ret | ret | 
 | align   4 | align   4 | 
 | register_eareg16: | register_eareg16: | 
| Line 134  I286 _smsw(void) { | Line 133  I286 _smsw(void) { | 
 | I286 _lmsw(void) { | I286 _lmsw(void) { | 
 |  |  | 
 | __asm { | __asm { | 
 |  | and             word ptr i286core.s.MSW, 1 | 
 | PREPART_EA16(2) | PREPART_EA16(2) | 
 | mov             ax, word ptr I286_REG[eax*2] | mov             ax, word ptr I286_REG[eax*2] | 
 | and             ax, 0ch | and             ax, 0ch | 
| mov             i286core.s.MSW, ax | or              i286core.s.MSW, ax | 
 | GET_NEXTPRE2 | GET_NEXTPRE2 | 
 | ret | ret | 
 | MEMORY_EA16(3) | MEMORY_EA16(3) | 
 | mov             ax, word ptr I286_MEM[ecx] | mov             ax, word ptr I286_MEM[ecx] | 
 | and             ax, 0ch | and             ax, 0ch | 
| mov             i286core.s.MSW, ax | or              i286core.s.MSW, ax | 
 | ret | ret | 
 | EXTMEM_EA16 | EXTMEM_EA16 | 
 | and             ax, 0ch | and             ax, 0ch | 
| mov             i286core.s.MSW, ax | or              i286core.s.MSW, ax | 
 | ret | ret | 
 | } | } | 
 | } | } |