ReactOS  0.4.15-dev-5499-g1341c38
terminal.h File Reference

Go to the source code of this file.

Functions

BOOLEAN SetupSerial (ULONG port, ULONG baudrate)
 
void CloseSerial (void)
 
void DebuggerShell (void)
 

Function Documentation

◆ CloseSerial()

void CloseSerial ( void  )

◆ DebuggerShell()

void DebuggerShell ( void  )

Definition at line 307 of file shell.c.

308 {
309  ARGS Args;
310  UCHAR speaker;
311  PEPROCESS pCurrentProcess;
312 
313  ENTER_FUNC();
314 
315  // save the graphics state
317 
318  // tell USER we are stopped
319  ShowStoppedMsg();
320 
322 
323  CheckRingBuffer();
324 
325  // kill the speakers annoying beep
326  speaker = inb_p((PCHAR)0x61);
327  speaker &= 0xFC;
328  outb_p(speaker,(PCHAR)0x61);
329 
331 
332  DPRINT((0,"DebuggerShell(): DisplayRegs()\n"));
333  // display register contents
334  DisplayRegs();
335 
336  DPRINT((0,"DebuggerShell(): DisplayMemory()\n"));
337  // display data window
338  Args.Value[0]=OldSelector;
339  Args.Value[1]=OldOffset;
340  Args.Count=2;
342 
343  DPRINT((0,"DebuggerShell(): Unassemble()\n"));
344 
345  // disassembly from current address
346  PICE_memset(&Args,0,sizeof(ARGS));
347  Args.Value[0]=CurrentCS;
348  Args.Value[1]=CurrentEIP;
349  Args.Count=2;
350  Unassemble(&Args);
351 
352  // try to find current process's name
353  pCurrentProcess = IoGetCurrentProcess();
354  CurrentProcess = (ULONG)pCurrentProcess;
355 
356  // display status line
357  ShowStatusLine();
358 
359  // switch on cursor
360  ShowCursor();
361 
362  // while we are not told to exit
363  while(bNotifyToExit==FALSE)
364  {
365  // emulate graphics cursor
367 
368  // we have a key press
370  {
371  DPRINT((0,"DebuggerShell(): key = %x control = %u shift = %u\n",ucKeyPressedWhileIdle,bControl,bShift));
372 
373  // if cursor reversed, normalize it again (only graphics)
374  if(bRev)
375  {
376  PrintCursor(TRUE);
377  }
378 
379  // convert key to ANSI, if success add to command buffer and try to
380  // find a command that fits the already entered letters
382 
383 #if 0
386 #endif
387 
388  if(!bControl && !bAlt && ucConverted)
389  {
390  DPRINT((0,"DebuggerShell(): normal key\n"));
391  if(!(usCurrentPosInInputBuffer==0 && ucConverted==' '))
392  {
393  // if we have space in the command buffer
394  // put the character there
396  {
398  // output the character
402  }
403  // if we have something in command buffer
404  // try to find command help that fits
406  {
408  }
409  else ShowStoppedMsg();
410  }
411  }
412  // normal key while holding down CONTROL
413  else if(bControl && !bAlt && !bShift && ucConverted)
414  {
415  if(ucConverted == 'f')
417  }
418  // normal key while holding down ALT
419  else if(!bControl && bAlt && !bShift && ucConverted)
420  {
421  }
422  // normal key while holding down ALT & CONTROL
423  else if(bControl && bAlt && !bShift && ucConverted)
424  {
425  }
426  // we didn't get a converted key
427  // so this must be a control key
428  else
429  {
430  // RETURN
432  {
433  DPRINT((0,"DebuggerShell(): RETURN\n"));
435  if(ucCommandBuffer[0])
436  {
441  // setup a safe stack for parsing
442  __asm__ __volatile__("\n\t \
443  movl %2,%%eax\n\t \
444  movl %%esp,%%ebx\n\t \
445  mov %%ebx,%0\n\t \
446  leal _aulNewStack,%%ebx\n\t \
447  addl $0x1FFF0,%%ebx\n\t \
448  movl %%ebx,%%esp\n\t \
449  pushl $0\n\t \
450  pushl %%eax\n\t \
451  call _Parse\n\t \
452  movl %0,%%ebx\n\t \
453  movl %%ebx,%%esp"
454  :"=m" (ulOldStack)
455  :"m" (ulOldStack),"m" (ucCommandBuffer)
456  :"eax","ebx");
457 
458  ShowStoppedMsg();
459  }
460  else
461  {
463  {
466  }
467  }
470  }
471  // backspace
473  {
474  DPRINT((0,"DebuggerShell(): BACKSPACE\n"));
476  {
479  else
480  ShowStoppedMsg();
481 
484  Print(OUTPUT_WINDOW,"\b");
485  }
486  }
487  // Tab
489  {
490  DPRINT((0,"DebuggerShell(): TAB\n"));
492  {
493  LPSTR pCmd;
494 
495  if((pCmd=FindCommand(ucCommandBuffer)) )
496  {
497  ULONG i;
498 
499  // clear the displayed command line
500  for(i=0;i<usCurrentPosInInputBuffer;i++)
501  Print(OUTPUT_WINDOW,"\b");
502  // clear command buffer
504  // copy the found command into command buffer
509  }
510  }
511  }
512  else
513  {
514  // function keys
516  {
517  DPRINT((0,"DebuggerShell(): FUNCTION %u\n",ucKeyPressedWhileIdle-59));
518  PICE_sprintf(tempShell,":");
525  if(ucCommandBuffer[0])
526  {
529 
530  // setup a safe stack for parsing
531  __asm__ __volatile__("\n\t \
532  movl %2,%%eax\n\t \
533  movl %%esp,%%ebx\n\t \
534  mov %%ebx,%0\n\t \
535  leal _aulNewStack,%%ebx\n\t \
536  addl $0x1FFF0,%%ebx\n\t \
537  movl %%ebx,%%esp\n\t \
538  pushl $1\n\t \
539  pushl %%eax\n\t \
540  call _Parse\n\t \
541  movl %0,%%ebx\n\t \
542  movl %%ebx,%%esp"
543  :"=m" (ulOldStack)
544  :"m" (ulOldStack),"m" (ucCommandBuffer)
545  :"eax","ebx");
548  }
549  }
550  else
551  {
552  switch(ucKeyPressedWhileIdle)
553  {
554  case SCANCODE_ESC:
556  {
557  PICE_sprintf(tempShell,":");
561  Print(OUTPUT_WINDOW,"");
562  ShowStoppedMsg();
563  }
564  break;
565  case SCANCODE_HOME: // home
566  DPRINT((0,"DebuggerShell(): HOME\n"));
567  // memory window
568  if(bAlt)
569  {
570  DPRINT((0,"DebuggerShell(): data window home\n"));
571  OldOffset=0x0;
572  // display data window
573  Args.Value[0]=OldSelector;
574  Args.Value[1]=OldOffset;
575  Args.Count=2;
577  }
578  // output window
579  else if(bShift)
580  {
581  DPRINT((0,"DebuggerShell(): output window home\n"));
583  {
586  }
587  }
588  // source window home
589  else if(bControl)
590  {
592  {
594 
596  {
598 
600  (LPSTR)pSrc+pSrc->ulOffsetToNext,
601  1,-1);
602  }
603  }
604  }
605  else if(!bShift && !bControl && !bAlt)
606  {
607  }
608  break;
609  case SCANCODE_END: // end
610  DPRINT((0,"DebuggerShell(): END\n"));
611  // memory window
612  if(bAlt)
613  {
614  DPRINT((0,"DebuggerShell(): data window end\n"));
615  OldOffset=0xFFFFFFFF-0x10*4;
616  // display data window
617  Args.Value[0]=OldSelector;
618  Args.Value[1]=OldOffset;
619  Args.Count=2;
621  }
622  // output window
623  else if(bShift)
624  {
625  DPRINT((0,"DebuggerShell(): output window end\n"));
627  {
629 
631  }
632  }
633  else if(!bShift && !bControl && !bAlt)
634  {
635  }
636  break;
637  case SCANCODE_UP: // up
638  DPRINT((0,"DebuggerShell(): UP\n"));
639  // memory window
640  if(bAlt)
641  {
642  DPRINT((0,"DebuggerShell(): data window up\n"));
643  OldOffset-=0x10;
644  // display data window
645  Args.Value[0]=OldSelector;
646  Args.Value[1]=OldOffset;
647  Args.Count=2;
649  }
650  // output window
651  else if(bShift)
652  {
653  DPRINT((0,"DebuggerShell(): output window up ulLastLineDisplayedOffset = %u\n",ulLastLineDisplayedOffset));
654 
656  {
658 
660  }
661  }
662  // source window up
663  else if(bControl)
664  {
666  {
668 
670  {
673  (LPSTR)pSrc+pSrc->ulOffsetToNext,
675  }
676  }
677  else
678  {
680  }
681  }
682  // command line history
683  else if(!bShift && !bControl && !bAlt)
684  {
685  LPSTR pCurrentCmd;
686  ULONG len;
687 
688  DPRINT((0,"DebuggerShell(): command line up\n"));
689 
690  // only if anything in history
692  {
693  // go to next entry in history
696  else
698  DPRINT((0,"DebuggerShell(): current history pos = %u\n",ulCommandCurrentPos));
699  // get this entry
701  // if it has a string attached
702  if((len = PICE_strlen(pCurrentCmd)))
703  {
704  // replace the current command line
705  PICE_sprintf(tempShell,":");
708  PICE_strcpy(ucCommandBuffer,pCurrentCmd);
710  Print(OUTPUT_WINDOW,pCurrentCmd);
711  }
712  }
713  }
714  break;
715  case SCANCODE_DOWN: // down
716  DPRINT((0,"DebuggerShell(): DOWN\n"));
717  // memory window
718  if(bAlt)
719  {
720  DPRINT((0,"DebuggerShell(): data window down\n"));
721  OldOffset+=0x10;
722  // display data window
723  Args.Value[0]=OldSelector;
724  Args.Value[1]=OldOffset;
725  Args.Count=2;
727  }
728  // output window
729  else if(bShift)
730  {
731  DPRINT((0,"DebuggerShell(): output window down ulLastLineDisplayedOffset = %u\n",ulLastLineDisplayedOffset));
733  {
735 
737  {
740  }
741  }
742  }
743  // source window down
744  else if(bControl)
745  {
747  {
749 
751  {
754  (LPSTR)pSrc+pSrc->ulOffsetToNext,
756  }
757  }
758  else
759  {
761  }
762  }
763  // command line history
764  else if(!bShift && !bControl && !bAlt)
765  {
766  LPSTR pCurrentCmd;
767  ULONG len;
768 
769  DPRINT((0,"DebuggerShell(): command line down\n"));
770 
771  // only if anything in history
773  {
774  // go to next entry in history
776  DPRINT((0,"DebuggerShell(): current history pos = %u\n",ulCommandCurrentPos));
777  // get this entry
779  // if it has a string attached
780  if((len = PICE_strlen(pCurrentCmd)))
781  {
782  // replace the current command line
783  PICE_sprintf(tempShell,":");
786  PICE_strcpy(ucCommandBuffer,pCurrentCmd);
788  Print(OUTPUT_WINDOW,pCurrentCmd);
789  }
790  }
791  }
792  break;
793  case SCANCODE_LEFT: // left
794  DPRINT((0,"DebuggerShell(): LEFT\n"));
795  // memory window
796  if(bAlt)
797  {
798  DPRINT((0,"DebuggerShell(): data window left\n"));
799 
800  OldOffset-=0x1;
801  // display data window
802  Args.Value[0]=OldSelector;
803  Args.Value[1]=OldOffset;
804  Args.Count=2;
806  }
807  else if(!bShift && !bControl && !bAlt)
808  {
809  }
810  else if(bControl)
811  {
812  if(ulWindowOffset > 0)
813  ulWindowOffset--;
814  PICE_memset(&Args,0,sizeof(ARGS));
815  Args.Count=0;
816  Unassemble(&Args);
817  }
818  break;
819  case SCANCODE_RIGHT: // right
820  // memory window
821  if(bAlt)
822  {
823  DPRINT((0,"DebuggerShell(): data window right\n"));
824 
825  OldOffset+=0x1;
826  // display data window
827  Args.Value[0]=OldSelector;
828  Args.Value[1]=OldOffset;
829  Args.Count=2;
831  }
832  else if(!bShift && !bControl && !bAlt)
833  {
834  }
835  else if(bControl)
836  {
837  if(ulWindowOffset < 80)
838  ulWindowOffset++;
839  PICE_memset(&Args,0,sizeof(ARGS));
840  Args.Count=0;
841  Unassemble(&Args);
842  }
843  break;
844  case SCANCODE_PGUP: // page up
845  DPRINT((0,"DebuggerShell(): PAGEUP\n"));
846  // memory window
847  if(bAlt)
848  {
850  // display data window
851  Args.Value[0]=OldSelector;
852  Args.Value[1]=OldOffset;
853  Args.Count=2;
855  }
856  // output window
857  else if(bShift)
858  {
860  {
862 
864  }
865  else
866  {
868  {
871  }
872  }
873  }
874  // source window page up
875  else if(bControl)
876  {
878  {
880  {
882 
884  {
886 
888  (LPSTR)pSrc+pSrc->ulOffsetToNext,
890  }
891  }
892  else
893  {
895 
897  {
899 
901  (LPSTR)pSrc+pSrc->ulOffsetToNext,
903  }
904  }
905  }
906  else
907  {
909  }
910 
911  }
912  else if(!bShift && !bControl && !bAlt)
913  {
914  }
915  break;
916  case SCANCODE_PGDN: // page down
917  DPRINT((0,"DebuggerShell(): PAGEDOWN\n"));
918  // memory window
919  if(bAlt)
920  {
922  // display data window
923  Args.Value[0]=OldSelector;
924  Args.Value[1]=OldOffset;
925  Args.Count=2;
927  }
928  else if(bShift)
929  {
931  {
933 
935  }
936  else
937  {
939  {
942  }
943  }
944  }
945  else if(bControl)
946  {
948  {
950  {
952 
954  {
956 
958  (LPSTR)pSrc+pSrc->ulOffsetToNext,
960  }
961  }
962  else
963  {
965 
967  {
969 
971  (LPSTR)pSrc+pSrc->ulOffsetToNext,
973  }
974  }
975  }
976  else
977  {
979  }
980  }
981  else if(!bShift && !bControl && !bAlt)
982  {
983  }
984  break;
985  }
986  }
987  }
988  }
990  }
991  }
992 
993  SaveOldRegs();
994 
995  PrintLogo(TRUE);
996 
997  ShowRunningMsg();
998 
999  if(bRev)
1000  PrintCursor(TRUE);
1001 
1002  // hide the cursor
1003  HideCursor();
1004 
1006 
1008 
1009  LEAVE_FUNC();
1010 }
USHORT CurrentCS
Definition: shell.c:116
signed char * PCHAR
Definition: retypes.h:7
void AddToCommandLineHistory(LPSTR s)
Definition: shell.c:160
#define SCANCODE_PGDN
Definition: scancodes.h:76
ULONG LinesInRingBuffer(void)
Definition: hardware.c:116
char * szFunctionKeys[10]
Definition: shell.c:95
void HideCursor(void)
Definition: hardware.c:566
void UnassembleOnePageUp(ULONG page)
Definition: parse.c:1513
void UnassembleOneLineDown(void)
Definition: parse.c:1413
volatile UCHAR ucKeyPressedWhileIdle
Definition: shell.c:78
#define SCANCODE_BACKSPACE
Definition: scancodes.h:36
BOOLEAN bRev
Definition: hercules.c:53
#define SCANCODE_PGUP
Definition: scancodes.h:70
BOOLEAN PrintRingBufferHome(ULONG ulLines)
Definition: hardware.c:447
ULONG ulCommandCurrentPos
Definition: shell.c:134
#define TRUE
Definition: types.h:120
void SaveOldRegs(void)
Definition: utils.c:1324
ULONG GLOBAL_SCREEN_WIDTH
Definition: hardware.c:62
ULONG OldOffset
Definition: shell.c:90
LPSTR FindCommand(LPSTR p)
Definition: parse.c:3252
int PICE_sprintf(char *buf, const char *fmt,...)
Definition: utils.c:2053
USHORT PICE_strlen(const char *s)
Definition: utils.c:547
USHORT cy
Definition: hardware.h:33
volatile BOOLEAN bShift
Definition: shell.c:71
#define SCANCODE_ENTER
Definition: scancodes.h:39
BOOLEAN PrintRingBufferOffset(ULONG ulLines, ULONG ulOffset)
Definition: hardware.c:378
#define LEAVE_FUNC()
Definition: debug.h:43
void ShowCursor(void)
Definition: hardware.c:556
char * LPSTR
Definition: xmlstorage.h:182
__asm__(".global NewInt31Handler\n\t \ NewInt31Handler:\n\t \ cli\n\t \ cld\n\t \ \n\t \ pushl %eax\n\t \ pushl %ds\n\t \ \n\t \ movw %ss,%ax\n\t \ mov %ax,%ds\n\t \ \n\t \ mov 0x4(%esp),%eax\n\t \ movl %eax,_CurrentEAX\n\t \ movl %ebx,_CurrentEBX\n\t \ movl %ecx,_CurrentECX\n\t \ movl %edx,_CurrentEDX\n\t \ movl %esi,_CurrentESI\n\t \ movl %edi,_CurrentEDI\n\t \ movl %ebp,_CurrentEBP\n\t \ movl (%esp),%eax\n\t \ movw %ax,_CurrentDS\n\t \ \n\t \ // test for V86 mode\n\t \ testl $0x20000,5*4(%esp)\n\t \ jz notV86\n\t \ \n\t \ int $0x03\n\t \ \n\t \ notV86:\n\t \ // test if stack switched (ring3->ring0 transition)\n\t \ // stack is switched if orig. SS is not global kernel code segment\n\t \ movl 4*4(%esp),%eax\n\t \ cmpw $" STR(GLOBAL_CODE_SEGMENT) ",%ax\n\t \ je notswitched\n\t \ \n\t \ // switched stack\n\t \ movl 6*4(%esp),%eax\n\t \ mov %eax,_CurrentESP\n\t \ mov 7*4(%esp),%eax\n\t \ movzwl %ax,%eax\n\t \ mov %ax,_CurrentSS\n\t \ jmp afterswitch\n\t \ \n\t \ notswitched:\n\t \ // didn't switch stack\n\t \ movl %esp,_CurrentESP\n\t \ addl $24,_CurrentESP\n\t \ movw %ss,%ax\n\t \ movzwl %ax,%eax\n\t \ mov %ax,_CurrentSS\n\t \ \n\t \ afterswitch:\n\t \ // save EIP\n\t \ mov 3*4(%esp),%eax\n\t \ mov %eax,_CurrentEIP\n\t \ //save CS\n\t \ mov 4*4(%esp),%eax\n\t \ movzwl %ax,%eax\n\t \ movw %ax,_CurrentCS\n\t \ // save flags\n\t \ movl 5*4(%esp),%eax\n\t \ andl $0xFFFFFEFF,%eax\n\t \ movl %eax,_CurrentEFL\n\t \ \n\t \ pushal\n\t \ \n\t \ // get reason code\n\t \ mov 0x28(%esp),%ebx\n\t \ \n\t \ /*\n\t \ * Load the PCR selector.\n\t \ */\n\t \ \n\t \ movl %fs, %eax\n\t \ movl %eax, _OLD_PCR\n\t \ movl _PCR_SEL, %eax\n\t \ movl %eax, %fs\n\t \ \n\t \ // setup a large work stack\n\t \ movl %esp,%eax\n\t \ movl %eax,_ulRealStackPtr\n\t \ \n\t \ pushl %ebx\n\t \ call _RealIsr\n\t \ addl $4,%esp\n\t \ \n\t \ pushl %eax\n\t \ movl _OLD_PCR, %eax\n\t \ movl %eax, %fs\n\t \ popl %eax\n\t \ \n\t \ // restore all regs\n\t \ popal\n\t \ \n\t \ // do an EOI to IRQ controller (because we definitely pressed some key)\n\t \ // TODO: SMP APIC support\n\t \ movb $0x20,%al\n\t \ outb %al,$0x20\n\t \ \n\t \ popl %ds\n\t \ popl %eax\n\t \ \n\t \ // remove reason code\n\t \ addl $4,%esp\n\t \ \n\t \ // make EAX available\n\t \ pushl %eax\n\t \ \n\t \ // modify or restore EFLAGS\n\t \ .byte 0x2e\n\t \ mov _CurrentEFL,%eax\n\t \ mov %eax,3*4(%esp)\n\t \ .byte 0x2e\n\t \ movzwl _CurrentCS,%eax\n\t \ mov %eax,2*4(%esp)\n\t \ .byte 0x2e\n\t \ mov _CurrentEIP,%eax\n\t \ mov %eax,1*4(%esp)\n\t \ \n\t \ // restore EAX\n\t \ popl %eax\n\t \ \n\t \ // do we need to call old INT1 handler\n\t \ .byte 0x2e\n\t \ cmp $0,_dwCallOldInt1Handler\n\t \ je do_iret2\n\t \ \n\t \ // call INT3 handler\n\t \ .byte 0x2e\n\t \ jmp *_OldInt1Handler\n\t \ \n\t \ do_iret2:\n\t \ // do we need to call old INT3 handler\n\t \ .byte 0x2e\n\t \ cmp $0,_dwCallOldInt3Handler\n\t \ je do_iret1\n\t \ \n\t \ // call INT3 handler\n\t \ .byte 0x2e\n\t \ jmp *_OldInt3Handler\n\t \ \n\t \ do_iret1:\n\t \ // do we need to call old pagefault handler\n\t \ .byte 0x2e\n\t \ cmp $0,_dwCallOldIntEHandler\n\t \ je do_iret3\n\t \ \n\t \ // call old pagefault handler\n\t \ .byte 0x2e\n\t \ pushl _error_code\n\t \ .byte 0x2e\n\t \ jmp *_OldIntEHandler\n\t \ \n\t \ do_iret3:\n\t \ // do we need to call old general protection fault handler\n\t \ .byte 0x2e\n\t \ cmp $0,_dwCallOldGPFaultHandler\n\t \ je do_iret\n\t \ \n\t \ // call old pagefault handler\n\t \ .byte 0x2e\n\t \ pushl _error_code\n\t \ .byte 0x2e\n\t \ jmp *_OldGPFaultHandler\n\t \ \n\t \ do_iret:\n\t \ //ei\n\t \ //int3\n\t \ iretl ")
void DisplaySourceFile(LPSTR pSrcLine, LPSTR pSrcEnd, ULONG ulLineNumber, ULONG ulLineNumberToInvert)
Definition: parse.c:1313
#define SCANCODE_ESC
Definition: scancodes.h:35
ULONG GetLinesInCommandHistory(void)
Definition: shell.c:143
void Print(USHORT Window, LPSTR p)
Definition: hardware.c:776
#define SCANCODE_LEFT
Definition: scancodes.h:71
char * PICE_strcpy(char *s1, char *s2)
Definition: utils.c:302
void UnassembleOnePageDown(ULONG page)
Definition: parse.c:1436
#define FALSE
Definition: types.h:117
void outb_p(UCHAR data, PUCHAR port)
Definition: utils.c:2159
UCHAR AsciiFromScan(UCHAR s)
Definition: utils.c:2069
#define SCANCODE_HOME
Definition: scancodes.h:68
#define SCANCODE_RIGHT
Definition: scancodes.h:73
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:585
#define SCANCODE_TAB
Definition: scancodes.h:37
LONG ulCurrentlyDisplayedLineNumber
Definition: parse.c:46
void ProcessBootParams(void)
Definition: shell.c:255
void ClrLine(ULONG line)
Definition: hardware.c:662
char ** Args
Definition: acdebug.h:353
WINDOW wWindow[4]
Definition: hardware.c:59
void ShowRunningMsg(void)
Definition: utils.c:843
TCHAR szCurrentFile[MAX_PATH]
Definition: mplay32.c:29
char tempShell[256]
Definition: shell.c:86
volatile BOOLEAN bControl
Definition: shell.c:70
ULONG CurrentProcess
Definition: shell.c:125
char * PICE_strcat(char *s1, char *s2)
Definition: utils.c:315
PEPROCESS NTAPI IoGetCurrentProcess(VOID)
Definition: util.c:139
#define SCANCODE_UP
Definition: scancodes.h:69
void RestoreGraphicsState(void)
Definition: hardware.c:884
UCHAR ucConverted
Definition: shell.c:68
void ReplaceRingBufferCurrent(LPSTR s)
Definition: hardware.c:301
BOOLEAN __inline bNoCtrlKeys(void)
Definition: shell.c:296
#define SCANCODE_DOWN
Definition: scancodes.h:75
Definition: parse.h:31
volatile BOOLEAN bAlt
Definition: shell.c:72
unsigned char UCHAR
Definition: xmlstorage.h:181
void ShowStatusLine(void)
Definition: shell.c:216
GLenum GLsizei len
Definition: glext.h:6722
void FlushKeyboardQueue(void)
Definition: hardware.c:913
void ShowStoppedMsg(void)
Definition: utils.c:861
void PrintRingBuffer(ULONG ulLines)
Definition: hardware.c:315
ULONG ulOldStack
Definition: shell.c:110
void DisplayRegs(void)
Definition: utils.c:1097
void SaveGraphicsState(void)
Definition: hardware.c:875
UCHAR GetKeyPolled(void)
Definition: hardware.c:904
void PutChar(LPSTR p, ULONG x, ULONG y)
Definition: hardware.c:604
USHORT usCurrentPosInInputBuffer
Definition: shell.c:128
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
UCHAR inb_p(PUCHAR port)
Definition: utils.c:2179
USHORT usCurX
Definition: hardware.h:34
LPSTR GetFromCommandLineHistory(ULONG ulCurrentCommandPos)
Definition: shell.c:194
ULONG CurrentEIP
Definition: shell.c:113
unsigned int * PULONG
Definition: retypes.h:1
void CheckRingBuffer(void)
Definition: hardware.c:133
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
ULONG ulWindowOffset
Definition: shell.c:63
void UnassembleOneLineUp(void)
Definition: parse.c:1460
BOOLEAN ConvertTokenToSrcFile(LPSTR p, PULONG pValue)
Definition: parse.c:3693
unsigned int ULONG
Definition: retypes.h:1
#define SCANCODE_END
Definition: scancodes.h:74
#define ENTER_FUNC()
Definition: debug.h:42
UCHAR ucCommandBuffer[256]
Definition: shell.c:127
#define DPRINT
Definition: sndvol32.h:71
USHORT OldSelector
Definition: shell.c:89
volatile BOOLEAN bNotifyToExit
Definition: shell.c:76
void PrintLogo(BOOLEAN bShow)
Definition: hardware.c:757
ULONG ulLastLineDisplayedOffset
Definition: shell.c:92
void PICE_memset(void *p, unsigned char c, int sz)
Definition: utils.c:228
void PrintCursor(BOOLEAN bForce)
Definition: hardware.c:767
BOOLEAN(* DisplayMemory)(PARGS)
Definition: parse.c:56

Referenced by RealIsr().

◆ SetupSerial()

BOOLEAN SetupSerial ( ULONG  port,
ULONG  baudrate 
)


Definition at line 133 of file serial.c.

134 {
136 
137  usSerialPortBase = ports[port-1];
139  SerialSetSpeed(baudrate);
140 
141  // clear out received bytes
142  // else we would think there's a terminal connected
144 }
void SerialSetOthers(ULONG Parity, ULONG Bits, ULONG StopBit)
Definition: serial.c:86
#define COM2BASE
Definition: serial_port.h:36
#define COM1BASE
Definition: serial_port.h:35
void SerialSetSpeed(ULONG baudrate)
Definition: serial.c:66
void FlushSerialBuffer(void)
Definition: serial.c:122
#define COM4BASE
Definition: serial_port.h:40
USHORT usSerialPortBase
Definition: serial.c:51
#define NO_PARITY
Definition: serial.c:89
unsigned short USHORT
Definition: pedump.c:61
#define COM3BASE
Definition: serial_port.h:39
USHORT port
Definition: uri.c:228