Skip to content

Commit

Permalink
Forth (#154)
Browse files Browse the repository at this point in the history
Форт система
  • Loading branch information
pimnik98 authored Aug 4, 2024
2 parents c7747f7 + 4f3adcb commit fdfdb11
Show file tree
Hide file tree
Showing 26 changed files with 4,854 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
![Графический интерфейс](img/scr_4.png)
![Приложение](img/scr_5.png)
![Файловая система](img/scr_6.png)
![Редактор Файлов в Форте](img/ForthEdit.png)
![Файловый менеджер в Форте](img/ForthNC.png)

## <a id="sysrequirements">Системные требования</a>

Expand Down
1 change: 1 addition & 0 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ SOURCES=\
kernel/src/net/tcp.c \
kernel/src/net/stack.c \
kernel/src/toys/pavi.c \
kernel/src/toys/forth.c \
kernel/src/drv/audio/hda.c \
kernel/src/sys/grub_modules.c \
kernel/src/drv/disk/mbr.c \
Expand Down
Binary file added img/ForthEdit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/ForthNC.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions kernel/src/drv/input/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ volatile int lastKey = 0; ///< Последний индекс к
uint8_t kbdstatus = 0; ///< Статус клавиатуры
bool echo = true; ///< Включен ли вывод?
bool key_ctrl = false;
bool key_alt = false;

volatile char kmode = 0;
volatile char* curbuf = 0;
Expand Down Expand Up @@ -326,6 +327,10 @@ void keyboardHandler(registers_t regs){
key_ctrl = true;
} else if (lastKey == 157) { // Left Ctrl release
key_ctrl = false;
} else if (lastKey == 0x38) { // Left Alt press
key_alt = true;
} else if (lastKey == 0xb8) { // Left Alt release
key_alt = false;
}

char* key = getCharKeyboard(lastKey, false);
Expand Down
3 changes: 3 additions & 0 deletions kernel/src/extra/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@ uint32_t pavi_view(uint32_t, char**);
uint32_t minesweeper(uint32_t, char**);
uint32_t shell_diskctl(uint32_t, char**);
uint32_t calendar(uint32_t, char**);
uint32_t forth_sys(uint32_t, char**);

CLI_CMD_ELEM G_CLI_CMD[] = {
{"CLS", "cls", CLI_CMD_CLS, "Очистка экрана"},
Expand Down Expand Up @@ -646,6 +647,8 @@ CLI_CMD_ELEM G_CLI_CMD[] = {
{"PLAIN", "plain", CLI_PLAIN, "Run plain program"},
{"HEX", "hex", CLI_CMD_HEX, "Show hex data"},
{"ST", "st", CLI_SPAWN_TEST, "spawn test"},
{"FORTH", "forth",forth_sys, "Форт система"},
{"4TH", "4th",forth_sys, "Форт система"},
{nullptr, nullptr, nullptr}
};

Expand Down
Loading

0 comments on commit fdfdb11

Please sign in to comment.