Re: BASIC
Posted: Wed Mar 22, 2017 6:31 pm
В архиве есть бинарник без расширения. Исполняемые файлы начинаются с заголовка MENUET или упакованные KPCK
При отсутствии нормального редактора внутри KolibriOS это пока что остаётся единственным разумным вариантом и не только для FreeBasic.Siemargl wrote:- Freebasic. Тема тут
Продвинутый диалект, но только кросскомпиляция
Теоретически, может и не нужно, так как существует KolibriOS.Lib (можно взять из темы Delphi7 examples http://board.kolibrios.org/viewtopic.php?f=33&t=3469), нужны лишь объявления системных функций, подобно тому как это сделано для UASM\JWasm(http://board.kolibrios.org/viewtopic.php?f=32&t=3583), GoAsm(http://board.kolibrios.org/viewtopic.php?f=32&t=3579), TASM32(http://board.kolibrios.org/viewtopic.ph ... 113#p69113), C--(http://board.kolibrios.org/viewtopic.ph ... 180#p69064).Siemargl wrote:нужно на встроенном ассемблере писать библиотеку системных вызовов для Колибри
Хотя, возможно, в более новых версиях FreeBasic что-то могло измениться в лучшую сторону.FB follows the GCC (GNU Compiler Collection) standards when mangling symbols, and because both statically and dynamically libraries must be supported (what neither PB or VB allows), every standard-call name is mangled with the @n suffix.
MS' choice was to mangle only the import library (the *.dll.a files in [fb-dir]/lib/win32) but leaving the DLL symbols unmangled, but LD (the GNU linker) doesn't follow that.
So, in short, if a DLL has no import library to be used by a C compiler, you have create one using pexports + dlltool. Now, if it follows the MS standard, then you will have to edit the .def file and add the mangling by hand like "foo = foo@12\nbar = bar@4", not a fun task..
In 0.17 you can create DLL's that are compatible with the MS mangling to be used in VB or PB, by passing a command to LD through FB when building the dll: "fbc mydll.bas -dll -Wl --kill-at".
Оказалось, не всё так плохо.0CodErr wrote:Сам я не пробовал FreeBasic+KolibriOS.Lib, но на практике могут возникнуть проблемы с манглингом
Code: Select all
Extern "Windows-MS"
Declare Sub MyProc( As Integer, As Integer )
End Extern
Code: Select all
push 20
push 10
call _MyProc
https://www.freebasic.net/wiki/wikka.php?wakka=KeyPgStdcall wrote:Platform Differences:
On Windows systems, Stdcall procedures have an "@N" decoration added to their internal/external name, where N is the size of the parameter list, in bytes.
https://www.freebasic.net/wiki/wikka.php?wakka=KeyPgExternBlock wrote:Platform Differences:
On Linux, *BSD and DOS platforms, Extern "Windows" blocks never append a "@N" suffix to procedure names, and thus are equal to Extern "Windows-MS".
Fixed #7845.Leency wrote:Серьезный баг: в TinyBasic после нажатия на клавиши стрелок перестаёт работать ввод с клавиатуры.