Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Some more work on KolibriOS support. Very simple example added - test_code/FreshLibHello.fpr - able to be compiled for Win32, Linux and KolibriOS from the same source. There is still a lot of work on the KolibriOS port anyway. |
---|---|
Timelines: | family | ancestors | descendants | both | FreshLibDev |
Files: | files | file ages | folders |
SHA1: |
0e5f16b0455b4869e017991560a9202a |
User & Date: | johnfound 2012-10-19 21:13:17 |
Context
2012-10-20
| ||
18:53 | Implemented KolibriOS/heapmgr.asm heap manager OS dependent part. check-in: 03fc7c9bbe user: johnfound tags: FreshLibDev | |
2012-10-19
| ||
21:13 | Some more work on KolibriOS support. Very simple example added - test_code/FreshLibHello.fpr - able to be compiled for Win32, Linux and KolibriOS from the same source. There is still a lot of work on the KolibriOS port anyway. check-in: 0e5f16b045 user: johnfound tags: FreshLibDev | |
19:39 | In OS dependent libraries added directory "Dummy" with empty templates for the OS dependent part of FreshLib. Added KolibriOS port, mostly empty in this commit. The memory management is based on "heapmgr.asm" check-in: ae5de2bd7b user: johnfound tags: FreshLibDev | |
Changes
Changes to freshlib/TestFreshLib.fpr.
cannot compute difference between binary files
Changes to freshlib/simpledebug/KolibriOS/debug.asm.
︙ | ︙ | |||
13 14 15 16 17 18 19 | ;_________________________________________________________________________________________ proc Output, .ptrStr begin pushad | < < < > > < | > | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | ;_________________________________________________________________________________________ proc Output, .ptrStr begin pushad mov esi, [.ptrStr] mov eax, sys_msg_board mov ebx, 1 .loop: mov cl, [esi] test cl,cl jz .finish lea esi, [esi+1] int $40 jmp .loop .finish: popad return endp proc GetTimestamp |
︙ | ︙ |
Changes to freshlib/system/KolibriOS/files.asm.
︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | DIR_SLASH equ '/' fsFromBegin = 0 fsFromEnd = 2 fsFromCurrent = 1 initialize InitStdHandles begin if used STDIN mov dword [__std_handle_in], 0 end if if used STDOUT mov dword [__std_handle_out], 1 end if if used STDERR mov dword [__std_handle_err], 2 end if return endp | > | | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | DIR_SLASH equ '/' fsFromBegin = 0 fsFromEnd = 2 fsFromCurrent = 1 if used STDIN | used STDOUT | used STDERR initialize InitStdHandles begin if used STDIN mov dword [__std_handle_in], 0 end if if used STDOUT mov dword [__std_handle_out], 1 end if if used STDERR mov dword [__std_handle_err], 2 end if return endp end if ;-------------------------------------- ; if CF = 0, eax is handle to the file. ; if CF = 1, eax is error code. ;-------------------------------------- |
︙ | ︙ |
Changes to freshlib/system/KolibriOS/timers.asm.
︙ | ︙ | |||
9 10 11 12 13 14 15 | ; ; Dependencies: ; ; Notes: ;_________________________________________________________________________________________ | < < | < < | < < < < < < > > > > > > > > > > > > > | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | ; ; Dependencies: ; ; Notes: ;_________________________________________________________________________________________ proc GetTime begin xor eax, eax return endp proc GetLocalTimeOffset begin xor eax, eax return endp proc Sleep, .ms begin push eax ebx ecx edx mov ecx, 10 mov eax, [.ms] cdq div ecx mov ebx, eax mov eax, sys_delay_hs int $40 pop edx ecx ebx eax return endp |
Added freshlib/test_code/FreshLibHello.asm.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ; _______________________________________________________________________________________ ;| | ;| ..:: Fresh IDE ::.. template project. | ;|_______________________________________________________________________________________| ; ; Description: FreshLib portable GUI application. ; ; Target OS: Any, supported by FreshLib ; ; Dependencies: FreshLib ; ; Notes: ;_________________________________________________________________________________________ include "%lib%/freshlib.inc" @BinaryType GUI include "%lib%/freshlib.asm" start: InitializeAll stdcall Output, 'Hello portable world!' stdcall Sleep, 5000 FinalizeAll stdcall TerminateAll, 0 @AllImportEmbeded ; or @AllImportSection @AllDataEmbeded ; or @AllDataSection |
Added freshlib/test_code/FreshLibHello.fpr.
cannot compute difference between binary files
Changes to freshlib/test_code0/TestLib.asm.
︙ | ︙ | |||
19 20 21 22 23 24 25 | include '%lib%/freshlib.inc' @BinaryType GUI options.FastEnter = 0 ; enter/leave or push ebp/pop ebp approach to the procedures. options.ShowSkipped = 0 ; shows the procedures skiped because of no use. options.ShowSizes = 1 ; enable/disable work of DispSize macro. options.ShowImported = 1 ; enable/disable display of imported functions. | | | < < < < < > < < | | | | | > > | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | include '%lib%/freshlib.inc' @BinaryType GUI options.FastEnter = 0 ; enter/leave or push ebp/pop ebp approach to the procedures. options.ShowSkipped = 0 ; shows the procedures skiped because of no use. options.ShowSizes = 1 ; enable/disable work of DispSize macro. options.ShowImported = 1 ; enable/disable display of imported functions. options.DebugMode = 1 ; enable/disable macros of simpledebug library. ;LinuxThreads equ native ;HeapManager equ OS ;HeapManager equ ASM include '%lib%/freshlib.asm' ; use one and only one of the following files. ; ;include 'TestGroundNull.asm' ;include 'TestGround.asm' ;include 'TestGroundComplex.asm' ;include 'TestGroundKeyboard.asm' ;include 'TestGroundFreshEdit.asm' ;include 'TestGroundConfig.asm' ;include 'TestGroundDirFunctions.asm' ;if TargetOS eq Linux ; rb 604 ; this bytes simply make ELF file to be loadable. ; ; there is a bug somewhere in the ELF generator (FASM or possibly ELF macros) ; ; that makes some sizes of the ELF executable not loadable. (the Linux loader crashes with SEGFAULT) ;end if ; Main Program pthread_create start: InitializeAll DebugMsg 'Before initializing.' DebugMsg 'After initializing.' ; stdcall Create, CApplication ; jc .start_error ; mov [pApplication], ebx ; stdcall PrepareDemo DebugMsg 'Just before run.' stdcall Sleep, 2000 ; stdcall Run .terminate: push eax FinalizeAll DebugMsg 'Just before the end.' stdcall TerminateAll ; from the stack |
︙ | ︙ |