11.07.2015 Views

Tandy's Little Wonder (1993)(Farna Systems).pdf - TRS-80 Color ...

Tandy's Little Wonder (1993)(Farna Systems).pdf - TRS-80 Color ...

Tandy's Little Wonder (1993)(Farna Systems).pdf - TRS-80 Color ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Microware's OS-9... a heavy-dutyDOS for CoCo...An Introduction to OS-9 Rick UllandDo you need OS-9? Maybe not! Many users view theircomputer as an appliance. Any good appliance should performit’s job as easily as possible, without much muss orfuss. For this type of use, DECB cannot be equalled. Youcram is a disk, type run, and away it goes. The only problemwith 'computer as appliance' is, they just aren't that good yet!Making it simple usually means leaving things out. Individualprogrammers can write any capability into any program, andsometimes do, but this approach to upgrading has provenless than impressive, resulting in giant, expensive programsthat each do things their own way. OS-9 attempts to put manyof the most wanted features of modern computers wherethey belong- in the operating system. Of course you onlyhave to learn everything once, but sometimes it seems youhave to learn everything first! The natural tendency is to asksomebody what the heck is going on. Those fortunate fewwho know a fellow OS-9 user who lives nearby enjoy a prettypainless introduction. The rest of the world has to settle forhurried conversations carried out over telephone or modem,and even though the other person is really trying to help,there is just too much information to pass on in a fewminutes. In an attempt to cover as much ground as possible,the helper may lapse into that dreaded variant of technobabbleknow as the buzz-word.A Very Buzzy BeeOS-9 promises (and delivers) quite a lot of capability in avery small package- watching Level II run on a 6<strong>80</strong>9 is anawesome sight to folks familiar with the chips' limitations inmemory space and speed. You may well ask, why worryabout memory? After all, there are 2 megabyte RAM upgradesavailable. Well, the rub is the 6<strong>80</strong>9 can only address64K at a time. DECB users are quite familiar with thislimitation. Even a 512K CoCo only shows 24K free (the restof it’s 64K ate up by the basic ROMs and some data space).BASIC does gain some use of the extra ram by moving thegraphics screens out of the base 64K area, but all of theprogram code still has to fit there. OS-9 Level II doesn’tremove this barrier, but does work around it nicely, bysplitting the whole into separate groups.A process is up to 64K of code and data. The difference isunder OS-9 you can have as many processes as you havememory for, while under DECB you have one. This is thereason some OS-9 programs are split into two parts, forexample word processors will be divided into a separateeditor and print formatter. This way the whole package canuse 128K (2 processes) instead of 64K (one process).Processes can be connected together from the commandline as well.When someone speaks of pipes, they are talking aboutconnecting one process' output directly to another ones'input. On the command line, a pipe looks like an exclamationpoint- proc1 ! proc2. There are two reasons to do thiseitherto get around the memory problem, or to make a singleutility more useful. We’ll get into this more later.There is still a problem with the total RAM available. Thepractical problem is fitting the operating system into themachine. There are 3 ways to do this. The DOS can be keptsmall and simple, or simply demand the machine grow largerand larger, so the whole thing will fit. (the disk drives alsohave to get faster and faster, so the thing can be loaded thesame day, and larger so the thing will fit on a decent numberof disks... in other words, it can be like MS-DOS). Microwaretook the third tack. OS-9 (and OS-9 programs) are splitinto modules, which can be loaded as needed, or unlinked tofree up memory. You’ll see this in action when runningconfig or os9gen- out of all the things that could go into OS-9, the user picks the ones he needs. OS9gen packs them intoa small, quickly loaded boot file.There are a few additional space saving tricks. First all ofthese modules are reentrant. One copy in memory can be ranmany times simultaneously. Each separate iteration gets it’sown block of data space, but uses the same copy of the code.The other trick involves how a module is run. For example,the OS-9 prompt you see on screen doesn’t come from OS-9 itself, but a special program called shell. When you typea command, shell reads it, then runs that module. It doesn’tgo away, but waits in the background for the new process tofinish. This is called forking a process. The old process(known as the parent) is still around, just hidden in the otherfork of the road waiting for the new process (the child) tofinish. Now, if you really need every byte of RAM, you canchain the new process, using the ex command. The parentshell is killed, freeing up the memory it used, but if the childprocess ends, the window seems to lock up! It hasn't reallycrashed, but there is nothing for it to run.To keep track of all these modules, OS-9 has a specialdirectory. Mdir (module directory) lists all the modules ismemory, and keeps track how many times each one is beingused. The link count starts at one if a module is loaded, or0 if it’s just called, and goes up one each time it is executed,then down by one when it’s finished. If it hits 0, that moduleis dropped and you get the RAM back. So a module that wasrun from the command line, and not loaded first, disappearswhen it’s finished. There are two special commands to dealwith this- link bumps the number up one so a module willnever be dropped, while unlink reduces it one. Enoughunlinks and it disappears!page 48<strong>Tandy's</strong> <strong>Little</strong> <strong>Wonder</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!