Atlas 1 Emulator

Extracodes

This page contains the complete list of extracode instructions -

The list is divided into sections (in approximate numerical order) as follows -

1001 - 1047 Magnetic tape
1050 - 1057 Input
1060 - 1072 Output
1100 - 1102 Subroutine entry
1103 - 1107 Branching
1112 - 1117 Monitor
1120 - 1127 Miscellaneous transfers
1131 - 1136 Traps
1140 - 1157 Compiler and supervisor
1160 - 1177 Store
1200 - 1265 Tests
1250 - 1253 Character data processing
1256 - 1276 ½" tape operations
1300 - 1377 B-register operations
1400 - 1425 Complex arithmetic
1430 - 1437 Vector operations
1407 - 1476 Miscellaneous B-type accumulator operations
1500 - 1576 Double-length arithmetic
1520 - 1575 Arithmetic using the address as an operand
1601 - 1652 Logical accumulator operations
1624 - 1626 Half-word packing
1700 - 1776 Functions and miscellaneous routines

Note that not all extracodes are currently implemented. Of those which are, some are implmented directly by the emulator and some are implmented by the more authentic means of obeying instructions in the fixed store under exctracode control.

Extracodes which are not (yet) implemented are shown like this.
Extracodes which are directly implemented by the emulator are shown like this.
Extracodes which are implemented by subroutines in fixed store are shown like this.
Extracodes which are implemented but are not required to do anything in the context of the emulator are annotated thus - §(optional note).

Organisational and Peripheral Extracodes
Magnetic tape
Block Transfers
1001Search for section n on tape Ba
1002Read next K+1 sections from tape Ba to store blocks , P, P+1 . . . . , P + K
1003Read previous K sections from Ba to P+K, ...., P
1004Write P, P+1 , .. , P to next K+1 sections on Ba
1005Move tape Ba forward K+1 sections
1006Move tape Ba backwards K+1 sections
Organisational Instructions
1007Mount next reel of file Ba
1010Mount
1011Mount free
1012Mount on logical channel K
1013Mount free on logical channel K
1014Write Title
1015Read Title or number
1016Unload
1017Free tape
1020Release tape (pass to another program)
1021Release mechanisms
1022Re-allocate
1023How long?
1024Where am I?
Variable Length Organisation
1030Start reading forwards
1031Start reading backwards
1032Start writing forwards
1033Select tape Ba
1034Start reading forwards from fixed blocks
1035Start reading backwards from fixed blocks
1036ba' = selected magnetic tape
1037s' = mode of magnetic tape Ba
Variable Length Transfers
1040Transfer
1041Skip
1042Mark
1043Stop
1044Word search
1046Read next block on Orion tape
1047Read Previous block on Orion tape
Input
1050Select input n
1051Find Selected input
1052Find peripheral equipment number
1053Test whether binary or internal code
1054Read next character to Ba, Jump to n at end of record
1055ba' = number of blocks read
1056Read ba characters to S
1057Read next record to S
Output
1060Select output n
1061Find Selected output
1062Find peripheral equipment number
1063Delete output n
1064Write character n
1065End this record
1066Write ba characters from S
1067Write a record from S
1070Rename output n as input ba
1071Break output n
1072Define output n
Subroutine entry
1100Enter subroutine at s, ba' = c + 1
1101Enter subroutine at n, ba' = c + 1
1102Enter subroutine at bm, ba' = c + 1
1362Enter subroutine at n, b90' = c + 1
Branching
1103Establish Ba branches
1104Start branch Ba at s
1105Kill Ba ; If Ba = 64 Kill current Branch
1106Halt current Branch if Ba is active
1107Jump to n if Ba is active
Monitor
1112Set Monitor Jump to n
1113Do not restart
1117End program
Miscellaneous transfers
1120ba' = clock
1121ba' = date
1122ba' = local instruction counter
1123Set instruction counter = n * 2048
1136Read instruction counter
1124v6' = n
1125ba' = v6 & n
1126v7' = n (hoot)
1127ba' = v7 & n (read handswitches)
Traps
1131See Character data processing
1132Set trap/normal mode
1133ba' = trap address
1134Trap
1135See Store
1136See Miscellaneous transfers
Compiler and supervisor
1140Read parameter Ba to s
1141Define compiler
1142End compiling
1143Reserve Supervisor tape
1147Call compiler n
1150Assign blocks, labels P to (P + ba - 1), to overflow K
1151Set up blocks from P onwards from overflow K
1155See Store
1156Enter extracode control at n if the "in Supervisor switch" is set§
1157Enter extracode control at n if the "Process switch" is set
Store
1135Jump to n when block > ba defined
1155Find smallest block label defined
1160Read block P
1161Release block P
1162Duplicate read
1163Duplicate write
1164Rename
1165Write Block P
1166Read absolute page
1167Lose block P
1170Clear blocks
1171Store allocation = n blocks
1172ba' = number of pages available
1173ba' = number of blocks available
1174Reserve band n
1175Read K + 1 blocks
1176Write K + 1 blocks
1177Lose band n
Arithmetic and logical extracodes
Accumulator operations are rounded floating-point unless marked X, when they are suitable for fixed-point working
Tests
1200ba'= n if AO set; Clear AO
1201ba'= n if AO clear; Clear AO
1204See Logical accumulator operations
1206ba' = n if most significant character in g = 0
1216ba' = n if bm > 0
1217ba' = n if bm < 0
1223ba' = n if Bc = 1
1226ba' = n if bt > 0
1227ba' = n if bt <; 0
1234c' = c + 2 if am approximately = s
1235c' = c + 2 if am not approximately = s
Approximate equality is defined by
|(am - s) / am| < C(ba) , with am standardised.
If am = 0, am is not approximately = s
1236ba' = n if ax > 0
1237ba' = n if ax < 0
1250 to 1253See Character data processing
1255ba' = n if m is neither zero nor all ones
1256 to 1276See ½" tape operations
1265See Logical accumulator operations
1727c' = c + 1 , c + 2 , c + 3 as am > , = < s
1736c' = c + 2 if |am| > s
1737c' = c + 2 if |am| < s
Character data processing
1131Table search
In 1250 and 1251 S is taken as a character address
1250ba'(digits 18-23) = s, ba' (digits 0-17) = 0
1251s' = ba(digits 18-23)
1252Unpack n characters starting from character address C(ba) to halfwords from C(ba*)
1253Pack n characters starting from half-word address C(ba*), to character address C(ba)
½" tape operations
1256Select density n on selected mechanism
1257Write file mark/Skip to file mark, using selected device
1260Select deck Ba; define record length and mode of transfer n
1261Set Ba to selected device; set b(n) to record length and mode defined
1262Set ba to type of device n
1265See Logical accumulator operations
1267Rewind selected device. Position tape to read first record
1270Write a record of ba characters starting at S to selected device
1274Read a record starting at S/Skip forward one record, using selected device
1275Skip backwards one record on selected device. Ba must be 1 and S negative
1276Set ba to length of previous record read from selected device
B-register operations
1300ba' = integral part of s,
am' = fractional part of s
1301ba' = integral part of am,
am' = fractional part of am
1302ba' = ba * n rounded away from zero
1303ba' = - ba * n rounded away from zero
1304ba' = integral part of (ba / n) ,
b97' = remainder
In 1302-1304 ba and n are 21-bit integers in digits 0-20
1312ba' = ba * n
1313ba' = - ba * n
1314ba' = integral part of (ba / n) ,
b97' = remainder
In 1312-1314 ba and n are 24-bit integers
1340ba' = ba * 2-n; unrounded arithmetic shift right
1341ba' = ba * 2n; unrounded arithmetic shift left
1342ba' = ba circularly shifted right n places
1343ba' = ba circularly shifted left n places
1344ba' = ba logically shifted right n places
1345ba' = ba logically shifted left n places
1347s' = s | ba
1353ba' = position of most significant 1 in bits 16-23 of n (as B123)
1356bt' = ba s
1357bt' = ba n
1362See Subroutine entry
1364ba' = (ba & ¬n) | (bm & n)
b119' = (ba bm) & n
1371b121' = Ba, b119' = N + bm
1376bt' = ba & s
1377bt' = ba & n
Complex arithmetic
The complex accumulator Ca is a pair of consecutive registers, the first first register having address ba. If Ba = 0 Ca is locations 0,1. s: is a number pair. Ca may coincide with S: but not otherwise overlap with it. A is spoiled.
1400ca' = log s:
1402ca' = exp s:
1403ca' = conjugate s:
1407See Miscellaneous B-type accumulator operations
1410ca' = sqrt s:
1411am' = arg s: radians
1412ca' = mod s:
1413ca' = s * cos s* , s * sin s* (s in radians)
1414ca' = 1 / s:
1415See Miscellaneous B-type accumulator operations
1420ca' = ca + s:
1421ca' = ca - s:
1424ca' = s:
1425ca' = -s:
1456s:' = ca
1462ca' = ca * s:
Vector operations
The vectors are of order n. s1 is stored in consecutive locations from ba and s2 from ba*. A is spoiled.
1430s1' = s1 + s2
1431s1' = s1 - s2
1432s1' = am * s2
1433s1' = s1 + am * s2
1434s1' = s2 (forwards or backwards)
1436am' = Σ (0 to n-1) of s1,i * s2,i
1437a' = Σ (0 to n-1) of s1,i * s2,i
Miscellaneous B-type accumulator operations
1407Remainder and adjusted integral quotient
1415Generate pseudo-random number
1441See Arithmetic using the address as an operand
1452m' = m * sx * 8y+sy-bay ; ay' = bay (X)
1456 1462See Complex arithmetic
1466a' = C(N + bm + ba) * C(N + bm) + a
1467am' = Σ(0 to r) sixi where x = am
1473m' = (ax / sx) * 8ay - sy - bay ; ay' = bay (X)
1474C(ba)' = quotient (am / s) ; am' = remainder
1475C(ba)' = quotient (a / s) ; am' = remainder
1476C(ba)' = quotient ([integral part of am] / s) ; am' = remainder
Double-length arithmetic
1500a' = a + s:
1501a' = a - s:
1502a' = -a + s:
1504a' = s:
1505a' = - s:
1520 - 1535See Arithmetic using the address as an operand
1542a' = a * s:
1543a' = -a * s:
1556s:' = a
1562See Arithmetic using the address as an operand
1565a' = -a
1566a' = |a|
1567a' = |s:|
1574 1575See Arithmetic using the address as an operand
1576a' = a / s:
Arithmetic using the address as an operand
The address is taken as a 21-bit integer with one octal fractional place. Fixed-point operations imply an exponent of 12.
1441sx' = ba ; sy' =12
1520am' = am + n
1521am' = am - n
1524am' = n ; l' = 0
1525am' = -n ; l' = 0
1534am' = n ; l' = 0
1535am' = -n ; l' = 0
1562am' = am * n
1574am' = am / n
1575am' = aq / n
Logical accumulator operations
The logical accumulator G is B98 and B99
1204Ba' = number of 6-bit characters from most-significant end identical in g and s
1265g' = 26 * g + n , ba' = 6 bits shifted out of g
1601g' = s
1604g' = g + s
1605g' = g + s with end around carry
1606g' = g s
1607g' = g & s
1611g' = ¬g
1613s' = g
1615am' = g
1624 1626See Half-word packing
1630g' = g & ¬s
1635g' = am
1646g' = g | s
1652bt' = g - s
Half-word packing
s has an 8-bit exponent and a 16-bit mantissa
1624am' = s
1626s'= am with s rounded
Functions and miscellaneous routines
1700am' = log s
1701am' = log aq
1702am' = exp s
1703am' = exp aq
1704am' = integral part of s
1705am' = integral part of am
1706am' = sign s
1707am' = sign am
1710am' = √s
1711am' = √aq
1712am' = √aq2 + s2
1713am' = aqs
1714am' = 1 / s
1715am' = 1 / am
1720am' = arc sin s
1721am' = arc sin aq
1722am' = arc cos s
1723am' = arc cos aq
1724am' = arc tan s
1725am' = arc tan aq
1726am' = arc tan aq / s
1727See Tests
1730am' = sin s
1731am' = sin aq
1732am' = cos s
1733am' = cos aq
1734am' = tan s
1735am' = tan aq
1736 & 1737See Tests
1752m' = ax * 812 ay' = ay - 12
1753ax' = m * 8-12 ay' = ay + 12
1754Round am by adding; standardise
1755ax' = ax * 8ay-ny ay' = ny
1756s' = am ; am' = s
1757am' = s / am
1760am' = am2
1762m' = ax * 812
1763ax' = m * 8-12
1764ax' = ax * 8n
1765ax' = ax * 8-n
1766am' = |s|
1767am' = |am|
1771b121' = Ba, B119 = N + ba + bm
1772m' = (m * sx) * 812; ay' = ay + sy - 12
1773m' = (m / sx) * 8ay - sy - 12; ay' = 12
1774am' = am / s
1775am' = aq / s
1776Remainder