Magic Six Commands Manual V0 Searchable

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 103

DownloadMagic Six Commands Manual - V0 Searchable
Open PDF In BrowserView PDF
%•

JBS\

The Zero-th Edition of the Maqic Six Commands Manual
4/27/78

Opening Monologue:
You are probably already asking why a system commands manual needs
an openinq monologue. I t ' s very simple, l i k e any opening monoloque
t h i s g i v e s one a ' t a s t e of what t o expect i n s i d e t h i s very z e r o - t h
e d i t i o n of The Magic Six Programmers' Manual. I t i s a l s o t o warn
you t o ignore the 3/20/78 t h a t appears a l l over the p l a c e . That
i s when t h i s manual was put onto ma emetic tape, i t took a b i t of
PDP-10 programming, a b i t of c a r e f u l q u e s t i o n i n g and the combined
resources of fche Dynamod (Proaramming Technology) PDP*-10 (they
had the nine track tape drive) , the Advanced Research Project
Agency's ARPANET, and the A r t i f i c i a l I n t e l l i g e n c e Laboratory's
Xerographic P r i n t e r . I t a l s o required c o u n t l e s s hours of dedicated
hacking, both t o document and t o implement (not n e c e s s a r i l y i n
t h a t order) the programs described h e r e i n .
/iPN

ijp\

t

>

All of the f i l e s i n t h i s manual are in the d i r e c t o r y : >doc
and are a c c e s s i b l e v i a the help command so i f i t d o e s n ' t work
the way i t i s described here, check o n l i n e and s e e i f i t i s out
of date.

3/20/78

The Magic S i x Commands t1art(J(J|
fox ( t y p i n g conventions)
I n f o r m a t i o n on "Fox" terminals on MagicSix.

Foxes are computer terminals w i t h a video'character d i s p l a y . They can d i s p l a y
24 l i n e s of up to 88 characters per l i n e . Each character p o s i t i o n can hold
• e x a c t l y one c h a r a c t e r , hence "over, s t r i k e s " (such as u n d e r l i n e d uord9) are not
p o s s i b l e . The d e f a u l t typing conventions are l i s t e d be I on, some a r e users e t a b l e , f o r i n f o r m a t i o n on changing them type " h e l p s t t y " .

\ $

On t y p e o u t , a t most one screenful I 424 lines - a "page") w i l l be typed since
your l a s t i n p u t . I f the command you typed causes more than one page of typed
o u t p u t , the l a s t l i n e typed on the screen w i l l be:
—more—

You now have twc choices:
(1) type a space ("blank"), to. allow the terminal to type the hext page. ;
(2) type any other character {such as the first character of the next coirtiiiand ,
you intend to type) to "swal low" the rest of the typed output, rather then
printing it. Note that the system "ready" message will also be "swallowed".
On input, most key bushes result in the corresponding character being added to
the right hand end of the "current line". Some control characters are used to .
edit the current line and reformat the display but are not normally inserted,/
into the current line:

RETURN
DEL

terminates current line (it is then sent to the command processor* or
whichever program is reading input).
;
this delates the rightmost character on the line, it "tintypes" the
previous character. (Note that the key on the Fox is labeled u p side
down, lower case is DEL, upper case is "underscore").
;
excises the current line (deletes to the. leftmost char on the line). '

•i.

i.

Ctrl X
Ctrl D
Ctrl R redisplays the current line (handy if you were typing in whi le the '.
'.lit'
system was typing out).
' . ,. .,,,
Ctrl L clears the screen then redisplays. Note: this is much better thertU8in£|:i|i:f,f';
the CLEAR ALL key, which also clears tab settings. Thesystein ;seis
- V^'t-fjOi
:
tabs every 5 characters at newproc' time.
• ; • 'j .;'••"• j • / "'*
Ctrl C clears
type ahead.
• i i M!'
Ctrl U silencesallthe
typout (all text which would* have been typed- is swallowed «\:y \'f\-n:
until the next input).
*
'
'•,•;'
ctrl Q quotes the following character (used to insert special control: chars ; I
into the buffer).
.
; •
Ctrl Z signals break immediately.
.
' •'^
To type a control character, "ctrl Z" for exampl-e, hold down the CTRL key} a n d
hit the " Z " key.
» !

In uc (upper case) mode all letters are converted to lower case unless
they are preceded by a #.

:

i(!
:

J)

1
- 1I I '

The rta^ic Six Commands Manual
glossary
.

3/29//T&
'
''••'.

Memory Management

..^'ifrf

'

'

;..

segment
most computers have a 1-dimensional address space,
a single integer can be used to specify any given memory
location. The Infce'rdato 7/32 provides a 2-dimensiohal
address space, each memory location is referred to by
a segment number (from 0* to 15) and an offset (from 0
to 65535). At any given time any number of the segments
may exist (a segment may exist even if it is actually
out on. the disk as long as the system knows that it has
been initiated). Each segment may have its own size
and access mode. This means that some may be programs
which are read and execute only, whi le others may
be data segments of varying sizes. If you read beyond
the end of a segment (e.g. load from <5,5049> when
segment 5 is only 4096 bytes long) an oobounds condition
wi II be raised. . If you write beyond the end of a
segment to which you have write access the segment
will automatically be grown to the appropriate size
tin multiples of 2048 bytes) unless the segments
maximum length is too small:. The current default
maximum, length is 50KB. If you attempt to write
to a segment to which you do not have write access
a no_write condition will be raised. Branching
to a segment to which you do not have execute access
will cause a no_execu condition to be raised.
Referencing a npn-exlstent segment wi.l I cause a
nonexist fault.

''.',•

. .

^
.!.

'I.

i

 is probably more fami Marly known as n|m
which is how pointers are usually printed .out
address space
. is the name given to the set of up to 16 segments •
which may referenced at a given instant. Since
a typical user needs many more segments the dynamic
linker is able to perform an operation caI led
address space switching which changes the set of
accessible segments and attempts to make the
arguments to the subroutine accessible in the new
address space.
Each segment has a preferred address space or
is expected to, run in the address space of i ts
caller. Thus Whenever tv is called it will be
run in the. address space called tv while whenever
ioa is called it will be run in the current address
space.

t

.1
i

- 2r
!

...(.,..} ; :-Ji;|

:i
:.".;>B
- >•• .:

;

The Magic Six Commands Manual
glossary
I

'?jj

3mm-\

•'• : ft'
-., -if,

• *jl
•.-..HI
-•••W.

J^N

access (or acl)
Each segment in an address space has an access mode.
This consists of a set of bits which indicate the
segment io readable (r), writable (w), or executable(e)
as well as a number of other bits which are.used to
protect the system from .the user. Uhen a segment is
initiated its access is set to the one stored in
the file system and will stay as such until it is
changed by use of hcs8set_acl.

••..!id:

•I

'H
I'!'
. I•M

An
.1

i. . i-'

M
reference name (ref_name)
Each segment in each address space.may have any number
of reference names as long as they are* unique .in the
address space. The reference names may be listed with
the Irn. (Iisi_ref_names) command and are used by the
dynamic linker when it trie-s to see if a segment is
already initiated.

r

•;••>'

1

il;• <

dynamic linking
In most systems the core locations of all subroutines
must be known before a program may be allowed to run.
This has many problems wh-ich should be obvious to anyone
who has written a multiple overlay program on MAGIC 4.
In a dynamically linked system subroutine references
are resolved the first time the subroutine j's-called
in.a given process, meaning that the core location of a
subroutine need not be known until it is actually caI led*
Calling is done by the means of a special' instruction
called a link. (Do not confuse this.with the use of.
link in the file system sense, this us'age is historical.).
The first time a link is executed the dynamic linker*
finds the address of the subroutine and converts the
link into a branch (or load immediate) instruction
with the proper target address. This is called snapping
the link. The call may then be repeated any number of
times with no further intervention by the dynamic,I inker*
(Since the link is obviously impure jt resides in the .'".:'..-•
so called linkage section or linkage segment along with v
the programs static storage.)

if :

•!•'

ill-'

••<'

X
J.:'

:-;h

h

.11*1

il'-ii!

V It-;-'

I.-K- •;•-<

The dynamic linker accepts links of the form:
refnameSepname
...
although the PL/I compiler and the assembler will convertexternal references of the form: refname to.refnameSrefname*
The work of the dynamic linker is done by a subroutine
called scsSmake_ptr. It first searches for a segment
with the specified reference name and if it finds one
decides if jt needs to be moved into the current address .•'
- 3 -

•:<•

I
•; i-:

KM i ,.•;;?

• :-rt.i • i > ) X i : h
•' II.

J#"V

!.=!f. .:*.i.il
" • v j •J.'.iifl

•I: '

The ttagtic Six Commands Manual
glossary

3/2d/JZ^

'

I':.
/ ^ L

4o-i.

i • •* *

space. Otherwise it searches through a list of directories
called the search rules for a segment with the appropriate .
etn-try name. ji

I

lift

1 . "

•

If the- link is of. the form rqfnamefr then it
is assumed to refer to the b39e of the segment. If it
is o-fr tha form renameJtepname then it .must- be; an object
segment, since it refers to*the entry point named epname
within it. Links^ofthe formflepname are designed to
prevent segment name clutter since'the dynamic linker
first checks the calling segment for that/entry point'
before trying to- snap a, link to epnameSepname. .

•'Is

•"

i

»

•

• [

{;•!_
.

w

i#-f

'W
•%!.

.J >
: «

i::iH

-

initiate
To initiate a segment the system looks up that segment
in the file system (given a directory, name'and. an entry
name) and-makes that segment appear to be in the current
(or specified) address space by making one of the previously
free segment slots contain tha,t segment.
')

P

Iv?.1

If the dynamic linker is unable to snap a link it will
raise the condition linkage.

i

.i i

•ii

before:
referencing <7,0> (or 710 in more common nomenclature)
would cause a honexist fault
'
hcsSini t i ate (%u>common'\ "uncommon",segjptr.-error^code)

;'-.•"
.'.;.'•

after:

\?i
' .!.i;j

.

.

..;#

*

seg_ptr « <7T0>
error_code » 0
referencing <7 r 0> is the same operation.as referencing
the f i r s t byte in the segment/file >u>common>uncommon

.• I :•

,

:'"'•{'$•
•It:

i

t

i-

terminate
}
To terminate a segment is tp disassociate the f i l e system
segment from the current slot in- the address space.

i. '•

before:
referencing <7,0> is the same operation as referencing
the f i r s t byte in the segment/file >u>common>uncommon

I

,•

.

I

>

hcsSterminate(<7,0>J
after:
t !
referencing *7,0> gives a nonexist fault
F i l e System .
- 4 <*%•f r . ' i
t

i

;.'

i

i

I

1 -.:•!:

The Magic Six Commands Mar.:;}
•'i

..... 'i
•MM

•> '•'•

•.'•.I.I;,«.

£^*-hierarchy
!
The file system can be thought of.as a tree (an acyclic
directed graph in which each'node has a unique predecessor).' •
At the top is a unique node known as the root. From this node
it is possible to specify a path 'to any other node of the. tree.
Nodes which point at other nodes are called directories
i
while those which do not are called segments (or files). ; "
Each branch leaving a given-node, may have any number of named i

'-:•

»

!•
 refers to the root, >udd refers to the
directory named udd immediately below the root. >udd>sas>foo
is the name of the file foo in the directory sas in the
directory udd under the root. Absolute pathnames begin
with a > (pronounced "greater than" or "down") and start at
the root. Relative pathnames start at' the current working
directory and may either indicate a list of branches to
travel down (e.g. if the working directory is>udd>sas then
foo.pll would refer to >udd>sas>foo.pll) or may indicate ,
that the specified node i.s reachable* from the working,
directory only by first travelling up the tree. This is
indicated by starting the pathname with a < or a series
of <*s. (e.g. if the working direc-tory is >udd>sas then,
udd>rk) .

i-. i

•:-!::i;:
• .i.

»!t •

»

I ink
A link is a node in a directory which indicates that a
branch is r e a i l y located somewhere else in the f i l e
hierarchy.
I f a link in > s l l name oink' were created
p o i n t i n g to >udd>sas>bar then a l l references to >sll>oinK
would be converted to references to >udd>sas>bar.
walking the hierarchy
Walking the hierarchy involves traversing the f i l e system
t r e e in such a manner as to v i s i t every node below a given

MM;
'' > •". ' i

• •..'• i \

J . '

?
••».

• i W W

•

- 5 -•

•;'••

/.i'H-'.i

3/29/78

The'Wagic Six Commands Manual
glossary

one in the tree. Thus a complete tape dump must walk the
entire file system from the root down.

r

starname or star convention
Sometimes it is useful to specify a set of file system
entries which have certain sections of their names in common.
For example, all: programs ending with ".pll" or aJI twc
component file names. To do this there is the star convention. .
which allows commands which accept starnames to recognize
the specified subset of all available files.' A starname looks
like any ordinary branch name except that it contains either a
star (asterisk, *) or a question mark (?}. In a star name
a ? matches an\^ letter. Thus, ?? would match all twc letter
names and mumble.???.frotz would match all names which start
with "mumble.", end wi th ."frdtz." and have exactly three
characters in the middle. Star matches any number of charactersup to the next dot (period, •') so that *.pll would match all
files which end with- ".pll" and contain no other dots. (e.g.
Saturday_Night.pll would match while SundayJlorning.incl.pl1
would not.) Star star (**) matches any sequence of letters,
therefore ** matches everything, **.pll matches anything ending
with ".pll", *.*#.pll matches everything with two or more dots
ending with ".pll".

i

\

••;• t

•A...'-'. 1 '• •
i

. l

:

i

' •'
.

•

1

* ': • ' '

. :.if

."' :- ••'

i

•»:
•'{

. I .

i * .
:

I/O System
stream
An I/O stream is the basic unit of data transmission in
Magic Six. It roughly corresponds to a logical unit on MAGIC 5, ..•
except that streams are given names rather than numbers and
consist of a dim which does the I/O processing and a description
which indicates to what device/stream the result is to be
transmitted (or received from) 8nd/or how such processing is to be
. performed* Streams may be created and destroyed within a process.
The information apdUt a given stream is stored in its iocb (I/O
Control Block).
*
attach
A stream is attach by specifying the stream, a dim, and an
attachment description which is interpreted by the dim.
A stream must be attached before i t can be Used for I/O.

detach
The opposite of attaching a stream is detaching it which makes
it unusable for I/O.
dim

:

i >r.

This o r i g i n a l l y came from device interface module and is b a s i c a l l y
the program which actually does J/0 to the given device.
- 6 -

•'•'*>-'.«

%":-X-

."i

•'..•;

The Magic Six Commands Manijpl
glossary

3/28/78

:••.« • '1»
I f
f.;1
•.'••<» •u}«

.'•>(••

•'• i

V "

• i .:.

I*.

. '•' I •
. . i •i.. •, !'
--[•:•
•;VV.

•

list of the most commonly appearing dims follows:
tty_io
interfaces to. pas I a devices and imiacs
syn_io
. transmits data on to the target stream , :
mt_Jo
does magnetic tape I/O
i
file.io.
does I/O to a-segment (or set- of segments)

..

. i .

if.
h

!.» .'

>.'••
'i !

i :

i 'i. 1

A;
'•* ,
•-.•'!

•. J. ! ;.ui
.,1

.

.'*"; ; ' •I'-;.
1 i

•••••Jr,-

i f

• . •• -. ; • <

-J-

'i^V

..L V-i'-j1

4

I I

,•• •• i
.t •.
,,
t
..-.:•. •. -• :•.. '•> •»,••,''•'
.i .';i-.••'•'•
-.

., : h ,"• ' •; * i I :••' »'

i!|
' .i

•

- 7-

•

»

.v:

• :;.'..?' '• •••••

. . • -i :

.

•

•

"."•r'r/a-.i'l.ViW.'l-

V •• •:. ;: i !

The H a g ic Six Commands Manual
address spaces

'3/2ft/ft
'•.t;

'•: ••;• -.;
li • ' i '.: i :

•. »! •

S^lk!!

(cur 1-14-78)
ADDRESS SPACE DOCUMENTATION
The commands which dear with address spaces arei
Irn

ii?

en
in
list
status
tmr.

Lists Reference Names of active segments (per address space).
List existing address Spaces.
sets the Space Name of a segment.
Initiates a segment in the current address Bpace.
Lists address Space for each segment (if it is not
null), its the next to the last thing on. the line,
the last-'being the ring number.
Gives stats on a segment, including address space.
Terminates a segment from the current atfdress space.
,," J. •**

HIM

i ;

! !

What an address space is:
Because of hardware I imitations, 'at most-IB segments may be "mapped"
or "in use". MagicSix provides a general -facility for a.l lowing the
users to think they have as many active segments as they want. The
operating system can manipulate entire sets- of 16 segments called
"address spaces", basically pushing' and poping on a stack of pending
address spaces, only the top one actual ly being active (hardware
mapped). Each segment has a specified address space. When we link
to a subroutine, a check of the address space of the segment
(containing the subroutine) is made, if it Is the same as the active
space or it is null (indicating "I'll run anywhere") the segment
is initiated in the current address-space and linked to. I f the space
names do not match the new space is pushed and made active. Now when
the segment is initiated it will be in the new address space and hence
will not take up any segments in the caller's address space. When the
subroutine returns therteWaddress space is poped and the previous
address space (the caller's) becomes active.: Note that the address
space is still "there" just not active.

i.i

.1 =•:>
;

1
.

1 *

i '

i'*a%!l ':'!

1

1

.

•• r
.4

• .
*

•
[

i
•(••
•" • * 1 1
• .*.
••;
i
<1
•
1

.T!'

•
••: '?i«l

.1 '

sn:

M-

This is the space_name command. It takes two args, a pathname
and an address space name. The segment represented by the pathname Is
put in the address space named.
Irnj

.-.i

This command has three .forms. Uhen called u i t h no args,
t h i s command l i s t s a l l the refnames on the segments in the current
address space.
Uhen c a l l e d with one arg, and that is not a " * " , then
I r n l i s t s the refnames oh the segments in the address space named
• tv

- 8 -

•. i

,J

.=

The Magic Six Commands ^OWfe'
address spaces

W

3/28/78

* 'I u
by
argument. 1 ff the name is a »*» *u
-y the
in* argument.
. .
n
are listed and all the S P C I
?*.! • ° ? " a d d r e " 8 P a c * 8
refnames.
segments therein are listed with their

•,.. ' I .

•• I

Is:
• i

prints a Iist
a list of all of the address-spaces which have been
entered s ts
ince the last neuproc (or login). w zs" removes spaces
from this list.

t '' l
•• I

A

I .
l >

.>' • *:••••«:•.'•:••; •.';••
• ... -I • J. • '• .
:,
f ••••'].*•• •'•••••:;'••,; i

•V •'•'"

:< .:•''.-':•.•••• •:•{••'.{.Ill*':.ifi--: !.*,:<•

•. i ..
ii • • . »

. f
I j

•

i ;

J0^\

V

1

i
i

, . ., , !' 1

Ui

I •'

^'H
-'•;'

I'., I

-':fV11

I !

KM

it
<

M i: ;if i

i

!"
;. i

vi!1

'I.-.1-

Ii

- 9t'-.ii.

>;!?!

.i »•
'id.

I! '

Ttte Wag i c Six- Commands Manua I
arcfrfve

-t

3/20/78
.

The archive manager:

»

*

1•

'

.'.'.• .' •• ••1I'
/«^
' M
• '^ft
1 •' /.
1 "»!i
1'
;'

,

usage is: ac   [J

"' ' .

The ac command has at least four sub commands
t - generate a table of contents of the specified archive
d - d e l e t e an entry from the specified archive
a - add an entry to the specified archive
x - copy an entry from then specified archive into a fife of the same name
,

1.

•«

': V

.

I

\.

i

i
f:

V.

j'.'ji

'!••

0'

\
: ' . . •'•••<
I.

• :•'. i
' r
>a%

/v
i
• i.

;

' '

!• '; i'-l :

• :

1

!:I '» •
i. ' i

II

>

Jfrt:'

• •• i

; ! ;/ : -i
•J

'l..'

:.J.i
;

'

?',

.

'.'.'if.

> M \-1

- 10 •»» ' .

'i ; "; lj':

.-' ' r,-'*

: . . ? :. ; 1• :i . I
. I

H

•;i

The Magic Six Commands MaHijpl
asr.dsr.psr

#**••

3/20/78

The asr command takes two args. The first is a full
pathname of a dir to be added to the search rules,
and the second is a number between 1 and f (hex)
which is the position in the rules to make'this .dir.
The. first dir after initiated segments is I, and
the others are numbered successively*
The name -ud will specify the working directory.
. The dsr command takes one argument and removes it*
from the search rules. It warns you if the dir
is not in the search rules.

. [ • < • * *

'

-

The psr command prints the search rules.

I

•

.' .:•' : :

•

"

i

* .» -

•1•i '
! •!•'•
-..•!r!i
• . • »*

,<•1
" t\ ' , • * *

, ,--JT:

;< : '•.'• Aw-.
'• -f-\-:"::.'m\
:

..)Hf-

.. • •- .i •

'

.•

t

:

• • ;f.

•• '"•

1

1

.

• •*
•

. * •*
i ' • *

. '••.

• '_' 1'

' ^ .'

•:: : ":J:K 3".-l

•.:

:.•;! :.r. Jr
• -V:.

•;i . * t »
••••; ... ;•• -il [•>.:.',. I '

.••••.
•
,

, •

.'. :=. ••• , '
'•

.• . "It' .1
• •'' ••:'' <:• '

"

•*:•'• a ' !
: i • .,

• r...ll >••,

••::' ':.r ^^l-WM
- 11 -

••••••

•

.-.•

.-," <'•'•• i''-'J'

»•
).

The Mag i c S t x Commands flanua I
b i nd

3/28/78
• Ir •
f

.-'•• r.'
•.

>!$':,#•1'

The bind command concatenates several object segments into
a single segment. The names of the segments to be bound are in
a bind control segment. The usage iss "bind foo" the bind, file •
becomes foo.bind and the first line in it is the name of the output
file. All succeeding lines of the bind file are interpreted
as segments, to be bound. The last line that will be read by
,
the binder is "end;", this terminates the bindirfg. Any line
beginning with a ";" Mill be treated'as a comment line.

i

si :

MJ
' '•' •!'

v«
-' i

I *

•I

- 12 /

••;

• f

i>

^:'.;j>

3/28/78

The Magic Six Commands Manual
clean

•. "• : i ;
r•

The CLEAN command takes no arguments. 11 goes through
the current working dir, and for each file that it finds, it
prints the file name and ask you "what about it"? If you .
answer anything etartihcj with a "d" or a "D", the. file will
be deleted, otherwise It will not; In either case, CLEAN
will then go to the next file in the dir. When there are no
more files in the dir, it will return. If you hit quit
wh-ile in clean, you wi II be back at the level you started
at.

i

..

.'!••:•• ' :•::>••••
••'••• '.:••: .! "
•

'

' •

.id-'!

V*

• 'I.

i

:

i;

.r
• ' t •..
il

>.i
..jjr'«!-i

>::••• •
'•.'. .1*•

' •-•» »•

i..

l

^ K ^ t ^

M

• •••;•.!••=;!.-: -_ r t, •
•I

•)!:-?-vr:i!|>

!--./---:i7-A--!'.-'-- V ' - ' l : ;
•' v : , : i v'f.?. :•'••'

A

•.:''•'-1
- 13 -

.<';

:•:%.{
•'.• >• ,<

# ^

.-«

•». ••

I''

i

T h e t t a g i c S i x Commands Manual
c o n d it ions

3/20/7JS

i ::.'•!:
"

:•.'

area

, •'•«'•: '••!: :

This condi tlon is raised*when an allocate statement or call
to allocn fails because of insufficient free space in the given area.

' 1. % I
:i .;

unimp I op
This means that an un-implemented pll operator has been U9ed.
Notify MLK (Mike Kazar) and he ui 11 write it.

•• !| I
i i ::: i
:

'I A

- 14 -

i;;1
! r
tfjfc ' ):••'

'• if

a

'«

3/20/78

The Magic Six Commands Manyal
cond i 11 ons

!••••!

badnargs
You c a l l e d a p l l program with the urong number of arguments.
oobounds

This condition is raisd when you attempt to either
grown a segment past its maximum length, usually >60K, or try to
reference past the end of a read-only segment. The latter is the most
Iikely reason.
recurse
This condition is raisedwhen you grow your stack too far, usually
by recursing too deeply. You can type a few commands, biit If you are not
lucky, then you will get a fatal error.
nonexi st
This condition is raised when.you reference or branch into a segment
that does not exist, i.e. that is not mapped over a file.
SVC0

i

This conditon means that the dynamic linker was unable to find
a segment named in a link, or the entrypoint in the segment.

i

>l.i,--

;• .7.fi:
!

• 15

1 it..

•i

I '•

1 . .
•••••*••:» i

. 5 :l i
' • ?! • •
 ..

:• •

.i'

•••' :i-

- 15 -

•••• yi
''•••••'?:
• i

••'

v
y

U'. 1
: v.' ;
-. -"i *

t-i^-hi
• .-fMs-.-,i ]•:•• • ...f

I
I

THie M a g re Six Commands Manual
console.Iights
*

3/20/715

;V.i.

••• a

EVERYTHING YOU ALWAYS WANTED TO KNOW ABOUT THE LIGHTS
teT WERE AFRAID TO ASK

:

.,••••.

: :

;•

, _';•'

1' • : '!. •

;;
*

'!

The information displayed in thefront panel lights by
MagicSix is extremely useful for debugging MagicSix crashes and
other less serious problems. The four different sections are
described below.
C

B

B

B

B

A

A

A

A ,.

• ,

•

. '

*

••
. i . • i " !.
-.
•'
•
,'
1 ..'. . ;'. 1
!
• . •;' '•••»*• ]••

• ;.
.•
..?•.:.
!••
• 1 .:••'.•'•
'. i
• ••-, *•.•'' ;'!
> J
1
- * *•*•'. J •I :
' . '•'•••• •'• '>"• ':•-'/
f. ••••",' i •• •

fr^'f
^

•'•
•x

The Right Most Ha If word (AAAA):
This displays the TCB address of the*current user. There are i
two classes of TCB's. The first set are the TCB*s for the
two system processes. TheyH both have zero as their upper
digit (ie "8CE8."-or "09D8 ). The Other class of TCB's are
those of users. These start at "D8C0" and can range into the
"Fxxx" area.
All of these numbers are multiples of 8 hex which means that
the low order three bits of this section should NEVER be
lit. The usual cause of their being lit is some sort of
irrecoverable disk error. To fix this problem hit SGL to
stop the processor and turn the disk off then on.> Restart
the processor by hitting RUN.
Since all the systeirt processes and only the system processes
have zero as their first digit "thrash mode" is easy to
detect. If very little* time is spent with any of the first
digit lit then no one is getting much work done: the system
is thrashing. Warning: the system always spends a certain
amount of time thrashing even with only one user and under
normal circumstances. For instance the PL/1 compiler
requires very little CPU time and Jets and lots of memory.
Therefore a PL/1 compilation with'only one user LOOKS a lot .
like thrashing. A cjood test to see if you are hopelessly
thrashing is for all users'to hit break and try to go idle.
if one or more, user fails to respond with QUIT followed by a
ready message'Within several minutes (give it a little time) .
then you are really thrashing. If one or more'users gets to
command, level have them type "hcsSlpgout"^ If all idle - users
have typed this AND their consoles* have stoped echoing then
you have really had it. The system must be re-IPLed..
The Middle Ha Ifword (BBBB):
This half word consists of a single bit which moves back and

: :

• ',

•

'•',•• .'< ' '' '•".
!••••.' • • - . . . . ' . *|

/pd that is locked so try it first followed
by the users home dir). If there are no other users logged
in hit *Z on a free console and login In as foo to try and
unlock things. Do NOT. login as a regular user.«

#''
i .!i

i i .

::. • • • ! . : [ '

• • V •• ; f.

• 11': '
i

i

: • I

! .
;

• r

v

- I; • »

"i

I

i'i

• h^'i'1':;!!' •
•i.

••• •'

t

h .. . :•• •.
•. •

r
. • •!
i'.' ',

.r.i,.- .fijihj.-. I

.M •

*

The Left Hand Corner (C):
This section is for hacks. It should be doing something.
•Mil.

The Left Most Edge (0):
These four bits are ALUAYS moving. If they aren* t the system

'1 ••

'41

i' 4

r r tr •

•'! - ; i *'\ ••:•• • *

- 17 :j,

•1

The-Magic S-i.x Commands hanual
console lights

3/20/78

i.

ti''

is deader than'!a door nai I. PUNT.
iH.:

; : ••'.

1
' , i

.

< i.•?•!

'.'""•'
• " -i.i \
•
••'•'.
i"l

1 • I '. . •i J i• i :••. .
. • -1 •

i ••

...;|r

"
*.'

•.

l

-• . ' • •
• •
;...' .•..::.
v

*.

;• J ;*»i. '

••'• ••'
!

• " v r i '' r
' ! p . : ; a •-iv /
•

- • • • ••:•. fit > ,
,t*

*' ' •
• .

-

i t

1

i .

f> 't

;

-

•• ti'.'

.•(«.'!

•

:'.||s;«

• '

•: ,

Mi

• '<.''•: •
• • • : •-:.•
' -th'r.
•, .•
•i
..'...,'•:i ; !
. '•-• '" : t ' ;
• ' " '; .• '
:. • •. .-51 • «i
.- ' :
. I t .
i

:
•
•'
•;

.-.

•••

.. ; .«:.i. .•

.-:.

Mi'...

'••.
'

: . : : . '
.••;:;:ij:
...
•••••' '
W:
•".'
•
"•
.
'
-j:
t
•'. ••' • • .•'<•,[ ± .r+ 1
•

I

*
*

• '
*"

: . : ' . -i.1 :

1

* • '.••••I
*•

..

•

.•: ? > l

- • ••'".
.••••-•;•
• ••
;

-Mv?
-,-.\\
;I
.>
•i

:. i

i ' • .
«•. -•!••!
• .-•;..i

- 18 -

•!• !
•. r

The Magic Six Commands Manual
copy

3/20/78

••' •'•'•''' » i.,-t' •• ' .'"
r: •-.,.. • • t<.. i«i
, ' •

:

\' • ! I) '< -I

••' •;•:•*•(-,*:• ( ; ' • ; !
• • • ' ! ! M T ,v'- , i
> • ; .' t : . . i ; . '!•
.'
•• '
• ••!'
•

ifi' V
I

Documentation for copy (cp):
' • !

i .•
•!'
•i •
:
''• •

•
••.•«••
• • • i- ••

Ji'Vhi!:

This is the copy command. It takes two arguments. The first i9.the'pathname
for the source fi le: The second is the pathname for the destination, file. '
If only one file name .is given, then it is the name of source f I le, and'the
• '•'•;
destination file name is formed by taking the entry name of the source file : ,'!; • ::i 'Uf;
• ft.' . .'I
and putting it in the current working directory. This command copies
using the bit count field of the source segment, unless it is zero, ih which
case the number of characters to be copied is determined from the page count
of the source file.
•
'.

: '!»

.•i.i

' i'
i-.

'

:',•• ••••'.\t

••:';» i . ;
>l

. I"t..l

1\

• *•

M

•: ',
•'•• -v •:•••• :.'.•:•
*•-&.'
. >••.•'• I .«. - till . ' • » • ' I M. | • ll
•••.m.• ' ''
•:•-*• •<••• -.I'll"

- 19 -

•>-:Vrt
' US

JPN

•J*

ii':l

The flagic Six Commands Manual
crash

3/20/78
•
•

rri

J

'

' ..-,•

'l

,/

Here arte a l i s t of the codes flashed in the lights when the system
\
'- yi
,
crashes, and Mhat they mean* They are due to svc7 s being issued by the system. .
•

I

•'

.'

"•'

'

•'.

1 : . Changed processes tilth the inhibit flag on.
•
\

.• ••

' • .

•'••.- :^

i

2: Read^Jpc got a spurious wakeup. Normally happens if you power up;.'•.
a .disk with the machine running rather than halted.
This is obsolete and should never occur.
• . . ' • • '

•

*

• .

•

'

.

.!
!•: ••
i" '•.'.'.' •';'

'

3: .Core job tried to grow a segment past .sixty-four k.
• '* .

'•

•

'

*

•

•

'

'

•

'..''. ''•- !

•

• ''.:':

! • .;

4* Core job tried to wakeup deleted user.-

• •'•.••:

5: Too many wired pages (No paddle). . .
:

6 : T r i e d to read a disk record into segment 0.

,

jl-

T

•I

7: Common heap free chain smashed.
8 : Not enough free-storage to satisfy request.
9* Smashed linkage offset table..•

•

•II • ,

•

•

A* Checksum error on system loading. .•

•

•'

,,:•'•'
. •

B: Tried to swap out into vtoces 0, 1 or 2.

.1. 1,J

. j ,

. i;
j>

Cs Tried to write out into pages .0 or 1.
•

•

'

• • » • • - . ; : •

D: Tried to load a file > memory hole size.
E: Power failure while executing critical code. ;

I

i.
..I

li '
'

. I

• - i ••'• i

<,.:M
'!h
1.»
i

i

<
4

:lf
y

! ^
!.

-20 -

i A

• 'i • • !;

!•*:•"•«:•
• i

3/20/78

The Magic S i x Commands HariUdl
delete

. !!• •

.-V-Mi
;

- ;•.!:

•i

There are
segs).

four commands f o r d e l e t i n g f i l e . s y s t e m e n t r i e s ( d i r e *

I inke, arid

They are

1)
2)
3)
4)

vi

delete or dl - deletes only segments .
unlink or u! - deletes only links
delete dir or dd - deletes only dirs
delete_entry or de - deletes any entry'

'..J; •'.-,

' •
• .

it.

• •hi : ill.1
.. i
i

• •.;.'•"/!!
• •• :•••(•'

i-: #.,

.I :

'

•• '*.-.'
'

• .* '
i

The first takes one argument which is the star name of the entries
to be deleted. The last three take any number of arguments which are the star
names of the entries to be deleted. The first three only attempt to delete
entries of the right type. Hence, if you have a dir named "fob" and say '
"delete foo". you Mill get an error messsage saying that no entries matched
the star name as opposed to an error message saying that the entry was of the
Mrong type. In general the first three commands are meant for general use
while the last is meant for masochists and really cleaning up a dir. ' - ;;
;
i

Comments / Complaints, on these commands should be sent to RK.!

• 1 ••

< . • -i

%!
-1

••S

• • • • I:
* • ' . .-if
. i
. • •'• »
.--•.. .•-'«' i'.'.l . •. - t ' '
,.'.!•; J
» ." '.:- '•
•I U ]
i TVI
••!•!

*•-.,.•.• k\- •:
t •

,j*^.

"M

.•/.

i •

!

!

1

! • •

,

*

'.!••

> i

•". <'->. .l-\ • • : r '"•'

>t\

1

»r •- • .

' • • - ••»•

j,':-' >'••; r • M| j

.,1 ( • •?•!

'"i-i '%; •
• i;
• , / .,

- 21 -

: i .'

•; • I.- •.: :

'• I ••••'•: . '• t»'.-'

i
'.»I
•

i

:r--;-... 'j -Jf.i,. v;I-* .'•

• v»

;

The Hagic Six Commands Manual
do

3/20/78

•/*% ••

do is a command line program which implements the general
lambda form for. command 4 ines.
do pattern argl arg2 ...
The pattern is a string which is passed to the command processor
after all parameters in it have been substituted for. A parameter
is indicated by an ampersand, u&". The string " W " is replaced by
a single ampersand, otherwise when an ampersand is encountered
the next few characters are scanned. These must be.V", "q" or
a digit from "0" to M9*\ do scans up to the number and then
performs the substitution.
&n ' causes the n-th argument to be substituted.
&qn causes the n-th argument to be substituted, but.
also requoted. This means that the string is surrounded
by quotes and all quotes within it are doubled so that
when do passes the line to the command processcr, the
result is ohe argument.
&rn causes the n-th argument on to be substituted., each
argument separated by a single space. This effectively
scoops up the remaining arguments.
6qrn acts like &rn except that it also requotes the result
like &qn.

i

IM

.i

•i

f i • •"

•

To see the
which acts
passing it
characters
»

I

•

result of a do expansion, use the entry point doSdebug
just like do except prints the result as Apposed to
to scsScl. The expanded line must hot exceed 256
In length.

. i,.-'

¥ ! 1<;

Examples:
do "who"
-'-»
who
do "pll &1 T nd" foo
~ »
pll foo -nd
do "send rk &rl" this is a message
'—»
send rk this is a message *
do "send &1 6qr2" sas this loses
— »
send sas "this loses" •

i'li '••

• •!r.

- 22 -

•. .

i•

•n

.-. i;'

The Magic Six Commands ManmQl
exec_.com

J I

3/28/78
.:-••

M.
exec_com: The command file executing routine.

.:«
in

Command Format:

=;: a

'

exec_com filename [substitution string, ffi [, sub. string N2 t,.*.l 1'J< where *ec* may be used instead of 'exec com' >

!

»'•

.• •:"•!;

The purpose of a command file is to allow a user to berform a defined Bet
of tasks repeatedly with a minimum amount of effort. Exec_com is a routine
designed to execute such a file.

'•..i

II;,

Basically, exec__com allows string substitution, and flow control (by means'
of 'if* - 'then* - 'else', and 'goto* statements). The substitut ion string
capability permits the user to substitute an argument in the command line '
for a string in the command file. Uith the use of the if - then.;- eiee
constructs and the goto statement control can be shifted from one part of ;'
the command file to another.
,
V- '

%*•!••

All exec_com commands are preceded by an '&',

:

•

;.'. i

i•J.

The following is a list of the possible exec_com commands*

' .;

1

i-.i
• !•• t
..i •

•''?r

i?-t •• ' f ••*••

('1

V

Argument Substitution:

:- ,1-

I

*

...*.

1

replaced by '&\
i
*4ec_name'
replaced by the entry name of command file.
!;! '
•fin'
replaced by the number of aruments to the- exec^com
command.
. • ' !
replaced by the directory port ion of the command fi le
pathname.
• &\* ( i is any integer)
replaced by the ' i'th substitution argument in the
exec_.com command.
*&fi* (i is any integer) replaced by the *i*th through; the last substitution

i

i

i

arguments
Flow Control Statements:
*&goto* < I abe I _namel*
'Alabel'

 is a character string df '.
i i
32 or less characters.
:
stops execution at this point and returns, to User.
•; j ••)
this is an optional command; it is. assumed at the end J | -.1
Mi
of the command, file.
/;/' ']:'•'•' :/*Wl.'*:|j:
the act i ve funct ion must be enc Iosed by square
; • :' • ;:'!<| ]|. .'jj
brackets, and is any function that is defined' to, ,: :V ;'. tfoiji
Mvrt •".&--n!'i» '-'I.

- 23 -

'•,

i.

it-1
•*;•

{Vr.wfc

i

if!'*t

3/20/78

The Magic Six Commands Manual
exec_com

'«then'
'Seise*
'Sendlf'

the system or user, the square-bracketed expression
is fed to the command-1 ine-prpcessor which returns
either .'true* or 'false* (assuming the active function ,
is defined), control is then issued to the *6then* # ot
•'Seise* statement depending on the returned value* .
[All *Sif* statements must have a matching 'Sendif*
statements, there may be nothing else on.the line
following the square-bracket expression,
control is- transferred to here if the square bracket
expression of the corresponding *Sif* is true,
control Js transferred to this pojnt if the square ,<
bracket expression of the corresponding * Sif* is ] v
.false.
.c •• •
closes a 'Sif block, there must be a one-to-one .
correspondence between *Sif* and 'Sendif* statements*

!?•' •

Miscellaneous Statements:
.

* Scommflind_ I i ne_on*

''Scqmfnand_ I i he_o f f'
*Sready_on*
'Sready_off*
'Sprint*
'S '

ill

«

;i ..

i • :•
causes subsequent command lines to be' printed out to
the terminal before they are executed.
' ,... , - :
inhibits printing of command lines before execution,
•I | !• •
invokes the calling of the user's ready procedure • .! I f : ...
after each command is executed.
•'•'>.*•'
turns off the previous.
prints rest of line to terminal, line is not executed*
rest of line is ignored, intended for commenting lines,
:> .

If any of this seems unclear look in the Multics Programmers* Manual Reference
Guide for *exec_com*. The major difference between this version of 'exec_com'
and the Multics version is that this version allows multiple line* and nested
(to level 16), i f-then-eIse. constructs.
' ;|
•
.. ' ••
I.
••.-.
t

t

:

I. '

I;

r "A

\!'.'Wi
' •;•,.,•••.••:.•!»;• '
1 *:
•!.•••!
''•'-•'>•- .
•'•i-l
••••••:'-fi

'' ••

•.•-'>

i • • : .• •
1
; • -y' ' "•••

tt-rf

'

,
•

- 24 -

i

:

:'ii!
('•' )

•.«.'•.

M - . - . - J : ! }

•

.

• ••><:•:; f

:

,.

«' • '! . S i - !i

i ... .- . '!• V>

• ; : : r -.!i
'*%•'

3/20/78

The Magic Six Commands Mariii|||l
e t c (error_table_cotnpi I*M-)

•!•!•

etc is the error table compiler.
#*•'

• " :
•J'
• ! • ' :•

etc error_table

•i '

converts a source error file error_table.et into an object
'error table in the current working directory.
The first I ine of the error table is the name to be given •
to the generated error table.
The format of a source, error file is* a series of lines which
may be either comments (if the first character is an asterisk)
or error designations, which are of the fonn:
error number, short name, long message •
where:

'

•'t ' *
.1 •!•

.,!.V'.-'••:•v".r.'^.,.i'! .• '
<- •< I

- 25 -

•'• J:-;.:-!.:
••':

i

"• ' :

• .i

f

:

ir-1

;f'M-'fil'''

!

Thesrtagic S^|x»Commands. ManuaI
e x t e r n a l data

;.^;^ir

3/2^7&,

External data Is normal ly stored In segment 14 by the system.
This i s
the Linkage segment and Is known by the name "linkage".
External
data Items':' may.be. set Mp-by.cal I Ing scs8make_static_external. The j
follstwjng. is. a l i s t of the system defined external data items*
They
may be* referenced as I inkage&.
var i abIe

va I ue
assess

level
.
ready_pn
',
acqefj^mB s sages
long^errpr
pr i nfc_coto._err or _mes sagp 9,

i1' •

V
I
.*>

uservjo
U8er_ input
user^output
listing_output
error_output

the current command processor level
whether or not ready messages on on
whether or.not messages are being accepted
whether or not long error messages are d e s i r e d
whether or not com_error should p r i n t the message
this, flag 18 reset, by each c a l l to com_error and'
is used by com_error$:shut_up uhich on c a l l s to
suppress the printing of the message i f you want
to dp something else
iocb ptr for user_io stream
.iocb ptr for user_input stream
iocp ptr for pser_output stream
.iocb ptr for I isting_output stream
iocb p t r f o r error__output stream
|

i/i

>':
t;

"•

t

i;i

• •>!!
'

:

1

\

J

,1
- 26'*%;

iri

i

3/20/78

The Magic Six Commands Manjjgl
fido

•
i

i
i'• i

•

i

!

i

i

Fido ip a general purpose watchdog program. It takes the fol lotting argst
•num
•user foo
•uatch nnnn
-off
-on
-1 i me n
-index n
-entry n
-sum

fct

-clear n
-calI foo
-cl foo

V:

means Match for a change in the number of users.
means Match for user foato login.
means Match hexadecimal location nnnn for changes (1 u o r d K
turns fido off.
turns fido back on.
tells fido to Makeup every n seconds.
tells fido to Match for vtoc index n to be used by anyone.
tails fido to Match for the segment h to be initiated*
fido Mill summarize Mhat it is waiting to see.
clear the n-th thing that fido is Matching for.
tells fido to call foo every time it Makes up.
I ike -calI.

1. ••
*
t

.1? f

v<

.<

Fido*s are cleared across processes.

• Mi. ^
i

I;I

,;'-::r.
i,

•

! ' .
;= • 111

ij
1 '.'•

•1 *

i •;»

*

i

i.

! '1
J-

i'.-'•Mi ••':
"l

r.

'. i

;• • * I

I.:

•i • •; : !

»..

•'•!:«

- 27 i^S

-i'V'il
I
i
•VI"I •

i»
)

t

The IWagic S i x Commands Manual
findall

.' *

3/2&/5%

.

Document for FINDALL:

' • ' •;?

f i n d a l l i s used to search for a particular character s t r i n g in a set of
segment-s. Usage I s :
f i n d a t l 
I  )

r »
!

~

• '

'

'

'

•

'{!'

(

j

i..i'

C-sl

•

The starname defaults to " * * " , and can be either absolute or r e l a t i v e *

T h e d e f a u l t is "long format", but any third argument will c a u s e it to
u s e "short format". I n long format, each I ine containing the s t r i n g
is p r i n t e d . In short format only the number of occurrences is p r i n t e d .
.

.,
*\

'

•

'

•

'

;

•

:

.

Examples of use:
To f i n d a l l labels in f o o . p l l :
findall
i fqo.pll

.

.

. •

; .
n

rt

-.i^jj
'•=• ' ^

: .

'*%•

. j;j.
ji^
jji|

!'

• • ' • ' • • • . . ' .'i "'••; i ••'!, ••' .v
in all of the pll
•" • . j(
'
. . Hi

T o find all o f the calls to subroutine zap
p r o g r a m s in your work Ihg directory:
fIndalI z a p *.pll
T o fin,d all (or at least most) of the setq's to the atom quack in
all o f your lisp files:
•
findall "(setq quack" *, lisp

.
• • • • .'
• ; •}':•••

__':!!
•. ..i
••". :ri •;

To count the number of statements in each of the phi 'prV$i:e|n8\jn :•• /••;> •'•'? if i ^ 'L^L
the system source directory:
, . .'
' !* ' ,!i
findall V
>s>*.pll -s

I'M

• •:':'• Jif.:-:

• i' • (
•
'
:Xi

i .1

;,

i.

.;.

-

• • • •. i
',• •»' ;
• • , ' •'.| •
': ; ••.' i-

:.:r:fj

«; i ••'.

!

! • if
>i

:! J
•jlii

- 28 -

'• :

•

'

—

ii
. •-

'I •

•.'I I?
;»
'!

'1 : •

3/28/78

The Magic Six Commands Mantel
forall
5/39/77

forall is a program which allows one to perform an operation on
a set of segments, links, or directories. .The general format
of an invocation of forall is as follows:
forall starname options command
where the starname (optional if the first argument begins with
a "-" in which case it becomes **) is a standard star/pathname
such as <**.PL1
options are keywords which begin with a "-" and are as follows:
-BF
-S
-L
-D
-UK
-P

brief - don't print the command strincj
segments j only perform the operation on segments
links - only perform the operation on links
dirs - only perform the operation on dirs *
after you finish a given directory recursively do
everything to all of the sub-directories
causes substitution to use the.full path name vs«
a relative pathname

i i

.;
.• i

I f no options are specified -S is assumed.

j|^N

The commands is an argument or a series of arguments which
are catenated together (separated by spaces) to form a s t r i n g .
I f the s t r i n g contains a *c i t * w i l l be replaced by the entry
name or f u l l pathname (see -P) of the entry being operated on.
"^c" may appear up tp 4 times in the command s t r i n g .
I f 0 A c" .'.'•"
does not appear in the command string i t is, catenated on at the
end.

M.
Hi'

Examples:
FORALL * * . P L 1 ST

does a status on al I PL1 programs in- the current dif
FORALL * -BF COPY A c >SLl>Ac
copies all single component segments in the wdir- into >SL1
without printing out messages
FORALL >**.PL1 -P -UK ASCIIP
checks a I I PL1 programs on the system (note the -UK)
and sees if they are ASCII files

;

.••

:

•. •i.,',n
'"•. i

' |=; !> ?jJ
'

• 4 'i

. •'. J .I Lr ' i r H. i
•V ••• I '. •>:'.
•••
i' I ' • "

- 29 -

:r •>.. "I k',?
.1 :'

TheMagic Six Commands Manual
he lp

3/20/78

help.pi1
' • !
/*

* * Novices to Hagicsix should try "help Introl" and "help i n t r o 2 V
help program looks upand prints the documentation on. a program • '' ,
or subroutine, "help tv" will print out the documentation on the tv command,
for instance. Help * MI 11 print* out all the topics'on which help is
available.
Two other programs also make use of the help__files "whatis" which give9 a1'J
short explanation of the program, arid "whoseis" which looks up the
maintaiher of the program.

<'*• '.••'

The data base in which the help (and whatis and whoseis) program, looks
is kept in >doohelp_f I le. The format of. each entry is as follows.

!.,:•

:

(   / )
The pathname can be one of three things.
D a real pathname.
2). the word "none" meaning that the-one liner i9 the only available
documentation and that* it should beprinted out.
,
M
3) the word "doc" meaning use >doc>name_of_progr.am.doc" as the pathname.

?

Since many programs have alternate names the number of help/f'J le.;
entries can be minimized by the use of the. assoc_table. • This is a file
containing a list of associations to be made between what topic help is
needed on and where the help can be found. The format of the assoc__table,
which Is in >doc>assoc_table. Is very simple:

*

[ ]

• '" '

!»

•t
•.'I

- 30 ' M '•
tools>

3/20/78
i-.

i

Ieh scan
or
ieh load dnameh enamel ...
These programs provide a facility for scanning and loading Magic 4 or 5
standard IEH DUMP tapes, To set up the tape stream type:

• >«!

io attach tape si mt_io ta^e
ieh load takes arguments like those used on Magic 4 except that the
Magic Six star convention is used (thus **.pll Mill Work). All letters
in requests are upper cased but the fi.le names are lower cased when
they are loaded. This is probably the most convenient transformation.
The Magic 4/5 directories are turned into subdirectories of the
current working directory.
Example:
ieh load z i n g _ * : * * . p l l zing_#:* zingjKt*.sysin

• t,. i.

.
':"•(.

might create the subdirectories zing_a and zing_b in the current
working d i r e c t o r y and load the appropriate f i j e s into them.

'. I . I

I

' >

m

/ •>

,

v:

i'i .!;•••

!

,,

'«'•• *•.-•••• .•.••::fi.«!;-i! a !
*

". f'

• > , •:. .V1 ' I • | f f
I,-I

" * j ->•'

•i •.•«

"H

.-J

. i.

- 31 -

/>«•>; lis:

••:.•; . ?J i
• .j .

imm

The Magic Six Commands Manual
iehlist
'

• •} t.r,"
/^9$\ ',';':

t

The IEHLIST command does a cheap version of the Magic 4 IEHLIST.
It prints out the name of every file in the file system, by recurslng
f rom the root. Files dire indented if they are contained in a subdir.

,1

•••\
f
I.

. : ' 7 . ' " ' ;>\i
•'•':',. - : ; :' ^ ! ,
. '
•- •:.; !i;-!
.-•••••. '• •
. -...- ••••
• •:>./!!•

"r4
v
M r

•: i.

t:

i. .

. ! .
• i.

I

• ilri
1"! !

I,

•ill

4.

• v.!'!
. V'i

', Hi'

••]•;.{
I V

*. »

i'V..
»•.'..'.••••••

' I1

r U

J

••• -

. > . . t i-

<"* s

I ; •;

. 1- f

Jilt

- 32 -

.1

:•:•

i'.

/ .

!'• *

%.\-

The Magic Six Commands Manual
inquire

3/20/78

•*t H

Inquire prints out useful information about people known by the system.
It optionally takes one arg which is the user id to lookup (default te you)*
If additional arguments are present these are interpreted as special fields
which are individually looked up.
•

.1! . ' \ l
.

t

This information is kept in >doopeop1e>foo.doc where foo is a login
id. There are only.a few requirements as tq the format of the ff Id. .
1) Each topic is delimited both before and after, with a double CR.
2) Each topic is headed by its name followed by h: ".
For an example see >doopeople>exatnple.doc. Currently inquire knows
about the fields name.nick_.name, phone, address, last_logout and hacking.
Good luck.
I
}

1:

I

!
:' *

c

.'ill
.'

'

i.

:

t

.>»
•
i

•v

I •

I.

:!

• ! T \:''•'•, '

.

••; •••:•••:•!•
. !

•t

, • •if.-';
.f.M <

<
< • .-. ••

•:^;f

i

-:••;;

f:-m

I is.

ill

•••:):•;

til
:. i.'-l--.-

V 5 :':•;•;.•'•";•'••.

- 33 -

-••••.

y\\i)r:i

• ! ' • . . • ! •••.•;»:!•;••.••
• . • • ••;l

i • ,'
• !

••:••

'•

. ' -

H-.--.-ffl

'
r I

:••'!! i
. v . ' :••!•?'i .•

1

•. • i

3/20/78 _ < !
j; •

TheM a g i c Six. Commands. Manual
io'- fti-t-l l.i ty command)

I

V

\

L . A-

The lo command a I lows a number of io system requests to
be performed at command level. These Include attaching,
detaching, and many I/O and order calls. The basic
synta* is:.

..',-.

>:•

io request stream options

' '

The various forms are as follows:

•.*'<*
»

< ,-f.:r»iii

io attach stream mode attach_string

»*.»•

;:
••:•' •'! 6.••
•
<::i
'»•

•

to detach stream
** •
-

i

lo order stream request

l

:

io get stream nbytes
'

•

; -

:

.

>

/'. .

f

[:

' " H

io put stream*nbytes *
.

get requests input from the terminal while put sends
ascii to the terminal.

,

• • .

•

.

.

<::•';'*

:•:..', :;.:•;.

••;•-•

•.••

,-;.;;••{!•

*
• • • • • • . • • • • • • . . t -.j
. • ' • • ; • • . • * • ! : .
U ; > ' v .' • • '

• •-:• • ... •

•••. ; • : - •

•;

' ' ]

*

.Tiii-i

t. Hi?

••*,
i '•'. ;

':

• "' •"•: :
:

i .
••-•'
•

.

•
.

I

•

:
"
•
•

.
- •

-

•'
.

.

«••' :•
= /'

.

A

' "I

i

'•••,';.''
.

•

•

<

i

;

• .

;

f

. . • - :
f .....;•: --r ..•''*
••
••• : •-,.••••' *-:•.
,: ' v
•• . .
••••» • • . r ; - ; ' ; : :; i f . 1
. .
.•'••:• . . •• \» - > ; i j .
. ' • " • • •
'• ••'•''•.'•' ' ; -j.
'
•:. . ; • >.i ,-! 1. -*;
. • • . ' " • . • ' • • "
:.•:'•;!
f

i. :

- 34 -

If
I'fii
ii••

••'I
.!«•

3/20/78

The Magic Six Commands Manual
link

j~-'
•i•; •

4

In addition to segments and directories, there are file system
objects called links that indicate that a file or directory in d
directory is not there, but can be found in another directory.
Thus if there was a link from ">a>b>cM to ">e>f", then a reference,
to the file ">a>b>c" would result.in the file ">e>f" being referenced
instead.
I i nk:
Iks

)«•'

;l i

. •'!.

' .
.

t

T h i s command creates f i l e system l i n k s . I t has two c o m p l e t e l y d i f f e r e n t
f o r m a t s . The f i r s t i s
•
l i n k  
•
'.
which c r e a t e s a l i n k a t the f i r s t pathname that when referencied y i e l d s
the segment, d i r e c t o r y or l i n k at the second'pathname. Thus
I ink*>u>mlk>a >u>rk>o>plums.
.
'
i ;
M
r
would c r e a t e a l i n k named "a", i n the d i r >u>mlk" that r e f e r e d (o
the segment plums i n the d i r >u>rk>p. • The second format i s
•;•"'
*'
l i n k 
:;, :
e.g.
'
- V

link >u>rk>o>plums
*
which would create a link, in the current working* dir, named plums
that refers to >u>rk>o>plums. Thus if the current working dir were
>u>mlk, a this would have been equivalent to the longer command
link >u>mlk>plums >u>rk>o>plums.

.'I..
' • I
• • i . ') .
•!: '
i

iil
I »

' j
•'•'»'• <

1

i

II

'" .

•i

'"; . •'••;'* )

ul:
unl inki
,'
This command deletes a link. The object of the I (nk is not
touched. The command format is the same as for the d.l and dd commands*

,,l

:

ir. .•

•'. . •!'

i > i "• i

i • ;

( Y
.'

" : .- • .;; 1 •

. ,

•

•• • -i •.* 4 -' • • ;,'

1H
••:pj

v

';..'|

!

--VM

:

^'

.':•; >•• a
i

:'i::.y:::

• M

,.

•

•

• '

;

I.I.

f
i

: I

- 35 -

.«
I.
I

. i •

.-<<•'.

y

'

f
1:

*' >•

.i j . :'. w

'••,. ;.• ;;;!:, ;,.'•.•!.• :.:i '!!.
' *• -•. i . • . J •. *l
••.••. ' i l . r i • !'i; ^il!
i.

;.»l .'i.!

l /--,

>

•I .
i •

3/2W#8

The Hagic Six Commands Manual
lisp

/S

(cur 1-21.-78)
MagicSix

%

L I S P

(type "help l i s p - i n t " rfor internal documentation)
LISP i s a programming language for symbol ic manipulation, i t is a very
v e r s a t i l e and'.elegant language, having i t s roots in the Lambda Calculus
of Alfonso Church. The name LISP is a contraction of LISt Processing,
a " l i s t " i^ the most common data-structure in l i s p . LISP programs
.
(functions) are usually interpreted, at least unti I the functions a r e '
completely debugged. But lisp functions can also be compiled for
increased execution speed and efficent use.of memory.
This on I ine document is not intended to be an instruction manual on l i s p
programming (several Of these exist off line) but this w i l l serve to
• sumer ize the aval I able features and compare MagicSix I i sp wi th i t s ancestors,.
MacLisp and Lisp Machine Lisp.

Symbols for l i s p constructs used in this document:


a I i s p symbolic expression,
either ah 
i or a
.



a terminal in the tree structure, .
. either a ,
an
,
or .a
.*



a tree structure,
either an empty l i s t (called " n i l " ) :
or a l i s t of expressions:






a numeric quantity,
either a ,
or a
,
a fixnUm, an integer
a flonum, a floating point number

•• *

'• ,
•

0
(• .



i-

••'•* *.)
. i
,.' •
- :•'
. .'

|'
•! >
t

J
f

• /•

''. '\>I !
• t;* •

;
,



an array,
a special type of atom allowing indexed access to data,
can have any number of dimensions,
each element of the array can have 8, 16, or 32 bits*

»

1

j

. ; •: ••'#•
•'•# •
•• ! "i-, •

:: >i!
,

,

.

, 1

1 '
1

• 1' . f

 ... <$>• ...
any .

- 36 -

'• i
•i

i

3/26/78 • ' •

The Magic Six Commands flamjgl
lisp

'*• •'• , 'i
! „'

; I

CBssccocnscBeccccaccBiiaccsseanssBScscQcaBSD

Alphabetical l i s t i n g of supplied functions:
BBBBciieBBBaBBSBBeiiecBesiissBeaflsiBSHBaDaRM

addl
1+

(addl  ) => n+1

addr
.1.

•J

and
'-.•:•.••« 3 1

apply

: -i :" •/' •'     ...) '*> 
Array Store function, sets the indicated element
of the array  to .
i
* «

autoload

. •

.
"'..•'

(atom  ) B> t
if  is an atom •
»> ni I otherwise
if;

.V-

append
assq

•.

#

: j
.',.

(append  ,  ... )

f
";•>
.V

.

I"

•

••

(assq   )
••

.

.

.

(autoload  )
Declares " to be an AUTOmaticaIly LOADed function.
The first time the function  is evaluated the
MagicSix segment named  is read in by "load",,
then the expression is re-evaluated.
'
baktrace

(baktrace)

... »

\

traces all pe.nding functions on stack after error*
printing their names, starting Mith most.recent*
- i

f

• •;•'! i

.'I

•

(baktrace t) trace includes calling form in additIon to name.
boundp

(boundp  ) «>

•'•• h'.
. '•!.

t
if  has a value bound to li'i
niI otherwise
••.j

•.. • •

• > • i • .iii'

catch
catenate

i •••* •
11 •.
I

-H.
•i ••
-:• : I'M-';.

car
- 37 -

".•I':
•J

i ;
. . #

Th© Itargtc Six Commands Manual
11 sp

3/2a/7a
•)'«•
:).
i

cdr

*• M!

'I'i
i.

close
cond
i! '

cons
cons-string
(cons-string   )
cons__string

cos

(cos  ) «*> trigonometric cosine of an
angle of  radians

Ctol
dec I are
i

i

defun
»* •.';

delq

(delq   ) two arg version only, deletes all elements of
 which are "eq" to 

.

-1

•

•:"

di fference
do

' i :. i i J

i.- V! M'

eq
.i

•1

• *

"i

•••••..

r

: :

r

• • : - [ • .

equal

... • ••>:•'«.-i
k

eva 1

•

i

fboundp •

• •• i

'

! I »

!

•"v . ! ;i

fixp
•i •'

-:•'.

n

,.i:

floatp
fmakunbound

••; i

feet
fc

II

••; >•
•••i;

fsymeval

I:
i

:

•

%•'
!V- i
,*

gc

I

gc_c1eanup
- 38 -

^%' 1

The Magic Six Commands Manga I
lisp

/jF"*

3/20/78

gc_setup

•:]

!••..:«

gensym

i-!i

get

'"\

getpname

1

get_asci i
get-ascii

• V:.

go
--•"•I :

gr i nd
greaterp
intern

•Ml

m

ItoC

Mi

• i

lessp

Vt

<. •»•

list

{••'.«,

load

'0*^

u

I oad2
make_array
make-array

i:

(make-array    V •'*.)'

mak e_ar r ay_header
'!

makoblist

i

makunbaund

i

mapcar

max
memq

,:>>..•: ;":;!•.'.:;
' '••', *"• "•,'•••• •

(memq  )

min
minus
nconc

•
"

(ncohc   . . . )

.

'

•

';. ; ;

:»>.

. J . . . .

1 , . . '•

X: •?•,].. J

Ui,#:

- 39 ' ^

i . - ,

. . • I . ; -r-i •••
!••.-.. vT ';. '

> • •!

•I.-T
; •• * ' l'

:•

.Ml. 'I .

! : : J : l •'•

The;' Magic Six. Commands: ManuaI
lisp:

3/2G/7S
f

:

not
nreverse

»i:

null

."i

. i

V

,

i

i

open
or
prist
:

\

1

\

pi us

1^

print
'»'*

. ' . p r o g ..'•

progrt
V.l;

'I

P

":.t

pu.tprop
quit

(quit)
 one  read from console,
(read  ) .=> one . read from .

release

(release) Used after an error to*unwind stack to uhere you
were before eval ing the function that got. the' errors
the previous top-level..
'.'•, .

!

i'

reroai nder
•. A

i :i

I i

remprop
(rep)

does a read-evaI-print operation

rep
(rep_loop) repeatedly does (rep)
rep__lqop
return
1

rplaca
rplacd
- 48 -

.•)j
i :

•• 1:

\'.l

.1

I • i

3/26/iZ

The Magic Six Commands Manual
lisp

:-i-:,:H

J1^

w-

.•, • '.•'•• •• '•'•'•
••• •:,< • •'.•:•:• j /

set

m

t

setq :

• •:.•!•• ^jA I- . •: !:-'!!'-

set__gc_flag

•:':;•• i \ r d n t *

sin

(sin  ) *> trigonometric sine of an
angle of  radians

.:••'•• ••::•; i •; .'«!"
•••.VI n-; -• ) - .--i

substr
i

.1

stringlength
string-length
string_length
•i.:..'-i •,'••!

strIngp
subl
1-

[•••.•••\".j,\

.: i ••J- %,!Ji.ir.i:;;!.j
.''••"'iwiv. •.•••>••.• ; • ; : , ,

fjV|

V'. '•••' = ! -j." ; -. ;•••*••" ::•••',' - I

symbolp

!

if-'. •: •?.: • : V . I:!:; *.' ••
•lj

rfi '»•<•:

I

:;;r?

symevaI
terpri

,jf»\

if

throw
top-level

(top-level)

By default this is the same'as the function ,'r6prtt
••..!'/•• "!| ' ••I. •

(defun top'-level
0

; .
r

'

'

'.

. (print (eval (read))))

;

'

•••''•• :;•: A

:
* ••i

*

"

'

I-. • . •' ' i -

'

"
..

.', -

i-••:,r

• ' . ' . • •

But it may be redefined to do whatever one wants
done every top level evaluation.
i

•-••:.•:. i :

t i mes
trace

tyi
tyo
untrace

•

zerop

;• • • ' - ; •;.'i:.t !
• • ••:
.
. •* i. > i *
; • • : • • i-.iir
|
• ' : . ' ' • • . • , ' • ' 1 •!•

-41 -

'

!

•: :-•.:• •••M..-| I

'

••••• ' ' / l i

;

;

' , .!•'•••. }/: ilM'ii.
i
••>;.•••
/:•• :• ' ; I ) - U .f
i 1 <
• I; •

The- flag i c S i x Commands ManuaI
lisp

3/20Z7&
i

'!•

ii

!
i ' j
r

J

1

...

:

rti'i

-

•'•'$•

•. •••
:'•:•

•• ii««
^ii:

(COOCBBCDSBRD

I n i t i a l l y bound atoms:

M'

.' i • ' .»•
'.

Da«BBBnaBBaonnnBcsseB»

I•

nil

» ni I

obarray

» art arra^ o f 128 l i s t s (hash buckets) of atoms, a l l
interned atoms*are on one of these l i s t s .

i.

\

m

:(!
c
.

I.

«
• W

Pi

•> 3.1415926

t

.> t

2pi

»> 6.2831852

•;.
'r •

i

*

:: \ »
t •

...

and a b a b y ' s arm Holding an apple.
•• i .•»!
h *„••

•

! .,.

•-

••'

I .

•'•>• •••••!'•. ! . T . ?•

;, '

' • •• i- .-t
•'!•. •:; •••
i :.'

!

'; Vi ; v;

•

i i - - •; '• -•••. |t |

i*

'**

^

•:. ¥" to list in the directory named. Note that if a
directory name starts with a ">" character or a "<" character* then
the "-p" is not necessary before the name, as the list command knows t
that this must be a dirname and not a star name. Here are some examples
of various list commands:
J»

•

I ist **
' •
lists all files In the current working dir.

•; i ! 'i;:
. } ' .! ;
'i

••,'

'•'

.••••)
•tl!-.
«•i

'."'.-

t •

I
does the same as the above.
11

list >s11 motd**
lists all file's in the dir >sll that star.t with the. first
four chars "motd".
I -p source foo*.*
oo*.* -d
-d
if the working
orking dir
dir is
is
dirs in Vthe directory
where the
e first three

•''•;•?;-if

!(
• •."!•'!•

..t

I

>u>ota, for example, this lists all
>u>ota,
>u>ota>source that have two component ftatnes.
characters of the first component ere "fo.0%

i* •
ff,.

J;l.
' • ' ' i'

' -il -

»

The l i s t i n g format f i r s t gives the access you have on the segment .
(any combination of V " , " e " and "w" for. read permission, execute
p e r m i s s i o n and w r i t e permission), followed by the number of 2K
pages a l l o c a t e d t o the segment, followed by the byte count ( c a l c u l a t e d
from the b i t count)- i n parentheses, followed by a " * " i f t h e segment has
been m o d i f i e d since i t has been backed up, • f o l lowed.by the. name o f t h e .
segment, f o l l o w e d by the address space name i f not " " , f o l l o w e d
* • ,
by the r i n g number i n brackets.
. ; '
.

I -.'in*.'

•. <

U: Wl

'•••• .!•.•>•» ;'?''.
:: <•. ' •-•' ;i'{ii.!^:i
!•• . r K-Ktf:
.'•• •:*>, #1 : U
••;•'• W V
; H

t

r
•'

• ' • ' 5

:

; / J

:•'•*»

. )

• :.':,-!!!.«-v.,-;.t;j

- 43 r
*

. 4' «',

••• •• N':|
•. ; ' • :

i

The Hagic Six Commands Manual
midi

3/5(9/7^8
i

i

midi is.a middle scale assembler for the 7/32
midi f iIename op 11ons
i

t

causes midi to assemble filename.sysin into an
object file named filename.

i

The options are:
f!

••si* •

-nc
-Is
-nl
-nx

supresses
generates
stops the
stops the

code generation
a listing on the console
l i s t i n g of include files
listing of macro expansions

I

i

midi knows about most of the machine opcodes and:
many pseudo-operations:
entry
extrn
extrd

defines an entry point
defines an external symbol
de.fi hes 3h external data reference
•

1

f
<•
»t. • 1.

•

i •
'••(! •
:

'

V:
', I

equ
set

sets a symbol
sets a symbol weakly (no error checking)
assigns the remainder of the line to a variable

end

ends the source program

. en t U
.rtn
pc

generates an entry sequence tilth ff bytes of automatic storage
generates the return sequence
sets the program counter to:
0 ahsolute/no code
1 pure code
7 impure code
same as pc 0
same as pc 1
same as pc 7

dsect
pure
static

i

I :

•.:'•••&!
• •;.•
•».

macro
mend
9

defines a macro, macros may not define macros
ends a macro definition
indicates that the next symbol is to be replaced by its
value, either a number or a string,
quotes an @ or quoted string

.

•

• • ; '.*

• »

incl
copy

includes the specified f i le. incT. sys-i-n in the source
like incl, except only for the first pass

dc
dac
ds
a I Ign

defines constants (halfwords)
defines constants (fullwords)
define storage NB: this, rounds up to the nearest halfMord
aligns storage on the specified boundary

• •"•.•'

In!
»'•'
!'».

'.'

• -" 44 #": •

vi-v
.Mi-I'-

ll •
• • ." •
.••'•i*
I.- ..

!"•:•!

The Magic Six Commands Manual
midi

. type
.push
.pop

3/20/78

types out the remainder of the line
pushes the numerical or string value of a symbol onto the •stack
pops the numerical or string value of a symbol, off of the etack •

• I 0 then true
flip state of truth flag
balances a . if

'<; _ r
•• v

I .-•;

i

1:. -1
!;•:••:•'

* 1 '

'

(see at so: midi.macros)

1 .

: .: 1

M.
••.-••:7;:i: j
. . ' • i n - * • • ; : .i

•I • • • • . • .-I „ • ,-,. I- .!' . • I J'- U,j| (

~#^'
;,•'.-','" •/. :. ••(r-••"••-•: »'•'••»•.

• . •,'•
i

•
'.'-

:

'

•

'

.

j

:

;

>:.

. .•!••• ..
'•- :.:•-.. •:••

;

.

•

•

'

.

• •

•

' •

I

-

'

I

.

!

'

.

*

" •u..:-.i'v!-U '
••'•lisYVMr
:.

;•.••;•»: v i

I, ,

. .;

• •!
I

. ••••!'!

'•' \

•

,:U' .:: ..:•••;-H--"
' •i '> • • ! • • j r - ; H

••'••••
'••i)''
:

•••'i >:;h

v - = -'.-'..lil

I '•.,!•.' •'
•' . • i i •
. 1

- 45 -

'

.

*»

•i

::!.,':|

<;<;.:}
• :. ••••;'.> 4

• '

m
•'i

i

The Magic Six-Commands Manual
midi

3/20/78:;

i-.i

Some Thoughts On Macro Assemblers
:

.

<
i.

M a g i c Six has had a smaII macro assembler named midi since thiB
summer-.. It has proven to be a valuable test bed for a number
of macro invocation ideas and will probably evolve into a full
fledged macro assembler over the next several months. Since
its inception i t has supported a weak macro expansion capabi I i ty
which has slowly been changing into a more advanced one.
OriginaI Iy, macro arguments could only be tokens.- Thus mumble
and x* f 8018000' could be passed to a. macro as an argument while
mumble+1 or 246+x* f8010000•« could not be. This allowed for the
simple use of; macros which did not do anything complieated or
require complicated arguments.

:;

•• ;

-;

j !
..'•(
j
!
•. ;'. r-' : ' . '
.''.'!-!'.•
.-..!
<]
t«:

i

M i' •

AliM
• I.
:.l.':.i

xyz» *@abc
- 47 -r

v\

3/2^/7a

The Itag i c Si x Commands Manua I
mid!

which would set xyz to "©abc". Note that:

i

•

•

:i

xyz«"@abcM

•t'i

uould set xyz to whatever abc was bound due to the way quoted
s t r i n g s are substituted for. In addition i t is now possible to
s t u f f quoted strings into strings by using accent ague to quote them.
I t has been suggested (but not yet implemented) ,that the
meanings of • and. ' be more or less reversed during macro
d e f i n i t i o n as in the semi-lunar macros.
One reason for the recent interest in macros is the desire to
improve the r e a d a b i l i t y of assembler code. One common method
o f doing t h i s is by means of a set of structured programming
macros. This suggests that one method of eliminating the
s h o r t / l o n g branch problem is by not allowing tine user to
d i r e c t l y code the branch instructions so that a table of
label/branch inter dependencies can be b u i l t and optimized.
I n a higher level language this is not as important implying
that goto*s ( i n a very limited sense) are "harmful" only
in lower level languages but not higher level ones.
[The long/short branch problem is common on mpchines which
have two flavors of branch instructions, which require
d i f f e r e n t amounts of memory so that i t is desirable to use
the shortest ones possible^ These machines include .the
IBM 1138, a l l recent (model 3 and up) lnterdata Machines,
many microprocessors and a host of others.]
As a f i n a l note, the strangest macro expander I have run
i n t o is M u l t i c ' s mexp which is a two pass macro expander,
the f i r s t expands-a 11 macros and their arguments and the
second evaluates a l l conditionals.

.

.1

.

I-.

•'•

i

.1

. 1

.. •»

: • •!!

i:

l! •• ' ,
i '•'•.••;;•

i

. >:
: ,•; I- ••.

..'I

'• .
:

t-'i
t

t '

' • i' '

.

!.
•i
! !:•:•-,•!•:,

\

. I

. *

!r *
••!• i

•;! i
- 48 -

^

•
•

*.

.

t
. :

i: i '
•:.' i •

.-•!..•
-.1.

••• ' •!

.

The Magic Six Commands Manual
mini

11

Mi

3/20/78

;,! !

*•!.

: ' : I •".

m*\

The MINI command runs the miniature assembler written by SAS.
It is primarily used to assemble compiler output, but can be used by
users also. The command format is:

••

%

•

1:1
• >•
•i!

MINI 
where the filename will have ".sysin" concatenated to i ts end by MINI*
The automatic assembly feature of PLl makes use of this command for PLl
output obsolete, as most programs are-automaticaI iy assembled rather
than manualIy.

it

The output is to the segment  without any modifiers*
such as .text.

I .

i

•' ' I

i

i

i

.

• I'

!

•h '
3

!•

Ji

K

A
: •

r

i

.•i

i

i
•,!.

••?.
i

...

<

. i

i

,•..•'••!

!

i
<| J

':: < *S-ti!4{;
-»>

I1

- 49 -

•'• •• •••• : • • ; : - > ; . - - . N ; ..
. .
. • \.- I. . , <• si i t , :•
• . • ' ! . ' ' , ', '• •,.'•>.{.• , I- ••!l; •
r • •' „-v; • .•.!!.»
•: »•
• ' ii

•I :•

,' I

3/20/78

The Magic Six Commands Manual
moon

For your convenience and safety, MagicSix keeps track of the
phase of the earth*s moon, Luna. The three commands are:
moon

Prints out a diagram of the current lunar phase-.

ppom

Prints phase of moon* short format.

pi pom

Prints long Version of phase of moon.

Related entry points:

•i

' i

..*

moonSpom
returns char string for ppoin
del moonSpom entry (bit(64), char (20) varying);
call moonSpom (time, short_pom_str) ;
wheret time is a standard system time code, (zero means current time)
short.jjom_str is the corresponding quarter and offset
moonSlpom same as moonSpom, but returns' long verbose string
del moonSlpom entry (foit(64), char (80) varying);
call moonSlpom (time,, long_pom_str);
moonSfpom returns phase as a floating point number between 0.0 & 1.0
del moonSfpom (bit(64), float);
call moonSfpom (time, ratio);
where: time is ds above
ratio is a floating point number-between 0.0 and 1.0/
0.0 new moon
'
0.25 first quarter
0.5 fulI moon
0.75 last quarter

• I'

:, . • i

•

"I !

I •'•

V> '

«tr-..
.•.!>!•:••

••<(:>•

•..'"•."•••'
'.. H v » ••
* •' .• »

• • '.:*••

••••: 3'

«• i

«

- 50 i >

i

t
i
i

i

The Magic Six Commands nanual
,,r
nlte

3/20/78

•'» i

NITE 02/22/78
Nlte Is a text justlfier. It is supposed to be extensible
and all that but only time will tell. At any rate It should be
good enough for UROP reports and the like. By default the input
text comes from foo.nite and the output goes to the terminal. The
output destination, can be changed with the file command. Here are
a list of available commands. As. usual with these things all
commands are the first and only things on a line and begin with a
dot. Any other lines beginning with ". " are treated as nite
comments, they are ignored by nlte/ and do not effect the
finished document^
In general numeric arguments which refer to." horizontal
white space can be given in terms of character positions or
inches or centimeters, (e.g. .Ilnel 6.5i. sets the line length to
8.5 inches).
linel - (II) this takes a number and makes that the line length.
page I - (pi) This sets the page length

w

page - (pa) Causes a page break (starts a new page).
*

break - (br) This causes a break in the filling of text.
lines - (Is) this sets the line spacing to its argument* .double
-> .Is 2
tty - send output to the tty pauses at every page, type any non
printing character to continue
file - This interprets the rest of the command line as a
pathname. The'spec i f.ied file is made the current output
destination, if no args output goes to input filename
concatenated wlth ".abno".

.;•!

v; j

The next two commands take a modifier (I, left, r, right, b,
both, c, center) which specifies the alignment of the line*
I means make the left margin even, this is the normal mode,
r means make the right margin even, b means make both
margins even, and c centers the line.

I

i

.1'

i

-i • . # :
.••••• ••

fill - (fi) make line a3 long as possible. ..
nofill - (nf) take each line as it comes.

V.\> •

11-

•. i

indent•- (in) Takes a number and indents all suceeding lines that
far. If the number is preceeded by a sign then the new
indenting is being specified relative to the current
indenting.
undent - (un) This takes an amount to tempprarily un-Indent. The
change last only for one line.

• i.

'» I

I-' •.

-51 ! t
. i i •

• • • ti ,

r '• •LiiL

3/20/78

The Mag i c S i x Commands Manua I
ni te

^%.

i-i

read - This takes the name of a file which is read and processed
toy nite as though•it had appeared in the main file.
*

•

•

-

begin * This pushes a\neu environment. All old parameters are
carried across but changes will go away when the environment
Is poped, this iricludes the definition of variables in these
frames.
[,
end - t h i s pops the cUrrent frame.
setvbl - This sets the variables named by the first arg to the
string consisting of the rest of the line. .If a previous
variable of the same name existed it value Mill be bashed.^
setlvbl - The sets a local variable. It is the same as the above
except that the value of the same variable in previous
frames is saved and restored when/the current frame «s
poped.

I

••i.u

macro - This defines a macro with the-name of the first argument.
The definition is ended with a .mend . Only one.
space i s a 11 owed betwjsen the mend and the name and therie mag
be no trailing spaces. The macro is invoked whenever the
command . is encountered durring normal parsing.
No breaks are generated.
skip - The takes a number and generates that many blank lines*
This is exactly equivalent to a I ike number of carraige
returns. If the line spacing is set to three <3) then three
times as many physical lines will be output.

. 'T

/

•i j : | >

.1

: i.;

;:• 9

•!•'• '
:

iC--'%\
•

:i ' y

i (•...••. ;•

block - This insures that *-blank lines will be left blank
contiguously. The number of lines is interpreted like in the
skip command.

it^'t •

Special variables are built into nite. The three variables
"date", "time", and "page" are set to the'current date, time and
page number when nite is started'and can be used any time. Also
the macros "header" and "footer" are called at the beginning and
end of every page (except the beginning of the first* page), i f
they are defined.

•.

• i

.i! 1
'I *
i.

i :
•i '

Fpr an example of a n i t e input f i l e , see the f i l e used to create
t h i s documentation ">doc>ni te.ni te".

* i

* i

i!
- 52 -

i;

The Magic Six Commands MfjHufl
object format
™

3/20/78

The Magic 6 Object Segment Format
An object segment looks more or less-as follows:

i

i

1

>• i

H

HH

I pure code | linkage section | relocation | entry map | a |

I

I

—I

I

_I_PJ

uhere:
I

pure code

••:•

is the executable code and other pure portions
of the program

linkage section

is the impure section of the program

relocation

is the relocation bits for the* program wh.ich
are a string of structures as follows:-

.Ml'.
! I

del 1 relocation_Jnfo based;
2 type fixed bin(7), /* 1,2,7. or 8 */
2 number_pf_hws bit(8), /* usually M a0"b4 */.
2 offset fixed bin, /* offset into section */
2 bits bit(80); /* one per halfword */

'

fl.

1/

; |

for relocating pure code: '•
1 indicates a reference to the'linkage section
2 indicates a reference to pure code

f f "

«,.'||

for relocating the linkage section:
7 indicates a reference to the linkage section
8 indicates a reference. ..to pure code

11 ..

I
f

The arrays appear in the relocation section serially
and are terminated by a halfword containing zero.
entry map

The entry map consists of a series o-f names each
preceded by a halfword length and consisting of
an ascii string. At the first halfword after the
string there is an offset into the pure code.

'!

i

To use this:
del 1 map_entry based(mp),
. 2 nchars fixed bin,
2 name c h a r d ) ;
del o f f s e t fixed bin based;

. ..: v . •;
i
,:

\

I ,• i *
.!' : ' ; . .,,1 i

,-•

do mp=map_start
repeat addrel(map_start, el en)
while(map_entry.ncbars A «0);
- 53 -

ipN

r

• '-%:l! ; '
•" :• ! "M I

!••*.*:&
1.1

! '

"i - ' T •? ! ,
'•WiiNii'-* ;

If ' •
••••! ...
*;*#
i. I
'•' • . - ! -v.••;••; : V i l b !

• 7 •;, '< J '

l:f:W-." !

•ruwm
•
!, :!
,"'. i.; f!'M

'I!

3/20/78

The Mag i c Si x Commands Manila I
object format

• i

M

•
|
?•'

M

elen=biHnchars+lf16)& fffe b4;
i f substr(name,l,nchars)t*epname
then ep=ptr(baseno(map_atart),.
addrel(mp,elen-2)->offeet);

I '

•

!

end;

To get a p6inter to the start of the map
given a pointer to the segment and its bit
count Took up scs8get_obj_map.
map

i s a s t r u c t u r e * g i v i n g the o f f s e t s w i t h i n the
segment o f the various aections described above.
The s t r u c t u r e i s declared as f o l l o w s :
del i objectjnap based,
2 code_section f i x e d b i n ,
J;
2 entry_map_offset f i x e d b i n ,
2 Iinkage_section-fixed b i n ,
2 relocation_bits fixed bin;

• "

iV.'
• i .

T.;:i
.i-l

I f r e l o c a t i o n _ b i t s i s zero then t h e i r are none.

•Y!
' ! .1

i •'•

;;ii!f
"

•••• ; . * * :

• • .•'•Mi.'.I,'

h.:-

1

•

-

m

•
*

•

- 54 -

•

I ' "
It ' '•
•:•••«•! '
••) !

The Magic Six Commands ManUjjl
B
o l s (>tools)

j0fi\

3/20/78

The online salvager, ols, is a program that cleans
up a directory. It basically reallocates everything in
the dir'in a wired tempseg that is not part of the file
system, and then truncates the dir being salvaged and
copies the new contents from the tempseg back to the dir. This program
is useful* when a hash bucket is somewhat damaged or something.
Be careful using it on directories that are badly smashed, it may loop.
If you do not know what this does clearly, then do not use it*

.,! •'.

j •.
'I I

->'

'»

•' ' •!

- 55 /JflN

! ,

:• .'!|:r;ii'M

3/20/78

The ftagic Six Commands Manual
peek (>tools)
.;}'.

Peek is a program which gives a l l sorts of useful and i n t e r e s t i n g
information about the current users of the system. The current columns
are as f i o l l o w s .

c u r r e n t address space

•n

\

name
',
tcb address
.:
pinwheel pointee
psw
console device address
i d l e time

pinwheel quantum
CPU time

'

'

!

it

i

i.

^

J;

. y\

:

'

-. ;

'.• i

\
»•!•i-

I ;

•• '•! • ' •! i-

i-;]1,^']!; !
1 '• . - .

1

1

'

.':

*

'

!•

w
i

l r .-

-"• i .' •>•
:
;
n - ' ; • ' • .:' : ! | '
:•;;"
«'

* « *

•'.••j-;

v,

i-

' ;<*
: •• i

-I

! ••• .;•!<

• i .'

ii.' ;• ••'!

•;:?;i;>,5IIi •'

I

i

'Mi

V'i iv.

>'-.

-

SB -

I!
!
»
! i

The Magic Six Commands Manual
Pll

3/28/78

The pll command runs the PL/I compiler.
J0f**>

Its usage is: pll pathname options
where pathname is the name of the file to compile.
The options may be:
-nc suppresses code generation
-na suppresses the assembly on.ly
-se short error message mode
-sz takes the next argument as a hex number of 4K blocks
that the compiler is to use for scratch-storage
-Is print listing
-nd suppresses the generation of debugging information
-tb causes the compiler to generate a symbol file. ,

•.•(•

\

' *
ft' • •
• : V 1 '• >:•

(see also: pll.language and pll.changes)

• f;

' /P***'
l-V.
III

• i ...

i

•.

1-; •

.••

• • ?

• '•.

••.:••; . i

" - r ' •!?•:'.,>4:,!.':;
.1 •

- 57 -

*

•'. • :(i:-.
<:•'•••>••>• •.'•••: 'V

# ^

.i:

The-Magic Six Commands Manual
p i 1 language summary

'

3/28/78:
i'.

/^% ".'?:;*:!'

General Notes on The Architecture Machine PL/I Language'Subset
Numbers:

t f!

There are numbers: f.ixed and float
.M;t't.r

fixed are like Fortran INTEGER
float are like Fortran REAL

1.
! .r

fixed constants include: 1, 247, -3121
float constants include: 1.0, 247.0, 0.0064, 12352.34, le23

^

operations on fixed and float constants include: +, -, *, /, **
If both operands are fixed the result is fixed, otherwise it
Is float.
2/3
2./3
66.2+32.1
12+7

i •?!

yields
yields
yields
yields

0 (fixed)
0.666667 (float)
98.3 (float)
19 (fixed)
*

, -I
t

To convert from fixed to float and back .there are two
"builtin" functions: fixed and float.
float(l)
fixed(2.3)

•\

yields 1.0
yields 2

•i •!

In addition fixed and float numbers may be compared with
the basic 6 relational operators: >, <,*>=, <«, «, A*.

• i • 'i

! !

Bits:

•;

B i t s are binary d i g i t s . .
strings.
.

PL/I supports b i t s and b i t
'""•U

b i t c o n s t a n t s : ' " 1 0 1 0 1 0 ^ , "l"b,

,M,

•i

operations on b i t s include: &, | ;

-leie^s-ii©©^
,,

,,

l"b|"0 b

b, "00011l"b

'I

A

yields "1000"b
yields ' T ' b
yields "1100"b
• •

To e x t r a c t a substring from a b i t string:
s u b s t r t b i t s t r i n g , . f i r s t bH,number of bits)
n

subs t r r i 0 1 0 b , 3.1)
substr("110011"b,3.3)

n

fields "l b
yields "001"b •

'•rr

• -if
•

iiit.,
•:•!! •

- 58 -

••I •

-if*;
* i

•*• •
•I'

•

•

The
Six summary
Commands
p
l l Magic
language
till

\ anmiane*

• •

'''

Maqu|l

aiihimarii

3/28/78

'«

•i,

# ^

i.-

The r e l a t i o n a l operators apply to b i t strings. "l"b is
greater than. M0"b and the shorter string is assumed .to
be f i l l e d out with blanks. Thus, "l n b is greater than
"81"b.
'

.':!

. '•

•
;

:

;'••

'f

j
|

' •'

*

i

NOTE:
The r e a u l t of a l l r e l a t i o n a l operations are b i t s .
" l " b i f the comparison uas true. M0ttb* i f i t had
been f a l s e . Thus: i > j & j>k is a b i t expression.
.

f

Characters:

•

character constants: "abed",
||

,M

\ "the quux ate luux"

is the concatenation operator

"abc"!!" "IT'def"

,;!.••...

,
• »•,..
-•
; • • } ! • • : i.»M ..

'•

yields "abc def"

'.

\

.<<

;

substr works on character strings more or less as
it does on bit strings.
8ubstrrabcdef",2,3)
substr(nfoonv2,1)

yields "bed"
yields MM«M
o

•

•

..

• I •

,

•••! ,

, U .'

•- .' -r-li-;!:
' i

.11

r •

ili.!. I
Variables:

' '

%

"•;'

. !* ;
'. : '

''.'•'.

'#- J?

Variables are places to put values.' Variable
names may be very (128 or mtre*) letters long
and may contain all the letters (upperor louer
case), S, _ and the numbers. They may begin with
any of these characters except the numbers.
•

.

abc, i , quux, foo_bar, age_of_time and so on
are v a r i a b l e s

'

'

•

• i,
it •
-.;
;j i.
!
.•:";>..; •'» • i"':\rj
"'':•'.*'.•?•:••'• -.rj"'•'!.:•'••:';
. ' . . . : • • !

: . . • ; ' • • 1.

i

' •u

\. •

I

.-.• ,'•' !"' 5> - •"* "L

•*•' • >i ' 'i
rj ".:•••«
r• t

A v a r i a b l e may contain:

! i

a fixed number
a float number
.:
any given number of bits
any given number of characters
up to any given number of characters, plus how
many there are

t. '
i

• ... .
; i ••• 'i..j':, .;•'••.'••. ii:'-:. ., •'••;/">.
'^
|
•; • >•
i

Declarations:

• I -.• •'.'• . •

1 Ml

.•(i

- 59 -

:

...J"

. ••.:!••
' : .

. I

1

••-.{?

" - .

'•' •

.''''

" i

1 i

3/20/78

The flagic Six Commands Manual
• p ' l l language summary .

i ..

ii

To declare a variable*

1
i•

. • i*

del tor declare) variable the type;

i

t

or
declare variable type, another type2, uet_another.'type3:

•f

Semicolon ends the statement!

.4"

Instead of a single variable you can use 3 list
of them such as: (varl,quux,var2). So:

.

fir-

.• ;•

del (i,j,k) fixed, name char(32) variable;

I

w

del (x,y) float;

.;»,*
»:;.•

del able__to_read bi.t(l)?
del

letters_seen_today char(26) varying:

Arrays:

' .i
1
ii

.

to

If there is more than one of a given thing:

^ % ;•'=; ;
• •.

del thing float?

i.l

del things(10) float?

vV.^i

i

i

causes':' thing(1),, thing(2), ..,
To specify the range df allowable subscripts:

*

....

-

i

• '.••
• i.:
•I .. ••:> '••'.'.
i
'•- ,

i

del things(19:47) char(32) varying:

' ''; "V' .!

causesi thing(19),thlhg(20), ... ,thing(47)
l-

,. . . . . .= •»'•'••'
•, ,• ;!•• -; !...'!' •

Structures:

,•

.!$ ; :• 10.4 & pudd i ng_dens i ty<*0.9 &

A

fruitlcakej

dist=x*x+y*y;
The substr bull tin function mentioned above can be used on
the left hand side of an equal side to indicate that a substring
of the string variable specified is to be modified. For example:

it

•<••

dcI c char(8)? ,
substr (c.,2,4)towq«uknj
would set c to " quux
Procedures:
! .1

The atomic u n i t of code is the procedure.
nuke:.pr ocedur e:
end;

is the procedure nuke. Anything between the procedure
statement and the ehd statement is in -the body of the

procedure.

'' •

1:1

•

• *

A procedure has associated with it all variables
which are declared in it. So:

•i.'i
;

I

I
•.•

nuke:procj
1.

- 62 -

i!.'J

.1

lhe flagic Six Commands Manual
pI1 Ianguage summary
Itl

3/20/78

<

i ..•
^ ^ \

del abomb fixed;
del hbomb float;

i-.W'U

••='
I

li.M.

J

:»[

"I

',.

i.
i

i

l •;

• 1

••.i. : .••:•'!••. •••!•< • ••
:
. ' • . ' : ' • • • . .
••;
J '.,
.' • • • ' , . ( * ': 4 ••' ** '*'.'.• *' .1'
*
'' , '• ' J - . • • • • : ' :' •.,-,'/
.:•. •••• ; ; • -••;? .'
'..'•'

luke:proc;
del abomb char(32);
del qbomb bi t(1);

-

i

"

:

end;

'•:
•• . ••'

• i

t • : ••' ',! • i
• .'••• • .« '!••

Hs.. ^Vfv.-iVfc!
•.••••••'.•>• •:•: ••,.••; :i t
.'

end;

:

-

has abomb and hbomb declared in it. There may be other
variables named abomb and hbomb but the abomb and hbomb
declared in nuke are only known inside'of nuke.

'.

• ' '•• ,

• /; »

.• ': • •*
* ! ; • < • v ^ i - ^ ;-"••:•; •. 1

' ::i

M
1'

nuke also has luke declared in it. luke has abomb and qbomb
declared in it. Inside of luke, abomb and qbomb refer to
the variables declared therein, hbomb refers to the hbomb
declared in nuke, the "containi'ng block",* Inside of nuke
qbomb is unknoun and abomb refers to the one declared in nuke.

:.j

•

.'.

• - ' - '. ' ,'
"•.'•• ' i f ;. vi'' r
•"' •:'•• r '.•!-.••
.••:•: j i - 1 - • ' * : , • !

This nesting and masking of variable names is known as
"lexical scop i ng".

•!•

r-.' •

il

. ••l.-w'l

J1

:>•

• 'M I

];• ;
VI- • !

i-Ji

Flow of-Control:
Normally the flow of control in a prpgram is sequential..
Each statement is executed in turn'. This can'be. altered
in several ways:
branching with a goto
executing an if statement
executing a do statement
calling a procedure
invoking a function

=

.<., ' N
. i "-

'-'

••'•• • • ' j . ' : f e . !
,,

. . . i t

i ,

r

t
1

1

= y.{ !

V Ii

»'T

>•
! '.

Branching with a goto:

f. -J • . :. '

• £i I ' 'III -

: • • : - ; • • • • • • !•:.",;• ^ - i l
•i
•• i .••
•'M.VI'i'i' .1.1
' • ; i : r - . : . ' ^ ; i ^ I;' •!

The syntax of this is: go to place;
r

J

" 4 * «'v

where place must appear somewhere in the program
a t the s t a r t of a statement.and followed by a
colon.
here: go to here; w i l l

!...

?

..'!<•'•*;

•I " • i

i,

ti!v: ." 1

:• -: I

. ' • I .i I • .

loop indefinitely

here is declared to be a label at that location.
- 63 -

'

• ' • r ;
M

•

<

:

- . :
"

;

i

" <•• > Ii

"

.

:

•

v

\

: • •

•
• ,

' . ' ^ • • . • • I E I
•

• • • • :

;• •'';r'-i'.-V

•

•

v

*

I

•''!•'!!*!"! i

);._*.• '.

•:'• i 'i

.'•

•••• i ' t |
'•' •••'!!•'• 1

•:••''

Hi

i '

3/20/78

The Hag i c Six Commands ttanua I
' p i t language summary

/

^%;' i

Label values can be put into label variables.
For example:
*
dcI mabeI IabeI?
..,,:

quux: mabelequuxj
go to mabe I; nil I loop indefinitely

'.!

Sometimes it is useful to branch to a given location
given an integer value (for example the Fortran computed
goto . . . ) . To do this declare a label arrant

:'••'•

•;•"

• < > • A

! '

del actions(7) label constant^

'.I

) i

and then you can define labels such as: ••
label(1):

','.

'

M

which would be the target of a branch to label ( i )
when i was equal to 1 .

>i'r• i- •

31.'.
fill.
.. i.

Executing an i f statement:

iJi;!

i f condition then a c t i o n l j
else action2j
causes the condition to be evaluated to a b i t ( J ) value
and i f i t is "l"b executes actionl, otherwise i t executes
action?* So:
i f a>b then max^a;
else max^b; '

. v. •

Indentation is not required by the language but i f you
don't bother don't expect to debug your code. Ask people,
how to set the tabs on your IMLAC, it Is not much worse
than on a Seleetrie.
An action may either'be a statement*or a-statement group.
The former we have been describing all along, but the latter
is a special construct:

• i '., -i-r. 1.
.

i f a>b then do:
maxca;
min=b;
end;
else do:
max«b;

. :

'".• • • ; • .

- . .

. -.1. :

!:>-

M
I1'

- 64 -

• I

3/20/78

The Magic Six Commands hartt|J|
p l l language summary
•

t

• M| • - | •
i • •' '* • • ; :
,'.:

41

l.'M

!»
'I 1 ; j,

i .-!•• •
• i

min»a;
end;

:
i

I

i

- • • 'i

Note that end is used to end statement groups and to close
procedures. PL/1 is f u l l of this kind of thing, notice:
a«b»c; is not unreasonable ?n P L / I .
•
•

*

i f - t h e n - e l s e clauses may be Inested and otherwise MeirdIy
grouped when the program logic gets hirsute,
i f a*b then i f o d then
else
) else i f e>f then
.else
II

i!

'

flag«"ll H bj
flaq« n 10"b;
f lag)«»"01"b; .
flagVWb;

;

:'••!'

««
i'.i

•I' '...--

i • .'•
I '•:.

:

1

In this example the indentation should indicate which if,
then and else go together. !
•
i
One of the most common constructs is:
i

!.i

• . •

(

»

»

i f a°l then do;
. : '
end;
j
else if b=»44.3 then do;
j
end;
i
else if command="G0" then dol;
end;
j
and so on.
.
j'
This "else if" construct is Used so frequently that some
languages have an else if statement.

'ii
•j"i:-

!

r

Mi:-':

Executing a do statement:
The do statement i s perhaps cne of the most powerful and
. v e r s a t i l e statements ih the {language. The simplest case
was r e c e n t l y mentioned and a:imply groups the contained
statements into a group for (use with if clauses.
i
do also allows the body of s{ do group to be executed
i t e r a t i v e l y ( l i k e the Fortran do statement):

•u•
'ifi!'-

I' t

;!•»

.!• JiK
i-••»{-• . i
i

-i-'i I-!;.:
l

»

•V

do v a r i a b l e s t a r t to end Coy increment];

num~0i

• In. I - I

; %1

i

In I Hi

j

nniii-niimi 11

•
1

,i

•

J>

which means that to add up a;11 the numbers
from 1 to 1 0 . . .
|

! ;•>•
. 'oi-

i
IT

"!l

•

'••• V i ;
'•".;

"1'

•• fob -

••<£•><
; 1;. !
11

M

h'
ii j

i.

r.

3/20/78

The Magic Six Commands Manual
pll language summary

endi
r

Mhile to add the numbers from i to 10 backwards.;..

aum»0j
do i-10 to 1 by -It
Bum-sum+ij
endj

:

i

The loop figures out which direction to go i f
i s n ' t obvious at compile time.

'•

it

NOTE: The values in the to and by clause are calculated
when the loop is entered* not each time through! , So,

1 ..:

' .1

do i = l to nj
end?

I. :

J'

•••V-V;.-«t- i

''

J I

cannot be exited by setting n to 1 or less than if sfnce
its initial value has been stored auay somewhere.
A more general form of the do allows the user to
completely specify the test and the iteration step:

. , / .

do variabIe°start repeat i terationlwhi le(condition)] \
•

•

- !;> A'/lf

•

I ' ' •!'•••
•>•••'.•

:»•••

•!><" if

i

This sets the variable to the start value and as long \
as the qondl tlon is true (if you leave out the condition
it will loop forever) executes the body of the do group.
Each time it reaches the end it sets the value of the
variably to the recalculated value of the iteration expression.

i

•• i

:

. •..'!»'. r !/;!

, t 11

':•• •••{}.!

:.«»' . I.

So to add the numbers from J to 10...
9um«=0;
dp i«l repeat i+1 whJle(i<«10);
sum«sum+ij
end;

l.'.i
rl-i'1

i

Another form of the do simply indicates that the: body is
to be iterated until some condition is no longer1 true.
This involves the; while clause alone, as in:

•"'•'•I
i

r

do while(error_margin>0.001);
end;

»

The while clause may also be combined with the to and by
constructs to provide anot+ier escape from the loop in
addition to the to*clause, as in:
- SB -

:

'

;

' *

. .-I
• •••• i

•»*'•

•' ' '

• i'Yl

•/•:•!.:•«••'».•'

i

'Wit)

The Magic Six Commands ri^HLJl
pll language summary

3/20/78
•.•:•;',; !'•
i
.•i

,:,'i: , !
i ..?*?•

do U l to n_people uhi le(person(i)A-"Jimmy");
end;

ii

M"

,4

Calling a procedure:
Calling is done via the call statement.
call the procedure nuke (from above):

Thus to

' i;:

7 it

calI nuke;

•.

This causes a branch to the program which nuke
which immediately grabs some storage from .somewhere
and saves all the information it will heed to-get
back to right after the place it was called, nuke
also uses this storage for pther things, but as soon
as nuke is done executing that storage is released
to whomever wants it and the flow of contr.ol resumes
where it left off. (This ability to save the machine
state is at the heart of a good deal of modern recursive*
function theory ...)

l«i

I !
' JJI

Executing a return statement will cause the procedure
executing to return to Its caller as will "falling 'through"
to the end statement.

Arguments and Parameters:
Uhen a procedure .is called it is possible to pass it
a number of values or variables (references) to work
with. These values or variables are passed as arguments
and are received as parameters.
zoot:proc(soot,bOot);
del (soot.boot) float;
soot«=boot;
end;

.

f , !•



i Mould have i t s Value converted tp floating point
and passed as an argument by value. Thus, soot would
r e f e r to t h i s temporary value as opposed to i . x would
be passed by reference.
External Procedures:
I n order for PL/I to generate code for a given c a l l statement
i t must know the a t t r i b u t e s expected for each argument for
the procedure in question. Toward this end there is. the
data type entry and the entry declaration:

it'

:\ ••

del things to declare entry U [ a t t r i b u t e n , a t t r i b u t e 2 . . . J ) ;

to declare nuke, del. nuke entryj
to declare zoot, del zoot entry (f I oat, float);

•w
. t.ij;i

to declare a procedure which accepts a char(32) values, two
floating point numbers.and a bit,
•

•

I . !

•

del mgby entry(char (32), float, float, bit(U) j
• i.l..

Some external entries are very versatile so they can figure
out how they have been called at runtime b.y means of the
opt ions (variable) clause. Something you may see, a lot is:
dq| (ioa,ask) entry opt ions(variable);
.s

These procedures may. be called with any number or type
of arguments and if they can figure out what to do with
them they will. PL/I has no language feature to write
that kind of program but there are subroutines that can
be called to dp a lot of it.
•

Functions:

;•:.!'

P-

I;

i

i

M:

•

!

. >5 j j

'>'-%'•

Any procedure may return a value so that i t may be
used in an expression. This is done by means of the
r e t u r n s clause in the procedure statement. A routine '
which returns a f l o a t i n g point number could be w r i t t e n :
won:proc(x) r e t u r n s ( f l o a t ) ;
del x f l o a t ;
return(sin(x)*sin(x)+cos(x)*co8(x));
end;
Note that the return statement indicates the value to
return.
This value w i l l be forced to the appropriate

- 68 -

ski
' < .! •
•

t

y •
• to

Hi
. I*
i i
<*%•?

The Magic Six Commands fid
p l l language summary

3/20/78
'» . 1

:it /jf^N

type before i t is returned, thus the above program Could
have been w r i t t e n with a V e t u r n ( l ) ; M .
External e n t r i e s may be declared with a-returns clause
as w e l l . For example:

j ••'. i''•'•'•;
• ••'•! f
"!•••• i •;:!

I:
I

dql mumble entry (f loat, f l o a t ) returns (char (64) varying);
del ages entry r e t u r n s ( f i x e d ) ;

• i '" : i

V '/. ! n
/ r'
• *

These routines may be used in functions: •
l .

images 0 + 1 ;
i f mumber (wonO , i / 2 ) = " " then . . .

4y_ u>

I.

t.

•'

i

•:l ,•

:

'-.•:.

>*•.
'

l':1' f I (111-'

..

- 69 -

•••• ','

' *-f

; • Lf ••

j..V'»V •M-" ? i^ | jli
'

!

•!•.-

. ; --i.fi

- : • • : :'.!:•:• :':••
:
-.:
•"•\\^\\[
••
•... ; • • :>.n
• : '( •'

i ;•

•i•

.1

The Magic Six Commands Manual
pr i nt

'

•

...

' j . •
• ;

3/28/78

The p r i n t (pr, type, ty) command prints a. f i l e on yodr console.
The usage i s :
;:
p r i n t * • l-no_header | -noheader | -nhel.
'

ill
•i

Unless the -no_header option is given, the f i l e ui 11 ! be preceded
by. a header giving the f u l l path, name and the-date-time modified.
The arguments can, of. course, be given in any order.
•

•

•

'if.
.V!

'

The d p r i n t (dp) command can be used to print a f i l e on the l i n e
printer.
. :•''''•.•"I '
•••".•rji:
•
I

* *
T

i

. • i 1. ;.. !

I •

'I

"I

'M
•'•- •'. ''•'.• .

'••",> !;''t '

i.^-ii'?
I

'• I

. --.Si.
i i

•'

>«
f

'1
1 .

•i'-':i

-.-'J!:!
.;! I
i
'i

•< v

•if
- 70 -

I !

I :
i .
« >

The Magic Six Commands Manjjfll
probe

3/20/78

This is the documentation for the symbolic debugge, pb.
Here is what the commands do. Note that numbers are
in hex unless preceded by a control d character.

_ M
I

Command * j ( l i n e feed):
This command opens the next location, by.adding four to
the current location and redisplaying i t .

i
i i

:•:;
• &
' •:/ 'J ir,

Command ^m (carriage r e t u r n ) :
This command opens the previous iocation from the current,
by substracting four from the current open location.

.

•\

Command . c h :
This command p r i n t s the current location out as a
char n s t r i n g , where n defaults to four.and can be specified
by preceding the command with a number.

•

'

1 .

*

•

-i

:

r •••>,!
]| •
:
.

I.I:

'•if

t

• !•
'!!• ! • «|i. r
1 ;
' 'K
' ' . ' ' ' ; ' M •...
:;•-. • .<;
:«i 1.

Command . f i t
This command p r i n t s the current rocation in decimal,
t r e a t i n g i t as a fixed (31) variable.

*~/p\.

• >•' •!•:
••.:. .'!.!
• I -. : .-».

Command . h i :
This command does the 6ame as . f i , only for a fixed(15)
v a r i a b l e instead.
till

Command .r:
This command prints in the current stack frame the value of
register n, where n is a standard arg to the command. i.e. is placed
immediately preceding the ' V character. For example,
3.r
•
.'.•.'.•:••..:•
would display register 3.

• (V.

Command +:
This command adds i t s argument to the current location, and
the argument defaults to 2 i f not specified.

.-••I

;

,!} i

'•

Command - :
This command does the same (with the same defaults)
as the '"+" command only i t subtracts the argument from
the current location Instead of adding i t in.

•

•

••

••:;•
^

!

• •! ••; :- i

:[ :
' • - . \ . >.•• ; / . ' • '
:' t\.\
:
•'•••••"« : ! ' ! . : • • ••••-,.«:i

.*'••
;

"•

..

•••*

• • - • • ' • ' • t.\

•••

i1',-

-;•:••

i > ~ * k $ : [

^••••T?..n,i.i'"i;;.N.
. " , . « : . '1 . : ' •:-. f ••l'l :

*\

•vi:';
:-..••

•

W

-:..
1

4

\

;iii;!
' '

i i •!' I

• ' ' . • '

•

.

t

/• i

3/20/78N

The Magic Six Commands Manual
probe

•>*%

•jrK'-h'
h •

Command ; :
This command modifies the open full'word. The argument is
the value that is put in the location. I f there is no .
argument, then the value of zero is used.

>i '••

t •
i

Command .in?
The .in command is used to initiate segments.
The name of the segment to be initiated is put after the j
. in, and exact I y one space is assumed,. so that files with
weird names can be easily handled. The command prints out
what segment the segment is initiated into, and the code
returned from initiate. If .in is given a numerical argument
then it attempts to initiate the pathname in a segment with
that number.

A

»r>f •

i • .: - i.
•;'".•;.•. •;
i.(•
•i

:

Command . . :
The . . command is used to send commands to the command processor
v i a the scsSd entry. The . . is immediately followed by the command
l i n e as i t is to be sent to the cl entry.
Command . i n s :
The . i n s provides the macro f a c i l i t y . I t is preceded by the
b u f f e r number, and is followed by the command name, which should
9 t a r t with a dot. You then input the macro, ending with a l i n e
t h a t contains only a backslash. You can then run the macro by
typing the command Name that you have given it.-

Command .ps:
The .ps command is used to set plod break points.
It takes an argument, which is the line number at which
to set the break point. As usual, the break is before
the line. The program name is taken from the last .use command.

• •
'

:

1

i.

1':
,••!'

'••• ;l

t
i.

j*i;-

.,,:;•!

ii'-

•• • ' '.
,i

•

Command .pk:
This command k i l l s a l l p l l break points that
have been set in t h i s process.

i
1

Command ,pn
This command is just l i k e .ps only i t k i l l s the
break point rather than setting i t . I t warns you i f
there is no such break.

• Mi'
Command .qs:
.- 72 -

•

.'!£••

f

•, •*

M
*
• * ;

The Magic Six Commands Manual
probe
H

/ifflBN.

3/20/78

This command sets assembly break- points. I t is preceded by
the location at which to set the break, or i f none ie provided,
then I t sets i t at the, current open location.

."!
I •••

Command .qk:
This kills all assembly break points in the
current process.

- hi

\>.:?<
Command-.qr;
This command works just like-.qs only it
resets the break point instead of setting it.

i

!

•

Command . p i :
This command l i s t s a l l p l l breaks.

• i.
.'

! 1:

! . '

Command . q l :
This command l i s t s a l l assembly break] points.
/

Command . f y :
This command turns on flow tracing of p l l debug programsCommand: . f n :
This command turns off flow tracing.

i

:' M

w.

i..

I

-.•••• (•'•:•?•< -i ••' ;»l.|
r -Mi. 1 • * ? ' •»'\ i
v;- »•!{!•:•':•
' il

Command .w:
This is the watch command. It takes a location, which
defaults to the current location, and watches it for changes.
It is checked at every pll debug line entry, and if it changes,
a warning is printed and you get a break point encountered message,

ii.j

Command .s:
This is the symbol loader command.-It has two forms.

•:•.•»

•s

•'It

.s f iIename
In the first, the file sym will.be used for the
symbols file, while in the second, the file filename.sym
will be used. Expand path is called.
l

Command .tr:
The . tr command does stack traces. If preceded by a number, only
the last n frames will be traced. If followed by an "I", then the long
- 73 -

/ .J

.,»••••»
• -I •

' '• J

\<>

3/26/78

The Magic Six Commands Manual
probe

form stack frame trace wili be done, which prints all registers.
Command q:
The q command causes the debugger to return to its caller. This
will work on pll breaks and assembly breaks as a break return, see
^g's documentation for more information. Thi.s command simply returns.
Command t:
The t command chases a pointer. The pointer at the current
open location is used as the address'of the new current location.

*• »
.••I'j

ii

Command o:
The o command does the same as t, only it only takes a halfnord
and adds in the offset base, set by the .so command.

j'ii

Command .so:
This command sets the offset base. All o commands have
this value added to them to get the new current location. If
no argument is provided, then it is assumed that the offs.et
base is the current location, otherwise the argument is the
new offset base.

•

r

i

Command • sb:
This command works like -.so, only i t sets the "based base". This
is the*, value that a l l based variables, are based at when using the symbol
table hackery.

rt
•i :

•, 1

Command g:
This command returns from assembly break points in a clever
way* namely that the current break points is cleared so that you
can precede, and then it is replaced after the single instruction
that was break pointed has run. This is not the standard return,
since some segments are read-only and this would cause a segfault
in some cases trying to catch execution after the break point.

*
.
;
:
i
1.

*

•• • * • *.
•
I

V

1,

Command p:
This is the pll next line instruction. It executes one
line of pll and then hits a breakpoint.
ii •'
p

Command .use:
This command takes two forms, .use and .use .
In the f i r s t form, it t e l l s the debugger to use frame n for

>'

/ .

;

/
• - 1

- 74 •U 1 .1

I

1

ill
1 ;:•'

il

• i:
vi r

The Magic Six Commands Manljpl
probe

.' \.

3/20/78
': t

examination of such things as registers. The second is more
powerful. This form tells it to look up the stack for a pll
entry with that name. If it can find it, it uses that frame, otherwise it
prints a warning. It then looks in the current symbol
table and searches for the symbol table for the proc.
If it can not find one, then it again prints a warning.
If the symbol table entry is found, then all further
symbol table requests will be done relative to that
procedure.

i •

Command .t i:
This command does text insertion. The rest of the
line after the space after the ".ti" is inserted from
the current location until the  is found. The ,
is not inserted.

Command v:
This command prints a char varying string.
It prints the one at the current location. Giving it
a location of course opens the new location, i.e.
3080V
prints the char varying 3tring at location
x'32W,

:

l

i' •
• . c

!

Command n:
This is the "next" command to execute one'
assembly instruction after an assembly type break has
been encountered.

* ! ' \.r>

•, i

: ;' .

.I'll.
11 •

Command . y :
This command returns from a macro to reading
commands from the terminal.

• -5 i

Mi;

»fi;

Command .tmr:
This command takes one argument, which is
the number of the segment to terminate.

i-i! ,

• ;-,h .
. • in -

Command .map:
This command takes a segment number like .tmr
only instead lists all of the entry points in the
particular segment.

i..- .

; .i.

!';

• ! • (!

:I\
l' 1 > '

iXi

Command .st:
This command takes one argument, ana" controls

•• .• i <
! I

- 75 # ^
I .• I .. "•(• ... !•'

r

I

3/20/78

The Magic S i x Commands Manual
probe

Ii>*
'**%

s u b r o u t i n e t r a c i n g wl'th the '.n command. I f you do a'
l . s t , then subroutines M i l l be traced, and 0.n r e s e t s
t h i s . The d e f a u l t mode i s not to trace subroutines.

(i j

Here are some examples of how to do gome of the more
commonly performed operations in probe. •
'{•

To use a. symbol t a b l e foo.sym, and..look a t - t h e v a r i a b l e
bar i n proedure mars':
<
. s foo
•use mars
, bar

#ifi:i.t

;need only be done once per process.
; p r i n t s spurious warnings sometimes,
{ p r i n t s the value of bar.

To chase a p o i n t e r , you use the
t command.

i

• i-

i;

If you have an area at location 50330 for example, and have lots
of offsets relative to this area that "you want the "o" command
to work with, then do
50330.so

jsets the offset base to 50330
•ii

and then from then on, the "q" command will take, the
halfword at the currently open location, add it to the base value
of 50330 and move' to this location. This is the equivalent of
the "t" command for offsets instead of pointers.
Note that probe currently does not work for debugging programs
that run in weird address spaces*
*

i*;

I'-l

;
'

•

To run a program, watching to see if• a static variable foo
in the procedure mars, with symbol tabl mars.syin, has changed, we do
the following.
Pb
• fy
• s mars
.use mars
, foo
.w
q

{turn
{tell
{tell
{open
;!
{tell
{telI

on flow t r a c i n g ,
pb which symbol table to use.
pb which procedure to use.
the location, foo
probe to watch t h i s l o c a t i o n .
probe to q u i t .

Then type a t command I eve IJ
mars
{ t e l l command processor to run the program mars.
;pb w i l l p r i n t every l i n e number, and w i l l stop
; i f the value of foo changes.
. -1.

J

il',

;

- 76 -

fit-'

*f

The Magic Six Commands MaHljgl
read maiI

3/20/78

Commands are:
t
n
d
u
p
I
s
a
q
x
j
f
r
?
" "

P'r int message.
(love to next message.
Mark message for deletion.
Undelete message.
Move to previous message.
Log cgrrent message (creates logbox if necessary)
Summarize undeleted messages. (* indicates current message)
Summarize all messages. (0 indicates message is marked for deletion)
Quit m a i l , deleting marked messages.
Same as q.
Jump to message. (No argument - jump to 1st message)
Forward message* prompting.for recipients.
Reply to message.
This information. (obviously)
Print the next  lines of this message, (default » all)



Becomes the argument for the following command. When no
argument is supplied, the current message is used (except
where specified above).
.

:1i

"A

Command l i n e options?
-summarize
-log

Summarize the mailbox, then quit,
Use the logbox.

•i if

*1

i j

-I.

•***

11 :
;
;

:•

i

i i

-i

/ .
?•

rx •

.... ,--!v»-n
: I.;.
-I

I

-.: • ••: ••-•i!:-!i
•?.: M l *

I

; -i

4

'.:t|.

•'•". : V h ! j j'
•!.•>••! . •" .•' j

-s: ¥'•'$•

''*M

' i;

- 77 -

i.M}
-i;f
ii ••

: : ii:

:; r '|;'^l-

'. ''. ,-;:./v;iii"
!.

. !

3/20/78

The Hagic Six Commands Manual
ready

The default MagicSix^ ready message has up to six parts:
(1)
(2)
(3)
(4)
(5).

Current time of day.
The amount of cpu time (in seconds) since the last ready message,
The current working directory.
The address space which invoked the command.processor.
The listener level number.
The command processor can be called recursively from inside
a program. The level number tells you how many times this
, has happened. This also happens when you hit the BREAK key.•".'.. *'
on your console. To go back to a previous (lower, numbered)
command processor level type rl (release). To restart the
program running under the previous comand processor, type
sr (start).
'
(6) The number of segments left if the number falls too low.
This is the number of unused segments in the.current address
space. The maximum number is 16. If it is 0, you cannot
bring in any new programs* One way to get out of this state
is to keep hittmg BREAK until the level count gets too high
and causes a fatal processor error and newproc.

.

\

if

ill

Si'..

ik

To invoke your own ready proc i n i t i a t e a segment with the reference
name rdy in your startup ec so that that version w i l l be found by
the dynamic l i n k e r .

t"

i!

*V..|j"p

!V
• i

li

.:

'

'

i '.[

.•!•• {•

- 78 ¥\

•r
V- •

••..'". ! r|!.

3/20/7*.

The Magic Six Commands Manila I
rename

-!';•
|

t s-

'.-' .

rn
rename

,1!

. ••, i

RENAME COMMAND:

rename  

Wr:

The rename command takes two arguments, the f i r s t is an absolute
or r e l a t i v e pathname of the segment to be renamed, the second is
the new segment name (which must be a r e l a t i v e pathname (no ">u9
or "<"s in name)).

< •'• M i

•i>;: fi • '•,'
- • • r- • ' t
' ' • .' ' i I

.;!
4-.

it

Examples:

I

rename foo bar

The segment now named "foo" in
the current working directory
is renamed "bar", if found*

rn >ding>dong>danc| dank

The segment ">ding>dong>dang"
becomes:
">dihg>dong^dank"

, ,

i

-

1

'*

• •• '
i'.-'l ,
< .1

•ill
• <

i

1

• i •.
• • • i- .;!'! i
?(•• !
• I-? '
•
M
i i
A

•.

j

••I :.

• n

W

i

s

•!

i

iii i
'•.«.'|l,.ji!

\ t
•

..

y•

. ..•: •.•"i.f

>:

" .••!' ' >*

- 79 .•'•-• •••..•.. •"•*• i •1
••':,': M M ^ ; • : • • : • , • • .-••fjli
•'••:.•-:•••• • ••• •!•!.•. ,• .'ii'-^i-{:•
!•
j".
J-;IIIP
i ^ »
.

i

3/20/78

The Magic Six Commands ManuaI

*.m

93

document for sa:

r
I

This is the set_access command. I t takes two arguments* The f i r s t
I s a pathname of a segment (or a directory), star names are allowed.
The second is any combination of the three letters "r.",."e" and "w" ;
for read, execute and write permission.

-I

l ••:

sa data r
a I lows read access only to segment "data"

'.••..;:,-r«!

sa ** rew

• «

i•

removes all access restrictions in the working dir
I n g e n e r a l , object code segments should have the access "re" and source
segments "rw" or V " , Dirs should have the access "r". I f the segment :
i 9 already i n i t i a t e d in any process, the access change wi 11 not take
place u n t i l the segment is terminated and r e - i n i t i a t e d , or u n t i l a
new_proc takes place.

Kl"

': • • 3-'

i.= •»,

: •'!

j«.

••

i

,1

!:

$fh

'.:' '.*

n.
,vf'!

= ;:'.' '

! ...|,v ;.•'••;.;; •.•«!•
• f 4

li •

.

.' ti-

t

' * •» •»
•• •
i. 4t ' . l

v !i

; 'i

*

.

f

- 88 *!•

r

ai

.4 •

i

The Magic Six Commands Manual
setjbi t_count

3/28/78

I

•

• * •

»

. ' •:" .-v. is. ,;-['l
The set bit count command, ?bc, sets the bit count of a file.
::-«: i\^'
The usage is:
•
,' • :/.'..;;• ' _ \ • ' ['\\ vj; •;
sbc  
. ' "'• i': • -*'\\ •^l;i
•••.•'

^
,

The b i t count i s provided in bytes for convenience.

.4
• ;•'•»
.'•

: 'it

'i
•','

i

l i . ; • : • , . •i--- > :i!:i
"'•:'•:'•" •• •'•• ;-t' i ; tl

»i?>

'•'., •:•••• ; "•

;•...•.•• Tj :"U-.:J. :V\ ;-|' .V-»- .'ci» •

jf^;
' ..

..I'-

-

• :i •

"i'

''•I.-:; «.' ?;«,'•
J

;

••.•: . i - ' ;.•>. • i : ••«!• » ':
'•'••••'•• ; V-P : i. 'J : : ^ , v - - ' ?

!(l

::V;vj'.::;3:N':^:t;f;:

I

,.. • ••'•:<» •• •.•••' ••!.;•: i." ••
•

.

'

• • , } '

• :• i :

• • "

' • • ' . . ' i -

4

! '

:

:

- T .

' • ' : . !

':
•

%

•}

1^. ••.•••.i-.-'..-v •;: ?; r.f I

•.i-.vi'^f.-.d:-?yf.-il.::-

- 81 /^\
• «; 'i'

'i

••••:.!:•.-

. I-: •.••••' .• • .•••'/•;..3.

i;

;.:.•••:• ^ : " l - . f

3/20/78

The Magic Six Commands Manual
stty

atty:

a program to set terminal descriptions

stty accepts
11 arguments
2) arguments
3) arguments
4). arguments
5) arguments

i,

i'.V

four types of arguments:
which describe a bit
which describe a numerical parameter
which describe a terminal or terminal' type
which print out the current settings
which specify a device

B i t values are modified by giving their name optionally preceeded
by a not sign indicating that .the bit is to be reset not set.
Numerical parameters are followed by their new value expressed as
a decimal number. Types, are specified by their name, describe,
des, show, and ? w i l l cause the current modes to be p r i n t e d ,
save say to change the flags used when the device is f i r s t
attached to the current flags. Devices are specified by
d e v i c e , device__force, dvt df, stream, or st which a f l take
one. argument (eitNer a device name or a stream name).
'Examples:
s t t y pad Amore j this w i l l set the pad b i t and reset the more b i t
s t t y page I 53 { t h i s sets the page length to 53 '
s t t y show
; this w i l l display a l l parameters and t h e i r current
{setting
s t t y device printer printer save ; t h i s w i l l f i r s t say to Use the
j p r i n t e r device, then reset i t s modea to the
{standard printer modes, and f i n a l l y to make them
' jthe default modes

i:;

t :•;> •

m
'if'
Hi

Set t a b l e Parameters:
bits:
echo
raw!
rawo
speed
.eft sp I ay
nobreaks

more

i
\

reverse
pari ty
wrap

notabs
formfeed
uc
numbers:
page I
line I
padcrIf

{do echoing on input
:
t'
{do ho special processing on characters oh input
{output characters without translation
{ i n i t i a l i z e this device in the high speed mode
,:
{ t h i s terminal'can do cursor* positioning ( i s a Fox) ':
{no breaks w i l j be noticed
!
{do more processing
{reverse the _ and del'keys' •
.
jdo p a r i t y checking
{assume that the scroll enable key. is up
•
{output tabs as spaces (for devices without hardware tabs)
jdutput control-l without translation
{assume the terminal is uppercase o.ily

i'.

js'i

{number of usable lines on a page
{number of usable columns on a I i ne
{number of pad characters to send s f t e r a cr I f
- 82 -

•i*J

- I!

-'I!
j

.!

!

|

' 'j

I ' • .'

,r.

.! •"'*% ] i

".•;••/ •;

The Magic Six Commands Manual
stty

5/20/78

I

:i

I -:!

jfGSv
I i

types:
fox
la3B
decwr i ter
carousel
printer
host
network
glass
imlac

Perkin-Elmer Data Systems Fox - 1100
DEC LA36 Decwriter Ii
(suitable for most 30 cp9 terminals)
,
Interdata Carousel P.O.S.
Bright BI 1215 Bar Printer
Semi-Intelligent Device
(actual ly meant for use with the Mult ice
calI out unit)
suitable for a CRT type terminal without
using cursor positioning and tabs
Imlac PDS 1

<•/!

/' ••: ,r.'! •.,'•:> ,'f:l

:

it-U:*!'

:'


, . . . ' • ::•'.•]

X

•* :

•I
' . I

(

*•

i !

.•:•••* -I ^ ' n : ;
••;••••' i .»•!•: •:••

';!-.V*.i-M:^fi-!

.' ••• •'• |i.;>'ii^
• : •' •'. "'i', *i:

- 83 JP"N

•i. •
I •!

• •• •':•!•

'•5'

j-. *•••., Hi

• "•,.|i-j;

•:. 'III---.

The flagic Six Commands Manual
sw 1. (snap | inkage sections)

rt'

'"

. .
3/20/7$
'•.:;••.•

Stfl is a program that allous you to suap your linkage section.
It viciously increases the likely hood of'bad_Juck faults, but.
gets you past those'"tight" times when you-thrash your ass off.

•

H'h:
•:1!

'
'

.

j'J

.. Lh .1

• ffl

:; r'!
;

it'

\

i

m

'.

t. ;

.?-

;:'!
f
•

••

i

i ...•

.'••'.

is'.:
s-1 ,;•••'.»
.... •,

I

(I • *

1
>

i

• • • ; • • .»; '

i

"i

^•'•.••"W**
*

I

I'!

4

I

• ilj.-l. -;l '
:
>
•

••;

' : r i i fi i!!

i

•• ! ; • '

•'•••!• « S -

•i '

!l.
to

*•

! ! .

•

- 84 -

•

:

• •.

:
;

:

v

l

'.!
^ -. -i

li

J!

The Magic Six Commands Manual
send ma iI

3/20/78

Uelcome to the wonderful world of sendjnail.

/jF*k\

T sends the mail.
Altmode (escape) is the command prefix.

s
t
u
f
i
n
q
?

Sub-commands of a l t aret

'
*•
Subject: Prompts for subject line.
To: Prompts for additional users and adds them to the recipient li S t .
Un-to: Prompts for a user name and removes it from the list.
From: Prompts for a user name'and changes the From field.
!* • •
Insert file: Prompts for a file* name and reads it .into the buff ex.
;• . Notify: Toggles notification of mail sent, default: off.
Quit: Exits sendjnaiI without sending the mail.
This information. (Obviously)
: •';

i

• •<

•
'

. > • •,»•'.
• ! 'it';

•••:•.!••.•:;
*

~L
*R
^X
'MJ
del

redisplays the entire message..
redisplays the current Iine.
kills the current line.
same as *X.
rubs out the last character.

i

.

.

|

• .

.-. •>:
i

i

:'

•',

*•••

K

i-

1

t •• 1 ! • -. :..
X

. :4

.'

•n.

. ' -V,

i

. < - ('

•

i '

. ,!•..

1

1:
.1 ,

ft-'iiiil

• ' .

•

. -M

' ? • • • 'Jl
II

JP\

, r\
i * \

!
• ...1

i .

t

'

i•

,::(;-V;
•

i.. f.: i . - r l s 1:

,.-'.

1-

•

.

1- i
• ; - ? m !.!

! ! iM«•••

) '
i

I-

•

i.

i .

i

• • >••

.' • • '
".'•>, il
;

i -.

..I

i*

.!•
iM

- 85 i

• !':• !!:ir

! "

':« •
•l-i

v
!'i

>
t .

i- ;. ;•••' ! i
•9
i ."'

. 9

3/20/78

The Mag i c S i x Commands ManuaI
tape
JK-h't

M A G N E T I C
tape, t p , t

TAPE

U T I L I T Y

The tape command dumps., loads and scans MaglcSIx format tapno. Every
c a l l to tape requires a sub-command, the (ILoad and (d)ump oub-commancle
!
a l s o take a pathname and optional arguments. Arguments aliiayn forco
' '
options which are not the defaults.
•.

•

!

»

'I
i "

sub-commands:.
j
r
rewinds tape
( . '
f
sk'ips to just after the next eof mark
s
scans the tape printing the files: dtb and size of each

•i

d

takes a .pathname and dumps it to tape*
-nw (-nowalk) Don't dump any sub directories.
-inc dump only those segments which have been modified since
last dumped,
-time takes a date/time string and dumps all files modified
since that date. Date is of standard form.
See also date_to_binary.

I

takes a pathname,' locates .it. on the tape and reloads it .
-rp (-replace) replace files found in the file system by those
on tape.
" •'
j
-any reload and entry found with the given name regardless of .
•,the dir it was dumped from.

I

;,

. t i i

• •'•• :' fi; '!

Control-x uses the next digit in the* argument and and tells the character ;I *j'• * '
• !)•! •••!. •
i
reader to look back that number of levels when reading characters.
It continues to read at this level until a backslash is encountered
1. ; • • :•• ' i
at which time the reader "pops up" and continues reading
'.'.-, 1
from the top level. This allows a macro (a saved sequence of TINT commands)
to tell with which arguments it was invoked since macro invocation simply'
.^.:.:W'j-:
"pushes" the reader level so that subsequent commands are taken from
that buffer.
! ; I \'
1
1

t,'j

'

*

'•

*

t

I
1 •

i
«, '

An example of the use of control-x follows:

.

- 88 ^•' J;'-'

I

i

1

'-%j-• •'

''?••*

•

'I-

' ' : 1- .
, .'

t

' !<

3/28/78

The Magic Six Commands Manujl
tint

i foo A xlbar\
this would insert a."foo" followed by anything typed at the
caller's level until a backslash terminated input at that level,
followed by "bar". Thus if this string were in a macro called from
command level, the stuff between ,"foo" and "bar" would be the
characters following the macro name on the command line.
Control-x0 is a special case which indicates that input is to come
from the keyboard a\ which the user is typing.

I:

.,'•• '!!!
i' • :|;i

Basic Commands
i - insert



•' "'• :••} h-i
•!f' '.W
• /Hi
.i

insert u n t i l speci fled ..character encountered
The character immediately, fol lowing the i is the d e l i m i t i n g
character. NO special processing is done on the string*

.1

1 ,

"•'.'":

"see?"

fit

• i

•.'!•.'•"

•'*•'•'•

ill

, '

:iehere are \ A c A b A g some random characters©
;
would insert:
'
•
A
"here are \ c \ b \ g spme random characters'

J.•'I
11.. i

d -

d e l e t e characters r e l a t i v e to the cursor
Deletes characters starting at the current cursor p o s i t i o n .
;;•
This works forward i f the numerical argument is positive .-',;"•! .:.'
and backwards i f the argument is negative.
5d

deletes 5 characters between positions'
:
. and .+5
.'
•

-d

*

•

• .

deletes the character immediately before
the cursor

* .• V.

1(1

•V

.!••

... . !*ijj{

xi •}••'• . • / * :
- • ^

-:;• ••<> •;•:?.• ' •

•••' ' - " , ;•::

it--'

:

.<1'

k - k l j l s characters or lines
- 89 -

'"••'•.•'v?.-:n v ,KV

r . tj .

'•$k

The Magic Six Commands Manual
tint
I.

3/20/78

••>•

When called with no argument k will delete characters up to the
next carriage return.
«

•••••••
. • • • : ) : sci
••'.,... ': ;-'.-"'.;-|» >><

J.

•

When c a l l e d with one argument k w i l l delete characters up to and
including the next n carriage returns. I f the argument is zero
k k i l l s back to the start of the current l i n e . I f the argument
is negative k deletes back over the. specif led number of l i n e s .

I ••
I
: , '••••
• '
<

When c a l l e d with two arguments k w i l l delete the characters
between the two specified buffer positions.
'^!»|:,:

••'•'.''
'•••'/ .i '.-if-;

.?. . T V , Y . •?,;-H

i

.'i'

mm
\'i

j - jump to position
This command sets the current position of the current buffer ^o
i t s argument i f i t had one, otherwise to zero.

c - move forward characters
This command increments the current position of the current buffer
by its argument, otherwise by one.

• ij

i.

r - move backward characters
' I
This command decrements the current position of the current buffer
by its argument, otherwise by one.
I - move by Iines
This command moves the cursor to just after the n-th carriage
r e t u r n from the current position. I f no argument is given i t moves
the cursor to the start of the next line. •

01
I
-31

/*%

i\

sets the cursor at the start of the current line
moves to the start of the next line
moves back 3 Iines

s•- search for a string
The s command searches for the n-th occurence of its string
argument starting at the current position. The cursor is left
at the end of :the string searched for in the direction.of the search.
If the argument is negative then a backwards search is done and
the cursor is left at the start of the found string.

'• • . ' >

• I
•. \
••' t
• •' *
::•••!

i;$:-i

I f no argument .|s given then s searches for the next occurrence.
i

I f the specified-"string is not found either an error message is
printed or the current macro or iteration level is ex it ted.
In any event the cursor is never moved if the search fails*

!l
i

i'.,ii;
i

i

• •1 <
"•'
i

1

•if
••!
•;;,-

."
* r*.

t - type out text
I f given no argument t types out the current Une.

,

• :'

I f given one argument t scans forward (or backward i f the argument
- 90 .:.'!

: ii '

3/20/78

The Magic Six Commands Manual
tint

is negative) passing over the specified number of carriage returns*
-5t5t
prints the five lines before and the five
after and including the current line
»

If given tuo arguments t types out all of the characters bettieen
ttiose tuo positions in the current, buffer,
*

. i

•

«i
eo
ed
em

'••'•• ! ' •

; .1

e - external command
This is a command Mhich takes several sub-commands:

i • •.:}•

.' '.-»••i'. ) V ;'•
•'• J * 'I •• .•<
•• :I

Input: reads the f i l e specified by the s t r i n g argument
into the current buffer at the current position.
Output: writes the current buffer put to the f i l e
specified by the string argument.
The current position and buffer remain the same.
D e l e t e : deletes the f i l e specified.
Macro: reads the f i l e into the buffer "external macro"
and C e l l s i t that macro.
The buffer is automatically deleted a f t e r the macro
is finished.
.

•.. i
• 11

.

.. i

•

i

•.V'-i,:-'!

i- ; •: -t, • '•''••

eq - Causes H N T to return to its caller.
la.
I

_

pause to command level

- print out the current numerical argument

.|F\

Advanced Commands
b - create/select/ctelete. bu,f fers
Iff no argument or a zero-argument is given the buffer specified
by the string argument i-s selected as current after .having been;
created if it had not already existed. •
If a positive argument is given the specifed buffer is pushed '
before it is selected. This means tViat a new "Instance" of the :
buffer is always created so that any buffer already existing <
by that name is inaccessible until this new buffer Is deleted.

or.u
•j

.11

y%\

in-

If a negativ? argument is gj'ven the specified buffer is deleted*
i."

x - move text out of the current buffer (export)
This command takes arguments .like the k command, but rather
than destroying the text indicated it copies into the buffer
specified by the string argument replacing the old contents
of the target buffer.

•r
•i

hxfoobar\
lxlineX

copies all of the current buffer into
buffer named "foobar"
copies the rest of the current line into
- 91 -

»<»

•

I

a* ,1-

T\*

•,:; ..V'.'-'f ••• :
. Jl - • • r ) • /
-•*••. ' :. • >.. •

* ' ^

i
t

The Magic Six Commands Manual
tint
*•!

:!

3/20/78

J-l

r.*

the buffer named "line"

'l-'.!.1
• rn.. i
,,, .1, ,-„;
.
.r ''•» • jjf
:...':. ,' ,-. •.-'..•'•',:-:.:!j•'•! '^[\
" ;

•i w

'tx

- append text to another buffer
This command is like x except that i t. appends the specified
text to the buffer as opposed to bashing it.
•

i

V - insert text into another buffer.
This command is like x except that it inserts the specif fed :\ .••'"•^ •' *.:i v;: rv'^;'hif;:
text Into the specified buffer at the current position* nithfn ,•;; •''. -i•."'''V;':-!•-"•'
that buffer*
•

H

u

n

r

n

,

•

:

•

•

p - pu£ a numerical value
This command puts i t s numerical argument into the numerical
vblue of the buffer specified by the spring argument*
•

"

•

.

.

•

•

•

*

• • * . ' • • -

•'

q - get the value of a buffer
This command returns (pushes onto the numerical stack)
the numerical value of the buffer specified by the
. •
s t r i n g argument*

^

.

•

••

, •

- • .

•

/':'••: ^ - I

. .

,

V

M

;

'.-•;: -ij j
iiii

•;;•"

•'•; : *••'•'.. v ! '

.. •; "
v;

r

' ?•

-'*vi

."'"•'••;.'
ir

J

K T; • '*!i \
•••••••

*4

.

-•:•«*. • v ; .'•• • .fi ••••.«•.!•

Assorted Hacks *
' • ' . ' .••-•-;•.: - ' H - ' : :

^g - screw around with the gap (this one "rings the bell")
This undeletes then last  characters that Mere deleted.
It's great for error recovery.
1

1
^

1

•v

-1

••••• '••.• • ••. •*...;•

iMl

*b - lists the names and useful information* for'al I. the buffers:l:
"

'

••••'

:

• 8 7 forces the redisplay o.f .the line at the top of the screen

,«'

•

*

*

••

'

• - . ; v . : - . , : i .••••*.:•••••: } . • • • :

i

'.'••.

^c - # a s e s the imlac screen
Macro FaciI ity

«

*

The macro facility in TINT works by allowing the input" stream (o.
be redirected from the keyboard to the contents of a buffer*.
This buffer is then referred to as a macro since this, redirect.ion
or invocation results In the execution of many TINT commands.

. \

..»

Mhen the reader reaches the end of the buffer It returns: cortroI
to uherever the reader was previously reading. Thus* i'i:'Vf>•'•?}•'• •

1.

ii'

- 92 »

r*

• ••• . I. -.- !-'s •'
r

...•

.;.••;:.:•!
•

;

'^i

.

)••! •• '•• •. .!'i • ;

• 'i

, «t i
ft

3/28/78

The Magic Six Commands Manual
tint

ii'i

S t r i n g arguments to macros are accessible v i a the c o n t r o l - x
d e s c r i b e d above.

feature

m - invoke a macro
'
Redirects the TINT reader to the buffer specified by the
string argument. Execution a I nays begins at the first character
in that buffer.
•
i
. .

it*

:m -

invoke a macro w i t h an e r r s e t
Behaves l i k e m except that an error handler i s e s t a b l i s h e d .
I f an e r r o r occurs inside of a handler then c o n t r o l i s r e t u r n e d
as i f the end of the macro had been reached and an e r r o r code
i s p l a c e d i n the numerical value of the b u f f e r " e r r o r " .

< -

i t e r a t i o n command
Takes as a s t r i n g argument a l l characters up to the next
non-quoted ">r " and places them in a new instance of a
b u f f e r named " i t e r a t i o n source" and then invokes that b u f f e r
as a macro e i t h e r :
1) the number of times s p e c i f i e d by the numerical argument
or i n d e f i n i t e l y i f no argument was given
2) u n t i l an e r r o r occurs with no e r r s e t (see m above)
Uhenever the i t e r a t i o n terminates the b u f f e r
deleted.

is automatically
i,

ti-!

10
replaces the next 10
occurrences of "foobar" w i t h "quux"

;.4

' A x - make executable
If given an argument of 1 (or no argument) this command
makes the character immediately following it be associated
with the buffer of that name. Thus, A xa would turn "a""
into a regular TINT command which runs the TINT code In
the buffer named "a" whenever it is encountered.

•'!

I f the b u f f e r named " J " contains: " A c i @ \ - 8 t 8 t - d "
then A x ] would t u r n ) i n t o a command which-clears
the screen and d i s p l a y s the local 16. l i n e s d e s i g n a t i n g
the cursor w i t h an "@". To undo t h i s type: 0 A x ) .
The A x command allows the user to turn TINT i n t o a
personally tailored edittor.
•1

Jl

?!.»>

:-i itV
'X

Sbnditional t e r m i n a t i o n
[ . g i v e n a p o s i t i v e or zero argument t h i s command w i l l
•minate the most recent macro as i f the end of the b u f f e r
«jd been reached. This makes i t useful for ending i t e r a t i o n s
ihd so on. I f i t i s given .a negative argument t h i s command
does n o t h i n g .

: • • • # •

•l-

- 93 -

(•

*

.

• •»,

fk>k*

-I*
i

.V.

%>!•

i
•: i

i: !

- 94 r^"-*%,' : | {

; • . i •• if I •

i : rv

The Macilc Six Commands MonUhil
truncate
•

3/20/78

..i
• i

it,
•i
it
• i

The TC command takes a file name and truncates the file
to zero length. It leaves the acls and names intact.

•• 'i t•

Vj

4

I-

'•I

•ifo

"i
« .ri

:••• • '.y- .•:-.---vi-•••"••' ••&
••••

••••

••

. J .

...•••.,•

• . ,

• ; - : ' ; ! r i ••'••+}•:

.i.'

• i

J.

•ij »

•'.t;- , [i , ;f

"•'•'•••• • • • : : ? : »;• i
,.

i

•$
:*' '.

'•

/-..'•:- ; v.^:iV : ':^-:4Aj:-:V :
• •• •! •

••• i

• •• !•: fit :

!'•'.'U'H:!''*!

- 95 -

v

.

^••"vri.,i:r;,;;^S;iJ-fc^i
.

••

•.••>••• ••"

• ' •• i

> •Jt; •• j r . . ' . ; ' ; »i

, • ' •'[• : • \ l ! i i-.'.'i Si
:,-

i

'

'i:

?

3/20/78

The Magic Six Commands Manual
tv

z^Hk

Quick Guide to tv on Magic Six
Type " t v " , "to" or "to1' to get into tv.
I f these commands are given arguments they perform the
following upon entering tv.

•Vf

. i

tv - a. *X*R is done on the argument.
tb - a AXAF is done on the argument.
to - a A X A 0 is done on the argument.
(See below for description of these commands.)
I f no argument is given the old contents of the buffer
are undisturbed.

.

^ I f you type any p r i n t i n g character i t w i l l get inserted.
The control key causes h i t t i n g a letter to do something.
The esc key (meta) is used to prefix a character and make i t
a l s o do something.

(Ml

.-ifi:

The d e l e t e key deletes to the l e f t qf the cursor.

• i.

The four basic directions are:

%
. '•:

:• -I;i

.1

*P
A
N
*F
?B

previous line
next I i n e
forward a character
backwards a character

'>%

•wu-

(backspace ( A K) also works)

t •

;•.•»
•* 'i

«

'V I

To get around on a given line:
A

A
IE

!.!r'

go to the beginning of the line
go the end of the line .

1ft.
•'I'M

To get rid of stuff:
A

D
1C

deletes the current character
kills to the end of the line (or the new line itself if
nothing is left")

J I

Mi*
J-VM "}

Jii.l

:.' !

To get to either end of the file:
• i

meta-<
meta->

hi

go to the top (or A T)
go to the bottom (or A Z)

: t

To move up or down half a screen:
A

V

move down half a screen
- 96 -

i»

1

v*

'I

I

The Magic S i x Commands Manual
tv

3/20/78
i'i I.
:i !

meta-V

move up h a l f a screen

To search forward f o r a s t r i n g type:
-i
*S
'
,
.
;
•
:•
' r .•*
the s t r i n g to f i n d (which gets echoed near the bottom
of the screen (delete works here))
a backslash
I f the s t r i n g i s n u l l ( i e "S\) then the the'previous search s t r i n g i s Usedt
To search backward the. same syntax is used but the command i s ""Ft.

i'

•/,

"I!

:
v •..(..
1

To i n t e r f a c e t o the o u t s i d e world two character combinations s.tarting with:
X a r e r e q u i r e d . A l l s t r i n g s (filenames b u f f e r names e t c ) are ' t e r m i n a t e d [
by a CR.
:
•
A

•I. <

«•

~X~R Reads from a f i l e (prompts for a f i l e name)
^X^U U r i t e s to a f i l e (prompts for a f i l e name)'
^XAS U r i t e s the b u f f e r to the current f i rename but d o e s n ' t ask.

•f

i
•<
'

^XT quit tv
^X^E
~X~Y
^X^X
^XB
•x

'v::

Executes an external commancj (prompts for a command line).
Prints out the entire buffer (like an h ht" in tint).
switches point and mark.
Asks for a buffer name and makes .that the current buffer.
l\
Each buffer has a mark and a filename of its own. There is one
search string and kill area per invocation of TV.
. :
A
X*F Asks for a filename and reads that file into a buffer whose
name is derived from the filename.
"X^O Asks for a buffername from a previous invocation of TV. It
is assumed that the file ". tvbuf ."
can be found in the processedir. That buffer is made the
current buffer*, it should be identical.to the old buffer.
"X^B List all the buffers currently known about.

1

. t{

To kill a large region of text use A @ to set the "mark" to the current position
then go to the end of tHn region to be deleted and use A U. Both this command
and the *K command pu^h the deleted text onto a kill stack. The top item on
this stack may be copied into the buffer at the'current position with the
;
*Y (Yank) command. The last item copied into the current buffer can be .• •.
replaced by the previous item on the kill stack with a meta-Y. (this dbe>;
•r •
a *U a pop-last-kill-item and a *Y).

;. • If
i

t !
•II-

I:
.1

i!«

It

.For h a n d l i n g words and L i s p s-expressions:

1

j ••• •'•

•^•".•vfU'jf

meta-F
meta-B
meta-D
meta-rub

move forward over word.
back up over word.
d e l e t e next word (pushed k i l l e d t e x t l i k e 1 0 .
d e l e t e previous word (pushed k'HIed t e x t ) .

meta-T
meta-^B

move forward over sVexpression.
move, backward over s-expression.
- 97 -

/0&\

'.::£•

I I'i'.'
'<:':-'i

u
< i:

i.

£

The •Magic Six Commands Manual
tv

3/20/78

ill

.**'

meta- •AD
delete next s-expressioh (pushed k i I fed t e x t ) .
meta- • A rub delete previous s-expression (pushed k i I led t e x t ) .

X
'•••«*.". •! 5
1(
• ;; ••1v'
. • V.f3•
L••>!i
•»..•

"1*

'•./•#•
-••... »,::•!
'i

\i: .*; 1

V

m

• •- 1 - •

:•*•:<

/'..J.!; :

^
• - -j • .
i .!•• ;.••

••! i

' -.1

"i-i

jC'-t

•i •

:

3i

>'l i'

/"» . •

>» •;?

"fli

.913
I!

j
I

•'-:;:.'.:•••'!!••.#•'
.)-.

;l
V •

£

m
k

• •'•*!

•rv

i

. ,!
"

i

- 98 -

1

3/20/78

The Magic Six Command? ManUfll
t r a n s f e r vector compiler (>tools)

.1 :

l •;

tvc is the MagicSix version of the transfer vector compiler,
.which is a method of creating command abbreviations by use
of the do mechanism.

i •!

r:

tvc filename

'

converts the f i l e , filename, tvc into an object f i l e called,
filename,
filename.tvc contains lines of the form:
l a b e l : p a t tern

:

i ,

!

v

i'

'•••

i•

\s
x :/:H'

''f •

: I

'; f !".

where label is the name of the entry point to be defined.
This name is also added to the object segment unless
there is some name c o n f l i c t .

!

Typing the command*:

: •':•'!.

-il'

I

i/lfl\

label argl arg2 ..*
then acts as if you had typed:
f!v» H

See the documentation on do for more information.
Examples:
i

t•

•*«•
•A

nd:pll «1 ~nd
w: who
note:mail sas -s £qrl

i" :

1-.

it

; I

••!• :

•hi':''.!:.

I.
... I . .

W
- 99-

J . ' L i ,.

. - I ' - - ... . ( "

i

• •'-..• '•' • i ••-.' . • / ' .:i ; j ; , ! , ' H T
.!
• , ";•'
V'\ '• ' ; •«'. • •'>•! v
:
••'"' •
' •>•;< i ]•''»•.. "I "
. ••'>••> •) ~.j rl ••:•>••!
.;!«•
•,-•'.'
, l! ' ! '. i
* > • < • • • i. , i ,
... ] . . ' • ; " ? ••••I..i.
••:|-" <
• : ; i ' m

-1

,'.• • - ! .. ! v
<' ' i' • • '',' il •'
•I . '

i i

'-.'.Hi.

' ...» •'
•s

•

i.i

:'V'i

5

.

•*!••?••

The Magic Six Commands Manual
Table of Contents

I/O
I/O system
MAGIC 4
PL/I
access
ac 1 s
addr-space
\
address spaces /
arch i ve
asr
assembler
backup
bind
b 11 count
clean
command generation
compiler
cohdi t i ons
console 1ights
copy
crash
dd
de
debugger
definitions
delete
de1e t e_d i r
delete^entry
.-do
dsr

^
ul '*

«»

.It
'»
11

^.

•^
*•. •

• 1

•*%

e c

/•*

t*

i)
.1

/"-

ed i 11 i ng
edit tor
error table
errors
etc
exec_com
external data
external_data
fido
f1le system
f incfall
foral1
fox
glossary
help
ieh

3/28/78

31 '
34
31 •
57
88
88
8
8
18
11
44.49
31.86
12
81
.13
22,23
57
.14 •
IS
19
28
21
21
71
2
21
21
21
22
11 .
23
9G
87
25
14*
25
23
2G
•26
i
i
27
13,19.21.28.29.31.32.35.43,79,88,81,86,95
28
29
1 .
2
38
31

A-

•V: «

- 188 -

• irr
;

**%[]

A »

HI

3/28/78

The Mag i c Six Commands. MarttJQ |
Table of Contents
iehlist
nformation
nquire
o
anguages
ights
ink
inks
isp
ist

!*.-

rn

^-

s
mai I
m i di
midi.macros
mini
moon
nite
object code
object_format
ols
o n Iine salvager
peek
phase of moon
Pll
pll.language
pi pom
ppom
pr i n t
probe
psr K
readlmaiI
ready
ready messages '.
rename
sa
sbc
search rules
segments
send_jnai I
stty
swapping •
814 I

system crashes
tape
tape I/O
text justification

32
38
33
34
38,44,57
16
35
35
36
8,43
8'
8
77,85
44
46
49
58
51
12,53
53
' 55
55
56
58
57
58
58
58

78,78
71
11
• 77
78.
78 .
79
88
81
11
8,18,28
85
8284
' 84
• 16,28
31,8686
51

.it

,

;:

:• i.
i

i

','

< '• V':. : ;. •(••

.-•-

V >

•1

•

.•;

'i '

'Wfci
vv.-w
'

:« •'• •'•.:.'{: ' . ' l i ; ' i f .

\' t,\...
1 -:-. "•:'
.• 1

: -ii

'•••:.

.!' :

y

-I':•"««-4}

;

. -,••'

'

..•'•!}'•: it i

:; >'i t..':'--:-'}?'•-{•

:r ; :=- : ! I
1,1"

:

.'•"•'

•ii

I'--

0

.HI

• ! ' • • ' ;!

. •: • '.•:• .'.-!.•
.! ' • " ^ v i
ii!

' •: }
';•! j

; : ' ' • ' : . i , i;-'."'i "•••!!{?

•••I- •••. !

v-.jl! . \i;i

i'.-.
-.-I,- M • I;<
•;; : ' ,u. •:'' :•'.:• I..1 1

•'ii-i/'V,-,;.-^,
••••''-••.:.••-

-ri

. i

• •it

:,i

,(
:

, •*:. *

• «

,. -..•: ' • -5

;
:

* *, *•
> -

•

# ^

1.

•;•:! i l l
•-•••:=!! .*

'••

- 181 -

\

M '

••;••>
-


I •
• • I

,1

I

'If:!

!. -i
i

« i VI j i i i j - | ' ,-ij
I ,'il

t

-

i

'

I !

• ' X ' T i
•

-. '-T,-.; .

The Magic Six Commands Manual
Table of Contents

! •

3/29/78
':•;
•I

t•

ti nt
transfer vector compiler
truncate
tv
tvc
,«
type
typing conventions
unlink
)
Users

87,87'
99
95
96
99
78
1.82
21 ,.35
27,33.56

II.

S*tk.

J'

*

... -m1

l

;..'I*'.
•••

I

••

f1

'«•',:.:

•'•^S.jfy

. i.i *V
.

'I :.;•'•••}.

\r,
;t:

I: •

!I

i

I

f

*

i

•vK"ii\'

- 182 -

. . ';:, l • 'Ii'l
i

i

i

.

:

,

:---:;::.:iJi- :.'Vl!i

' :!.T>i.f|
•'Mi ':;1:i
:

•
"

-l-'fl

• d ' 1
•.;•!. f j



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : Yes
Creator                         : ABBYY FineReader Express (Mac edition)
Create Date                     : 2018:11:18 18:11:56+08:00
Modify Date                     : 2018:11:18 18:11:56+08:00
Page Count                      : 103
EXIF Metadata provided by
EXIF.tools

Navigation menu