Skip to main content

Full text of "Australian National OS9 Newsletter (March 1994)"

See other formats


AUSTRALIAN OS9 
NE\^SLETTER 



Volume 8 



March 1994 



Number 2 



EDITOR: 

SUB-EDITOR: 

TREASURER: 

LIBRARIAN: 

CONSULTANT 

SUPPORT: 



Gordon Bentzen 

Bob Devries 

Jean-Pierre Jacquet 

Fax Messages 

Rod Holden 

Don Berrie 

Brisbane OS9 Users Group 

CONTENTS 



(07) 344-3881 
(07) 278-7209 
(07) 372-4675 
(07) 372-8325 
(07) 200-9870 
(079) 75-3537 



Editorial page 2 

0S9 BBS Sysop Page 2 

Bootsplit Page 5 

Sound Piles page 5 

Scientific Calculator Page 7 



EditoritU Material: 


Library Requests: 


Gordon Bentzen 


Rod Holden 


8 Odin Street 


53 Hai^ Road 


SUNNYBA^K Qld ^109 


LOGAN LEA QM 4131 



AUSTRALIAN OS9 NEWSLETTER 

Newsletter of the National OS9 User Group 

Volume 8 Number 2 



EDITOR : Gordon Bentzen 
SUBEDITOR : Bob Devries 



SUPPORT : Brisbane 0S9 Level 2 Users Group, 



TREASURER : Jean-Pierre Jacquet 
LIBRARIAN : Rod Holden 



Hello! is an^xxly there? At the time of our last 
subsciption renewal we asked members to again return 
a Membership Application/Renewal form and we thank 
you again for your continued support. Also, if I 
recall correctly, we were pleased with the number of 
responses which indicated they would be able to 
contribute material for inclusion in the newsletter. 
Hey this was really encouraging! but where have you 
guys gone? 

We are now half way through the current subscription 
year and I would not like to see anybody miss out on 
having their article published due to the rush in the 
last half of the year. Hint - please send your 
material as soon as possible :-) <grin> 

Does anybody use the source code which is published 
from time to time? Well I can report that I compiled 
the 'C source for Bootsplit by Bob Devries from last 



months newsletter. I used the 'C compiler from OS- 
9000 after only a couple of changes to the source and 
of course assistance from Bob. (see the details later 
in this newsletter). 

Anyway the programme does work just fine on the OS- 
9000 Boot file and I also understand that Don Berrie 
had similar success with OSK and the MM One. Thanks 
Bob for this simple but very useful utility. I would 
be interested to know if anybody compliled a CoCo 
0S9/6809 version. 

We do need to know what you think of the material we 
present in each newsletter as we want to cater to 
your needs and wants. This may make our job a little 
more difficult but we are willing to give it a go. 

I will have to leave now to go stand by the mailbox. 
Until next time, Cheers Gordon. 



_ A 
/ W \ 

/ OZ - 0S9 \ 
\ RiBBs 2.1 / 

^ W 



The National 0S9 Usergroup 
(07)-805-5980 

300/1200/2400/9600/14400 baud. 
20:00 to 21:30 HRS.(AEST) 
(8N1) 



New Phone number! 



Co-ordinator: Bob Devries (07)-278-7209 
Sysop: Rod Holden 



This is (RiBBS).... A Tandy Coco Based BBS program. 

This BBS is accessable to Usergroup Members ONLY! 

Feel free to look around , and test out the options, 

0S9 for Ever ! ! ! i 



This is your Sysop 
this lot; 



giving you a directory listing of what type of software is available, feast your eyes on 



Page 2 



March 1994 



AUSTRTUl^IAN OS9 NEWSLETTER 



DNLD 

DNLD/0S9 

DNLD/0S9 

DNLD/0S9 

DNLD/0S9 

DNLD/0S9 

DNLD/0S9 

DNLD/0S9 

DNLD/0S9 

DNLD/0S9 

DNLD/0S9 

DNLD/0S9 

D1^D/0S9 

DNLD/0S9 

DNLD/0S9 

DNLD/0S9 

DNLD/0S9 

DNLD/0S9 

DNLD/0S9 

DNLD/0S9 

DNLD/0S9, 

DNLD/0S9 

DNLD/0S9, 

DNLD/0S9 

DNLD/0S9 

DNLD/0S9. 

DNLD/0S9. 

DNLD/0S9 

DNLD/0S9 

DNLD/0S9. 

DNLD/0S9. 

DNLD/0S9 

DNLD/0S9. 

DNLD/0S9. 

DNLD/0S9 

DKLD/0S9. 

DNLD/0S9. 

DKLD/0S9^ 

DNLD/0S9. 

DNLD/0S9 

DNLD/0S9. 

DNLD/0S9. 

DNLD/0S9 

DNLD/0S9 

DNLD/0S9. 

DNLD/0S9. 

DNLD/0S9. 

DNLD/0S9 

DNLD/0S9^ 

DNLD/0S9. 

DNLD/0S9. 

DNLD/0S9, 

DNLD/0S9. 

DNLD/0S9. 

DNLD/0S9 



APP 

APP/ad9,ar 

APP/areacode.ar 

APP/astronl.ar 

APP/cal2.ar 
_APP/calcl3.pak 
_APP/catlog.pak 
^APP/cclock.arc 
_APP/checks.pak 
_APP/dbase.ar 
_APP/dcraessag.arc 

APP/dynafix.ar 
,APP/dynapatc.ar 
_APP/ed.ar 
_APP/exfind.ar 
_APP/filer.ar 
_APP/hdline.ar 
_APP/itdictl4.ar 
_APP/label201.pak 
_APP/ledger45.pak 
_APP/loans.ar 
_APP/[nail.ar 
_APP/inan,ar 
_APP/niiiiiber.ar 
3PP/os9niail.pak 
_APP/paynister,ar 
_APP/quiz.pak 
_APP/register.ar 
_APP/sc.pak 
_APP/sculptor.ar 
_APP/sled.ar 
_APP/swise.pak 

APP/tax90.ar 

APP/vi,ar 
_APP/vull.pak 

APP/wp31.ar 

APP/xled22.pak 

.GAM 

_GAH/adventur.pak 

.GAM/astroLar 

.GAM/batlship.ar 

.GAM /black] ac.pak 

.GAM/cribge.ar 

.GAM/dungeons.ar 

GAM/games.ar 
_GAM/gaiDeshow,pak 
.GAM/geraquest,pak 
.GAM/glife.ar 

GAM/hordes.ar 

GAM/kq3.pat 

GAM/lander.ar 

GAM/lotto.ar 

GAM/lsl2sol.pak 

GAM/mastmind.ar 



DKLD/0S9 
DKLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9, 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DIfLD/0S9, 
DNLD/0S9, 
DMLD/0S9 
DNLD/0S9, 
DtiLD/0S9 
DMLD/0S9 
DNLD/0S9, 
DKLD/0S9. 
DNLD/0S9^ 
DNLD/0S9. 
DNLD/0S9 
DNLD/0S9 
DlfLD/0S9^ 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9. 
DNLD/0S9. 
DHLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9 
DNLD/0S9. 
DNLD/0S9, 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DliLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9^ 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9, 
DNLD/0S9^ 
DNLD/0S9. 
DNLD/0S9. 
DKLD/0S9. 
DNLD/0S9^ 
DNLD/0S9. 
DNLD/0S9. 
DKLD/0S9. 



_GAM/mixup.ar 
_GAM/nflschd.ar 
GAM/nim.ar 
_GAM/pacos9.ar 
_GAM/psychic.ar 
_GAM/rescue.pak 
_GAM/sokoban.ar 
_GAM/spy.pak 
GAM/stones.pak 
_GAM/strandl.arc 
_GAM/tetris.ar 
_GAM/trek.ar 
_GAM/ttt.ar 
_GAM/valspeak.ar 
_GAM/wrevenge.pak 
_GAM/yahtzee.ar 
GAM/zap.pak 
_GRA 

_GRA/altfont.bin 
_GRA/ansishow.ar 
_GRA/banner.pak 
_GRA/block.ar 
^GRA/bouncer.ar 
_GRA/brot*ar 
_GRA/cartog,ar 
_GRA/cgp220.pak 
_GRA/cgpduinp.ar 
_GRA/coco.ar 
_GRA/colordinp.pak 
_GRA/cursive,ar 
_GRA/cviewgf2*pak 
_GRA/dragfont.ar 
_GRA/fern.ar 
_GRA/fonted.ar 
_GRA/fonts.ar 
_GRA/fstgrf.ar 
GRA/gcofflp,ar 
.GRA/gfx2.ar 
^GRA/gfx2fix.ar 
_GRA/gfxc[nds.pak 
_GRA/grab,ar 
_GRA/ibni.fnt 
GRA/macview.ar 
,GRA/max9.ar 
^GRA/iDge2vef.ar 
,GRA/(norewin,ar 
_GRA/ncolor.pak 
,GRA/orb.pak 
.GRA/palette.ar 
^GRA/pci.pak 
_GRA/prf.ar 
^GRA/rayboun2,arc 
_GRA/rayboimc.ar 
GRA/rgb.ar 
GRA/rlepic.pak 



March 1994 



Page 3 



AUSTRALIAN OS9 NEWSLETTER 



DKLD/0S9 
Dm.D/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DHLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9, 
DNLD/0S9 
DNLD/0S9. 
DNLD/0S9 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9 
DNLD/0S9 
DKLD/0S9 
DNLD/0S9, 
DNLD/0S9, 
DNLD/0S9. 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9 
DNLD/0S9. 
DNLD/0S9„ 
DNLD/0S9, 
DtiLD/0S9_ 
DNLD/0S9_ 
DNLD/0S9, 
DNLD/0S9^ 
DNLD/0S9. 
DNLD/0S9_ 
DNLD/0S9_ 
DNLD/0S9_ 
DNLD/0S9^ 
DNLD/0S9 
DNLD/0S9_ 
DNLD/0S9_ 
DNLD/0S9_ 
DNLD/0S9_ 



GM/s.ar 
GRA/sea3d.pak 
GRA/shapes.ar 
GRA/show.ar 
GRA/spiro.ar 
GRA/vefprt.ar 
_GRA./view44.ar 
GRA/waterfal.ar 
GRA/window.ar 
GRA/wload.ar 
_GRA/worins.ar 
_GRA/wreath.ar 
_GRA/sview.pak 
_MUL 

_HUL/aif_nigr.ar 
_MUL/aifbnc.ar 
_MUL/bonk.pak 
_MUL/cardl7a.ar 
_MUL/cannen,ar 
„MUL/cubist.ar 
_HUL/deadic*ar 
.MUL/ed30,ar 
_MUL/edcon.ar 
^HUL/edfont,ar 
_MUL/edpat30a.ar 
_MLIL/edptr.ar 
_MUL/envelope,pak 
_HUL/fntflian,pak 
_MUL/fs2ffiv,ar 
^MUL/gfrraat.ar 
_MlIL/glabel.ar 
_MUL/gshelLar 
.MUL/gshell2.ar 
HUL/gshpat.ar 
MUL/guib.ar 
.MUL/guiblLpak 
_MUL/icon.pak 
MUL/iconedit.ar 
_MUL/icons.ar 
MUL/icons.pak 
MUL/]budget.pak 
_MUL/kq3.ar 
_MUL/inanager2,pak 
MUL/multedit.ar 
_MUL/raultii.ipc 
m/raultii.pak 
MUL/n!v2pat.ar 
^HUL/mvaifs.ar 
MUL/ravskeLar 
MUL/nivtest.ar 
Hl]L/newdir,ar 
MUL/pacaif.ar 
MUL/phonbase,pak 
MUL/pointers.pak 
HUL/ratmaze.ar 



DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DKLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DKLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DKLD/0S9 
DNLD/0S9 
DNLD/0S9. 
DNLD/0S9 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DWLD/0S9. 
DNLD/0S9, 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9, 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9, 
DNLD/0S9. 
DNLD/0S9, 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9_ 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9, 
DNLD/0S9. 
DKLD/0S9_ 
DNLD/0S9_ 
DNLD/0S9_ 
DNLD/0S9_ 



_MUL/shGlicon.pak 
_MUL/srtiate.ar 
_HUL/snienu,ar 
_MUL/solitarG.ar 
_MUL/stereovu.ar 
_MUL/submv.ar 
_MUL/superike.ar 
_MUL/vicon.pak 
^HUL/windfix.ar 
_HUL/yaicon.ar 
_HUL/yatzee.ar 
_MUS ' 

_MUS/digitize.ar 
_MUS/mfcvpl.ar 
_MUS/play.ar 
^MUS/play3.ar 
_HUS/play4.ar 
_MUS/playmus,pak 
_MUS/playutiLpak 
MUS/sspak.ar 
_MUS/ultibox,ar 
_MUS/umuse.ar 

'pro 

_PRO/alib.pak 

_PR0/b09utiLpak 

_PRO/carray,ar 

_PR0/cc2.pak 

_PRO/clib,ar 

_PRO/cpatch.ar 

_PRO/devpakhp,ar 

_PRO/devsys.pak 

_PRO/disasni.ar 

_PRO/header,ar 

_PRO/os9p4.ar 

_PRO/pilotLar 

_PR0/pilot2.ar 

_PR0/sorts_09.ar 

_PRO/Secad.lha 

.SYS 

_SYS/cactie.ar 

_SYS/cc3dis.ar 

.SYS/cc3disk,ar 

^SYS/cc3go.ar 

,SYS/ctidisk,ar 

_SYS/clockbb.ar 

^SYS/copypatc.ar 

SYS/cpprint.ar 

.SYS/dirosk.ar 

^SYS/distsasi.ar 

.SYS/distscsi.ar 

^SYS/eswllO.ar 

SYS/floppy35.ar 

SYS/kfutiLar 

SYS/nubbclk.ar 

SYS/os9p2.ar 



Page 4 



March 1994 



AUSTRALIAN OS9 NEWSLETTER 



DNLD/0S9 
DNLD/0S9. 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9. 
DNLD/0S9^ 
DNLD/0S9^ 
DNLD/0S9 
DNLD/0S9 



SYS/os9p3,ar 
_SYS/partqen.ar 
SYS/pa tches.ar 
^SYS/ran\_736k.asm 
SYS/ramdisk.pak 
_SYS/rbf30,ar' 
^SYS/scfed2.ar 
^SYS/spedupl2,ar 
_SYS/vdgdesc.ar 
_SYS/vrn,ar 
_SYS/widedirs.ar 
_SYS/wx.ar 



DNLD/0S9^_SYS/xtbootfx.pak 
DNLD/0S9„TEL 

We are currently trying to obtain the rest of the 
0S9 Coffiffiunity Network files which is approximately 
600 files "froiB the States. As soon as we receive 
them a directory listing will be published, and from 
a list I have seen it looks real interesting. See 
you in the bit stream; Happy CoCoing. 

Sysop 
Rod Holden 



ooooooooooOOOOOOOOOOoooooooooo 



BootSplit - 0S9000 changes 

With the help of an 0S9000 user; I have been able to make the necessary modifications to my C programme 
BootSplit. The changes necessary are: 

1. Change the name of the structure from roodhcom to rah_com- 
So struct modhcom module becomes struct mh_coin module. 

2. Change the field names in the structure from _m to m_. 
So module, msize becomes module. m size. 



Regards ; Bob Devries 



ooooooooooOO(X)OOOOOOoooooooooo 



Playing back sound samples 



Recently; I had the chance to check out a CD-ROM 
which was filled with IBM files of all sorts. Of 
course; most of these were of no use to me, but one 
file; AUDI0FHT.2IP caught ray eye. After I unzipped 
it; I found that it was a collection of text files 
with details of quite a few different sampled sound 
file formats. I feel that these could be useful to 
the OS-9 world; so I am going to include them in the 
newsletter a few at a time, as space permits. Most 
of the files give the data break-down, so that a 
programme can be written to decode the sound sample 
file, and play it back on any computer. The file 
types include 8SVX, VOC, WAV, and AIFF. 

Bob Devries 

AIFF Format (Audio IFF) and AIFC 

This format was developed by Apple for storing high- 
quality sampled sound and musical instrument info; it 
is also used by SGI and several professional audio 
packages (sorry, I know no names). An extension, 
called AIFC or AIFF-C, supports compression (see the 
last item below). 



I've 
spec 



made a BinHex'ed HacWrite version of the AIFF 
(no idea if it's the same text as mentioned 
below) available by anonymous ftp from ftpxwi.nl 
[192.16.184.180]; the file is 
/pub/audio/AudioIFF1.2.hqx. But you may be better off 
with the AIFF-C specs, see below, 

Mike Brindley (brindleygece.orst.edu) writes: 

"The complete AIFF spec by Steve Milne, Matt 
Deatherage (Apple) is available in "AMIGA ROM Kernal 
Reference Manual: Devices (3rd Edition)' 1991 by 
Commodore -Amiga, Inc.; Addison-Wesley Publishing Co.; 
ISBN 0-201-56775-X; starting on page 435 (this 
edition has a charcoal grey cover). It is available 
in most bookstores; and soon in many good 
librairies." 

According to Mark Callow (mscgsgi.cora): 

A PostScript version of the AIFF-C specification is 
available via anonymous ftp on FTP.SGI.COM 
(192.48.153.1) as /sgi/aiff-c.9,26.91.ps. 



March 1994 



Page 5 



AUSTRALIAN OS9 NEWSLETTER 



RIFF WAVE (.WAV) file format 

RIFF is a forinat by Microsoft and IBM which is 
similar in spirit and functionality as EA-IFF-85; but 
not coiTipaLible (and it's in little-endian byte order, 
of course :-). WAVE is RIFF's equivalent of AIFF, 
and its inclusion in Microsoft Windows 3.1 has 
suddenly made it important to know about. 

Rob Ryan was kind enough to send me a description of 
the RIFF format. Unfortunately, it is too big to 
include here (27 k), but I've made it available for 
anonymous ftp as ftp,cwi.nl:/pu]3/audio/RIFF-forfflat. 

And here's a [>3inter to the official description from 
Matt Saettler, Microsoft Multimedia: 

"The complete definition of the WAVE file format as 
defined by IBM/Microsoft is available for anon, FTP 
from ftp, uu, net in the vendor/microsoft/multimedia 
directory," 



(Rob Ryan's version iiiay dcLudlly Ije an extract from 
one of the files stored there.) 

IFF/8SVX For mat 

Newsgroups: alt. binaries. sounds, d, alt. sex. sounds 
Subject: Format of the IFF header (Amiga sounds) 
Message-ID: <2509@tardis, Tymnet. COM> 
From: jnisPtardis. Tymnet. COM (Joe Smith) 
Date: 23 Oct 91 23:54:38 GMT 
FoUowup-To: alt. binaries. sounds. d 
Organization: BT North America (Tymnet) 

The first 12 bytes of an IFF file are used to 
distinguish between an Amiga picture (FORM-ILBM), an 
Amiga sound sample (F0RM-8SVX); or other file 
conforming to the IFF specification. The middle 4 
bytes is the count of bytes that follow the "FORM" 
and byte count longwords. (Numbers are stored in 
M68000 form, high order byte first.) 



FutureSound audio file, 15000 samples at lO.OOOKHz, file is 15048 bytes long. 



0000: 464F524D 00003AC0 38535658 56484452 

FORM 15040 8 S V X V H D R 

0010: 00000014 00003A98 00000000 00000000 

20 15000 

0020: 27100100 00010000 424F4459 00003A98 

10000 10 1.0 BODY 15000 



F0RM..:,8SVXVHDR 



BODY,. 



0000000.. 03 = "FORM", identifies this as an IFF format file. 
FORM+00..03 (ULONG) = maraber of bytes that follow, (Unsigned long int. 
F0RH+03.,07 = "8SVX", identifies this as an 8-bit sampled voice. 



????+00..03 = "VHDR", Voice8Header, describes the parameters for the BODY. 
VHDR+00.,03 (ULONG) = number of bytes to follow. 



VHDR+04.,07 (ULONG) 
VHDR+08..0B (ULONG) 
VHDR+OC.OF (ULONG) 



samples in the high octave 1-shot part, 
samples in the high octave repeat part, 
samples per cycle in high octave (if repeating), else 0. 



VHDR+10..11 (UWORD) = samples per second, (Unsigned 16-bit quantity.) 

VHDR+12 (UBYTE) = number of octaves of waveforms in sample, 

VHDR+iS (UBYTE) = data compression (O=none, i=Fibonacci-delta encoding). 

VHDR+14..17 (FIXED) - volume. (The number 65536 means 1.0 or full volume.) 

????+00..03 = "BODY", identifies the start of the audio data. 
BODY+00..03 (ULONG) = number of bytes to follow. 
B0DY+04..NNNNN - Data, signed bytes, from -128 to +127. 

0030: 04030201 02030303 04050605 05060605 

0040: 06080806 07060505 04020202 OlFFOOOO 

0050: 00000000 FFOOFFFF FFFEFDFD FDFEFFFF 

0060: FDFDFFOO OOFFFFFF 00000000 OOFFFFOO 

0070: 00000000 OOFFOOOO OOFFFEFF 00000000 



Page 6 



March 1994 



AUSTRALIAN OS9 NEWSLETTER 



0080: 00010000 OOOIOIFF FFOOOOFE FEFFFFFE 
0090: FDFDFEFD FDFFFFFC FDFEFDFD FEFFFEFE 
OOAO: FFFEFEFE FEFEFEFF FFFFFEFF OOFFFFOl 

This small section of the audio sample shows the number ranging from -5 tOxFD) to +8 (0x08). Warning: Do not 
assume that the BODY starts 48 bytes into the file. In addition to "VHDR", chunks labeled "NAME", "AUTH", 
"ANNO", or "(c) " may be present, and may be in any order. You will have to check the byte count in each chunk 
to determine how many bytes to skip, 

ooooooooooOOOOOOOOOOoooooooooo 

Scientific Calculator for 0S9 

In among the large quantity of public domain software we have, I found a scientific calculator prograniHie for 0S9. 
It is in the OCN library, and is called SCAR. It is in the 0S9_APP subdirectory. What follows is the comnients 
from the front of the source code, which tells how it is used, and which functions are available. The source 
code should compile on either 0S9/6809, or 0S9/68000, and probably on OS9000 as well. 



/* sec 

Scientific Calculator, Version 2.1 for 0S9 and 0S9/68000 

Copyright 1989 John H Semler 

NOTE: You must use good mathematical common sense when interpreting the 
results returned by "sc". 

t*i*******t**t**t*t*******************************+**++*++*****+i ********* 

Revision History - 

11/03/89 Modified the source code so that it can be compiled under 
0S9 and OS9/68000. 

11/03/89 Corrected memory management bug involving variable storage. 
************************ **********tt*±**t**t*+tttt +**+**+++******* ******** 

General Overview: 

Input into "sc" consist of a series of statements of which there are 
two types. Expression statements are mathematical strings that will 
evaluate to a single result. Command statements are strings that 
will perforin some action but return no results. All statements must 
ierfflinate with the character ' ; ' . 

Binary operators: 

Operands can either be real numbers, real matrices, complex numbers, 
complex matrices, named constants ("e", "i", and "pi"), variable 
references, and or valid expressions unless otherwise restricted by 
mathematical convention. 



March 1994 Page 7 



AUSTRALIAN OS9 NEWSLETTER 



Precedence and associativity of the binary and unary operators: 
Operator Precedence Associativity Comments 

I 5 (high) right-to-left Unary plus 

5 right-to-left Unary minus 

4 right-to-left Power operator 

/ 3 left-to-right Division 

* 3 left-to-right Multiplication 

2 left-to-right Subtraction 

+ 2 left-to-right Addition 

1 (low) right-to-left Assignment ** 

The evaluation order of expressions can be modified through the use 
of parenthesis. 

** Note: The assignment operator can appear anywhere in the expression. 
However, the left operand must be a variable reference. 

Built-in constants: 

pi = 3.141592653589796 
e = 2.718281828450945 
i = <0;1> (The imaginary unit) 

Complex numbers: 

Two different forms are accepted: Angle bracket pairs, or expressions 
involving the imaginary unit. For instance, the complex expression 
X = 3 + 4i can be entered as: 



0S9:sc 




0S9:sc 




0S9:sc 


X-3+4*i; 


or 


X=<3,4>; 


or 


X=5*e^(. 927295218*1); 


<3,4> 




<3,4> 




<3,4> 



Matrices (n x m where n,m dictated by the size of the input buffer): 

Matrices are entered using two levels of curly brackets. The inner- 
most levels of curly brackets will group row elements together. For 
instance, the complex matrix expression 

-1 

1-10 3 I I 3 I 

I 7 1 -1 I M 2 I 

I 2+i 3 I I 5 I 

can be entered as: 

0S9:sc 

{{-1,0,3}, {7,1,-1), {2+i,3,0)r-lM{3), {2), {5)1; 

or for more readability 

0S9:sc 

{{-1, 0, 3}, 



Page 8 March 1994 



AUSTRALIAN 0S9 NEWSLETTER 



I h 1, -IK 

(2+i, 3, 0|r-l * \{3]. \2\, 151); 

Display register reference: 

You can access the display register through the variable name "disp" 

Variable references: 

Variables may consist of a single letter followed by zero or more 
occurrences of letters and digits terminating with zero or more 
occurrences of dinks. Names that are reserved by "sc" may not be 
used as variable names. The list of reserve names are as follows: 
"clear", "list", "eng", "fix", "polar", "rect", "pi", "e", "i", 
"disp", and the built-in function names. 

Built-in functions (all functions operate with scalar operands unless 
otherwise noted): 

sin(x) Returns the sine of x, 

coslx) Returns the cosine of x, 

tan(x) Returns the tangent of x, 

asin(x) Returns the arc sine of x, 

acos(x) Returns the arc cosine of x, 

atan(x) Returns the arc tangent of x, 

csc(x) Returns the cosecant of x, 

sec(x) Returns the secant of x, 

cot(x) Returns the cotangent of x, 

acsc(x) Returns the arc cosecant of x, 

asec(x) Returns the arc secant of x, 

acot(x) Returns the arc cotangent of x, 

sinh(x) Returns the hyperbolic sine of x, 

cosh(x) Returns the hyperbolic cosine of x, 

tanh(x) Returns the hyperbolic tangent of x, 

asinh(x) Returns the arc hyperbolic sine of x, 

acosh(x) Returns the arc hyperbolic cosine of x, 

atanh(x) Returns the arc hyperbolic tangent of x, 

csch(x) Returns the hyperbolic cosecant of x, 

sech(x) Returns the hyperbolic secant of x, 

coth(x) Returns the hyperbolic cotangent of x, 

acsch(x) Returns the arc hyperbolic cosecant of x, 

asech(x) Returns the arc hyperbolic secant of x, 

acoth(x) Returns the arc hyperbolic cotangent of x, 

log(x) Returns the logarithm base 10 of x, 
ln(x) Returns the logarithm base E of x, 
antilog(x) Returns the anti logarithm base 10 of x, 
exp(x) Returns the anti logarithm base E of x, 

sqrt(x) Returns the square root of x, 

sqr(x) Returns the square of x, 

abs(x) Returns the absolute value of x, 



March 1994 



Page 9 



AUSTRALIAN OS9 NEWSLETTER 



det(x) Returns the determinant of the matrix x. 

coniix) Returns the conjugate of the scalar x (or matrix x). 

trans(x) Returns the transpose of the matrix x. 

canon(x) Returns the row canonical form of the matrix x. 

Commands : 

list - Lists out the memory locations (variable names, values), 
clear - Clears out the memory locations, 
eng - Changes the display mode to the engineering format, 
fix - Changes the display mode to the fix point format, 
polar - Changes the display mode to polar format "<r, theta>". 
rect - Changes the display mode to rectangular format "<Re, Iffl>", 

Notes concerning the display mode: 

1) The polar display mode will display theta in the range from -PI/2 
to 3*PI/2. If the magnitude of theta is less than LOe-U radians, 
theta will not be printed out (no brackets). This guards against 
small roundoff error causing real numbers to be printed in polar 

form, 

2) For the rectangular mode, if the real component is greater than 
l.Oell times the imaginary component, the imaginary component will 
not be printed out (no brackets). If the imaginary componet is 
greater than LOell times the real component, the real component 
will be zeroed out. This was done to help reduce the clutter. 

To compile and link this program under 0S9 (6809 version) you will 
need the math enhanced library "CLIBT.L" and the defines from the file 
"HEADER. AR", both of which can be found in data library 3 of the 0S9 
forum on CompuServe. 

******************************************************************************** 

SAMPLE PROBLEMS IN LINEAR ALGEBRA: 

Problem |1 (m equations in n unknowns, infinite number of solutions) 

Solve for x, y, z, s, t given: 

X + 2y - 3z - 2s + 4t = 1 

2x + 5y - 8z - s + 6t - 4 

X + 4y - 7z + 5s + 2t = 8 

Enter the coefficient matrix and the constants as follows: 

0S9:sc 

canondl 1, 2,-3,-2, 4, 1), 

{ 2, 5,-8,-1, 6, 4), 

{ 1, 4,-7, 5, 2, 8))); 

"sc" will respond with: 

ill, 0,1, 0,24, 21), {0,1, -2, 0,-8, -7), {0,0,0, 1,2, 3)} 

Page 10 March 1994 



AUSTRALIAN OS9 NEWSLETTER 



Rewrite as: 

X + Oy + z + Os + 24t - 21 x - 21 - z - 24t 
Ox + y - 22 + Os - 8t = -7 or y = -7 + 2z + 8t 
Ox + Oy + Oz + Is + 2t = 3 s = 3 - 2t 

The parametric solution vector is (let z=a and t=b) 

(x=21-a-24b, y=-7+2a+8b, z=a; s=3-2b, t=b) 

If a=l and b=2 does the solution vector (x=-28,y=ll;Z=l,s=-l,t=2) 
satisfy the set of linear equations given above? 

Yes! Work it out in the following manner: 

0S9:sc 

II 1, 2.-3,-2, 4}, 

1 2, 5,-8,-1, 6}, 

{ h 4,-7, 5, 2}} * {{-28},{11),{1),{-1),|2)); 

"sc" will respond with: 
Ul},|4),|8}) 

which is the constants for the set of equations given above. 

Problem 12 (m equations in n unknowns, no solution) 

Solve for x, y, z, s, t given: 

X + 2y - 3z - 2s + 4t - 1 
2x + 5y - 8z - s + 6t = 4 
4x +10y -162 - 2s +12t - 9 

Enter the coefficient matrix and the constants as follows: 

0S9:sc 

canon({| 1, 2, -3, -2, 4, 1}, 

I 2, 5, -8, -1, 6, 4), 

{ 4, 10,-16. -2. 12. 9)1); 

"sc" will respond with: 

111,0,1, -8, 8, 01,10,1,-2,3, -2,0}, (0,0,0, 0,0,1}) 

Rewrite as: 

X + Oy + 2 + Os - 8t = 8 X = 8 - 2 + 8t 
Ox + y - 22 + 3s - 2t = or y - 2z - 3s + 2t 
Ox + Oy + Oz + Os + Ot = 1 = 1 

There is no solution for this set of equations since is 
not equal to 1! 

Problem |3 (n equations in n unknowns solved using the inverse 

March 1994 Page 11 



AUSTRALIAN OS9 NEWSLETTER 



operator) 

Solve for x, y, z given: 

X + 2y - z = -1 

X - y + 2z = 8 

2x - y - z - 5 

Enter the coefficient matrix and the constants as follows: 

0S9:sc 

|{ 1, 2. -IK 

I 1,-L 2), 

{ 2,-l.-l)r-l * ||-1),{8}.{5}1; 

"sc" will respond with: 

n3},|-lK{2}} 

Check the answer: 

{{ 1, 2,-1), 
{ 1,-1, 2), 
(2,-1,-1)1 *disp; 

"sc" will respond with: 

|{-11,(81,|511 

which is the constants for the set of equations given above* 
******************************************************************************* / 

ooooooooooOOOOOO(X)OOoooooooooo 



Page 12 March 1994