Author Topic: KnightOS  (Read 188618 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: KnightOS
« Reply #240 on: October 15, 2010, 11:56:33 am »
Cool :D. Just make sure programs cannot be dependent on 128 KB of RAM pages, though, else those programs will have a limited audience, like the 85, 86 and 92 calculators, since the last calc to have 128 KB of RAM was in early 2007.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

SirCmpwn

  • Guest
Re: KnightOS
« Reply #241 on: October 15, 2010, 10:34:20 pm »
Update
Libraries are now fully implemented, with the ability to lcall functions in a library, and the ability to navigate through a library from within itself, using lld, lcall, and ljp.
« Last Edit: October 15, 2010, 10:34:57 pm by SirCmpwn »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: KnightOS
« Reply #242 on: October 15, 2010, 11:04:16 pm »
Nice :D
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6265
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: KnightOS
« Reply #243 on: October 19, 2010, 11:22:22 am »
Sweet :D can't wait to play around and make some nice GUI libraries :P
/e

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: KnightOS
« Reply #244 on: October 20, 2010, 04:11:20 pm »
Nice!  * ZTrumpet hopes coding's going smoothly. ;D

SirCmpwn

  • Guest
Re: KnightOS
« Reply #245 on: October 20, 2010, 04:45:53 pm »
Yepyep.

SirCmpwn

  • Guest
Re: KnightOS
« Reply #246 on: October 22, 2010, 10:50:19 pm »
Update
Flash writing now works great!  You can change the value of anything in flash memory.  Still to-do are page erasures, and for some odd reason, the flash write routine doesn't return correctly, but that should be easy to fix.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6265
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: KnightOS
« Reply #247 on: October 22, 2010, 10:51:26 pm »
YAY! :D
/e

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: KnightOS
« Reply #248 on: October 22, 2010, 10:53:14 pm »
Cool! Tested thoroughly and all?

I have a concern about compatibility with my 83+, though... as it doesn't support app compiling in Axe...
« Last Edit: October 22, 2010, 10:53:57 pm by DJ Omnimaga »
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline guy6020665

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 481
  • Rating: +7/-1
    • View Profile
Re: KnightOS
« Reply #249 on: October 22, 2010, 11:23:59 pm »
Is it just your 83+? because App compiling seems to work on mine.

SirCmpwn

  • Guest
Re: KnightOS
« Reply #250 on: October 22, 2010, 11:40:25 pm »
Cool! Tested thoroughly and all?

I have a concern about compatibility with my 83+, though... as it doesn't support app compiling in Axe...
Tested thoroughly, not really.  As for Axe stuff with apps, I'm not entirely sure how this applies...

Offline Ranman

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1354
  • Rating: +83/-0
    • View Profile
Re: KnightOS
« Reply #251 on: October 23, 2010, 04:34:06 am »
This is amazing SirCmpwn!

I'm really interested in your multitasking implementation. What type of scheduling algorithm did you use? Are you planning on implementing a priority based preemptive multithreaded capability -- similar to some commercial off the shelf Real Time OSs (like VxWorks or Integrity)? Have you thought about how different tasks can communicate and/or signal one another?

Once again... I'm very impressed!

Ranman
Bringing Randy Glover's Jumpman to the TI-89 calculator. Download available at Ticalc.

SirCmpwn

  • Guest
Re: KnightOS
« Reply #252 on: October 23, 2010, 10:56:49 am »
As for scheduling, there is only 6 MHz to go around, 15 at best, so the scheduler is as fast as possible and simply moves between threads.  Each thread has the same priority, although I will eventually add implementation outside the kernel for moving threads out of the thread table if they are asleep.
Communication between threads, I was thinking of synchronized threads and shared-stack threads.  Synchronized threads are running right after each other with a shared stack, and several helper methods would be there to keep them in sync, such as SyncWithSister (input A=any number), which would pause execution until the other thread calls SyncWithSister (A=Sister's chosen number).
Shared stack threads share variables and stack, and merely run different code.
ExecProgram and StartThread return the thread ID in A.  SendToThread sends HL to thread A, and RecieveFromThread returns HL and the thread it came from.

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: KnightOS
« Reply #253 on: October 23, 2010, 11:01:12 am »
I'm happy to see more progress on this. Very nice! ^^

Offline Ranman

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1354
  • Rating: +83/-0
    • View Profile
Re: KnightOS
« Reply #254 on: October 23, 2010, 11:23:31 am »
A common syncing mechanism for commercial RTOSs is via something called a semaphore.

The APIs I see used most often are:

WaitForSemaphore(Semaphore* semaphore);
ReleaseSemaphore(Semaphore* semaphore);

and

SemWait(Semaphore* semaphore);
SemRelease(Semaphore* semaphore);

The task waiting on the semaphore is basically pended (or blocked/asleep) until another thread releases the semaphore. Hence, a great way to sync 2 tasks.

Anyway... just throwing some ideas at ya.
Ranman
Bringing Randy Glover's Jumpman to the TI-89 calculator. Download available at Ticalc.