From: ol.sc Date: Sat, 4 Feb 2012 17:56:46 +0000 (+0000) Subject: Moved the 'process' files from 'geos-cbm' to 'geos-common' which are believed to... X-Git-Tag: V2.13.3~21 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4c16163c7cecbecfa8c4356e86539887a6730686;p=cc65 Moved the 'process' files from 'geos-cbm' to 'geos-common' which are believed to work as-is on Apple GEOS too. git-svn-id: svn://svn.cc65.org/cc65/trunk@5444 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/geos-cbm/Makefile b/libsrc/geos-cbm/Makefile index 057e07363..314040fec 100644 --- a/libsrc/geos-cbm/Makefile +++ b/libsrc/geos-cbm/Makefile @@ -50,7 +50,6 @@ DIRS = common \ disk \ file \ memory \ - process \ runtime \ system diff --git a/libsrc/geos-cbm/process/Makefile b/libsrc/geos-cbm/process/Makefile deleted file mode 100644 index e214f01c8..000000000 --- a/libsrc/geos-cbm/process/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# -# makefile for CC65 runtime library -# - -#-------------------------------------------------------------------------- -# Object files - -S_OBJS += processinitrestartenable.o \ - processblock.o \ - processfreeze.o \ - processsleep.o diff --git a/libsrc/geos-cbm/process/processblock.s b/libsrc/geos-cbm/process/processblock.s deleted file mode 100644 index 94928894e..000000000 --- a/libsrc/geos-cbm/process/processblock.s +++ /dev/null @@ -1,25 +0,0 @@ - -; -; Maciej 'YTM/Alliance' Witkowiak -; -; 27.10.99 - -; -; void InitProcesses (char number, struct process* proctab); -; (rest) -; void BlockProcess (char number); -; void UnBlockProcess (char number); -; - - .export _BlockProcess - .export _UnBlockProcess - - .include "jumptab.inc" - -_BlockProcess: - tax - jmp BlockProcess - -_UnBlockProcess: - tax - jmp UnBlockProcess diff --git a/libsrc/geos-cbm/process/processfreeze.s b/libsrc/geos-cbm/process/processfreeze.s deleted file mode 100644 index eb6b22019..000000000 --- a/libsrc/geos-cbm/process/processfreeze.s +++ /dev/null @@ -1,23 +0,0 @@ - -; -; Maciej 'YTM/Alliance' Witkowiak -; -; 27.10.99 - -; -; void FreezeProcess (char number); -; void UnFreezeProcess (char number); -; - - .export _FreezeProcess - .export _UnFreezeProcess - - .include "jumptab.inc" - -_FreezeProcess: - tax - jmp FreezeProcess - -_UnFreezeProcess: - tax - jmp UnFreezeProcess diff --git a/libsrc/geos-cbm/process/processinitrestartenable.s b/libsrc/geos-cbm/process/processinitrestartenable.s deleted file mode 100644 index 5a0f33ac3..000000000 --- a/libsrc/geos-cbm/process/processinitrestartenable.s +++ /dev/null @@ -1,34 +0,0 @@ - -; -; Maciej 'YTM/Alliance' Witkowiak -; -; 27.10.99 - -; -; void InitProcesses (char number, struct process* proctab); -; void RestartProcess (char number); -; void EnableProcess (char number); -; - - .import popa - .export _InitProcesses - .export _RestartProcess - .export _EnableProcess - - .include "jumptab.inc" - .include "geossym.inc" - -_InitProcesses: - - sta r0L - stx r0H - jsr popa - jmp InitProcesses - -_RestartProcess: - tax - jmp RestartProcess - -_EnableProcess: - tax - jmp EnableProcess diff --git a/libsrc/geos-cbm/process/processsleep.s b/libsrc/geos-cbm/process/processsleep.s deleted file mode 100644 index e44ecd2eb..000000000 --- a/libsrc/geos-cbm/process/processsleep.s +++ /dev/null @@ -1,37 +0,0 @@ - -; -; Maciej 'YTM/Elysium' Witkowiak -; -; 30.10.99, 15.8.2003 - -; -; void Sleep (int jiffies); -; - - .export _Sleep - - .include "jumptab.inc" - .include "geossym.inc" - .importzp ptr1 - .importzp tmp1 - -_SleepExit: - jsr Sleep ; call Sleep - ldx tmp1 - txs ; restore stack pointer - jmp (ptr1) ; when timeouts control will reach here - -_Sleep: - sta r0L ; store data - stx r0H - pla - sta ptr1 - pla - sta ptr1+1 ; preserve return address - inc ptr1 - bne @L0 - inc ptr1+1 ; fix return address -@L0: tsx - stx tmp1 ; preserve stack pointer - jsr _SleepExit ; call Sleep - jmp MainLoop ; immediate return here - go to idle loop diff --git a/libsrc/geos-common/Makefile b/libsrc/geos-common/Makefile index 7751ec811..746205078 100644 --- a/libsrc/geos-common/Makefile +++ b/libsrc/geos-common/Makefile @@ -34,7 +34,8 @@ DIRS = dlgbox \ graph \ memory \ menuicon \ - mousesprite + mousesprite \ + process #-------------------------------------------------------------------------- # Directives diff --git a/libsrc/geos-common/process/Makefile b/libsrc/geos-common/process/Makefile new file mode 100644 index 000000000..e214f01c8 --- /dev/null +++ b/libsrc/geos-common/process/Makefile @@ -0,0 +1,11 @@ +# +# makefile for CC65 runtime library +# + +#-------------------------------------------------------------------------- +# Object files + +S_OBJS += processinitrestartenable.o \ + processblock.o \ + processfreeze.o \ + processsleep.o diff --git a/libsrc/geos-common/process/processblock.s b/libsrc/geos-common/process/processblock.s new file mode 100644 index 000000000..94928894e --- /dev/null +++ b/libsrc/geos-common/process/processblock.s @@ -0,0 +1,25 @@ + +; +; Maciej 'YTM/Alliance' Witkowiak +; +; 27.10.99 + +; +; void InitProcesses (char number, struct process* proctab); +; (rest) +; void BlockProcess (char number); +; void UnBlockProcess (char number); +; + + .export _BlockProcess + .export _UnBlockProcess + + .include "jumptab.inc" + +_BlockProcess: + tax + jmp BlockProcess + +_UnBlockProcess: + tax + jmp UnBlockProcess diff --git a/libsrc/geos-common/process/processfreeze.s b/libsrc/geos-common/process/processfreeze.s new file mode 100644 index 000000000..eb6b22019 --- /dev/null +++ b/libsrc/geos-common/process/processfreeze.s @@ -0,0 +1,23 @@ + +; +; Maciej 'YTM/Alliance' Witkowiak +; +; 27.10.99 + +; +; void FreezeProcess (char number); +; void UnFreezeProcess (char number); +; + + .export _FreezeProcess + .export _UnFreezeProcess + + .include "jumptab.inc" + +_FreezeProcess: + tax + jmp FreezeProcess + +_UnFreezeProcess: + tax + jmp UnFreezeProcess diff --git a/libsrc/geos-common/process/processinitrestartenable.s b/libsrc/geos-common/process/processinitrestartenable.s new file mode 100644 index 000000000..5a0f33ac3 --- /dev/null +++ b/libsrc/geos-common/process/processinitrestartenable.s @@ -0,0 +1,34 @@ + +; +; Maciej 'YTM/Alliance' Witkowiak +; +; 27.10.99 + +; +; void InitProcesses (char number, struct process* proctab); +; void RestartProcess (char number); +; void EnableProcess (char number); +; + + .import popa + .export _InitProcesses + .export _RestartProcess + .export _EnableProcess + + .include "jumptab.inc" + .include "geossym.inc" + +_InitProcesses: + + sta r0L + stx r0H + jsr popa + jmp InitProcesses + +_RestartProcess: + tax + jmp RestartProcess + +_EnableProcess: + tax + jmp EnableProcess diff --git a/libsrc/geos-common/process/processsleep.s b/libsrc/geos-common/process/processsleep.s new file mode 100644 index 000000000..e44ecd2eb --- /dev/null +++ b/libsrc/geos-common/process/processsleep.s @@ -0,0 +1,37 @@ + +; +; Maciej 'YTM/Elysium' Witkowiak +; +; 30.10.99, 15.8.2003 + +; +; void Sleep (int jiffies); +; + + .export _Sleep + + .include "jumptab.inc" + .include "geossym.inc" + .importzp ptr1 + .importzp tmp1 + +_SleepExit: + jsr Sleep ; call Sleep + ldx tmp1 + txs ; restore stack pointer + jmp (ptr1) ; when timeouts control will reach here + +_Sleep: + sta r0L ; store data + stx r0H + pla + sta ptr1 + pla + sta ptr1+1 ; preserve return address + inc ptr1 + bne @L0 + inc ptr1+1 ; fix return address +@L0: tsx + stx tmp1 ; preserve stack pointer + jsr _SleepExit ; call Sleep + jmp MainLoop ; immediate return here - go to idle loop