diff --git a/reactos/lib/cportlib/cport.c b/reactos/lib/cportlib/cport.c index 75a4c03ce94..28d7738fec5 100644 --- a/reactos/lib/cportlib/cport.c +++ b/reactos/lib/cportlib/cport.c @@ -23,7 +23,7 @@ - Make this serial-port specific (NS16550 vs other serial port types) - Get x64 KDCOM, KDBG, FREELDR, and other current code to use this */ - + /* INCLUDES *******************************************************************/ #include @@ -76,18 +76,18 @@ CpDoesPortExist(IN PUCHAR Address) /* * See "Building Hardware and Firmware to Complement Microsoft Windows Headless Operation" * Out-of-Band Management Port Device Requirements: - * The device must act as a 16550 or 16450 UART. + * The device must act as a 16550 or 16450 UART. * Windows Server 2003 will test this device using the following process. * 1. Save off the current modem status register. * 2. Place the UART into diagnostic mode (The UART is placed into loopback mode * by writing SERIAL_MCR_LOOP to the modem control register). * 3. The modem status register is read and the high bits are checked. This means - * SERIAL_MSR_CTS, SERIAL_MSR_DSR, SERIAL_MSR_RI and SERIAL_MSR_DCD should + * SERIAL_MSR_CTS, SERIAL_MSR_DSR, SERIAL_MSR_RI and SERIAL_MSR_DCD should * all be clear. * 4. Place the UART in diagnostic mode and turn on OUTPUT (Loopback Mode and * OUTPUT are both turned on by writing (SERIAL_MCR_LOOP | SERIAL_MCR_OUT1) * to the modem control register). - * 5. The modem status register is read and the ring indicator is checked. + * 5. The modem status register is read and the ring indicator is checked. * This means SERIAL_MSR_RI should be set. * 6. Restore original modem status register. */ @@ -144,7 +144,7 @@ CpSetBaud(IN PCPPORT Port, WRITE_PORT_UCHAR(Port->Address + LINE_CONTROL_REGISTER, Lcr | SERIAL_LCR_DLAB); /* Set baud rate */ - Mode = 115200 / Rate; + Mode = (USHORT)(115200 / Rate); WRITE_PORT_UCHAR(Port->Address + DIVISOR_LATCH_MSB, (UCHAR)((Mode >> 8) & 0xff)); WRITE_PORT_UCHAR(Port->Address + DIVISOR_LATCH_LSB, (UCHAR)(Mode & 0xff)); @@ -168,7 +168,7 @@ CpGetByte(IN PCPPORT Port, /* Handle early read-before-init */ if (!Port->Address) return CP_GET_NODATA; - + /* If "wait" mode enabled, spin many times, otherwise attempt just once */ i = Wait ? 204800 : 1; while (i--) diff --git a/reactos/lib/sdk/crt/libcntpr.cmake b/reactos/lib/sdk/crt/libcntpr.cmake index 5723d993344..c3401721867 100644 --- a/reactos/lib/sdk/crt/libcntpr.cmake +++ b/reactos/lib/sdk/crt/libcntpr.cmake @@ -80,6 +80,7 @@ if(ARCH STREQUAL "i386") math/i386/allshl_asm.s math/i386/allshr_asm.s math/i386/atan_asm.s + math/i386/atan2_asm.s math/i386/aulldiv_asm.s math/i386/aulldvrm_asm.s math/i386/aullrem_asm.s diff --git a/reactos/win32ss/CMakeLists.txt b/reactos/win32ss/CMakeLists.txt index c889a3b7319..0cbe6b16ff4 100644 --- a/reactos/win32ss/CMakeLists.txt +++ b/reactos/win32ss/CMakeLists.txt @@ -194,12 +194,7 @@ list(APPEND SOURCE gdi/dib/i386/dib24bpp_hline.s gdi/dib/i386/dib32bpp_hline.s gdi/dib/i386/dib32bpp_colorfill.s - gdi/eng/i386/floatobj.S - user/ntuser/misc/i386/cos_asm.s - user/ntuser/misc/i386/sin_asm.s - user/ntuser/misc/i386/atan2_asm.s - user/ntuser/misc/i386/floor_asm.s - user/ntuser/misc/i386/ceil_asm.s) + gdi/eng/i386/floatobj.S) else() list(APPEND SOURCE gdi/dib/dib24bppc.c diff --git a/reactos/win32ss/user/ntuser/misc/i386/atan2_asm.s b/reactos/win32ss/user/ntuser/misc/i386/atan2_asm.s deleted file mode 100644 index 75aca5f7b30..00000000000 --- a/reactos/win32ss/user/ntuser/misc/i386/atan2_asm.s +++ /dev/null @@ -1,53 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Run-Time Library - * FILE: lib/rtl/i386/atan.S - * PROGRAMER: Alex Ionescu (alex@relsoft.net) - * - * Copyright (C) 2002 Michael Ringgaard. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the project nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES// LOSS OF USE, DATA, OR PROFITS// OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include - -/* FUNCTIONS ***************************************************************/ -.code - -PUBLIC _atan2 -_atan2: - push ebp - mov ebp,esp - fld qword ptr [ebp+8] // Load real from stack - fld qword ptr [ebp+16] // Load real from stack - fpatan // Take the arctangent - mov esp,ebp - pop ebp - ret - -END diff --git a/reactos/win32ss/user/ntuser/misc/i386/ceil_asm.s b/reactos/win32ss/user/ntuser/misc/i386/ceil_asm.s deleted file mode 100644 index 1256fa1cf00..00000000000 --- a/reactos/win32ss/user/ntuser/misc/i386/ceil_asm.s +++ /dev/null @@ -1,59 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Run-Time Library - * FILE: lib/rtl/i386/ceil.S - * PROGRAMER: Alex Ionescu (alex@relsoft.net) - * - * Copyright (C) 2002 Michael Ringgaard. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the project nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES// LOSS OF USE, DATA, OR PROFITS// OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include - -/* FUNCTIONS ***************************************************************/ -.code - -PUBLIC _ceil -_ceil: - push ebp - mov ebp,esp - sub esp,4 // Allocate temporary space - fld qword ptr [ebp+8] // Load real from stack - fstcw [ebp-2] // Save control word - fclex // Clear exceptions - mov word ptr [ebp-4],HEX(b63) // Rounding control word - fldcw [ebp-4] // Set new rounding control - frndint // Round to integer - fclex // Clear exceptions - fldcw [ebp-2] // Restore control word - mov esp,ebp // Deallocate temporary space - pop ebp - ret - -END diff --git a/reactos/win32ss/user/ntuser/misc/i386/cos_asm.s b/reactos/win32ss/user/ntuser/misc/i386/cos_asm.s deleted file mode 100644 index 8b525755b17..00000000000 --- a/reactos/win32ss/user/ntuser/misc/i386/cos_asm.s +++ /dev/null @@ -1,51 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Run-Time Library - * FILE: lib/rtl/i386/cos.S - * PROGRAMER: Alex Ionescu (alex@relsoft.net) - * - * Copyright (C) 2002 Michael Ringgaard. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the project nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES// LOSS OF USE, DATA, OR PROFITS// OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include - -/* FUNCTIONS ***************************************************************/ -.code - -PUBLIC _cos -_cos: - push ebp - mov ebp,esp // Point to the stack frame - fld qword ptr [ebp+8] // Load real from stack - fcos // Take the cosine - pop ebp - ret - -END diff --git a/reactos/win32ss/user/ntuser/misc/i386/floor_asm.s b/reactos/win32ss/user/ntuser/misc/i386/floor_asm.s deleted file mode 100644 index 1f5f2b107df..00000000000 --- a/reactos/win32ss/user/ntuser/misc/i386/floor_asm.s +++ /dev/null @@ -1,59 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Run-Time Library - * FILE: lib/rtl/i386/floor.S - * PROGRAMER: Alex Ionescu (alex@relsoft.net) - * - * Copyright (C) 2002 Michael Ringgaard. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the project nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES// LOSS OF USE, DATA, OR PROFITS// OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include - -/* FUNCTIONS ***************************************************************/ -.code - -PUBLIC _floor -_floor: - push ebp - mov ebp,esp - sub esp,4 // Allocate temporary space - fld qword ptr [ebp+8] // Load real from stack - fstcw [ebp-2] // Save control word - fclex // Clear exceptions - mov word ptr [ebp-4],HEX(763) // Rounding control word - fldcw [ebp-4] // Set new rounding control - frndint // Round to integer - fclex // Clear exceptions - fldcw [ebp-2] // Restore control word - mov esp,ebp - pop ebp - ret - -END diff --git a/reactos/win32ss/user/ntuser/misc/i386/sin_asm.s b/reactos/win32ss/user/ntuser/misc/i386/sin_asm.s deleted file mode 100644 index 7ec0fa69c23..00000000000 --- a/reactos/win32ss/user/ntuser/misc/i386/sin_asm.s +++ /dev/null @@ -1,51 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Run-Time Library - * FILE: lib/rtl/i386/sin.S - * PROGRAMER: Alex Ionescu (alex@relsoft.net) - * - * Copyright (C) 2002 Michael Ringgaard. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the project nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES// LOSS OF USE, DATA, OR PROFITS// OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include - -/* FUNCTIONS ***************************************************************/ -.code - -PUBLIC _sin -_sin: - push ebp // Save register bp - mov ebp,esp // Point to the stack frame - fld qword ptr [ebp+8] // Load real from stack - fsin // Take the sine - pop ebp // Restore register bp - ret - -END