From 0e9c10036a3c4df2848c4acb28adf6c4273945df Mon Sep 17 00:00:00 2001 From: turbocat Date: Mon, 24 Jan 2022 17:01:24 +0000 Subject: [PATCH] ktcc set kx folder as bin git-svn-id: svn://kolibrios.org@9663 a494cfbc-eb01-0410-851d-a64ba20cac60 --- .../trunk/{kx => bin}/doc/en/Features.txt | 0 .../trunk/{kx => bin}/doc/en/How to use.txt | 0 .../trunk/{kx => bin}/doc/ru/Features.txt | 0 .../ktcc/trunk/{kx => bin}/doc/ru/History.txt | 0 .../trunk/{kx => bin}/doc/ru/How to use.txt | 0 .../ktcc/trunk/{kx => bin}/lib/box_lib.def | 0 .../ktcc/trunk/{kx => bin}/lib/console.def | 0 .../develop/ktcc/trunk/{kx => bin}/lib/crt0.o | Bin .../ktcc/trunk/{kx => bin}/lib/dialog.def | 0 .../ktcc/trunk/{kx => bin}/lib/http.def | 0 .../ktcc/trunk/{kx => bin}/lib/img.def | 0 .../ktcc/trunk/{kx => bin}/lib/libSDL.a | Bin .../ktcc/trunk/{kx => bin}/lib/libc.def | 0 .../ktcc/trunk/{kx => bin}/lib/libcryptal.a | Bin .../ktcc/trunk/{kx => bin}/lib/libshell.a | Bin .../ktcc/trunk/{kx => bin}/lib/libsound.a | Bin .../ktcc/trunk/{kx => bin}/lib/libtcc1.a | Bin .../ktcc/trunk/{kx => bin}/lib/mbedtls.def | 0 .../ktcc/trunk/{kx => bin}/lib/msgbox.def | 0 .../ktcc/trunk/{kx => bin}/lib/network.def | 0 .../trunk/{kx => bin}/lib/rasterworks.def | 0 .../develop/ktcc/trunk/kx/src/crt/crt0.asm | 127 ------------------ .../develop/ktcc/trunk/kx/src/tests/kxtest.c | 18 --- .../develop/ktcc/trunk/kx/src/tests/kxtest.sh | 3 - 24 files changed, 148 deletions(-) rename programs/develop/ktcc/trunk/{kx => bin}/doc/en/Features.txt (100%) rename programs/develop/ktcc/trunk/{kx => bin}/doc/en/How to use.txt (100%) rename programs/develop/ktcc/trunk/{kx => bin}/doc/ru/Features.txt (100%) rename programs/develop/ktcc/trunk/{kx => bin}/doc/ru/History.txt (100%) rename programs/develop/ktcc/trunk/{kx => bin}/doc/ru/How to use.txt (100%) rename programs/develop/ktcc/trunk/{kx => bin}/lib/box_lib.def (100%) rename programs/develop/ktcc/trunk/{kx => bin}/lib/console.def (100%) rename programs/develop/ktcc/trunk/{kx => bin}/lib/crt0.o (100%) rename programs/develop/ktcc/trunk/{kx => bin}/lib/dialog.def (100%) rename programs/develop/ktcc/trunk/{kx => bin}/lib/http.def (100%) rename programs/develop/ktcc/trunk/{kx => bin}/lib/img.def (100%) rename programs/develop/ktcc/trunk/{kx => bin}/lib/libSDL.a (100%) rename programs/develop/ktcc/trunk/{kx => bin}/lib/libc.def (100%) rename programs/develop/ktcc/trunk/{kx => bin}/lib/libcryptal.a (100%) rename programs/develop/ktcc/trunk/{kx => bin}/lib/libshell.a (100%) rename programs/develop/ktcc/trunk/{kx => bin}/lib/libsound.a (100%) rename programs/develop/ktcc/trunk/{kx => bin}/lib/libtcc1.a (100%) rename programs/develop/ktcc/trunk/{kx => bin}/lib/mbedtls.def (100%) rename programs/develop/ktcc/trunk/{kx => bin}/lib/msgbox.def (100%) rename programs/develop/ktcc/trunk/{kx => bin}/lib/network.def (100%) rename programs/develop/ktcc/trunk/{kx => bin}/lib/rasterworks.def (100%) delete mode 100644 programs/develop/ktcc/trunk/kx/src/crt/crt0.asm delete mode 100644 programs/develop/ktcc/trunk/kx/src/tests/kxtest.c delete mode 100644 programs/develop/ktcc/trunk/kx/src/tests/kxtest.sh diff --git a/programs/develop/ktcc/trunk/kx/doc/en/Features.txt b/programs/develop/ktcc/trunk/bin/doc/en/Features.txt similarity index 100% rename from programs/develop/ktcc/trunk/kx/doc/en/Features.txt rename to programs/develop/ktcc/trunk/bin/doc/en/Features.txt diff --git a/programs/develop/ktcc/trunk/kx/doc/en/How to use.txt b/programs/develop/ktcc/trunk/bin/doc/en/How to use.txt similarity index 100% rename from programs/develop/ktcc/trunk/kx/doc/en/How to use.txt rename to programs/develop/ktcc/trunk/bin/doc/en/How to use.txt diff --git a/programs/develop/ktcc/trunk/kx/doc/ru/Features.txt b/programs/develop/ktcc/trunk/bin/doc/ru/Features.txt similarity index 100% rename from programs/develop/ktcc/trunk/kx/doc/ru/Features.txt rename to programs/develop/ktcc/trunk/bin/doc/ru/Features.txt diff --git a/programs/develop/ktcc/trunk/kx/doc/ru/History.txt b/programs/develop/ktcc/trunk/bin/doc/ru/History.txt similarity index 100% rename from programs/develop/ktcc/trunk/kx/doc/ru/History.txt rename to programs/develop/ktcc/trunk/bin/doc/ru/History.txt diff --git a/programs/develop/ktcc/trunk/kx/doc/ru/How to use.txt b/programs/develop/ktcc/trunk/bin/doc/ru/How to use.txt similarity index 100% rename from programs/develop/ktcc/trunk/kx/doc/ru/How to use.txt rename to programs/develop/ktcc/trunk/bin/doc/ru/How to use.txt diff --git a/programs/develop/ktcc/trunk/kx/lib/box_lib.def b/programs/develop/ktcc/trunk/bin/lib/box_lib.def similarity index 100% rename from programs/develop/ktcc/trunk/kx/lib/box_lib.def rename to programs/develop/ktcc/trunk/bin/lib/box_lib.def diff --git a/programs/develop/ktcc/trunk/kx/lib/console.def b/programs/develop/ktcc/trunk/bin/lib/console.def similarity index 100% rename from programs/develop/ktcc/trunk/kx/lib/console.def rename to programs/develop/ktcc/trunk/bin/lib/console.def diff --git a/programs/develop/ktcc/trunk/kx/lib/crt0.o b/programs/develop/ktcc/trunk/bin/lib/crt0.o similarity index 100% rename from programs/develop/ktcc/trunk/kx/lib/crt0.o rename to programs/develop/ktcc/trunk/bin/lib/crt0.o diff --git a/programs/develop/ktcc/trunk/kx/lib/dialog.def b/programs/develop/ktcc/trunk/bin/lib/dialog.def similarity index 100% rename from programs/develop/ktcc/trunk/kx/lib/dialog.def rename to programs/develop/ktcc/trunk/bin/lib/dialog.def diff --git a/programs/develop/ktcc/trunk/kx/lib/http.def b/programs/develop/ktcc/trunk/bin/lib/http.def similarity index 100% rename from programs/develop/ktcc/trunk/kx/lib/http.def rename to programs/develop/ktcc/trunk/bin/lib/http.def diff --git a/programs/develop/ktcc/trunk/kx/lib/img.def b/programs/develop/ktcc/trunk/bin/lib/img.def similarity index 100% rename from programs/develop/ktcc/trunk/kx/lib/img.def rename to programs/develop/ktcc/trunk/bin/lib/img.def diff --git a/programs/develop/ktcc/trunk/kx/lib/libSDL.a b/programs/develop/ktcc/trunk/bin/lib/libSDL.a similarity index 100% rename from programs/develop/ktcc/trunk/kx/lib/libSDL.a rename to programs/develop/ktcc/trunk/bin/lib/libSDL.a diff --git a/programs/develop/ktcc/trunk/kx/lib/libc.def b/programs/develop/ktcc/trunk/bin/lib/libc.def similarity index 100% rename from programs/develop/ktcc/trunk/kx/lib/libc.def rename to programs/develop/ktcc/trunk/bin/lib/libc.def diff --git a/programs/develop/ktcc/trunk/kx/lib/libcryptal.a b/programs/develop/ktcc/trunk/bin/lib/libcryptal.a similarity index 100% rename from programs/develop/ktcc/trunk/kx/lib/libcryptal.a rename to programs/develop/ktcc/trunk/bin/lib/libcryptal.a diff --git a/programs/develop/ktcc/trunk/kx/lib/libshell.a b/programs/develop/ktcc/trunk/bin/lib/libshell.a similarity index 100% rename from programs/develop/ktcc/trunk/kx/lib/libshell.a rename to programs/develop/ktcc/trunk/bin/lib/libshell.a diff --git a/programs/develop/ktcc/trunk/kx/lib/libsound.a b/programs/develop/ktcc/trunk/bin/lib/libsound.a similarity index 100% rename from programs/develop/ktcc/trunk/kx/lib/libsound.a rename to programs/develop/ktcc/trunk/bin/lib/libsound.a diff --git a/programs/develop/ktcc/trunk/kx/lib/libtcc1.a b/programs/develop/ktcc/trunk/bin/lib/libtcc1.a similarity index 100% rename from programs/develop/ktcc/trunk/kx/lib/libtcc1.a rename to programs/develop/ktcc/trunk/bin/lib/libtcc1.a diff --git a/programs/develop/ktcc/trunk/kx/lib/mbedtls.def b/programs/develop/ktcc/trunk/bin/lib/mbedtls.def similarity index 100% rename from programs/develop/ktcc/trunk/kx/lib/mbedtls.def rename to programs/develop/ktcc/trunk/bin/lib/mbedtls.def diff --git a/programs/develop/ktcc/trunk/kx/lib/msgbox.def b/programs/develop/ktcc/trunk/bin/lib/msgbox.def similarity index 100% rename from programs/develop/ktcc/trunk/kx/lib/msgbox.def rename to programs/develop/ktcc/trunk/bin/lib/msgbox.def diff --git a/programs/develop/ktcc/trunk/kx/lib/network.def b/programs/develop/ktcc/trunk/bin/lib/network.def similarity index 100% rename from programs/develop/ktcc/trunk/kx/lib/network.def rename to programs/develop/ktcc/trunk/bin/lib/network.def diff --git a/programs/develop/ktcc/trunk/kx/lib/rasterworks.def b/programs/develop/ktcc/trunk/bin/lib/rasterworks.def similarity index 100% rename from programs/develop/ktcc/trunk/kx/lib/rasterworks.def rename to programs/develop/ktcc/trunk/bin/lib/rasterworks.def diff --git a/programs/develop/ktcc/trunk/kx/src/crt/crt0.asm b/programs/develop/ktcc/trunk/kx/src/crt/crt0.asm deleted file mode 100644 index 55bf4f6f69..0000000000 --- a/programs/develop/ktcc/trunk/kx/src/crt/crt0.asm +++ /dev/null @@ -1,127 +0,0 @@ -; -; 2021, Edited by Coldy -; -; This module same as original crt0.asm, but cut: -; 1. virtual header block (hparams change to __app_params, hpath change to __app_path) -; 2. init heap of memory - not needed because 68.18 (68.19) init heap implicitly -; (it is does dll.obj) -; 3. loader (he lives in dll.obj) -; - -format ELF -section '.text' executable -public start -public start as '_start' - -extrn main -;include 'debug2.inc' -include '/../../../../../../proc32.inc' -include '/../../../../../../macros.inc' -__DEBUG__ = 0 - -__app_params equ 0x1C ; Pointer to program arguments -;__app_path equ 0x20 ; Pointer to program path - -start: -;DEBUGF 'Start programm\n' - - mov [argc], 0 - mov eax, [__app_params] - test eax, eax - jz .without_path - mov eax, path - cmp word ptr eax, 32fh ; '/#3' UTF8 - jne .without_path - mov word ptr eax, 12fh ; '/#1' fix to CP866 -.without_path: - mov esi, eax - call push_param -; retrieving parameters - mov esi, params - xor edx, edx ; dl - идёт параметр(1) или разделители(0) - ; dh - символ с которого начался параметр (1 кавычки, 0 остальное) - mov ecx, 1 ; cl = 1 - ; ch = 0 просто ноль -.parse: - lodsb - test al, al - jz .run - test dl, dl - jnz .findendparam - ;{если был разделитель - cmp al, ' ' - jz .parse ;загружен пробел, грузим следующий символ - mov dl, cl ;начинается параметр - cmp al, '"' - jz @f ;загружены кавычки - mov dh, ch ;параметр без кавычек - dec esi - call push_param - inc esi - jmp .parse - - @@: - mov dh, cl ;параметр в кавычеках - call push_param ;если не пробел значит начинается какой то параметр - jmp .parse ;если был разделитель} - -.findendparam: - test dh, dh - jz @f ; без кавычек - cmp al, '"' - jz .clear - jmp .parse - @@: - cmp al, ' ' - jnz .parse - -.clear: - lea ebx, [esi - 1] - mov [ebx], ch - mov dl, ch - jmp .parse - -.run: - push argv - push [argc] - call main -.exit: - xor eax,eax - dec eax - int 0x40 - dd -1 -.crash: - jmp .exit -;============================ -push_param: -;============================ -;parameters -; esi - pointer -;description -; procedure increase argc -; and add pointer to array argv -; procedure changes ebx - mov ebx, [argc] - cmp ebx, max_parameters - jae .dont_add - mov [argv+4*ebx], esi - inc [argc] -.dont_add: - ret - - -;============================== -public argc as '__argc' -public params as '__argv' -public path as '__path' - -section '.bss' -buf_len = 0x400 -max_parameters=0x20 -argc rd 1 -argv rd max_parameters -path rb buf_len -params rb buf_len - -;section '.data' -;include_debug_strings ; ALWAYS present in data section diff --git a/programs/develop/ktcc/trunk/kx/src/tests/kxtest.c b/programs/develop/ktcc/trunk/kx/src/tests/kxtest.c deleted file mode 100644 index f53e59a567..0000000000 --- a/programs/develop/ktcc/trunk/kx/src/tests/kxtest.c +++ /dev/null @@ -1,18 +0,0 @@ -// -// This sample show that KX extension supported or not - -#include - -int main(){ - - char* kx_ext = -#ifndef __KX__ - "not " -#endif - "supported" - ; - - printf("KX extension %s", kx_ext); - - return 0; -} \ No newline at end of file diff --git a/programs/develop/ktcc/trunk/kx/src/tests/kxtest.sh b/programs/develop/ktcc/trunk/kx/src/tests/kxtest.sh deleted file mode 100644 index 94fb434702..0000000000 --- a/programs/develop/ktcc/trunk/kx/src/tests/kxtest.sh +++ /dev/null @@ -1,3 +0,0 @@ -#SHS -../../../tcc ../src/tests/kxtest.c -o kxtest -I../../include -llibc -exit \ No newline at end of file