mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
cleanup to support incorporated changes
svn path=/trunk/; revision=109
This commit is contained in:
parent
37af92952e
commit
13e75fd710
12 changed files with 782 additions and 663 deletions
|
@ -74,7 +74,7 @@ typedef DISK_GEOMETRY *PDISK_GEOMETRY;
|
|||
#include <internal/i386/io.h>
|
||||
#include <internal/string.h>
|
||||
|
||||
//#define NDEBUG
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
#include "ide.h"
|
||||
|
@ -237,7 +237,7 @@ DriverEntry(IN PDRIVER_OBJECT DriverObject,
|
|||
BOOLEAN WeGotSomeDisks;
|
||||
int ControllerIdx;
|
||||
|
||||
DPRINT("IDE Driver %s\n", VERSION);
|
||||
DbgPrint("IDE Driver %s\n", VERSION);
|
||||
|
||||
// Export other driver entry points...
|
||||
DriverObject->DriverStartIo = IDEStartIo;
|
||||
|
@ -302,7 +302,7 @@ IDECreateController(IN PDRIVER_OBJECT DriverObject,
|
|||
ControllerParams->ControlPortBase))
|
||||
{
|
||||
DPRINT("Could not find controller %d at %04lx\n",
|
||||
ControllerIdx, ControllerParams->ControlPortBase);
|
||||
ControllerIdx, ControllerParams->CommandPortBase);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -967,6 +967,11 @@ IDECreateDevice(IN PDRIVER_OBJECT DriverObject,
|
|||
// Initialize the DPC object here
|
||||
IoInitializeDpcRequest(*DeviceObject, IDEDpcForIsr);
|
||||
|
||||
if (Win32Alias != NULL)
|
||||
{
|
||||
DbgPrint("%s is %s %dMB\n", DeviceName, Win32Alias, (Size + 512) / 1024);
|
||||
}
|
||||
|
||||
return RC;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,11 +30,14 @@ extern "C" {
|
|||
#define IDE_RESET_BUSY_TIMEOUT 31
|
||||
#define IDE_RESET_DRDY_TIMEOUT 120
|
||||
|
||||
#define IDE_REG_ALT_STATUS 0x0006
|
||||
#define IDE_REG_DEV_CNTRL 0x0006 /* device control register */
|
||||
// Control Block offsets and masks
|
||||
#define IDE_REG_ALT_STATUS 0x0000
|
||||
#define IDE_REG_DEV_CNTRL 0x0000 /* device control register */
|
||||
#define IDE_DC_SRST 0x04 /* drive reset (both drives) */
|
||||
#define IDE_DC_nIEN 0x02 /* IRQ enable (active low) */
|
||||
#define IDE_REG_DRV_ADDR 0x0007
|
||||
#define IDE_REG_DRV_ADDR 0x0001
|
||||
|
||||
// Command Block offsets and masks
|
||||
#define IDE_REG_DATA_PORT 0x0000
|
||||
#define IDE_REG_ERROR 0x0001 /* error register */
|
||||
#define IDE_ER_AMNF 0x01 /* addr mark not found */
|
||||
|
|
|
@ -56,10 +56,17 @@ int process(FILE* in, FILE* out, FILE *out2)
|
|||
nr_args = (char *)strtok(NULL," \t");
|
||||
|
||||
// printf("name %s value %d\n",name,value);
|
||||
#ifdef PARAMETERIZED_LIBS
|
||||
fprintf(out,"GLOBAL _%s@%s\n",name,nr_args);
|
||||
fprintf(out,"GLOBAL _%s@%s\n",name2,nr_args);
|
||||
fprintf(out,"_%s@%s:\n",name,nr_args);
|
||||
fprintf(out,"_%s@%s:\n",name2,nr_args);
|
||||
#else
|
||||
fprintf(out,"GLOBAL _%s\n",name);
|
||||
fprintf(out,"GLOBAL _%s\n",name2);
|
||||
fprintf(out,"_%s:\n",name);
|
||||
fprintf(out,"_%s:\n",name2);
|
||||
#endif
|
||||
fprintf(out,"\tmov\teax,%d\n",value);
|
||||
fprintf(out,"\tlea\tedx,[esp+4]\n");
|
||||
fprintf(out,"\tint\t2Eh\n");
|
||||
|
|
|
@ -208,4 +208,22 @@ NtReplyWaitSendChannel ZwReplyWaitSendChannel 12
|
|||
NtSendWaitReplyChannel ZwSendWaitReplyChannel 16
|
||||
NtSetContextChannel ZwSetContextChannel 4
|
||||
NtYieldExecution ZwYieldExecution 0
|
||||
wcscat Rtlwcscat 8
|
||||
wcschr Rtlwcschr 8
|
||||
wcscmp Rtlwcscmp 8
|
||||
wcscpy Rtlwcscpy 8
|
||||
wcscspn Rtlwcscspn 8
|
||||
wcsicmp Rtlwcsicmp 8
|
||||
wcslen Rtlwcslen 4
|
||||
wcsncat Rtlwcsncat 12
|
||||
wcsncmp Rtlwcsncmp 12
|
||||
wcsncpy Rtlwcsncpy 12
|
||||
wcsnicmp Rtlwcsnicmp 12
|
||||
wcsnlen Rtlwcsnlen 8
|
||||
wcspbrk Rtlwcspbrk 8
|
||||
wcsrchr Rtlwcsrchr 8
|
||||
wcsspn Rtlwcsspn 8
|
||||
wcsstr Rtlwcsstr 8
|
||||
wcstok Rtlwcstok 8
|
||||
wstrlen Rtlwstrlen 4
|
||||
|
||||
|
|
20
reactos/include/ddk/li.h
Normal file
20
reactos/include/ddk/li.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
|
||||
#ifdef COMPILER_LARGE_INTEGERS
|
||||
|
||||
#define GET_LARGE_INTEGER_HIGH_PART(LargeInteger) ( ( LargeInteger >> 32) )
|
||||
#define GET_LARGE_INTEGER_LOW_PART(LargeInteger) ( (LargeInteger & 0xFFFFFFFF) )
|
||||
#define SET_LARGE_INTEGER_HIGH_PART(LargeInteger,Signed_Long) \
|
||||
( LargeInteger |= ( ((LARGE_INTEGER)Signed_Long) << 32 ) )
|
||||
#define SET_LARGE_INTEGER_LOW_PART(LargeInteger,Unsigned_Long) \
|
||||
( LargeInteger |= Unsigned_Long )
|
||||
|
||||
#else
|
||||
#define GET_LARGE_INTEGER_HIGH_PART(LargeInteger) ( (LargeInteger.HighPart) )
|
||||
#define GET_LARGE_INTEGER_LOW_PART(LargeInteger) ( (LargeInteger.LowPart) )
|
||||
#define SET_LARGE_INTEGER_HIGH_PART(LargeInteger,Signed_Long) \
|
||||
( LargeInteger.HighPart= Signed_Long )
|
||||
#define SET_LARGE_INTEGER_LOW_PART(LargeInteger,Unsigned_Long) \
|
||||
( LargeInteger.LowPart = Unsigned_Long )
|
||||
|
||||
#endif
|
||||
|
|
@ -20,14 +20,14 @@ typedef unsigned short wchar_t;
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
//wchar_t * ___wcstok = NULL;
|
||||
extern wchar_t * ___wcstok;
|
||||
extern wchar_t * wcscpy(wchar_t *,const wchar_t *);
|
||||
extern wchar_t * wcsncpy(wchar_t *,const wchar_t *, __kernel_size_t);
|
||||
extern wchar_t * wcscat(wchar_t *, const wchar_t *);
|
||||
extern wchar_t * wcsncat(wchar_t *, const wchar_t *, __kernel_size_t);
|
||||
extern int wcscmp(const wchar_t *,const wchar_t *);
|
||||
extern int wcsncmp(const wchar_t *,const wchar_t *,__kernel_size_t);
|
||||
wchar_t* wcschr(wchar_t* str, wchar_t ch);
|
||||
wchar_t* wcschr(const wchar_t* str, wchar_t ch);
|
||||
extern wchar_t * wcsrchr(const wchar_t *,wchar_t);
|
||||
extern wchar_t * wcspbrk(const wchar_t *,const wchar_t *);
|
||||
extern wchar_t * wcstok(wchar_t *,const wchar_t *);
|
||||
|
@ -35,12 +35,14 @@ extern wchar_t * wcsstr(const wchar_t *,const wchar_t *);
|
|||
extern size_t wcsnlen(const wchar_t * s, size_t count);
|
||||
extern int wcsicmp(const wchar_t* cs,const wchar_t * ct);
|
||||
extern int wcsnicmp(const wchar_t* cs,const wchar_t * ct, size_t count);
|
||||
extern size_t wcscspn(const wchar_t *, const wchar_t *);
|
||||
extern size_t wcslen(const wchar_t *);
|
||||
extern size_t wcsspn(const wchar_t *, const wchar_t *);
|
||||
|
||||
extern unsigned long wstrlen(PWSTR);
|
||||
WCHAR wtoupper(WCHAR c);
|
||||
WCHAR wtolower(WCHAR c);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -14,12 +14,7 @@
|
|||
#include <kernel32\thread.h>
|
||||
#include <wstring.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// RJJ: (we dont have it) #include <stdlib.h>
|
||||
|
||||
/* system global and local atom tables */
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
SECTION .text
|
||||
|
||||
BITS 32
|
||||
|
||||
GLOBAL _NtAcceptConnectPort
|
||||
GLOBAL _ZwAcceptConnectPort
|
||||
_NtAcceptConnectPort:
|
||||
|
@ -1893,3 +1895,165 @@ _ZwYieldExecution:
|
|||
int 2Eh
|
||||
ret 0
|
||||
|
||||
GLOBAL _wcscat
|
||||
GLOBAL _Rtlwcscat
|
||||
_wcscat:
|
||||
_Rtlwcscat:
|
||||
mov eax,210
|
||||
lea edx,[esp+4]
|
||||
int 2Eh
|
||||
ret 8
|
||||
|
||||
GLOBAL _wcschr
|
||||
GLOBAL _Rtlwcschr
|
||||
_wcschr:
|
||||
_Rtlwcschr:
|
||||
mov eax,211
|
||||
lea edx,[esp+4]
|
||||
int 2Eh
|
||||
ret 8
|
||||
|
||||
GLOBAL _wcscmp
|
||||
GLOBAL _Rtlwcscmp
|
||||
_wcscmp:
|
||||
_Rtlwcscmp:
|
||||
mov eax,212
|
||||
lea edx,[esp+4]
|
||||
int 2Eh
|
||||
ret 8
|
||||
|
||||
GLOBAL _wcscpy
|
||||
GLOBAL _Rtlwcscpy
|
||||
_wcscpy:
|
||||
_Rtlwcscpy:
|
||||
mov eax,213
|
||||
lea edx,[esp+4]
|
||||
int 2Eh
|
||||
ret 8
|
||||
|
||||
GLOBAL _wcscspn
|
||||
GLOBAL _Rtlwcscspn
|
||||
_wcscspn:
|
||||
_Rtlwcscspn:
|
||||
mov eax,214
|
||||
lea edx,[esp+4]
|
||||
int 2Eh
|
||||
ret 8
|
||||
|
||||
GLOBAL _wcsicmp
|
||||
GLOBAL _Rtlwcsicmp
|
||||
_wcsicmp:
|
||||
_Rtlwcsicmp:
|
||||
mov eax,215
|
||||
lea edx,[esp+4]
|
||||
int 2Eh
|
||||
ret 8
|
||||
|
||||
GLOBAL _wcslen
|
||||
GLOBAL _Rtlwcslen
|
||||
_wcslen:
|
||||
_Rtlwcslen:
|
||||
mov eax,216
|
||||
lea edx,[esp+4]
|
||||
int 2Eh
|
||||
ret 4
|
||||
|
||||
GLOBAL _wcsncat
|
||||
GLOBAL _Rtlwcsncat
|
||||
_wcsncat:
|
||||
_Rtlwcsncat:
|
||||
mov eax,217
|
||||
lea edx,[esp+4]
|
||||
int 2Eh
|
||||
ret 12
|
||||
|
||||
GLOBAL _wcsncmp
|
||||
GLOBAL _Rtlwcsncmp
|
||||
_wcsncmp:
|
||||
_Rtlwcsncmp:
|
||||
mov eax,218
|
||||
lea edx,[esp+4]
|
||||
int 2Eh
|
||||
ret 12
|
||||
|
||||
GLOBAL _wcsncpy
|
||||
GLOBAL _Rtlwcsncpy
|
||||
_wcsncpy:
|
||||
_Rtlwcsncpy:
|
||||
mov eax,219
|
||||
lea edx,[esp+4]
|
||||
int 2Eh
|
||||
ret 12
|
||||
|
||||
GLOBAL _wcsnicmp
|
||||
GLOBAL _Rtlwcsnicmp
|
||||
_wcsnicmp:
|
||||
_Rtlwcsnicmp:
|
||||
mov eax,220
|
||||
lea edx,[esp+4]
|
||||
int 2Eh
|
||||
ret 12
|
||||
|
||||
GLOBAL _wcsnlen
|
||||
GLOBAL _Rtlwcsnlen
|
||||
_wcsnlen:
|
||||
_Rtlwcsnlen:
|
||||
mov eax,221
|
||||
lea edx,[esp+4]
|
||||
int 2Eh
|
||||
ret 8
|
||||
|
||||
GLOBAL _wcspbrk
|
||||
GLOBAL _Rtlwcspbrk
|
||||
_wcspbrk:
|
||||
_Rtlwcspbrk:
|
||||
mov eax,222
|
||||
lea edx,[esp+4]
|
||||
int 2Eh
|
||||
ret 8
|
||||
|
||||
GLOBAL _wcsrchr
|
||||
GLOBAL _Rtlwcsrchr
|
||||
_wcsrchr:
|
||||
_Rtlwcsrchr:
|
||||
mov eax,223
|
||||
lea edx,[esp+4]
|
||||
int 2Eh
|
||||
ret 8
|
||||
|
||||
GLOBAL _wcsspn
|
||||
GLOBAL _Rtlwcsspn
|
||||
_wcsspn:
|
||||
_Rtlwcsspn:
|
||||
mov eax,224
|
||||
lea edx,[esp+4]
|
||||
int 2Eh
|
||||
ret 8
|
||||
|
||||
GLOBAL _wcsstr
|
||||
GLOBAL _Rtlwcsstr
|
||||
_wcsstr:
|
||||
_Rtlwcsstr:
|
||||
mov eax,225
|
||||
lea edx,[esp+4]
|
||||
int 2Eh
|
||||
ret 8
|
||||
|
||||
GLOBAL _wcstok
|
||||
GLOBAL _Rtlwcstok
|
||||
_wcstok:
|
||||
_Rtlwcstok:
|
||||
mov eax,226
|
||||
lea edx,[esp+4]
|
||||
int 2Eh
|
||||
ret 8
|
||||
|
||||
GLOBAL _wstrlen
|
||||
GLOBAL _Rtlwstrlen
|
||||
_wstrlen:
|
||||
_Rtlwstrlen:
|
||||
mov eax,227
|
||||
lea edx,[esp+4]
|
||||
int 2Eh
|
||||
ret 4
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
|
||||
#include <wstring.h>
|
||||
#include <internal/debug.h>
|
||||
|
||||
/* GLOBALS ******************************************************************/
|
||||
|
|
|
@ -63,15 +63,14 @@
|
|||
* PURPOSE: Current cursor position
|
||||
*/
|
||||
static unsigned int cursorx=0, cursory=0;
|
||||
|
||||
static unsigned int lines_seen = 0;
|
||||
static unsigned char CharAttribute = 0x17;
|
||||
|
||||
//#define NR_ROWS 25
|
||||
#define NR_ROWS 50
|
||||
#define NR_COLUMNS 80
|
||||
#define VIDMEM_BASE 0xb8000
|
||||
|
||||
|
||||
/*
|
||||
* PURPOSE: Points to the base of text mode video memory
|
||||
*/
|
||||
|
@ -185,19 +184,19 @@ static void putchar(char c)
|
|||
{
|
||||
case '\n':
|
||||
cursory++;
|
||||
cursorx=0;
|
||||
cursorx = 0;
|
||||
lines_seen++;
|
||||
break;
|
||||
|
||||
default:
|
||||
vidmem[(cursorx*2) + (cursory*80*2)]=c;
|
||||
vidmem[(cursorx*2) + (cursory*80*2)+1]=0x17;
|
||||
vidmem[(cursorx * 2) + (cursory * 80 * 2)] = c;
|
||||
vidmem[(cursorx * 2) + (cursory * 80 * 2) + 1] = CharAttribute;
|
||||
cursorx++;
|
||||
if (cursorx>=NR_COLUMNS)
|
||||
if (cursorx >= NR_COLUMNS)
|
||||
{
|
||||
cursory++;
|
||||
lines_seen++;
|
||||
cursorx=0;
|
||||
cursorx = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -207,10 +206,10 @@ static void putchar(char c)
|
|||
char str[] = "--- press escape to continue";
|
||||
|
||||
lines_seen = 0;
|
||||
for (i=0;str[i]!=0;i++)
|
||||
for (i = 0; str[i] != 0; i++)
|
||||
{
|
||||
vidmem[NR_COLUMNS*(NR_ROWS-1)*2+i*2]=str[i];
|
||||
vidmem[NR_COLUMNS*(NR_ROWS-1)*2+i*2+1]=0x37; // 17 for white on blue 37
|
||||
vidmem[NR_COLUMNS*(NR_ROWS-1)*2+i*2] = str[i];
|
||||
vidmem[NR_COLUMNS*(NR_ROWS-1)*2+i*2+1] = CharAttribute;
|
||||
}
|
||||
|
||||
while (inb_p(0x60)!=0x81);
|
||||
|
@ -218,26 +217,33 @@ static void putchar(char c)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (cursory>=NR_ROWS)
|
||||
{
|
||||
memcpy(vidmem,&vidmem[NR_COLUMNS*2],
|
||||
NR_COLUMNS*(NR_ROWS-1)*2);
|
||||
memset(&vidmem[NR_COLUMNS*(NR_ROWS-1)*2],0,NR_COLUMNS*2);
|
||||
cursory=NR_ROWS-1;
|
||||
}
|
||||
if (cursory >= NR_ROWS)
|
||||
{
|
||||
unsigned short *LinePtr;
|
||||
|
||||
memcpy(vidmem,
|
||||
&vidmem[NR_COLUMNS * 2],
|
||||
NR_COLUMNS * (NR_ROWS - 1) * 2);
|
||||
LinePtr = (unsigned short *) &vidmem[NR_COLUMNS * (NR_ROWS - 1) * 2];
|
||||
for (i = 0; i < NR_COLUMNS; i++)
|
||||
{
|
||||
LinePtr[i] = CharAttribute << 8;
|
||||
}
|
||||
cursory = NR_ROWS - 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the cursor position
|
||||
*/
|
||||
|
||||
offset=cursory*NR_COLUMNS;
|
||||
offset=offset+cursorx;
|
||||
offset = cursory * NR_COLUMNS;
|
||||
offset = offset + cursorx;
|
||||
|
||||
outb_p(CRTC_COMMAND,CRTC_CURLO);
|
||||
outb_p(CRTC_DATA,offset);
|
||||
outb_p(CRTC_COMMAND,CRTC_CURHI);
|
||||
offset>>=8;
|
||||
outb_p(CRTC_DATA,offset);
|
||||
outb_p(CRTC_COMMAND, CRTC_CURLO);
|
||||
outb_p(CRTC_DATA, offset);
|
||||
outb_p(CRTC_COMMAND, CRTC_CURHI);
|
||||
offset >>= 8;
|
||||
outb_p(CRTC_DATA, offset);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <internal/io.h>
|
||||
#include <ddk/ntddk.h>
|
||||
|
||||
//#define NDEBUG
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue