July 11, 2020, 01:31:31 pm

The shoutbox is currently out of service. Join us on Discord instead.
You can help CodeWalrus stay online by donating here.

WARNING: DO NOT UPGRADE your TI-83 Premium CE or TI-84 Plus CE to OS 5.5.1 and higher. It removes all compatibility with most games and removes ASM/C programming! DOWNGRADING IS IMPOSSIBLE. BE WARNED! Likewise, do NOT update your TI-Nspire CX past OS 4.5.0, else using Ndless and ASM/C programs will be impossible.

My BASIC Questions

Started by xMarminq_, November 13, 2016, 11:24:38 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SiphonicSugar

This may help a little:

"Multitasking does not necessarily mean that multiple tasks are executing at exactly the same time (simultaneously). In other words, multitasking does not imply parallel execution, but it does mean that more than one task can be part-way through execution at the same time, and that more than one task is advancing over a given period of time." - Wikipedia

So, multitasking is probably going to be very hard without having multiple cores. (I'm pretty sure the z80 only has 1 core...)

Just try to make sure to optimize your code very well to get the fastest speeds. That is pretty much the only way I can think of getting the "illusion" of multitasking.
I'm just trying to grab some inspiration. :P

p2

multitasking:
you got 10 programs running
the processor can execute 1000 tasts every second
so you witch between them and execute 100 tasks of every program per second.
If one programm (/process) is set on higher priority, you do 500 of that one and only 55 for each other program in that second.
so you share the processor "time" you have among the running programs.
that's called "Task sceduler" :)
that's (suuuuper low-lever) how multitasking on computers works ;)

for a program with multiple threads, it's more or less similar.
*this is not accurate, just so you understand that way of not "really" doing stuff at the same time ;)
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

SiphonicSugar

Yeah, one of the major operating system breakthroughs was when multi threaded CPUs were released. Multitasking will be amazingly hard without more than one thread.
I'm just trying to grab some inspiration. :P

p2

the best way for calc programming is still making a while loop and putting calls for all sup-programs you need in it ^^
like this:
while-loop {
check input
move player
render stuff
display all
}
and then just try to make the loop run as fast as possible :)
once you reach a nice speed it's gonna look like doing it all (almost) at the same time ^^
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

Powered by EzPortal