Operating System
Macros | Functions | Variables
terminal.c File Reference

terminal. More...

#include "../include/utilities.h"
#include "../include/mystring.h"
#include "../filesystem/API/fsapi.h"
#include "../include/stdio.h"
#include "../include/graphic.h"

Go to the source code of this file.

Macros

#define BACK_SPACE   8
 '' ascii More...
 
#define BUFFER_SIZE   64
 buffer size for parcing command More...
 
#define PROMT   "yb@yb-thinkpad-e450:~$ "
 
#define HELP_MSG
 
#define LOW_8_MASK   (0b11111111)
 
#define GET_LOW_8BITS(X)   (X & LOW_8_MASK)
 
#define GET_HIGH_8BITS(X)   (X >> 8)
 
#define TERMINAL_STYLE   (TO_FN(G_PINKISH))
 

Functions

void kb_interupt_install ()
 
void kb_interupt_uninstall ()
 
void parseCMD (int)
 
void resetTerminal ()
 
int terminal ()
 

Variables

char CMD_BUFFER [BUFFER_SIZE+10] = {}
 
static FAT_ITEMCUR_DIR = 0
 current directory pointer More...
 

Detailed Description

terminal.

parce user command. load files into memory. run files. do whatever and never really returned

Definition in file terminal.c.

Macro Definition Documentation

◆ BACK_SPACE

#define BACK_SPACE   8

'' ascii

Definition at line 15 of file terminal.c.

◆ BUFFER_SIZE

#define BUFFER_SIZE   64

buffer size for parcing command

Definition at line 16 of file terminal.c.

◆ GET_HIGH_8BITS

#define GET_HIGH_8BITS (   X)    (X >> 8)

Definition at line 25 of file terminal.c.

◆ GET_LOW_8BITS

#define GET_LOW_8BITS (   X)    (X & LOW_8_MASK)

Definition at line 24 of file terminal.c.

◆ HELP_MSG

#define HELP_MSG
Value:
" run <program> : run program <program>\n\r" \
" \t e.g. run stoneQ: run program stoneQ.bin\n\r" \
" \t in program, press Q to exit\n\r" \
" ls : list all file in root directory\n\r"\
" showinfo: print my id 16337269 in 3-D mod"

Definition at line 18 of file terminal.c.

◆ LOW_8_MASK

#define LOW_8_MASK   (0b11111111)

Definition at line 23 of file terminal.c.

◆ PROMT

#define PROMT   "yb@yb-thinkpad-e450:~$ "

Definition at line 17 of file terminal.c.

◆ TERMINAL_STYLE

#define TERMINAL_STYLE   (TO_FN(G_PINKISH))

Definition at line 28 of file terminal.c.

Function Documentation

◆ kb_interupt_install()

void kb_interupt_install ( )

◆ kb_interupt_uninstall()

void kb_interupt_uninstall ( )

◆ parseCMD()

void parseCMD ( int  CMDindex)

Definition at line 87 of file terminal.c.

◆ resetTerminal()

void resetTerminal ( )

Definition at line 166 of file terminal.c.

◆ terminal()

int terminal ( )

Definition at line 35 of file terminal.c.

Variable Documentation

◆ CMD_BUFFER

char CMD_BUFFER[BUFFER_SIZE+10] = {}

Definition at line 31 of file terminal.c.

◆ CUR_DIR

FAT_ITEM* CUR_DIR = 0
static

current directory pointer

Definition at line 33 of file terminal.c.