ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
November 2013
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
16 participants
348 discussions
Start a n
N
ew thread
[aandrejevic] 60939: [FAST486] Fix Fast486GetCurrentPrivLevel.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Mon Nov 11 15:27:54 2013 New Revision: 60939 URL:
http://svn.reactos.org/svn/reactos?rev=60939&view=rev
Log: [FAST486] Fix Fast486GetCurrentPrivLevel. Modified: branches/ntvdm/lib/fast486/common.h Modified: branches/ntvdm/lib/fast486/common.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/common.h?rev=…
============================================================================== --- branches/ntvdm/lib/fast486/common.h [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/common.h [iso-8859-1] Mon Nov 11 15:27:54 2013 @@ -167,7 +167,16 @@ INT Fast486GetCurrentPrivLevel(PFAST486_STATE State) { - return GET_SEGMENT_RPL(State->SegmentRegs[FAST486_REG_CS].Selector); + if (State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE) + { + /* In protected mode, return the RPL of the CS */ + return GET_SEGMENT_RPL(State->SegmentRegs[FAST486_REG_CS].Selector); + } + else + { + /* Real mode is always in supervisor mode */ + return 0; + } } #include "common.inl"
11 years, 1 month
1
0
0
0
[aandrejevic] 60938: [NTVDM] Implement the miscellaneous BIOS system service (INT 15h) handler. Implement INT 15h, AH = 88h, "Get Extended Memory Size".
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Mon Nov 11 04:00:10 2013 New Revision: 60938 URL:
http://svn.reactos.org/svn/reactos?rev=60938&view=rev
Log: [NTVDM] Implement the miscellaneous BIOS system service (INT 15h) handler. Implement INT 15h, AH = 88h, "Get Extended Memory Size". Modified: branches/ntvdm/subsystems/ntvdm/bios.c branches/ntvdm/subsystems/ntvdm/bios.h Modified: branches/ntvdm/subsystems/ntvdm/bios.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/bios.c?r…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/bios.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/bios.c [iso-8859-1] Mon Nov 11 04:00:10 2013 @@ -481,6 +481,7 @@ RegisterInt32(BIOS_VIDEO_INTERRUPT , BiosVideoService ); RegisterInt32(BIOS_EQUIPMENT_INTERRUPT, BiosEquipmentService ); RegisterInt32(BIOS_MEMORY_SIZE , BiosGetMemorySize ); + RegisterInt32(BIOS_MISC_INTERRUPT , BiosMiscService ); RegisterInt32(BIOS_KBD_INTERRUPT , BiosKeyboardService ); RegisterInt32(BIOS_TIME_INTERRUPT , BiosTimeService ); RegisterInt32(BIOS_SYS_TIMER_INTERRUPT, BiosSystemTimerInterrupt); @@ -1174,6 +1175,30 @@ { /* Return the conventional memory size in kB, typically 640 kB */ setAX(Bda->MemorySize); +} + +VOID WINAPI BiosMiscService(LPWORD Stack) +{ + switch (getAH()) + { + /* Get Extended Memory Size */ + case 0x88: + { + /* Return the number of KB of RAM after 1 MB */ + setAX((MAX_ADDRESS - 0x100000) / 1024); + + /* Clear CF */ + Stack[STACK_FLAGS] &= ~EMULATOR_FLAG_CF; + + break; + } + + default: + { + DPRINT1("BIOS Function INT 15h, AH = 0x%02X NOT IMPLEMENTED\n", + getAH()); + } + } } VOID WINAPI BiosKeyboardService(LPWORD Stack) Modified: branches/ntvdm/subsystems/ntvdm/bios.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/bios.h?r…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/bios.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/bios.h [iso-8859-1] Mon Nov 11 04:00:10 2013 @@ -27,6 +27,7 @@ #define BIOS_VIDEO_INTERRUPT 0x10 #define BIOS_EQUIPMENT_INTERRUPT 0x11 #define BIOS_MEMORY_SIZE 0x12 +#define BIOS_MISC_INTERRUPT 0x15 #define BIOS_KBD_INTERRUPT 0x16 #define BIOS_TIME_INTERRUPT 0x1A #define BIOS_SYS_TIMER_INTERRUPT 0x1C @@ -171,6 +172,7 @@ VOID WINAPI BiosVideoService(LPWORD Stack); VOID WINAPI BiosEquipmentService(LPWORD Stack); VOID WINAPI BiosGetMemorySize(LPWORD Stack); +VOID WINAPI BiosMiscService(LPWORD Stack); VOID WINAPI BiosKeyboardService(LPWORD Stack); VOID WINAPI BiosTimeService(LPWORD Stack); VOID WINAPI BiosSystemTimerInterrupt(LPWORD Stack);
11 years, 1 month
1
0
0
0
[aandrejevic] 60937: [NTVDM] Give the virtual machine 16 MB of memory, for DOS extenders, protected mode programs, etc... EMS is still not implemented.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Mon Nov 11 03:45:39 2013 New Revision: 60937 URL:
http://svn.reactos.org/svn/reactos?rev=60937&view=rev
Log: [NTVDM] Give the virtual machine 16 MB of memory, for DOS extenders, protected mode programs, etc... EMS is still not implemented. Modified: branches/ntvdm/subsystems/ntvdm/ntvdm.h Modified: branches/ntvdm/subsystems/ntvdm/ntvdm.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/ntvdm.h?…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/ntvdm.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/ntvdm.h [iso-8859-1] Mon Nov 11 03:45:39 2013 @@ -25,7 +25,7 @@ #define TO_LINEAR(seg, off) (((seg) << 4) + (off)) #define MAX_SEGMENT 0xFFFF #define MAX_OFFSET 0xFFFF -#define MAX_ADDRESS TO_LINEAR(MAX_SEGMENT, MAX_OFFSET) +#define MAX_ADDRESS 0x1000000 // 16 MB of RAM #define FAR_POINTER(x) \ (PVOID)((ULONG_PTR)BaseAddress + TO_LINEAR(HIWORD(x), LOWORD(x)))
11 years, 1 month
1
0
0
0
[aandrejevic] 60936: [FAST486] Fix a bug in the LDS and LES instructions.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Mon Nov 11 03:16:07 2013 New Revision: 60936 URL:
http://svn.reactos.org/svn/reactos?rev=60936&view=rev
Log: [FAST486] Fix a bug in the LDS and LES instructions. Modified: branches/ntvdm/lib/fast486/opcodes.c Modified: branches/ntvdm/lib/fast486/opcodes.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/opcodes.c?rev…
============================================================================== --- branches/ntvdm/lib/fast486/opcodes.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/opcodes.c [iso-8859-1] Mon Nov 11 03:16:07 2013 @@ -4314,6 +4314,7 @@ OperandSize = AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; + TOGGLE_OPSIZE(OperandSize); TOGGLE_ADSIZE(AddressSize); /* Get the operands */
11 years, 1 month
1
0
0
0
[aandrejevic] 60935: [FAST486] Implement the LSS instruction. Fix a bug in LFS and LGS.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Mon Nov 11 03:14:18 2013 New Revision: 60935 URL:
http://svn.reactos.org/svn/reactos?rev=60935&view=rev
Log: [FAST486] Implement the LSS instruction. Fix a bug in LFS and LGS. Modified: branches/ntvdm/lib/fast486/extraops.c branches/ntvdm/lib/fast486/extraops.h Modified: branches/ntvdm/lib/fast486/extraops.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/extraops.c?re…
============================================================================== --- branches/ntvdm/lib/fast486/extraops.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/extraops.c [iso-8859-1] Mon Nov 11 03:14:18 2013 @@ -215,7 +215,7 @@ Fast486ExtOpcodeImul, Fast486ExtOpcodeCmpXchgByte, Fast486ExtOpcodeCmpXchg, - NULL, // TODO: OPCODE 0xB2 NOT IMPLEMENTED + Fast486ExtOpcodeLss, Fast486ExtOpcodeBtr, Fast486ExtOpcodeLfsLgs, Fast486ExtOpcodeLfsLgs, @@ -1102,6 +1102,74 @@ return TRUE; } +FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLss) +{ + UCHAR FarPointer[6]; + BOOLEAN OperandSize, AddressSize; + FAST486_MOD_REG_RM ModRegRm; + + /* Make sure this is the right instruction */ + ASSERT(Opcode == 0xB2); + + OperandSize = AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; + + TOGGLE_OPSIZE(OperandSize); + TOGGLE_ADSIZE(AddressSize); + + /* Get the operands */ + if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm)) + { + /* Exception occurred */ + return FALSE; + } + + if (!ModRegRm.Memory) + { + /* Invalid */ + Fast486Exception(State, FAST486_EXCEPTION_UD); + return FALSE; + } + + if (!Fast486ReadMemory(State, + (State->PrefixFlags & FAST486_PREFIX_SEG) + ? State->SegmentOverride : FAST486_REG_DS, + ModRegRm.MemoryAddress, + FALSE, + FarPointer, + OperandSize ? 6 : 4)) + { + /* Exception occurred */ + return FALSE; + } + + if (OperandSize) + { + ULONG Offset = *((PULONG)FarPointer); + USHORT Segment = *((PUSHORT)&FarPointer[sizeof(ULONG)]); + + /* Set the register to the offset */ + State->GeneralRegs[ModRegRm.Register].Long = Offset; + + /* Load the segment */ + return Fast486LoadSegment(State, + FAST486_REG_SS, + Segment); + } + else + { + USHORT Offset = *((PUSHORT)FarPointer); + USHORT Segment = *((PUSHORT)&FarPointer[sizeof(USHORT)]); + + /* Set the register to the offset */ + State->GeneralRegs[ModRegRm.Register].LowWord = Offset; + + /* Load the segment */ + return Fast486LoadSegment(State, + FAST486_REG_SS, + Segment); + } +} + FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBtr) { BOOLEAN OperandSize, AddressSize; @@ -1204,6 +1272,7 @@ OperandSize = AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; + TOGGLE_OPSIZE(OperandSize); TOGGLE_ADSIZE(AddressSize); /* Get the operands */ Modified: branches/ntvdm/lib/fast486/extraops.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/extraops.h?re…
============================================================================== --- branches/ntvdm/lib/fast486/extraops.h [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/extraops.h [iso-8859-1] Mon Nov 11 03:14:18 2013 @@ -42,6 +42,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeImul); FAST486_OPCODE_HANDLER(Fast486ExtOpcodeCmpXchgByte); FAST486_OPCODE_HANDLER(Fast486ExtOpcodeCmpXchg); +FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLss); FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBtr); FAST486_OPCODE_HANDLER(Fast486ExtOpcodeLfsLgs); FAST486_OPCODE_HANDLER(Fast486ExtOpcodeMovzxByte);
11 years, 1 month
1
0
0
0
[hbelusca] 60934: [NTVDM]: Fix CMOS file sharing access (so that we allow multiple ntvdm running with the same cmos data).
by hbelusca@svn.reactos.org
Author: hbelusca Date: Mon Nov 11 02:35:06 2013 New Revision: 60934 URL:
http://svn.reactos.org/svn/reactos?rev=60934&view=rev
Log: [NTVDM]: Fix CMOS file sharing access (so that we allow multiple ntvdm running with the same cmos data). Modified: branches/ntvdm/subsystems/ntvdm/cmos.c branches/ntvdm/subsystems/ntvdm/cmos.h Modified: branches/ntvdm/subsystems/ntvdm/cmos.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/cmos.c?r…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/cmos.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/cmos.c [iso-8859-1] Mon Nov 11 02:35:06 2013 @@ -366,11 +366,11 @@ /* Clear the CMOS memory */ ZeroMemory(&CmosMemory, sizeof(CmosMemory)); - /* Always open (and if needed, create) a RAM file with exclusive access */ + /* Always open (and if needed, create) a RAM file with shared access */ SetLastError(0); // For debugging purposes hCmosRam = CreateFileW(L"cmos.ram", GENERIC_READ | GENERIC_WRITE, - 0, + FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, Modified: branches/ntvdm/subsystems/ntvdm/cmos.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/cmos.h?r…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/cmos.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/cmos.h [iso-8859-1] Mon Nov 11 02:35:06 2013 @@ -77,6 +77,8 @@ * See the following documentation for more information: *
http://www.intel-assembler.it/portale/5/cmos-memory-map-123/cmos-memory-map…
*
http://wiki.osdev.org/CMOS
+ *
http://www.walshcomptech.com/ohlandl/config/cmos_registers.html
+ *
http://www.fysnet.net/cmosinfo.htm
*
http://www.bioscentral.com/misc/cmosmap.htm
*/ #pragma pack(push, 1)
11 years, 1 month
1
0
0
0
[aandrejevic] 60933: [NTVDM] To make debugging easier, put the interrupt handlers at offset 0x1000, and reserve 16 bytes for each. Also, move the common stub to offset 0x2000. That way the entry po...
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Mon Nov 11 02:27:29 2013 New Revision: 60933 URL:
http://svn.reactos.org/svn/reactos?rev=60933&view=rev
Log: [NTVDM] To make debugging easier, put the interrupt handlers at offset 0x1000, and reserve 16 bytes for each. Also, move the common stub to offset 0x2000. That way the entry point of, for example, INT 0x21 is at F000:1210. Modified: branches/ntvdm/subsystems/ntvdm/int32.c branches/ntvdm/subsystems/ntvdm/int32.h Modified: branches/ntvdm/subsystems/ntvdm/int32.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/int32.c?…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/int32.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/int32.c [iso-8859-1] Mon Nov 11 02:27:29 2013 @@ -131,11 +131,31 @@ LPDWORD IntVecTable = (LPDWORD)BaseAddress; LPBYTE BiosCode = (LPBYTE)SEG_OFF_TO_PTR(BiosSegment, 0); USHORT i; - WORD CommonStub, BopSeqOffset, Offset; + WORD BopSeqOffset, Offset = 0; - CommonStub = Offset = 0; + /* Generate ISR stubs and fill the IVT */ + for (i = 0x00; i <= 0xFF; i++) + { + Offset = INT_HANDLER_OFFSET + (i << 4); + IntVecTable[i] = MAKELONG(Offset, BiosSegment); + + BiosCode[Offset++] = 0xFA; // cli + + BiosCode[Offset++] = 0x6A; // push i + BiosCode[Offset++] = (UCHAR)i; + + BiosCode[Offset++] = 0x6A; // push 0 + BiosCode[Offset++] = 0x00; + + BopSeqOffset = COMMON_STUB_OFFSET - (Offset + 3); + + BiosCode[Offset++] = 0xE9; // jmp near BOP_SEQ + BiosCode[Offset++] = LOBYTE(BopSeqOffset); + BiosCode[Offset++] = HIBYTE(BopSeqOffset); + } /* Write the common stub code */ + Offset = COMMON_STUB_OFFSET; // BOP_SEQ: BiosCode[Offset++] = 0xF8; // clc @@ -162,26 +182,6 @@ BiosCode[Offset++] = 0x04; BiosCode[Offset++] = 0xCF; // iret - - /* Generate ISR stubs and fill the IVT */ - for (i = 0x00; i <= 0xFF; i++) - { - IntVecTable[i] = MAKELONG(Offset, BiosSegment); - - BiosCode[Offset++] = 0xFA; // cli - - BiosCode[Offset++] = 0x6A; // push i - BiosCode[Offset++] = (UCHAR)i; - - BiosCode[Offset++] = 0x6A; // push 0 - BiosCode[Offset++] = 0x00; - - BopSeqOffset = CommonStub - (Offset + 3); - - BiosCode[Offset++] = 0xE9; // jmp near BOP_SEQ - BiosCode[Offset++] = LOBYTE(BopSeqOffset); - BiosCode[Offset++] = HIBYTE(BopSeqOffset); - } } VOID WINAPI RegisterInt32(BYTE IntNumber, EMULATOR_INT32_PROC IntHandler) Modified: branches/ntvdm/subsystems/ntvdm/int32.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/int32.h?…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/int32.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/int32.h [iso-8859-1] Mon Nov 11 02:27:29 2013 @@ -18,6 +18,9 @@ /* 32-bit Interrupt Identifiers */ #define EMULATOR_MAX_INT32_NUM 0xFF + 1 +#define INT_HANDLER_OFFSET 0x1000 +#define COMMON_STUB_OFFSET 0x2000 + /* FUNCTIONS ******************************************************************/ typedef VOID (WINAPI *EMULATOR_INT32_PROC)(LPWORD Stack);
11 years, 1 month
1
0
0
0
[aandrejevic] 60932: [FAST486] We don't support in-circuit emulation opcodes such as USERMOV. The 486 does not have the JMPE or POPCNT instructions.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Mon Nov 11 01:14:24 2013 New Revision: 60932 URL:
http://svn.reactos.org/svn/reactos?rev=60932&view=rev
Log: [FAST486] We don't support in-circuit emulation opcodes such as USERMOV. The 486 does not have the JMPE or POPCNT instructions. Modified: branches/ntvdm/lib/fast486/extraops.c Modified: branches/ntvdm/lib/fast486/extraops.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/extraops.c?re…
============================================================================== --- branches/ntvdm/lib/fast486/extraops.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/extraops.c [iso-8859-1] Mon Nov 11 01:14:24 2013 @@ -53,10 +53,10 @@ NULL, // Invalid NULL, // Invalid NULL, // Invalid - NULL, // TODO: OPCODE 0x10 NOT IMPLEMENTED - NULL, // TODO: OPCODE 0x11 NOT IMPLEMENTED - NULL, // TODO: OPCODE 0x12 NOT IMPLEMENTED - NULL, // TODO: OPCODE 0x13 NOT IMPLEMENTED + NULL, // Invalid + NULL, // Invalid + NULL, // Invalid + NULL, // Invalid NULL, // Invalid NULL, // Invalid NULL, // Invalid @@ -221,7 +221,7 @@ Fast486ExtOpcodeLfsLgs, Fast486ExtOpcodeMovzxByte, Fast486ExtOpcodeMovzxWord, - NULL, // TODO: OPCODE 0xB8 NOT IMPLEMENTED + NULL, // Invalid Fast486OpcodeGroup0FB9, Fast486OpcodeGroup0FBA, Fast486ExtOpcodeBtc,
11 years, 1 month
1
0
0
0
[hbelusca] 60931: [FAST486]: Remove an extra "return TRUE; "
by hbelusca@svn.reactos.org
Author: hbelusca Date: Mon Nov 11 01:02:48 2013 New Revision: 60931 URL:
http://svn.reactos.org/svn/reactos?rev=60931&view=rev
Log: [FAST486]: Remove an extra "return TRUE;" Modified: branches/ntvdm/lib/fast486/opgroups.c Modified: branches/ntvdm/lib/fast486/opgroups.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/opgroups.c?re…
============================================================================== --- branches/ntvdm/lib/fast486/opgroups.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/opgroups.c [iso-8859-1] Mon Nov 11 01:02:48 2013 @@ -2004,9 +2004,6 @@ /* Return success */ return TRUE; - - return TRUE; } /* EOF */ -
11 years, 1 month
1
0
0
0
[aandrejevic] 60930: [FAST486] Implement SHLD and SHRD.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Mon Nov 11 00:57:59 2013 New Revision: 60930 URL:
http://svn.reactos.org/svn/reactos?rev=60930&view=rev
Log: [FAST486] Implement SHLD and SHRD. Modified: branches/ntvdm/lib/fast486/extraops.c branches/ntvdm/lib/fast486/extraops.h Modified: branches/ntvdm/lib/fast486/extraops.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/extraops.c?re…
============================================================================== --- branches/ntvdm/lib/fast486/extraops.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/extraops.c [iso-8859-1] Mon Nov 11 00:57:59 2013 @@ -201,16 +201,16 @@ Fast486ExtOpcodePopFs, NULL, // Invalid Fast486ExtOpcodeBitTest, - NULL, // TODO: OPCODE 0xA4 NOT IMPLEMENTED - NULL, // TODO: OPCODE 0xA5 NOT IMPLEMENTED + Fast486ExtOpcodeShld, + Fast486ExtOpcodeShld, NULL, // Invalid NULL, // Invalid Fast486ExtOpcodePushGs, Fast486ExtOpcodePopGs, NULL, // Invalid Fast486ExtOpcodeBts, - NULL, // TODO: OPCODE 0xAC NOT IMPLEMENTED - NULL, // TODO: OPCODE 0xAD NOT IMPLEMENTED + Fast486ExtOpcodeShrd, + Fast486ExtOpcodeShrd, NULL, // TODO: OPCODE 0xAE NOT IMPLEMENTED Fast486ExtOpcodeImul, Fast486ExtOpcodeCmpXchgByte, @@ -601,6 +601,98 @@ return TRUE; } +FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShld) +{ + BOOLEAN OperandSize, AddressSize; + FAST486_MOD_REG_RM ModRegRm; + UCHAR Count; + + OperandSize = AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; + TOGGLE_OPSIZE(OperandSize); + TOGGLE_ADSIZE(AddressSize); + + /* Make sure this is the right instruction */ + ASSERT((Opcode & 0xFE) == 0xA4); + + /* Get the operands */ + if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm)) + { + /* Exception occurred */ + return FALSE; + } + + if (Opcode == 0xA4) + { + /* Fetch the count */ + if (!Fast486FetchByte(State, &Count)) + { + /* Exception occurred */ + return FALSE; + } + } + else + { + /* The count is in CL */ + Count = State->GeneralRegs[FAST486_REG_ECX].LowByte; + } + + /* Normalize the count */ + if (OperandSize) Count &= 0x1F; + else Count &= 0x0F; + + /* Do nothing if the count is zero */ + if (Count == 0) return TRUE; + + if (OperandSize) + { + ULONG Source, Destination, Result; + + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Source, &Destination)) + { + /* Exception occurred */ + return FALSE; + } + + /* Calculate the result */ + Result = (Destination << Count) | (Source >> (32 - Count)); + + /* Update flags */ + State->Flags.Cf = (Destination >> (32 - Count)) & 1; + if (Count == 1) State->Flags.Of = (Result & SIGN_FLAG_LONG) + != (Destination & SIGN_FLAG_LONG); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_LONG) != 0); + State->Flags.Pf = Fast486CalculateParity(Result); + + /* Write back the result */ + return Fast486WriteModrmDwordOperands(State, &ModRegRm, FALSE, Result); + } + else + { + USHORT Source, Destination, Result; + + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Source, &Destination)) + { + /* Exception occurred */ + return FALSE; + } + + /* Calculate the result */ + Result = (Destination << Count) | (Source >> (16 - Count)); + + /* Update flags */ + State->Flags.Cf = (Destination >> (16 - Count)) & 1; + if (Count == 1) State->Flags.Of = (Result & SIGN_FLAG_WORD) + != (Destination & SIGN_FLAG_WORD); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_WORD) != 0); + State->Flags.Pf = Fast486CalculateParity(Result); + + /* Write back the result */ + return Fast486WriteModrmWordOperands(State, &ModRegRm, FALSE, Result); + } +} + FAST486_OPCODE_HANDLER(Fast486ExtOpcodePushGs) { /* Call the internal API */ @@ -710,6 +802,98 @@ /* Return success */ return TRUE; +} + +FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShrd) +{ + BOOLEAN OperandSize, AddressSize; + FAST486_MOD_REG_RM ModRegRm; + UCHAR Count; + + OperandSize = AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; + TOGGLE_OPSIZE(OperandSize); + TOGGLE_ADSIZE(AddressSize); + + /* Make sure this is the right instruction */ + ASSERT((Opcode & 0xFE) == 0xAC); + + /* Get the operands */ + if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm)) + { + /* Exception occurred */ + return FALSE; + } + + if (Opcode == 0xAC) + { + /* Fetch the count */ + if (!Fast486FetchByte(State, &Count)) + { + /* Exception occurred */ + return FALSE; + } + } + else + { + /* The count is in CL */ + Count = State->GeneralRegs[FAST486_REG_ECX].LowByte; + } + + /* Normalize the count */ + if (OperandSize) Count &= 0x1F; + else Count &= 0x0F; + + /* Do nothing if the count is zero */ + if (Count == 0) return TRUE; + + if (OperandSize) + { + ULONG Source, Destination, Result; + + if (!Fast486ReadModrmDwordOperands(State, &ModRegRm, &Source, &Destination)) + { + /* Exception occurred */ + return FALSE; + } + + /* Calculate the result */ + Result = (Destination >> Count) | (Source << (32 - Count)); + + /* Update flags */ + State->Flags.Cf = (Destination >> (Count - 1)) & 1; + if (Count == 1) State->Flags.Of = (Result & SIGN_FLAG_LONG) + != (Destination & SIGN_FLAG_LONG); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_LONG) != 0); + State->Flags.Pf = Fast486CalculateParity(Result); + + /* Write back the result */ + return Fast486WriteModrmDwordOperands(State, &ModRegRm, FALSE, Result); + } + else + { + USHORT Source, Destination, Result; + + if (!Fast486ReadModrmWordOperands(State, &ModRegRm, &Source, &Destination)) + { + /* Exception occurred */ + return FALSE; + } + + /* Calculate the result */ + Result = (Destination >> Count) | (Source << (16 - Count)); + + /* Update flags */ + State->Flags.Cf = (Result >> (Count - 1)) & 1; + if (Count == 1) State->Flags.Of = (Result & SIGN_FLAG_WORD) + != (Destination & SIGN_FLAG_WORD); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_WORD) != 0); + State->Flags.Pf = Fast486CalculateParity(Result); + + /* Write back the result */ + return Fast486WriteModrmWordOperands(State, &ModRegRm, FALSE, Result); + } } FAST486_OPCODE_HANDLER(Fast486ExtOpcodeImul) Modified: branches/ntvdm/lib/fast486/extraops.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/extraops.h?re…
============================================================================== --- branches/ntvdm/lib/fast486/extraops.h [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/extraops.h [iso-8859-1] Mon Nov 11 00:57:59 2013 @@ -34,9 +34,11 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodePushFs); FAST486_OPCODE_HANDLER(Fast486ExtOpcodePopFs); FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBitTest); +FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShld); FAST486_OPCODE_HANDLER(Fast486ExtOpcodePushGs); FAST486_OPCODE_HANDLER(Fast486ExtOpcodePopGs); FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBts); +FAST486_OPCODE_HANDLER(Fast486ExtOpcodeShrd); FAST486_OPCODE_HANDLER(Fast486ExtOpcodeImul); FAST486_OPCODE_HANDLER(Fast486ExtOpcodeCmpXchgByte); FAST486_OPCODE_HANDLER(Fast486ExtOpcodeCmpXchg);
11 years, 1 month
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
35
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Results per page:
10
25
50
100
200