ticalc.org
Basics Archives Community Services Programming
Hardware Help About Search Your Account
   Home :: Archives :: File Archives :: Preemptive Multithreading 1.0
Preemptive Multithreading 1.0

FILE INFORMATION

Ranked as 22475 on our all-time top downloads list with 2642 downloads.
Ranked as 8914 on our top downloads list for the past seven days with 1 downloads.

threadsp.zip
Filename threadsp.zip (Download)
Title Preemptive Multithreading 1.0
Description These are functions for *preemptive* multithreading in an assembly-language program. This is similar to the way modern operating systems multitask. It uses mode 2 interrupts, so grayscale is possible by editing the interrupt handler. It supports unlimited number of threads (currently only one variable limits it to 255); exiting and canceling threads mid-slice; waiting on another thread; and variable thread priorities, similar to nice in *nix. It also supports conditional assembling, so you can include only the features you need!
Author Christopher Williams (abbrev+ticalc@gmail.com)
Category TI-86 Assembly Routines
File Size 42,383 bytes
File Date and Time Sat Jul 24 20:44:40 2004
Documentation Included? Yes

REVIEWS

Review
Review by  James Rubingh
Reviewed on 2004-07-29
Being the only interesting source code I've seen released for the Z80 TI calculators in literally five years, I thought I would take a pedestrian look at these routines. With that said, this is a very interesting project.

The first thing to note is that it's a person with obvious C programming style, coding in Z80 assembly. Personally I found the code easy to follow, but for somebody who has never used structures in C, it might be a bit confusing. There are things like a "memory structure" called "thread_t" that organizes the data for each thread much like a structure. However, it's Z80, and not C, so there are preprocessor tricks added to change the size of the structure to add an extra word for "return value," which traditionally would be returned through the stack instead of added to the structure size. No big deal though, it works. The rest of the code is separated into very clear segments such as creating threads, stopping and joining.

The reason I have this code a 9 instead of a 10 is because it is, in my opinion, while an impressive project almost entirely useless. This is a lot of code, considering the benefits compared to simply adding a couple of calls in your "main loop" are few. The bottom line is if you're using interrupts already and reading key-presses, it means your code is blocking, and while it's blocking you can always add a "call" here or there to get this same functionality in about twenty lines of code.

With that said, I think this is a great little package. I give it a 9 out of 10, and a tip of my hat.


LEAVE FEEDBACK

Questions, comments, and problems regarding the file itself should be sent directly to the author(s) listed above.

Write a review for this file (requires a free account)

Report inappropriate or miscategorized file (requires an account; or you may email us directly)

If you have downloaded and tried this program, please rate it on the scale below
BadGood
1  2  3  4  5  6  7  8  9  10  

ARCHIVE CONTENTS

Archive Contents
Name Size
threadsp/COPYING.txt   18349
threadsp/ChangeLog   3762
threadsp/README.txt   6736
threadsp/TODO   1482
threadsp/asm86.h   3896
threadsp/c/count.c   1017
threadsp/c/lists.c   821
threadsp/c/sema.c   555
threadsp/c/sema.h   220
threadsp/c/threads.c   7644
threadsp/c/threads.h   1525
threadsp/count.86p   861
threadsp/count.asm   2087
threadsp/count.lst   43431
threadsp/ints.inc   333
threadsp/inttest.86p   186
threadsp/inttest.asm   662
threadsp/inttest.lst   4149
threadsp/lists.inc   2005
threadsp/puthex.inc   539
threadsp/threads.asm   14697
threadsp/ti86asm.inc   11233

  Copyright © 1996-2019, the ticalc.org project. All rights reserved. | Contact Us | Disclaimer