Delphi7 examples
Posted: Sat Feb 04, 2017 10:00 pm
Here are some Delphi7 examples of using wrappers to call system functions from KolibriOS.lib.
Also, it is possible to use FreePascal compiler i hope. Newer version is more compatible with Delphi.
The main goal is more convenient programming with KolibriOS API.
Tools needed:Here omf2d utility just in case: Some examples and KolibriOS.lib: It contains these 5 examples:
{1} Just a simple window.
Used functions: DrawWindow, GetScreenSize, WaitEvent, BeginDraw, EndDraw, GetKey, GetButton, ThreadTerminate.{2} When you click on the buttons the window caption changes.
Used functions: DrawButton, GetButton, SetWindowCaption, GetScreenSize, WaitEvent, BeginDraw, DrawWindow, EndDraw, GetKey, ThreadTerminate.{3} Press on the keyboard and text will be drawn in window.
Used functions: GetKey, DrawText, GetScreenSize, WaitEvent, BeginDraw, DrawWindow, EndDraw, GetButton, ThreadTerminate.{4} Load example.asm into console window.
Used functions: LoadFile, LoadLibrary, GetProcAddress, ThreadTerminate.{5} Show CurrentDirectory, AppPath and CmdLine in console window.
Used functions: GetCurrentDirectory, LoadLibrary, GetProcAddress, ThreadTerminate.
In the case of new examples they will be added to this topic below.
Also, it is possible to use FreePascal compiler i hope. Newer version is more compatible with Delphi.
The main goal is more convenient programming with KolibriOS API.
Tools needed:
Code: Select all
dcc32 — Delphi compiler
omf2d — utility for converting from Borland omf to Intel omf
link — Microsoft linker
ld — GNU linker
objcopy — utility to convert object files
{1} Just a simple window.
Used functions: DrawWindow, GetScreenSize, WaitEvent, BeginDraw, EndDraw, GetKey, GetButton, ThreadTerminate.
Spoiler:
Used functions: DrawButton, GetButton, SetWindowCaption, GetScreenSize, WaitEvent, BeginDraw, DrawWindow, EndDraw, GetKey, ThreadTerminate.
Spoiler:
Used functions: GetKey, DrawText, GetScreenSize, WaitEvent, BeginDraw, DrawWindow, EndDraw, GetButton, ThreadTerminate.
Spoiler:
Used functions: LoadFile, LoadLibrary, GetProcAddress, ThreadTerminate.
Spoiler:
Used functions: GetCurrentDirectory, LoadLibrary, GetProcAddress, ThreadTerminate.
In the case of new examples they will be added to this topic below.