Compare commits

...

3 Commits

Author SHA1 Message Date
68612c69b0 DOCS 2026-03-09 15:19:34 +04:00
363a56d95e Fixed 2026-03-09 15:00:22 +04:00
f92ba731b8 Fixed 2026-03-09 14:57:42 +04:00
8 changed files with 6 additions and 8 deletions

View File

@ -74,7 +74,6 @@ static void __str_slice(char* str) {
char* ntsys_get_arg(ntsys_asm_cache_t save) {
char* str = save->cache;
printf("Cache : %s\n", save->cache);
while (1) {
if ((!is_space(str[0])) || str[0] == '\0') {
break;
@ -96,7 +95,6 @@ char* ntsys_get_arg(ntsys_asm_cache_t save) {
save->cache = &str[n_p + t];
str[n_p] = '\0';
}
printf("Switch : %s\n", save->cache);
if (str[strlen(str) - 1] == '\n' || str[strlen(str) - 1] == '\r') str[strlen(str) - 1] = '\0';
if (strlen(str) == 0) {
str = NULL;
@ -138,7 +136,6 @@ char* ntsys_get_arg(ntsys_asm_cache_t save) {
}
}
save->string = str;
printf("Loading : %s\n", save->string);
return str;
}

BIN
dump.bin

Binary file not shown.

View File

@ -1,4 +1,4 @@
main: ; Метка main
push.string "Hello, world!\n" ; Записываем строку
push byte 0x00 ; Запись номера SYSCALL
push byte 0x00 ; Запись номера SYSCALL
syscall ; Системный вызов

View File

@ -1,10 +1,10 @@
main:
push.string "Введите ваше имя: " ; Строка
push byte 0x00
push byte, 0x00
syscall
getch:
push db getch
push byte 0x01
push db, getch
push byte, 0x01
syscall
push byte 0x0A
push byte, 0x0A
neq byte

BIN
input.exe

Binary file not shown.

BIN
ntsys

Binary file not shown.

View File

@ -55,6 +55,7 @@ int ntsys_asm_from_string(size_t* mempos, char* str, FILE* fp, byte_t cycle, nts
ntsys_asm_save_t __save = create_ntsys_asm_save(str);
ntsys_asm_cache_t __cache = create_ntsys_asm_cache(__save);
ntsys_argument_parser_t parser = create_ntsys_asm_parser(__cache, fp, str, ntsys_asm_table, ntsys_command_count, labels, labels_pos, labels_count, cycle, fsz);
/*puts(str);*/
return ntsys_run_asm_parser(parser);
}

BIN
out.exe

Binary file not shown.