[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 6502 Multitasking OS announce
- Subject: Re: 6502 Multitasking OS announce
- From: cdahello@comp.brad.ac.uk (xian the desk lisard)
- Date: 1996/03/21
- Followup-to: comp.sys.cbm,comp.os.misc,alt.comp.hardware.homebuilt,comp.sys.apple2,comp.sys.apple2.programmer,comp.sys.atari.8bit
- Newsgroups: comp.sys.cbm, comp.os.misc, alt.comp.hardware.homebuilt, comp.sys.apple2, comp.sys.apple2.programmer, comp.sys.atari.8bit
- Organization: the pasture of the sacred chao
- References: <4i94fs$stj@narses.hrz.tu-chemnitz.de> <holger.948.00030EE6@deep.hb.provi.de> <4ijtbe$7ca@no-names.nerdc.ufl.edu>
PLEASE don't go over about 75 columns!!! i have to edit the
paragraphs by hand if they don't fit. it's what has to be done in
vi...
thus spake Michael Ellis in comp.os.misc...
. 2) Passing parameters via zero page has problems with the fact that
. your code will NOT be reentrant. If you propose to do ANY multitasking
. whatsoever, you must write reentrant code. If you don't, the following
. will happen:
i dispute this. it is possible to multitask with non-re-entrant bits
- that's what shared-memory synchronisation is all about. but you
have to make sure that no more than one thread is using any one bit of
memory at a time. which is easy enough if you have fixed desched
points - look at forth's classical tasking model.
. 1. parameters are installed and program jumps to routine
. 2. timer interrupt comes in and invokes the dispatcher which then
. decides to give time to another task
solution: dispatcher says "ok, i'll do that when this task's got out
of the kernel code". yes, it's messy, but it would work for that
purpose. (think of it as a semaphore on the parameter area.)
[]
. The way to get around this is to pass all parameters on the stack,
. and use separate stacks for the separate tasks.
and this option is even less usable on the 6502 because you only get
256 bytes of stack space, unless you use a couple of zp locations to
define your own.
--
xian the desk lisard -- cdahello@comp.brad.ac.uk
time's taught the killing game herself
NO i taught the killing game
first