/programs/develop/fp/examples/build |
---|
Property changes: |
Added: svn:ignore |
+*.exe |
+*.kex |
+*.a |
+*.o |
+*.ppu |
+*.log |
/programs/develop/fp/examples/example.pp |
---|
1,10 → 1,13 |
{$codepage cp866} |
{ FreePascal 2.2.0 ª®¤¨à®¢ª cp866 ¥ ॠ«¨§®¢ . } |
{-$codepage cp866} |
{$mode objfpc} |
{$smartlink on} |
{$apptype console} |
{ ¤ ë© ¬®¬¥â à áᬠâਢ ¥âáï ¢ë¯®«¥¨¥ ¯à¨«®¤¥¨ï ⮫쪮 ª ª ª®á®«ì®¥, |
â.¥. ¤¨à¥ªâ¨¢ concole ®¡ï§ ⥫ì , ¯®¢¥¤¥¨¥ ¯à®£à ¬¬ë ¯à¨ ®âáãâá⢨¨ í⮩ |
â.¥. ¤¨à¥ªâ¨¢ console ®¡ï§ ⥫ì , ¯®¢¥¤¥¨¥ ¯à®£à ¬¬ë ¯à¨ ®âáãâá⢨¨ í⮩ |
¤¨à¥ªâ¨¢ë ¯à¥¤®¯à¥¤¥«¨âì ¥«ì§ï. à â¨à®¢ ® ¥«ì§ï ¨á¯®«ì§®¢ âì äãªæ¨¨ |
Write, WriteLn, Read, ReadLn ®â®á¨â¥«ì® áâ ¤ à⮩ ª®á®«¨ ¢¢®¤ /¢ë¢®¤ . |
} |
21,13 → 24,13 |
{ 뢮¤ ᮤ¥à¦¨¬®£® ®ª ¯à¨«®¦¥¨ï } |
begin |
kos_begindraw(); |
{®¯à¥¤¥«¥¨¥ ¯ à ¬¥â஢ ®ª (0)} |
{®¯à¥¤¥«¥¨¥ ¯ à ¬¥â஢ ®ª } |
kos_definewindow(200, 200, 200, 50, $23AABBCC); |
{kos_definewindow ¥ ¨¬¥¥â ¯ à ¬¥âà ¤«ï ¢ë¢®¤ § £®«®¢ª , |
¤¥« ¥¬ íâ® ®â¤¥«ì®© äãªæ¨¥©} |
{kos_setcaption, ®â®¡à ¦¥¨¥ § £®«®¢ª ®ª (71.1)} |
¤¥« ¥¬ íâ® ®â¤¥«ì®© äãªæ¨¥© kos_setcaption} |
{®â®¡à ¦¥¨¥ § £®«®¢ª ®ª } |
kos_setcaption(' '); |
{¢ë¢®¤ á®®¡é¥¨ï (4)} |
{¢ë¢®¤ á®®¡é¥¨ï} |
kos_drawtext(3, 8, ' ¦¬¨â¥ «î¡ãî ª« ¢¨èã...'); |
kos_enddraw(); |
end; |
44,7 → 47,7 |
Notes[1] := Key shr 8; |
Notes[2] := $00; |
{¢®á¯à®¨§¢®¤¨¬} |
kos_speak(@Notes); |
kos_speaker(@Notes); |
end; |
53,20 → 56,22 |
var |
Button: DWord; |
begin |
{¯®«ãç¨âì ª®¤ ¦ ⮩ ª«¨ë¨è¨} |
{¯®«ãç¨âì ª®¤ ¦ ⮩ ª«¨¢¨è¨} |
Button := kos_getbutton(); |
{¥á«¨ X, â® § ¢¥à襨¥ ¯à¨«®¦¥¨ï} |
Result := Button = 1; |
{¥á«¨ [x], â® ¢¥àãâì «®¦ì, § ç¨â á¯à®¢®æ¨à®¢ âì § ªàë⨥ ¯à¨«®¦¥¨ï} |
Result := Button <> 1; |
end; |
function ProcessMessage: Boolean; |
{ @return: ®§¢à é ¥â False, ¥á«¨ ¡ë«® ᮡë⨥ ª § ¢¥àè¥¨î ¯à¨«®¦¥¨ï. |
{ ¦¨¤ ¨¥ ¨ ®¡à ¡®âª ᮡë⨩. |
@return: ®§¢à é ¥â False, ¥á«¨ ¡ë«® ᮡë⨥ ª § ¢¥àè¥¨î ¯à¨«®¦¥¨ï. |
@rtype: True ¨«¨ False } |
var |
Event: DWord; |
begin |
Result := False; |
Result := True; |
{®¦¨¤ ¥¬ ᮡëâ¨ï ®â á¨á⥬ë} |
Event := kos_getevent(); |
case Event of |
73,7 → 78,7 |
SE_PAINT : DoPaint; {¯¥à¥à¨á®¢ª ®ª } |
SE_KEYBOARD: DoKey; {ᮡë⨥ ®â ª« ¢¨ âãàë} |
SE_BUTTON : Result := DoButton; {ᮡ먥 ®â ª®¯ª¨, ¬®¦¥â ®¯à¥¤¥«¨âì |
§ ¢¥à襨¥ ¯à¨«®¦¥¨ï, ¥á«¨ ¢¥à¥â True} |
§ ¢¥à襨¥ ¯à¨«®¦¥¨ï, ¥á«¨ ¢¥à¥â False} |
end; |
end; |
83,17 → 88,14 |
var |
ThreadSlot: TThreadSlot; |
begin |
{ᤥ« âì íâ® ®ª® ªâ¨¢ë¬} |
ThreadSlot := kos_getthreadslot(ThreadID); |
kos_setactivewindow(ThreadSlot); |
{ áâà ¨¢ ¥¬ ᮡëâ¨ï, ª®â®àë¥ ¬ë £®â®¢ë ®¡à ¡ âë¢ âì} |
kos_maskevents(ME_PAINT or ME_KEYBOARD or ME_BUTTON); |
{£« ¢ë© 横«} |
while not ProcessMessage do; |
{®¡à ¡®âª ᮡë⨩} |
while ProcessMessage do; |
end; |
begin |
WriteLn('Look for a new window, I''m just a konsole, hi mike ;-)'); |
WriteLn('Look for a new window, I''m just a konsole ;-)'); |
MainLoop; |
end. |
/programs/develop/fp/examples |
---|
Property changes: |
Added: svn:ignore |
+*.exe |
+*.kex |
+*.a |
+*.o |
+*.ppu |
+*.log |
/programs/develop/fp/exe2kos |
---|
Property changes: |
Modified: svn:ignore |
*.exe |
+*.kex |
+*.a |
*.o |
*.ppu |
*.log |
/programs/develop/fp/readme-ru.txt |
---|
1,7 → 1,7 |
Codepage: cp866 |
¥ªã騩 ª®¤ ¤ ¯â¨à®¢ ¨ ¯à®¢¥àï«áï ⮫쪮 FreePascal 2.3.1 (SVN 8373) ¯à¨ |
ª®¬¯¨«ï樨 ¨§ Windows. |
¥ªã騩 ª®¤ ¤ ¯â¨à®¢ ¨ ¯à®¢¥àï«áï ⮫쪮 FreePascal 2.2.0 ¯à¨ ª®¬¯¨«ï樨 |
¨§ Windows. |
«ï ª®¬¯¨«¨à®¢ ¨ï ¢¥àᨨ RTL ¤«ï KolibriOS ¢ ¬ ¥®¡å®¤¨¬® ¨¬¥âì ãáâ ®¢«¥ë© |
ã ᥡï FreePascal á ¨á室묨 ª®¤ ¬¨ RTL 㪠§ ®© ¢ëè¥ ¢¥àᨨ. âªà®©â¥ ä ©« |
/programs/develop/fp/rtl/_defines.inc |
---|
5,5 → 5,7 |
{$undef os2} |
{$undef linux} |
{$undef DISABLE_NO_THREAD_MANAGER} |
{$undef debug_mt} |
{$define EMULATOR} |
{$undef debug_mt} |
/programs/develop/fp/rtl/kos.inc |
---|
594,7 → 594,7 |
{ Sound } |
function kos_speak(notes: Pointer): Boolean; assembler; register; |
function kos_speaker(notes: Pointer): Boolean; assembler; register; |
asm |
pushl %esi |
pushl %ebx |
/programs/develop/fp/rtl/kos_stdio.inc |
---|
151,6 → 151,7 |
FThreadID := BeginThread(TThreadFunc(@KonsoleThreadMain), @Self); |
if FThreadID <> 0 then |
{XXX: ¬®¦¥â § ¢¨áãâì} |
{®, â ª ¨ ¥áâì ¢ 2.2.0.} |
while not FOpened do ThreadSwitch; |
end; |
/programs/develop/fp/rtl/kosh.inc |
---|
142,7 → 142,7 |
{ Sound } |
function kos_speak(notes: Pointer): Boolean; |
function kos_speaker(notes: Pointer): Boolean; |
{ Work with hardware } |
function kos_readport(index: DWord): DWord; |
/programs/develop/fp/rtl/systhrd.inc |
---|
185,7 → 185,7 |
if not IsMultiThread then |
begin |
TLSKey := TLSAlloc(); |
InitThreadVars(@SysRelocateThreadVar); {XXX: must be @SysRelocateThreadvar} |
InitThreadVars(@SysRelocateThreadVar); |
IsMultiThread := True; |
end; |
287,7 → 287,52 |
end; |
{***************************************************************************** |
Heap Mutex Protection |
*****************************************************************************} |
{$ifndef HAS_MT_MEMORYMANAGER} |
var |
HeapMutex: TRTLCriticalSection; |
procedure KosHeapMutexInit; |
begin |
InitCriticalSection(HeapMutex); |
end; |
procedure KosHeapMutexDone; |
begin |
DoneCriticalSection(HeapMutex); |
end; |
procedure KosHeapMutexLock; |
begin |
EnterCriticalSection(HeapMutex); |
end; |
procedure KosHeapMutexUnlock; |
begin |
LeaveCriticalSection(HeapMutex); |
end; |
const |
KosMemoryMutexManager: TMemoryMutexManager = ( |
MutexInit : @KosHeapMutexInit; |
MutexDone : @KosHeapMutexDone; |
MutexLock : @KosHeapMutexLock; |
MutexUnlock: @KosHeapMutexUnlock); |
procedure InitHeapMutexes; |
begin |
SetMemoryMutexManager(KosMemoryMutexManager); |
end; |
{$endif HAS_MT_MEMORYMANAGER} |
var |
KosThreadManager: TThreadManager; |
procedure InitSystemThreads; |
336,5 → 381,8 |
SemaphorePost := @NoSemaphorePost; |
end; |
SetThreadManager(KosThreadManager); |
{$ifndef HAS_MT_MEMORYMANAGER} |
InitHeapMutexes; |
{$endif HAS_MT_MEMORYMANAGER} |
ThreadID := GetCurrentThreadID; |
end; |
/programs/develop/fp/rtl/sysutils.pp |
---|
161,7 → 161,7 |
ReleaseFileRecord(Handle); |
end; |
function FileTruncate(Handle: THandle; Size: Int64): Boolean; |
function FileTruncate(Handle: THandle; Size: Longint): Boolean; |
begin |
Result := False; |
end; |
/programs/develop/fp/rtl |
---|
Property changes: |
Modified: svn:ignore |
*.exe |
+*.kex |
+*.a |
*.o |
*.ppu |
*.log |
/programs/develop/fp/units |
---|
Property changes: |
Added: svn:ignore |
+*.exe |
+*.kex |
+*.a |
+*.o |
+*.ppu |
+*.log |
/programs/develop/fp/. |
---|
Property changes: |
Modified: svn:ignore |
*.exe |
+*.kex |
+*.a |
*.o |
*.ppu |
*.log |