B~S REFERENCE DOCUMENT .Issued· March 3, 19~7 . . Revised AuguSt 28, 19'67
BY
Ann Hardy. DeL. Schmidt
0.0 1.0 2.0 3.0
4.0
5.0 6.0
7.0
8.0
9.0
10.0
Index by Type
Scheduling, Forks and Program Interaction
Input/Output
Teletypes
Memory
String Processing
Numbers
Miscellaneous
. System. Command BRS's
Index of BRS·t s and System Operators
0.1 "
1.0 SCHEDULING, FORKS AND PROGRAM INTERACTION
1.1 Program Interrupts
1.2
1.3
1.1.1 78 Arm/Disarm Software Interrupts
1.1.2 79 Cause Specified" Software Interrupts
"1.1.3 49 Determines Which Soitwa~e "Interrupts are Arm
1 .. 1.4 BE+12 ·Arm Timing Interrupt
Control of the Escape Key
1.2.1 90 Declare a Fork for Escape
1.2.2 46 Turn Escape orf
1.2.3 47 Turn Escape On
1.2.4 26 Skip if Escape \'lai ting
Actlvationof Forks
1 . 3 . 1 9 Op·e n For k
1.3.2 57 Guarantee 16ms Computing
1.4 Interrogation of a Fork
1.4.1 30 Read Status of a Lower Fork
1.4.2 107 Read Status of all Lower Forks
1.5 Temporary Suspension of Forks
1.5.1
45
Dismiss on Quantum Overflow1.5.2 72 Executive Dismissal
1.5.3 81 Dismiss for Specified Amount of Time 1.5.431 Wait for Specific Fork to Cause a
Panic
1.5.5 106 Wait for Any Fork to Terminate
1.6 Termination of a Fork
1.6.1 10 Terminates the Cal~ing Fork
1.6.2 22 Terminates all Forks Lower to the System Exec
1.6.3 32 Terminates a Specified, Lower Fork
1.6.4 73 Terminates a Specified Number of
LOt~ler Forks,
1.6.5 108 Terminate all' LONer Forks
2.0 INPUT/OUTPUT'
2.1 Direct Control of Peripherals
2.1.1 1 Open a File of
a
Specific Device2.1.2 110 Read Device and Unit
2.1.3 2 Close a File
2.1.4 20 Close A Tape File
2.1~5
8
Close All Files2.1.6
66
Delete DSU File Data2.1.7 67 Delete DSU File Index Block 2.1.8 82 Switch Sequential File Type
2.1.9 87 Read DSU File Index Block
2.1.10 10}·l Read a Page (2048 words) from HAD
2.1.11 105 ltIrite a Page (2048 words) to RAD
2.1.12 113 Compute File Size of a Disc File
2.1.13 l l1J Turn
orr
Run-Away Magnetic 'rape2.1.14 118 Allocate Magnetic Tape Unit
2.1.15 119 De=A11ocate Magnetic Tape Unit
, 0.3
2.1.17 BE+10 Write DSU Page
2.1.18 BE+7 Test a Breakpoint Switch
2.1.19 BE+1 Read DSU
2.'1.20 BE+2 Write DSU
2.2 Control of Files Via File Names
2.2.1 15 Read Input File Name
2.2.2 16 Open Input File in File Directory
2.2.3
17
Close, All Files2.2.4 18 Read a File Name and Look It Up in the File Directory
2.2.5 19 Open Output FileLocated in File ,Directory
2.2.6 48 Look Up Input/Output File Name
2.2.7 60 Look Up I/O File Name 'and .Insert, in File Director'y i f Not Found.
2.3 I/O Operations
2.3.1 CIO Character Input/Output
2.3.2 WIO Word Input/Output
2.3.3 BID Block Input/Output
2.3.4 CTRL I~put/Output Control (Tape)
3.0 TELETYPE OPERA?IONS
3.1 Linkin~ and Attachin~
3.1.1 23 Link/Unlink Specified 'rTY
3.1.2 24 Unlink All TT~'s
3.1.3 25 Set Teletype to Accept/Refuse
3.1.4 27 Attach TTY to Calling Program
3.1.5 28 Release Attached TTY
4.0
3.1.7 BE+6 Turn a Teletype Line On or Ofr
3.2 Input/Output Operation~
3.2.1 11 Clear the Teletype Input Buffer
3.2.2 Clear the Output Buffer
3.2.3 12 Declare Echo Table.
3 .2 . !~
3.2.5 3.2.6 3.2.7 3.2.8 40 13 14 is 85
86
Read Echo Table
Test Input Buffer for Empty
Delay Until the T~Y Output Empty
Set Special TTY Output
'Clear Special TTY Output
Buffer
3.2.9 BE+ll Ignore Line Feed or Carriage Return When Followed by Carriage .Return or Line Feed Respectively
3.2.10 TCI Teletype Character Input
3.2.11 TCO Teletype Character Output
3.2.12 1ST Input from Specific TTY
3.2.13 OST Output to Specific TTY
3.2.14 STI Simulate TTY Input
MEMORY OPERATIONS
4.1 Private Memory
4.1.1 4 Release a Page of Memory
4.1.2 121 Release Specified Page from PMT
4.1.'3 120 Acquire a New Page
11 .1.4 43 Read Pseudo Relabeling
0.5
4.1.6 116 Read User Relabeling·
4.1.7 117 Set User Relabeling
4.1.8 122 Simulate Memory Panic
4.1.9' 56 Make Page Executive
4 .1.10
80
Make Page Read Only.4.1.11 BE+4 Read/Write One Word in the Monitor
4.2 Shared Memory
4.2.1 68 Make Pseudo-Page Shareable
4.2.2 69 Get SMT Block to PMT
5.0 STRING PROCESS
5.1 ·String I/O
5.1.1 33 Read String
5.1.2 34 output Message
5.1.3 35 Output String
5.1.4 BE+l~ Input String with Edit
5.1.5: CIT Character Input·and Test
5.2 Hash Table Search
5.2.1 5 Look Up String in Hash Table
5.2.2
37
General String Look Up5.2.3 6 Insert String in Hash Table
5.3 String ~1anipu1a tion
5.3.1 STP Store Strin~ Pointer
5.3.2 LDP Load String Poi.nter
5.3.:: SKSE Skip if String Equal
5.4 .
Character.-Manipulation5.4.1
Gcr Get Character from Beginning of String and Increment Beginning Pointer5.4.2
WCI Put Character on End of String and Increment End Pointer5.4.3
GCD Get Character from End of String and Decrement End Pointer .5.4.4
WCD Put Character on Beginning of String and Decrement Beginning Pointer5.4 .5
'vcn
Write Character to Memory by Table6.0 NUMBER OPERATION
6.1 Number I/O
6.1.1 36 Output Number to Specified Radix
6.1.2 38 Input Number to Specified Radix
6.1.3 52 Formatted Floating Point Input
6.1.4 53 Formatted Floating Point Output
6.1.5
SIC String to Internal Conversion6.1.6 ISC Internal to String Conversion
6.2 Arithmetic Operations
6.2.1 50 Conversion from Floating Point to Fixed Point
6.2.2 51 Conversion from Fixed Point to Floating Point
6.2.3 21 Floating Point Negate
6 . 2. It FAD Floating Point Addition
6.2.5 F'SB Floating polnt Subtract
6.2.6· FMP Ploating Point Multiplication
0.7
7.0 EXECUTIVE COMMAND OPERATIONS
7.1
95
Dump Program and Status on File7.2
96
Recover Program and Status from File8~0 . MISCELLANEOUS OPERATIONS
8.1 42 Read Real-Time Clock
8~·2 91 Read Date and, Time into a String
8.3
88 Read Execution Time8.4 41
Return from I/O Subroutine8.5
III Return from Exec ERS (Exec Only)8.6
112 Turn Off Teletype Station (Exec Only)8.7
71 Skip if Executive8.8
BE+5 Set Disc Bit Map8.9BE+8 To Crash the System for Error Diagnostic
8.10 BE+13 Sets Exec, Switches in SYMS
NUMBER: 78
'NAME: SAIR
FUNCTION: Arm/Disarm ,Software Interrupt~
STATuS: User
CALLING SEQUENCE: LDA M BRS 78
M is the complete new interrupt mask.
DESCRIPTION: The new interrupt mask is substituted for the old one. A user may arm interrupts 1-10. An exec fork may arm interrupt 11 also. Interrupt 1 is in bit '4.of th~ mask word. The inter~upts are as follows:
1 Interrupt if Program Panic (BRS 10 or Escape)
2 Interrupt if Memory Pani~
3 Interru~t if Lower Fork terminates
4 Interrupt if any I/O condition occurs which sets a flag bit (0,7 or 8 in file number word) 11 Interrupt if DSU error
5
through 10 interrupts on condition set by userLocation 200 octal plus the interrupt' number must be set to point to a routine to process the inte~rupt.
When the interrupt occurs an SBRM* is executed to the location pointed to. If it is desired to return to the point in the program interrupted, the user must BRR to the ~0cation where the return was saved.
Example:
SET
LDA =ESCAPE STA 201B
INTERRUPT ROUTINE ESCAPE
zno
ESCRTNREGISTERS AFFECTED: None
,NUMBER: 79
NAME: SIIR
FUNCTION: Cause Int~rrupt
STATUS: User
'CALLING SEQUENCE: LDA N BRS 79
1.1.2
N = Interrupt number. N has the range of
5
to 10.DESCRIPTION: Parallel forks in the structure are
~earched first and then higher forks. The interrupt will be caused in the first fork found which has the interrupt armed. If no fork has the interrupt armed, it is treated like a NOP. This would normally be used to cause interrupts 5 through 10 to interrupt.
NUMBER:
49
NAME:SRIR
FUNCTION: Read Interrupts Armed
'STATUS: User
CALLING SEQUENCE: BRS ~9
DESCRIPTION: Reads the interrupt mask into the A regis-ter.'Bit
4
c6rresponds to interrupt number 1,5
to num-,ber ~,and etc. There are 11 p.rogrammable interrupts.'See also BRS 78(1.1.1).
REGISTERS AFFECTED: A
1.1.4
.. NUMBER: BE+12
NAME: TIMINT
FUNCTION: Interrupts a fork after a specified period of time.
STATUS: User
CALLING SEQUENCE: LDA M LDB T
LDX N
BRS BE+12 NORMAL RETURN
·M is the new interrupt mask.
T is the time in milliseconds 'after which the fork will be interrupted.
N is the interrupt number.
DESCRIPTION:· The fork i~suing this BRS will be inte~~
rupted after the delay if the interrupt specified by
N is armed at that time. (Exception: The interrupt
will be ignored if the fork is dismissed ana BRS 9 (1.3.1) at the time of the interrupt.) If a fork gives this
BRS again with the same N before the time has passed, the new time will be set. A fork may have a maximum of three timing interrupts pending simultaneously. See
also, BRS U1 (1.5.3) .
NUMBER: 90
NAME: DFR
FUNCTION: Declare a Fork for "Escape"
STATUS: User
CALLING SEQUENCE: BRS . go
DESCRIPTION: In case· the user' types "Escapelt or a fork
panics, this fork will be activated. A fork panic is a fork status of 0, 1, or 2. See also, BRS 10. (1.6.1).
NUMBER: 46
'NAME: NROUT
FUNCTION: Turn Escape
orr
STATDS: System
CALLING SEQUENCE: BRS
46
1.2.2
DESCRIPTION: ThisBRS will 'set up to remember an escape interrupt,butnot allow the program to be interrupted. It will· stack the first escape· ocaurring and ignor~
any ~ubsequent ones. . . . . .
A program running with escape ~urned off cannot be
ter-minat~d by.ahigher fork. .
See also, BRS 26 (1.2.4) and
47
(1.2.3).47
. NAME: SROUT
FUNCTION: Turn Escape On
STATT]S: System
CALLING SEQUENCE: BRS
47
DESCRIPTION: This BRS reverses BRS
46
(1.2.2); that . is, reactivates the eScape interrupt. If an escape in~terrupt was stacked ·(~~membered)·whil~ in an
orr
condi-tion, the interrupt will occur.NUMBER: 26
NAME: SKROUT
FUNCTION: Skip if Escape Waiting
STATuS: System
CALLING SEQUENCE: BRS 26
EXCEPTION RETURN NORMAL RETURN
1.2.4
DESCRIPTION: Checks for a ~tacked .escape for this program and if there is one, transfers control to the "normal return" or ·to the "exception returnlt i f there
is not an escape stacked. Significant only after BRS
46
(1.2.2).NAME: FKST
FUNCTION: Open Fork
STATUS: User
CALLING SEQUENCE: LDA T
ERS "9
T = Address of a "Panic Table"
, Bits'
a
through 40f register A have the following significance: 'o
=
Make fork 'system' if current fork is' system.1
=
Set £ork relabeling from panic table'. ,Otherwise uSe current relabeling.2
=
Propogate escape'assign~ent to fork (See BRS90,1.2.l').3 ~ Make fork fixed memory. It is not allowed any morememory,than it'started with.
4
=
Make fork local memory. New memory will be assigned to it independent,of the con~trolling fork.
5= M~ke fork privileged if current fork is
'privileged. "
DESCRIPTIO~: BRS 9 is used to create dependent entries in the PAC table. The panic table indicated by register A must not be the same for two forks of the same fork or overlap a page boundary; if it is, BRS 9 is illegal. BRS 9 creates a new fork as a fork of the fork creating it, which is called the controlling fork. The fork is lower in the hierarchy of forks than the controlling fork. The controlling fork may itself be a fork of some still higher: fork. For more detailed information see Document No. 30.10.31.
When BRS 9 is executed by a user fork, the user fork is dismissed until the lower fork terminates. This ,has the same effect as issuing a BRS 31 (1.5.4) immediately after a BRS
9.
A user may not have more than eight forks in his fork structure. This includes the system fork and one fork for each system BRS that is active. Only one system BRS can be active.NUMBER: 57
NAME: CQO
FUNCTION: Guarantee 16ms Computing
s'rATUS: User
CALLING SEQUENCE:. BRS 57
'DESCRIPTION: This BRS guarantees to the user' upon re-turn at lea,st 16 msec. of· uni.nterrupted computation. This is done by dismissing the' us~~ if less than 16
msec.r~main~in his' time qua~tum.
This time will include somesystem·overhead. ThUS, if the time required.is very close to 16 msee., a BRS
45
{1.5.1) should be used. BRS45
guarantees severaltimes this amount. .
NUMBER: 30
NAME: FKRD
FUNCTION: 'Read Fork.
··STATUS: User
CALLING SEQUENCE: LDA P BRS 30
P ~ Panic Table Add~ess.
, DESCRIPTION: ·Reads the current s,tatus of 'a lower fork into the p~nic table indi~atedby the A register~It
'does not influence the operation of the fork in any
, way.
. NUMBER: 107
. NAME: FKRA
FUNCTION: 'Read All Fork Statuses
,STATUS: User
CALLING SEQUENtE: BRS' 107
1.4.2
DESCRIPTION: Th~ status of all lower forks is recorded in the' appropriate pan~c tables.~
Nur1DER: 45
NJ\IYIE: sQO
FUNC~::-:O~: Dismi~s oh Quantum Overflow
srrl\
T'CS : UserCAL ;":::NG SEQUENCE: BRS:
DESCRIPTION: . This .BRS causes the user to .bedismissed
as though heh~d overflowed his quantum. It guarantees. that the noyt time he· is ~ta~tedh~ will have, a complete
short. timE: quantum. See BRS 57 ·(1 .• 1.2) tOf$uarantee 16msec. .
NUMBER: 72
NAME: EXDMS
,FUNCTION: System Fork Dismissal
CALLING SEQUENCE: LOB D LDX N
BRS 72
1.5.2
Rev. 8/67
N
=
The' number of 'the queue that the fork is to, be put on.D
=
Dismiss, condition~DESCRIPTION: Dismisses a system 'fork and puts it on' the specified queue. Returns, tqcatl,+i when recalled.
o
=
Teletype ~ueue1 - I/O queue
2
=
Short time ,quantUm queue' 3=
,Long time quantum queueNUMBER :.. 81
. NAME: . WREAL
FUNC~IO~: Dismiss for Specified Amo~nt o~ Time.
STATUS: User·
CALLING SEQUENCE: LDA T··
. BRS 81
T = Dismissal time in milliseconds.
DESCRIPTION~ . The fork is dismissed for ·the·numb~~ of
millisecond~ specified in A. Se~ also, BE+12 (1.1~4).
NUMBER:
31
NAME: FKWT
~UNCTION: Wait for Fork to Ca~sea Panic STATUS: User
CALLING .SEQUENCE: ··.LDA P BRS 31
p = Panic Table Address
·1.5.4
·'DESCRIPTION: Causes ihe controlling fork to be dismissed until the lower for~or forks,causesa panic. When
it do~~) the controlling fork is ~eactivated at the in-struction following this BRS, and the panic table 6on-· tains the status of the fo~k on its dismissal. The
status i~ also put into the X register. The panic table address is· put into the A register. .
The controlllngfork mu~t have armed an interrupt or a lower fork must exe~ute a BRS.10 (1.6.1).
NUMBER: 106
NAME: FKWA
FUNCTION: Wait for Any Fork to Terminate
S'rAFJ.·US: User
CALLING SEQUENCE: BRS 106
DESCRIPTION: Fork is dismissed until some· lower fork terminates. Whan a lower fork terminates, the panic table address will be left in A.
NUMBER: 109
NAME: DMS·
FUNCTION: Dismiss
STATUS: User
CALLING SEQUENCE: BRS 109·
1.5.6
DESCRIPTION: The fork is dismissed. It can only be acttvated again by a program interrupt which has been armed by this: fork or the,termination of a lower fork.
NUMBER: 10
NAME: PPAlJ
T:i'UN81'ION: Programmed Panic.· 'l'erminates a Fork.
CALLING SEQUENCE: BRS 10
BRS 10 terminates the fork that issues it and re-turns control to the higher fork.' It is just like typing. "escape" on the .teletype.
DE~CRIPTION: Terminates a lower fork. This condition can be distinguished from a panic caused by the escape
key only by the fact that in· the former dase the program countsr in the panic table points tea word containing ERS 10. This BRS ~ould normally be used to terminate
a fork when it is finished . . The information in the
panic table would,· therefore, only be useful to a higher
fork or to this fo:c!c only if interrupt 4 has been armed
by thir. fork.
NUMBER: 32
NAME: FKTM
FUNCTION: Terminate a Fork
STATUS: User
CALLING SEQUENCE: LDAP BRS 32
P
=
Panic Table1.6.3
DESCRIPTION: Cause~ a lower fork to be uncotiditionally terminated and its status to be stored into the panic table. .The X register contains the status word upon return. .
NUMBER: 73
NAME: EPPAN
FUNCTION: Economy Panic
STA'rJS: Usel")
CALLING SEQUENCE: LDA N
BRS 73
N
=
Number of'f6rks to. terminate.DESCRIPTION: This is like doing a BRS 10 f6r each of the forks specified. Forks are t~rminated going up until the system fork is reached or until N forks have
been' terminated.
NUMBER: 108
NAME: FKTA
FUNCTION: Terminates 'All Forks
STATUS: User
CALLING SEQUENCE: BRS 108
1.6.5,
DESCRIPTION: All lower forks are, terminated and their status read into the cor~esponding panic tables.' '
NUMBER: 1
NAME: . I'1l0NOPH
FUNCTION: Open Q File of a Spe~ific Device
STJ\TUS: System
CALLING SE~UENCE: LDA· ±I LDX D BRS ·1
EXCEPTION RETURN NORMAL RETURN
File number will be in register A ~n Normal Return.
I :: Thel'elativc uddress (DSU Address MOD 4) of the file's Index Block fbr DSU files, or unit . riumber for magnetic tape, otherwise anything. - - r·lal{c the file read only.
+ - MakA the file read/write. D -Device number.
Avriilnble device numbers are as follows:
1. Paper tape input~ .. 2. Paper tape output 3 . Ca·rd input.
4.
Magnetic tape input~ 5. Mugnetic tape output.r( • Printer.
8. Sequential. DSU input 9. Sequential DSU output. J.O. Handam DSU
DESCRlp:rION:. The !I"~'\pen file" BRS is used to condition a fiJ.2 fo:, illput or output processing. If the file is succcsAfully opened, control is transferred to the nor-l1'i~!.l .return; othert'-J"i3e control is transferred to the ex-ceptlon return.. Exceptj.on conditions arc as follows:
1. D8Vicc in uce or not available. 2. Plle in usc.
2.1.2
NUMBER: 110
NAME: RDU
'FUNCTION: Read Device and Unit
STATUS: User
CALLING SEQUENCE: 'LDA "'=FILENo. BRS 110
NORMAL RETURN'
DESCRIPTION: Output X = device riumber. A'= Unit number.
See BRS 1 (2.1.1) for device nUmbe~ description.
NUi·1DER: 2
NJ'JiE: MOnCLS
STA'I'0S: User
CALLLNG Sll;QUENCE: "LDJ\ N
ERS 2
NOHl\IAL RETURN
N !'~ PiJ.c nUl'1bc.:;r (obtained" "'hen file was opened) .
DESCRIPTION: rrh(~"" clo;:;e file" ERS 1"8 used to indicate to th8 system all processing is completed" on this file. All n~nes8ary terminatlonprocessing will be completed :.~~}~·~·.l cO:1i~l~OJ~ w·:tJ..l be ~cransI~errecl to the normal return.
2.1.4
NUMBER: 20
NAME: CFILE
FUNCTION: Close a File
STATUS: User
CALLING SEQUENCE: LDA N
BRS "20
N
=
File NtimberDESCRIPTION~ The "close file" BRS ~s used to indicate to the system all processing is completed on this file. If the file number indi~ates Mag Tape, the file will be terminated and if"o~tput, the" End of File will be written; but in either case, the tape will be positioned at the start of "the next file and "the tape is de-allocated. All registers are~lobbered.
NUNBER: 8
NAME: IOH
FUNCTION: Close all Files
C~LLING SEQUENCE: BRS8
NORMAL RETURN
DEscn:t.FTION: The 1.1 close all files" BRS is used to
in-dicato to the oystem all processing is completed on
nIl fileD. The syctemwill cqmplete all necessary ter-miriation proce$sing, on all files and trinsfer aontrol ' to the normal 'return. BRS 8is always executed wheh contrlo1 returns to the syst<:9In. This BRS' will not close
m2gn~tic tape files correctly~ , See ,also, BRS 1 (2.1.1),
" NUMBER: 66 NAME: DFDL
FUNCTION: Delete DSU File Data STATUS: User
CALLING SEQUENCE: LDA N ',BRS ,66'
NORMAL RETURN D· N =' File Number
Rev.8/67
DESCRIPTION :,J'·TlJ.is BRS will return to available storage all DSU blocks W~ich are ,assigned to the indicated file and clear the iatlex block of'DSU addresses. The file ' must be open as 'an 'output file.
NUMBER: 67
NAME: DFER
FUNCTION: DeJ.ete a Specified Block of the DSU ..
STATDJ: System
CALLING SEQUENCE: LDA D
BRB '67
·.NORMAL RETURN
·D
=
Address of the. DSU block.DESCRIPTION: This BRS will return the DSU block-indi-cated by the address in register A to available storage and transfers control to the normal. return. This BRS should be used to delete Index Blocks. The BRS .does not clear the 'Iridex Block address from the Customer File Directory.
NUMBER: 82
NAME: SWSF
FUNCTION: Switch Sequential File Type
STATUS: User
CALLING SEQUENCE: LDA N
LDB C
BRS 82
N
=
File numberC
=
a will make the file ~n input file.C
=
1 will make the file an"output file.2.1.8
DESCRIPTION: This BRS sets the file type to input or output depending on" the contents of register B ~egard~ less" of its current file type ~nd transfers control to" the normal return. RESTRICTrON~ "If the sign bit o~ register A wa~ set when the BRS I (2.1.1) was executed" to open the file, it cannot be switched from input tOI output. A violation results in an instruction trap.
NUMBER:
87
NAME: DFRX
FUNCTION: . Read DSU File Index Block
STATUS: System
CALLING SEQUENCE: LDA D
LDX W.
BRS 87
NORMAL RETURN
. .
D
=
DSU addres~ of the index b166k(MOD 4)
W
=
Core address into which the block is·' to b.e read.DESCRIPTION: Reads the specified block into the given core location and transfers control to the' normal r-eturn .. The block read is the size of the currently -defined in- . dex block. The size of an index block varies with the assembly.
'NUMBER: 104
NAME: RSYB
FUNCTION: Read a'Page from the RAD
STATUS: System
CALLING SEQUENCE: LDA C LDB R
BRS 104
C = Core Address H = HAD Address
2.1.10
DESCRIPTION: Reads one page from the RAD starting 'at the address R into a page in core. C may.be any loca~ tion in that page. The data will start in the first word of the page.
Undorrectable HAD errors result in an instruction trap or interrupt' 11 ,if it is armed. Try command again;~
. NUMBER: 105
NArJIE : WSYB
FUNCTION: Write a Page on the RAD
STATUS: System
CALLING SEQUENCE:· LDA C LDB R
BRS 105
NORMAL RETURN
DESCRIPTION: Writes one page on the RAD star~ing at the address .R from a page in core. C may be any loca-tion
in
that page. The data will start in the -first word of the page.Uncorrectable RAD· errors result in an instructioti trap or interrupt 11 if it is armed~ Try command~gain.
NUMBER: 113
NAME: DFCD
FUNCTION: Compute File Size of ~ DSU File
STATUS: User
CALLING SEQUENCE: LDA =File Ntimber BRS DFeD
NORMAL 'RETURN
DESCRIPTION: Adds the number of dat~ words (in multiples of 255) in the file to the number in the X register.
Returns, the resul t in X.
NUMBER: 114
NA~1E: MTDI
FUNCTION: Turn,Off·Run-away Magnetic Tape
STATu'S: System
CALLING SEQUENCE: BRS MIDI NORMAL RETURN
DESCRIPTION: Issues commands to, try to stop the tape.
NUMBER: 118
NAME: TGET
FUNCTION: Allocate Magnetic Tape Unit
STATUS: System
CALLING SEQUENCE: LDA =Tape Number BRS 118
EXCEPTION RETURN NORMAL RETURN
2.1.14
DESCRIPTION: Assigns tape requested to the user. If tape is already busy with someone else the execptlon return 1s executed.
NUMBER: 119
NAME: . r.PREL
FUNCTION: De-Allocate Magnetic Tape Unit
CALLING SEQUENCE: LDA =Tape Number BRS 119
.NORMAL RE~URN
DESCRIPTION: Releases the tape specified. Releases
rega~dle3s of who had it.
NUMBER: BE+9
NAME: RDSYB
FUNCTION: Read DSU Page
STATUS: System
CALLING SEQUENCE: LDA C
. LDB R
BRS .BE+9
C
=
Core Address R = RAD Address·2.1.16
DESCRIPTION: Use like 104. Can only be called by the system exec. ·BE+l (2.1.19) can be used to perform this function.
NUMBER: BE+IO
NAME: t<JDSYB
FUNCTION: Write DSU Page
S'llATUS: System
CALLING SEQUENCE: LDA LDB BRS
C= Core Address R
=
HAD AddressC
R
BE+IO
DESCRIPTION: Use like 105 (2.1.11). Can only be called by the ,system exec. aE+2 (2;1.20) should be used to
NUMBER: BE+7
NAME: BPTEST
FUNCTION: Test a Breakpoint ,Switch
STATUS: System
CALLING SEQUENCE:LDX =Switch Number BRS 'BE+7
" SWITCH UP RETURN SWITCH DOWN RETURN
2.1.18
DESCRIPTION: Tests the breakpoint switch (1,2,3~4)
indicated in
X.
If'the switch is down, the BRS skips on return.NUMBER: BE+l
NAME: ARD
FUNCTION: Read DSU·
CALLI1~G SEQUENCE: LDA =Core Address LDB =Disc Address LDX =Number of'Words BRS BE+l
NORMAL RETURN
DESCRIPTION: Reads from the disc as specified. Errors result in an instruction trap, or programmed interrupt
11 if it is armed. No two forks that are to run simul-taneously should both use this BRS.
NUMBER: BE+2
NAME: AviD
FUNCTION: Write DSU
STATUS: System
CALLING SEQUENCE: LDA LDB LDX BRS
=Core Address =Disc Address =Number of Words BE+2
2.1.20
DESCRIPTION: Like BE+l (2.1.19). The number of words must be a multiple of
64
and greater than O.NUMBER:
15
NAME: GFN
FUNcrrION: Reads Input File Name from a Corrunand File and Looks up the File Name in the User's ,File Directory.
STATUS: User
CALLING SEQUENCE: LDA N BRS
15
EXCEPTION RETURN NORMAL RETURN
N
=
Command File NumberDESCRIPTION: The routine ~gnores leading spaces, leading multi-blanks, and leading carriage return characters. It then uses the BRS 37 (5.2.2) to look up the file name in the user!s file directory hash table.* It returns in the ~egisters for both returns exactly what ~he BRS
37 puts there, which is: E:;:ception Return:. X:
A
&
B:Norma] Return:. A:
B:
X:
Pointer to the input
fi~e name string painters. Input filename string pointers.
Pointer to the string pointers of the desired file in the file directory hash table.
The value word of the hash table entry. Clobbered.
*Thc 0xccption return 1s taken if the input file name
strin~ cannot be'located in the file directory.
NOTE: The informatibn contained in the registers cannot be used directly by the user since the ad~resses are in the
'r.
S. Block; this BRS °is normally followed by the BRS 16.If the input file name string begins with a left paren, or with the full quote, the file name' will be located in
another userYs file directory or in the public file di~ec
tory, respectively; in these cases, the input command file must be the teletype. Since the BRS 37 is not used in thiti case, the information in the registers is of
no practical use to the user,o and the BRS MUST be followed by th0 BRS 16 (2.2.2) as indicated under the BRS'16.
NUMBER: 16
NAME: GIFNB
FUNCTION: Operi,Input File in File Directory.
STATUS: User
CALLING SEQUENCE: LDA N
BRS 15
BRU (Error) BRS 16
EXCEPTION RETURN NORMAL RETURN
N
=
File Directory Pointer Address2.2.2
, Rev. 8/67
DESCRIPTION: Opens an input file located in the user's file directory. 'The BRS requires in A, the location of the first word of the entry in the file directory
hash table. The excepti6n return is taken if the painter in A is not ,pointing to a proper location in the hash table, or if the file cannot be opened, for any reason, such as a physical device that cannot be an input file. The file directory pointer may' be obtained from ,a 'BRS , 15, a BRS 48 ora BRS 60.
Exception Return: Normal Return: A:
B:
X:
REGISTERS AFFECTED: All
All registers clobbered. File Number
FUNC'TION: Close all Files (Including Tape)
. STATUS: User
CALLING SEQUENCE: BRS 17
DESCRIPTION: If mag tape has been used, the last record will be terminated and if output, the End of File will be written; in'either case the tape will b~ positioned at the start of the next file. The tape is then closed and the unit is de-allocated. See also, BRS
8
,(2.,1.5).All registers are clobbered. '
NUMBER: 18
NAME: GOFNA
2.2.4
FUNCTION: Reads File Name from a Command File and Looks Up the File Name in the User's File Directory . . The Command File Must Be an Input File.
STATUS: User
CALLING SEQUENCE: LDA N BRS 18
EXCEPTION RETURN NORMAL RETURN
N
=
Command File NumberBit 1
=
I of A Register - Assume a file name is correct and does not type "OLD FILE" or "NEW FILE".DESCRIPTION: The routine ignores leading spaces, leading multi-blanks, and leading carriage return characters. If the string begins and ends with a single quote or a slash, the string is terminated ·for look-up with this character and the string is looked up in the user's file directory using the. BRS 5 (5.2.1). A confirming carriage return must followtthe quote or slash before the string· is looked up. The exception exit is taken if the charac-ter is not a carriage return. If the string is found in the file directory hash table, the message "OLD FILE" is typed, otherwise the message "NEW FILE" is typed. If a confirming line feed, carriage return, or period is then next in the input string, the normal return will be taken, otherwise the exception return. In the case of a new file, the file name is inserted conditionally
into the file directory. .
If the string begins with a character other than a single quote or a slash, the string is looked up 1n the user's file direbtory using the BRS 37 (5.2.2). If the string is not located,. the error exi t is immediately taken caus-the exception return. The exception return will also be caused if the file is read only as indicated by the flag in the file directory.
Exception Return: All clobbered.
Normal Return: A - Location of the file in the
REGISTERS AFFECTED: All
directory hash table.
B - Confirming character in case of a quote or slash file; otherwise, the file directory hash table value word.
NUMBER: 19 NAME: GOFNB
FUNCTION: Open Output File Located in File Directory STATUS: User
CALLING SEQUENCE:. LDA Nl
LDB N2 (For Tape Files Only) LDX N3
BRS 19
EXCEPTION RETURN NORMAL RETURN
Nl
=
Information s.upplied in A by BRS 18 (2.2.4),BRS 48 or BRS 60 (locationinth~ file directory).· N2 File S~ze (as supplied in X by BRS 16) for tape
files only.
N3 File Type (as supplied in B by BRS 16).
DESCRIPTION: Opens an .output file located in the user's file directory. The information required in the registers is indicated above. The word in A is checked for legality. If i t is now a valid pointer, the exception return is taken. The exception return is also taken if the file cannot be opened for any reason, such as a physical device that can-not be used for output. In the case of a new file, the file directory entry is completed. If the new file is a DSU file and i t cannot be opened, the message "NO ROOM"
is typed. The message "FILE TYPE WRONG" is typed as
approp-riate. .
Exception Return: All clobbered. Normal Return: A - File Number.
NUMBER:
48
NAME: . GSFN
FUNCTION: Look. up Input/Output File Name
STATUS: User
CALLING SEQUENCE: LDP N
BRS
48
EXCEPTION RETURN NORMAL RETURN
N = String pointers for the file"name.
2.2.6
DESCRIPTION: The file name is looked up in the file directory hash table using the ERS 5 (5.2.1). If it is not there, the exception return is taken.
Exception Return: A
&
B -' No change.X - Clobbered.
Normal Return:. A
&
B - Location in file directory hash table. Can beused by BRS 16 ·(2.2".2) or BRS 19 (2.2.5). X - Clobbered.
NAME: CIa
FUNCTION: Charac~er Inp~t/Otitput
STATUS: User·
CALLI~G SEQUENCE: LDA CIa
C (Output Only)
N
c
=
8 bit data character right justified. N=
Address of word containing a file number.DESCRIPTION: CIa is used to input or output a single character from, or to, a fil~ from the A register. On input an End of Record or End of File condition will set bits 0 and 8 or bits 0 and 7 in the file number and return a 13 48 or 1378 character, respectively. If in-terrupt
4
is armed (see BRS 78, "1.1.1"), it will occur. The End of Record occurs on the next input operation after the last character of the record has been input and the End of File condition occurs on the next·input operation after the End of Record which signals the last record of the file. If an error occurs, bits 0 and6
wIll be set in N and interrupt
4
will occur if it is armed.WIO and BIO should not be mixed with CIa to read or write a given file.
. NAME : .. WIO
FUNCTION: Word Input/Output
STATUS:. User·
CALLING SEQUENCE: LDA
WIO D (Output Only) . N
D
=
Data word to· be writtenN
=
Address of word containing a file number.DESCRIPTION: WIO is used to input or output a word of data to or from the A register. On input an End of Record condition returris a word of three
1348
characters andsets bits 0 and 8 in the file number word. If interrupt
4
is armed· (see BRS78, "1.1.1"),
it will occur. An <End of File condition returns award of three
1378
charac-ters and sets bits 0 and7
in the file number word.~f interrupt 4·1s armed, i t will occur. If an End of Record or File condition occurs with a partially filled out word, the word is completed with
1348
or1378
charac-ters .. : If an error occurs, bits 0 and 6 are set in N.If interrupt
4 is
armed it will occur.CIO and WIO should not be mixed to read or write a given file.
NAME: BIO
FUNCTION: Blocked Input/Output
STATUS: User
CALL~NG SEQUENCE: LDA W . LDX I
BIO N
EXCEPTION RETURN NORMAL RETURN
I·
=
Starting memory address.W
=
Numbe~ of words to be read or written.N
=
Address of Hard .containing a file number·. DESCRIPTION: BIO is used to input'a block of words to memory or output a block of word~ from memory. The A register vlill contain the first memory location not read into or out of at the end of the op~ration. If the oper-ation is completed successTully, control will be traris-fcrred to the normal return, otherwise control will be transferred to the exception return.On input an End of Record or End of File condition will SGt bits 0 and 8 or 0 and 7 in the file number. An error will set bits 0 and
6.
Interrupt4
will occur if armed when any of these bits are set.~xception conditions are:
1. End of Record
2. End of File 3 . r~:j.cI Hecord
If' b~·. t 1 is on In the Data Block disc· address in the Index Block of Q DSU file, it indicates the en~ of the
2.3.4
NAME: CTRL
FUNCTION: Input/Output Control (only tape is implemented),
STATUS: System
CALLING SEQUENCE: LDA C CTRL N
C ='Control number N = File number
DESCRIPTION: CTRL provides the following control func~
tions for tape files:
Contr'ol #
'I.
.2 •
3 · ,4 •
5.
6. 7 • 8 . DescriptionWrite end of record on output. Record count not used.
Backspace physical block. '
Forward space physical block.
Backspace file.
Erase tape (output only) (3 inches).
Rewind.
Write EOF. Output only.
Long erase. Output only.
NUMBER: 23
NAME: LNKS
}i'UNCTION: Link/Unli.nk TTY - Not i'mplemented
STATU.S: User
CALLING SEQUENCE: LDX T LDA A LDB C
BRS 23
T -.• Teletype number
J\. == Address of a list of teletype numbers terminated
with
--2
~C -. Control word. The bits of this word are as follows:
Bit 0 .. 0
=
Output LCW~ 1-
Input LCW.·. Bit I
--
0 .- Clea.r all links first, 1=
Donat clear links first.Bit 2 .. - 0
-
Set link bits for TTY whose numbers are in the table.Bit 2
=
1=
Clear link bits for TTY whose num-bers are in the table.DESCRIPTION: This BRS is used to set the link bit for
T~Y T in ~he LCW. Associated with each TTY are two words called the Qb301ute input and absolute output link con-trol t~Tords
D.Jcw'
s) . Each of these words contain one bit for each TTY in the system (maximum of 24). Alsoas~;ocJD.tec1 wlth each Trry are relative LCW's for input and output. 'Ilhe bi ts ir~ these LCH's are set by this BBS. FrOll1 .the old rr?lative LCp and the informat:l.on
sup-plied :in the calling sequencE: a new relative LCW Is crc:J.ted. Eo.ch t:i..mc any pelative LeW is changed, the absolute Let'" s [tre all recomputed.
NUMBER: 24
NAME: LNKC
FUNCTION: Unlink - not implemented
STATUS: System
CALLING SEQUENCE: LDX' T BRS 24
T
=
Teletype NumberDESqRIPTION: This BRS 1s used to clear all links '" input and output, to or from TTY T.
FUNCTION: Set Accept Mecsages and Set Accept Input In-" " dicators.
"STATUS: System"
CALLING SEQUENCE: LDX T LDA I BRS 25
T
=
Teletype number (must b~ controlling TTY or an attached TTY).I
=
Bit 23,on to set "Accept Messages" Indicator. I=
Bit 24 onto s~t "Accept Input" Indicator.DESCRIPTION: This BRS allows the user to specify wh~ther
or not messaBes from outside will be accepted, and whether or not input from outside will be accepted for his con-, trolling teletype or for one which he,has attached.
The accept message indicator controls execution of OST instructions and thesettirig of teletype output links. The accept input ~ndicator controls execution of STI instructions and the setting of teletye input links. Setting or clearing of these indicators will not affect any'TTY links currently set.
NUMBER: 27
NAME: ASTT - not implemented
FUNCTION: Attach TTY to this program
STATUS: System
CALLING SEQUENCE: LDA T BRS 27
EXCEPTION RETURN NORMAL RETURN
T
=
Teletype Number3.1.4
DESCRIPTION: To giv~ total control over a TTY to the' requesting program. If the indicated TTY is£ree, it is attached to the requesting program and transfers con-trol to the "normal return". If it is not free, control is transfBrred to the ','exception return".
NUMBER:
28
~AME:RSTT - not implemented· FUNCTION: Release TTY
STf\rpt.i3: System
CALLING SEQUENCE: LDA T BRS 28
~ ~ Teletype Number
DESCRIPTION: R~turns to a free status the TTY indicated
by the A register. If the TTY was not attarihed to the requestlng program a "panicll will be executed.
NOTE:' All attached teletypes are released when the user logs out.
NUMBER: BE+3
NAME: CARRY
FUNCTION: Test for Carrier. Presence
STATUS: System
CALLING SEQUENCE: LDA =LINE #
BRS BE+3·
.3.1.6
EXCEPTION RETURN -·No Carrier NORMAL BETURN.- Carrier Present
DESCRIPTION: This BRS gives a skip return, if the car-rier signal is present on the line identical in A. No carrier signal - no skip.
Nur1BER: BE+6.·
NAME: TTYON
FUNCTION: Turns a Teletype Line On or Off.
STATU~: System
CALLING SEQUENCE: LDA =TTY #
LDB =0 (off) or -1 (on)
BRS BE+6
NORMAL RETURN
DESCRIPTION: Issues the EOM and POT commands which cause the line to be turned off (hung up) or made ready to
accept an incomin~ call.
NUMBER: 11 'NAIVIE: C IB
FUNCTION: Clear the Teletype Input Buffer STATuS: User
CALLING SEQUENCE: LDX. T BRS 11
3.2.·1
T
=
Teletype number (-1 is used to indicate the controlling teletype).DESCRIPTION: Sets the buffer pOinters to indicate there are no characters in the TTY input buffer.
NUMBER: 29
NAME: COB
FUNCTION: . Clear the Output. Buffer
·STATUS: User
CALLING SEQUENCE: LDX T BRS 29
T
=
Teletype Number {-I indicates the controllin~. rr'ry)
DESCRIPTION: Sets the buffer pOinters to indicate there are no characters in the TTY output buffer.
Rev.8/67
NUMBER: :12
NAME: CET
FUNCTION: Declare Echo Table
STATUS: User
CALLING SEQUENCE: LDX T LDA R BRS .12
T = Teletype number (-1 is used to indicate the con-trolling TTY).
R = 0,1,2, or 3 to indic~te the proper echo tabl~ •.. R may also contain any eight-bit character it the sign bit is on. In this case, each eight bit character read from the· teletype is transmitted unchanged to the user's program. No echoes are generated while in this special eight-level mode. The eight bit character is the character on which eight-level mode will terminate.
DESCRIPTION: BRS 12 sets the echo table for the TTY in-dicated by Register A. Echo tables are as follows:
o
= Echo each character just as i t was received and break on all characters.1
=
Same echo as 0 but all characters except letters, digits and spaces are break characters.2
=
Same echo as 0, but the only break characters are control characters (including carriage return and line feed).3
=
No echo for any character and break on all charac-ters.NUMBER: llO
NAME: RDET
FUNCTION: Read Echo Table
STATUS: User·
.CALLING SEQUENCE: LDX T BRS 40
T
=
Teletype numberDESCRIPTION: Reads the echo table number (0,1,2,3) into the A register.
If the teletype is not in eight-level input mode, reads' the echo table number (0,1,2,3) into the A register. If the teletype is in eight-level input mode, the sien bit of A is ~et, the address ·field contains the terminal character.
NUMBER: 13
NAr~E: Sl<;:I
FUNCTTON: Test Input Buffer for Empty
CALLING SEQUENCE: LDX T BRS 13
EXCEPTION RETURN NORMAL RETURN
3.2.5
T ~~ Teletype· number (-1 is used to indicate the controll:t.ng rl"rY)
DESCRIPTION: This BRS tests for the presence of input characters in the buffer. If the buffer is empty, con-trol i3transferred to the "normal return". If there are any characters in the input buffer, control is trans-ferred to the "exception return".
NUMBER: 14 NAME: DOB
FUNCTION: Dismiss Until the Teletype Output Buffer is Empty.
STATUS: User
CALLING SEQUENCE: LDX T BRS 14
T = Teletype number (-1 is used to indicate the con-trolling TTY) .
DESCRIPTION: Dismiss this fork'until the teletype output buffer indicated is empty. It is dismissed until the last
NUMBER: 85 NAME: SET8P
FUNCTION: Set Special ,Teletype Output STATUS: User
CALLING SEQUENCE: LDX T BRS 85
3.2.7 Rev.8/67
T = Teletype number (-1 is used to indicate control-ling TTY).
DESCRIPTION: Sets teletype to 8-level output mode. The teletype specified must either be the controlling teletype or an attached teletype. Eight-level is transmitted to the teletype exactly as i t is received from the user
program. A fork sending eight-level code should do a BRB 14 before terminating.
NUMBER: 86
NAME: CLR8p
FUNCTION: Clear Special Teletype Output
STATUS: User
CALLING SEQUENCE: LDX T BRS 86
T
=
Teletype number (-1 is used to indicate con-trolling TTY).DESCRIPTION: Puts the teletype output back into normal mode. The teletype specified must either be the con-trolling teletype or attached.
NUMBER: BE+ll NAME: CRSW
Rev.8/67
FUNCTION: To Allow the User to Ignore Line Feed or Car- . riage Return when i t Follows a Carriage Return or Line Feed.
STATUS: User
CALLING SEQUENCE: LDX -1
LDA ~O (ignore) =-1 (do not ignore) BRS BE+ll
NORMAL RETURN
NAME: Tel
FUNCTION: Teletype Character Input
STATUS: User
CALLING SEQUENCE: Tel M
M
=
Memory location.DESCRIPTION: This SYSPOP reads the character from the teletype input buffer and places it into the location
M right justified. The remainder of location M is cleared. The character is also placed in the A register right
justified".
NAME: TCO
FUNCTION: Teletype Character Output STATUS: User
CALLI~G SEQUENCE: TCO ,M
M
=
Memory address.DESCRIPTION: This SYSPOP outputs the character from the ri~ht-most eight bits of location M to the
control-lin~ teletype. In addition to the ordinary ASCII·char-acters, all teletype output operations will accept 1358
as a multiple blank character. The next character will be taken as a blank count, and the indicated number of blanks will be typed.,
NAME: 1ST (Not implemented)
FUNCTION: Input From Specified Teletype STATUS: User
GALLING SEQUENCE: 1ST T T
=
Teletype numberDESCRIPTION: 1ST is used to input a character from an attached teletype. The character will be right justi-fied in the A register upon return.
3.2.13
NAME: OST (Not implemented)
FUNCTION: Output to Specified Teletype
STATUS: User
CALLING SEqUENCE: OST T
. T
=
Teletype numberDESCRIPTION: OST is used to out~ut a character in the A register to a specified teletype. This instruction is used for output to an attached teletype. It's accept message hit must be set or an illegal instruction panic will be generated ..
NAME: STI
FUNCTION: Simulate Teletype Input STATUS: User
CALLING SEQUENCE: STI T T
=
Teletype numberDESCRIPTION: This BRS is used to simulate teletype input. It puts the character in the A register into the input buffer'of the specified teletype. It is legal for a user fork only if T equals the controlling TTY or -1.
NUMBER: 4
NAME: MPT
FUNCTION: Release a Page of Memory STATU.'): User
CALLING SEQUENCE: LDA N BRS
4
4.1.1
N = Contains any address in the page to be released. DESCRIPTION: The PMT entry for the block is removed
and in any other fork which has this PMT byte in its relabeling, the byte is cleared to O.
,NUMBER: 121
NAr1E: DPMTE
FUNCTION: Release Specified PMT Entry STATUS: User
CALLING SEQUENCE: LDA R BRS 121 R
=
Relabeling byteDESCRIPTION: Releases the specified page from the PMT. It is exactly like a BRS 4 (4.1.1) except that it takes a byte number instead of ' an address.
Instruction Trap:
1) Byte not in PMT.
NUMBER: 120
NAME: APrJITE,
FUNCTION: Assign PMT Entry
'CALLING SEQUENCE: LDA 'R BRS 120
n = Helabeling, byte
4.1.3
DESCRIPTION: Obtains a new page for the relabeling byte specified. This BRS is used only in the recover routine in the exec.
Ih~truction Trap:
1) PMT entry is already assigned.
. NUMBER:
43
NAME: HDRL
FUNCTION: Read Pseudo-Relabeling
STATU~: User
CALLING SEQUENCE: . BRS
43
DESCRIPTION: Reads the current pseudo-relabeling regis-ters into regisregis-ters A andB.
NUMBER:
44
NAME: STRLFUNCTION: Set Pseudo-Relabeling . STATU8:· User
. CALLING SEQUENCE: LDA Rl LDB R2 BRS
44
Rl
&
R2=
Relabeling factors4.1.5
DESCRIPTION: This BRS takes the contents of registers A and B and stores them into the current pseudo-relabel-ing registers. It also causes the real relabeling to be reset to correspond to the new pseudo-relabeling. This BRS will result in an instruction trap for any of the following reasons:
1)
2)
3)
Swapping in the new pages was not completed. (Usually because of a RAD failure.)
The user tried to relabel over a system page. The user tried to relabel over a page he did not have. (This is not the way to obtain more. memory.)
NUMBER: 116
NAME: RURL
FUNCTION: Read User Relabeling
STATU.:): System
CALLING SEQUENCE: BRS 116
DESCJ{IPTION:Puts the program relabeling into A and B. This is what the system executive uses as program
re-labelin~. It is kept in the TS block.
. NUMBER: 117
NANE: SURL
I,'UNc'rrON:' Set User Relabeling
S'I'ATU . .): System
CALLING SEQUENCE: tDA RLI LDB RL2 BRS .117
4.1.7
RLI and RL2 are the new values for the program relabeling.
DESCRIPTION: Sets the program relabeling as specified. This BRS is used by the system. User programs should
us~ BRS
44
to set relabeling for a fork. Instruction Trap:1) A specified relabeling byte. was not assigned. 2) A user fork tried to relabel a system byte.
NUMBER: 122
NAME: MPAN
FUNCTION: Simulate Memory Panic'
STATUS: System
CALLING SEQUENCE: LDA A
BRS' 122
'A
=
Core addressDESCRIPTION: 'This BRS gets new memory for a class 3 BRS. If'it succeeds the new memory is put into the relabeling of the calling program. Can be issued from a class 3 BRS only.
If' a memory trap occurs, it ,looks to the calling program like it came from the BRS instruction.
NUMBER: 56
NAME: MBEX
FUNCTION: Make Page System STATUS: System
CALLING SEQUENCE: LDA P
BRS 56,
P
=
Pseudo-Re labc~ lin'g byte for page.4.1.9
If bit
°
of A=
1, page will be made system. If bit 0 of A=
0, page will be made not system.DESCRIPTION: Sets the use mode of a pa~e dependin~ on
the value of bit 0 in the A register.
Bit
°
of A is set to 1 if'page was formerly system or a if it was not.NUMBER: 80 NAME: MBRO
FUNCTION: Make Par,eRead Only STATU3: User·
CALLING SEQUENCE: LDA P
BRS 80 p _. PMT/SMT number
If bit 0 of A
=
1, make page read only. If bit 0 of A=
0, make page read-write.DESCRIPTION: Sets the read-write status of the entry according to the value of A. An SMT entry can only be chan~ed by a system fork. The former status of the entry Is returned in A.
Instruction trap:
1) Specified entry is not in use. 2) The swap failed.
NUMBER: BE+5
NAr4E : PEBRS
FUNCTION: Reads or 'Sets One Word in the Monitor
S'llATUS: System
CALLING SEQUENCE: LDA V
LDB
a
or -14.1.11
LDX =Location in Monitor Relabeling BRS BE+4
RETURN
V ~ New value for word if'it is to be set.
The contents of the location are returned in the A register.
If B is positive, the word is read.
If B is negative, the word is chan~ed and the old value returned in
A.
DESCRIPTION: Allows a system program to read or set the contents of any location in the monitor relabeling.
The original contents of the location are always returned in the A register.
NUMBER: 68
NAME:· EBSM
FUNCTION: Enter Block in SMT - Not implemented.
STATUS: System
CALLING SEQUENCE: LDA B BRS 68
B
=
Byte riumber in users pseudo-relabelingDESCRIPTION: A free SMT entry is found and the PMT entry put into it. The SMT number is returned in A.
4.2.2
NUMBER: 69
. '
NAME: GBSM
FUNCTION: Get SMT Block to PMT - Not implemented.
S1ATUS: Subsystem
CALLING SEQUENCE: LDA S BRS, 69
S
=
SMT numberDESCRIPTION: Puts the SMT entry into the first free 'PMT entry. The PMT entry number is returned in A.
Instruction trap:,
1) A user program tries to relabel a system SMT entry.
2) The SMT n~mberis not vaiid. Memory trap:
NUMBER:, ,33
Ni\Ivl~ : GETS'rH
FUNCTION: nc~d Strine
CALLING SEQUENCE": LDA A LDI3 T LDX F BRS 33
[~ -- Address of string pointer T'
=
,Terminal character17 -- llliie number
Bit a of A on ~The string is taken as null with the Gccond'pointcr equal to the first.
DESCRIPTION: This BRS reads characters from the file and ap00nds them t6 the string until the terminal char-,'lctcris J'c~lched.' The terminal character is not appended to the Dtring. It returns the updated string pointers
~n the A and B re~isters and updates the end string
pOiil{~(]r) in memory. '
NU,MBER: 34
NAr~E : OUTMSG
FUNcrr'ION: Output :'·lessar:e STATUS: User
CALLING SE~UENCE: LDX F LDA W
LDB C
BRS
34
F
=
File numberW
=
Beginning word address C=
Character count or ~15.1.2
DESCRIPTION: This BRS outputs C consecutive characters starting with the first character of the speciried word. If B
=
-1, characters are output until a / is encountered~ the character t i s interpreted as a carriage return and line feed.NUr-·1DEH: .
35
N~.ME:. OUTSTR
. FUNCTION: Output String
CALLING SEQUENCE: LDX F LDA P
LDB P+l BRS
35
F :-~ File number
P, P+l ~·A string painter pair
DESCRIPTION: Outputs the string indicated by the string pcilnters in registers A and B to the specified file.
NUMBER: . BE+14
NAME:
FUNCrrON: Inpu~ String with Edit
STATUS: ·User.
CALLING SEQUENCE:
NAME: CIT
FUNCTION: Character Input and Test
STATUS: User
CALLI .. JG SEQUENCE: . LDA N
CIrrI F
EXCEPTION RETURN
NOR~1AL RETURN N
=
Character to be tested.F = File N·umber (see CIO) (Input Only)
DESCRIPTION: The character in the A register is compared against the next character in the input file. If it
compares, the normal return is taken and the character is removed from the input buffer. If it does not com-pare, the character is left in th~ input buffer and is returned in A.
Exception Return:
A -
The next character in the input buffer.B & X - No change
Normal Return: A - The character supplied
REGISTERS AFFECTED: A
'NUMBER: 5
NAME: 8SCH
FUNCTION: Look Up String in Hash Table
srrATUS:· U.ser
CALLING SEQUENCE: LDA P
P and P+l
=
T - Address
ZRO ZRO ZRO
LDB P+l LDX rI; BR8 5
EXCEPTION RETURN NORrlAL RETURN
String painters for a looked up.
of a three Nord table
string
of the
I-lash Table Beginning. Address Hash Table End Address
0
5.2.1
to be
form:
DE8CRIPTION:BRS 5 (5.2.1) searches the hash table for
a string to match the string indicated by A and B regis-ters. If successful it returns in register B the ad-dress of the hash table string pointers, and in register
A, the stri.nr; "value" and executes the "normal" return. Other\vise, it executes the "~xception" return with regis-ters A, B and X unchanged and the address of the next free hash table entry in word 3 of the table is painted to by register X. (Word 3 will be -1 if the table is full.) The "value" is the hash image for this string.
Sec BRS 6 (5.2.3)
NAME: 'GSLOOK
FUNCTION: General String Lookup STATUS: ' User
'CALLING SEQUENCE:LDA F ,LDB S LDX T BRS 37
EXCEPTION RETURN NORMAL RETURN F
=
Input file number.S
=
Address of string pointer pair.T Addre~~of the Hash Table Control Table.
DESCRIPTION: The hash table is scanned for a string to match the given one. If an exact match
1S
found the normal return is taken (see exits below). If the given string does not, ,match the initial part of any hash table string, the exception return is taken. If the given string matches the initial part of some hash table string, characters from the input file are appended until the string is long enough ei ther t'o determine a unique hash table string, with amatching initial part, or for no match to be possible, in which case the exception return is taken. In the case where a unique hash table string has been located, more characters are taken from input until an exact match is
obtained, in which case the normal return is taken, or until the last character causes a mis-match. If the last charac-·ter is alphanumeric, the exception return is taken since
i t is assumed that only a non-alphanumeric character, such as a space, carriage return,punctuation marks, etc., can be considered a proper terminator. The last character
(which caused the mis-match) is left in the input file. ,Exits are as follows: (1) The exception return is taken
on the no-match condition with a string pointer in A, B to the string so far collected. X is undisturbed. (2) The normal return is taken on'a match with the address of a hash table string pointer in A and the string "value" in B. X is undisturbed.