Author Topic: KnightOS  (Read 188329 times)

0 Members and 1 Guest are viewing this topic.

Offline matthias1992

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 408
  • Rating: +33/-5
    • View Profile
Re: KnightOS
« Reply #540 on: November 17, 2010, 06:41:51 am »
I'm not using a register, although refresh is a good idea.
So, an entirely different subject. How do you manage multi-threading? I really have been wrecking my brain over it...I assume you use time-division multiplexing? But then again where do you leave/store all the 'shadow' Program Counters?

Also, how many threads will KOS support eventually or is it basically unlimited (despite significant slowdown)

You really should also include BSOD's hehe, any calc user will go nuts on seeing their screen turn dark blue! j/k :P
MASM xxxxxxxxxx aborted | SADce ====:::::: 40% -Halted until further notice| XAOS =====::::: 50% -Units done| SKYBOX2D engine ========== 100% -Pre-alpha done. Need to  document it and extend |

~Those who dream by day are cognizant of much more than those who dream by night only. -Sir Edgar Allen Poe-

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: KnightOS
« Reply #541 on: November 17, 2010, 10:41:02 am »
Hmm, is there a way to detect if a BSoD byte is sent? If it is, maybe KOS could cancel it as soon as it's detected...




Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: KnightOS
« Reply #542 on: November 17, 2010, 10:45:21 am »
I think he said 20 threads max.

An error OE exception has occurred.

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: KnightOS
« Reply #543 on: November 17, 2010, 10:28:23 pm »
Hmm, is there a way to detect if a BSoD byte is sent? If it is, maybe KOS could cancel it as soon as it's detected...
Not really.  BSOD occurs when the screen is put into test mode.  This would require knowing what bytes were written to the port, which, IIRC, isn't possible.  I think that it could correct it, but it would wast time and space.

SirCmpwn

  • Guest
Re: KnightOS
« Reply #544 on: November 18, 2010, 08:25:02 pm »
*BLOD
I also have crash alerts, where it will apologize to the user for crashing and try to recover the previous state.

So, an entirely different subject. How do you manage multi-threading? I really have been wrecking my brain over it...I assume you use time-division multiplexing? But then again where do you leave/store all the 'shadow' Program Counters?

Also, how many threads will KOS support eventually or is it basically unlimited (despite significant slowdown)
20 threads max.  As for multithreading, I use interrupts to switch threads, and push all the registers to the stack during the interrupt.  Then, I change the value of SP to point to a different thread's stack, pop all the registers, and RET.  That's the small and simple explanation.

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: KnightOS
« Reply #545 on: November 18, 2010, 09:57:31 pm »
I also have crash alerts, where it will apologize to the user for crashing and try to recover the previous state.
*jaw drops*  Awesome!!!  "Sorry, your calculator just crashed.  Trying to recover..." That would be nice.  Does it ask to recover?  How does it recover?

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 #546 on: November 18, 2010, 11:28:52 pm »
*BLOD
BSOD on the 83+SE. Instead of a few blue lines, the entire screen turns blue in test mode. :P

Crash alerts and the like sounds cool, but please make sure we can get out of any crash, unlike the TI-Nspire. I hated having to clear the entire memory to get out of one. On  the 89 Titanium I often had this happen too (Line 1111 emulation or something) and I always had to spend 10 minutes trying to find the key combination to get out of the crash everytime...
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

SirCmpwn

  • Guest
Re: KnightOS
« Reply #547 on: November 19, 2010, 04:59:53 pm »
*jaw drops*  Awesome!!!  "Sorry, your calculator just crashed.  Trying to recover..." That would be nice.  Does it ask to recover?  How does it recover?
It looks at a sort of checksum of RAM to make sure it isn't corrupted, and sets a flag that says a restore was attempted, so it won't try it if it crashes again.  It unloads the currently executing thread, which is probably the source of the crash.  Then, it just restores the calculator to an executing state, where everything is already loaded in RAM.

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: KnightOS
« Reply #548 on: November 20, 2010, 05:03:43 pm »
Woah, nice work :)
BSOD on the 83+SE. Instead of a few blue lines, the entire screen turns blue in test mode. :P
On my 84+SE the whole screen turns blue as well :P

Offline matthias1992

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 408
  • Rating: +33/-5
    • View Profile
Re: KnightOS
« Reply #549 on: November 20, 2010, 06:16:00 pm »
'bout the bsod i wasn't really being serious but anyway, great work so far Sir! that's one respect for you (in lack of 1337 peanuts which are so extremely rare that there basically are none)

edit:
*BLOD
I also have crash alerts, where it will apologize to the user for crashing and try to recover the previous state.

So, an entirely different subject. How do you manage multi-threading? I really have been wrecking my brain over it...I assume you use time-division multiplexing? But then again where do you leave/store all the 'shadow' Program Counters?

Also, how many threads will KOS support eventually or is it basically unlimited (despite significant slowdown)
20 threads max.  As for multithreading, I use interrupts to switch threads, and push all the registers to the stack during the interrupt.  Then, I change the value of SP to point to a different thread's stack, pop all the registers, and RET.  That's the small and simple explanation.
Brings up another question. Can a program consume more then one thread? or will threads only be initiaded when a other task comes in?
« Last Edit: November 20, 2010, 06:18:21 pm by matthias1992 »
MASM xxxxxxxxxx aborted | SADce ====:::::: 40% -Halted until further notice| XAOS =====::::: 50% -Units done| SKYBOX2D engine ========== 100% -Pre-alpha done. Need to  document it and extend |

~Those who dream by day are cognizant of much more than those who dream by night only. -Sir Edgar Allen Poe-

SirCmpwn

  • Guest
Re: KnightOS
« Reply #550 on: November 20, 2010, 07:51:10 pm »
Brings up another question. Can a program consume more then one thread? or will threads only be initiaded when a other task comes in?
Programs can be multithreaded, yes.  StartThread takes a pointer in HL to some code to execute on a new thread.

Offline matthias1992

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 408
  • Rating: +33/-5
    • View Profile
Re: KnightOS
« Reply #551 on: November 21, 2010, 08:45:31 am »
awesome!
MASM xxxxxxxxxx aborted | SADce ====:::::: 40% -Halted until further notice| XAOS =====::::: 50% -Units done| SKYBOX2D engine ========== 100% -Pre-alpha done. Need to  document it and extend |

~Those who dream by day are cognizant of much more than those who dream by night only. -Sir Edgar Allen Poe-

SirCmpwn

  • Guest
Re: KnightOS
« Reply #552 on: November 27, 2010, 06:28:09 am »
Update
I just created the official KnightOS website at http://knightos.sourceforge.net, where you will eventually be able to find downloads, source code, documentation, and developer information for KnightOS.  Please let me know if you find anything wrong with it.

Offline kindermoumoute

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 836
  • Rating: +54/-3
    • View Profile
Re: KnightOS
« Reply #553 on: November 27, 2010, 06:29:53 am »
Pretty, I will see your website.
Projects :

Worms armageddon z80 :
- smoothscrolling Pixelmapping : 100%
- Map editor : 80%
- Game System : 0%

Tutoriel français sur l'Axe Parser
- 1ère partie : en ligne.
- 2ème partie : en ligne.
- 3ème partie : en ligne.
- 4ème partie : 10%
- Annexe : 100%

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: KnightOS
« Reply #554 on: November 27, 2010, 07:14:08 am »
There's a website, it looks quite cool, I'm gonna make my own SourceForge project too (Formulum). It looks better than Google Code:

www.code.google.com/p/formulum