#[repr(u8)]pub enum Opcode {
Show 50 variants
Opr = 4,
Jmp = 5,
Jpx = 6,
Jnx = 7,
Aux = 8,
Rsx = 9,
Skx = 10,
Exx = 12,
Adx = 13,
Dpx = 14,
Skm = 15,
Lde = 16,
Spf = 17,
Spg = 18,
Lda = 20,
Ldb = 21,
Ldc = 22,
Ldd = 23,
Ste = 24,
Flf = 25,
Flg = 26,
Sta = 28,
Stb = 29,
Stc = 30,
Std = 31,
Ite = 32,
Ita = 33,
Una = 34,
Sed = 35,
Jov = 37,
Jpa = 38,
Jna = 39,
Exa = 44,
Ins = 45,
Com = 46,
Tsd = 47,
Cya = 48,
Cyb = 49,
Cab = 50,
Noa = 52,
Dsa = 53,
Nab = 54,
Add = 55,
Sca = 56,
Scb = 57,
Sab = 58,
Tly = 60,
Div = 61,
Mul = 62,
Sub = 63,
}
Expand description
Opcode
enumerates all the valid TX-2 opcodes. These values are
taken from the User Handbook. Volume 3 of the Technical Manual
(page 1-5-3) describes opcodes 00, 01, 02, 03, 04 (mentioning bit
2.8 of N being in state 1), 13, 23, 33, 45, 50, 51, 52, 53, 63, 73
as being undefined.
Different copies of the User Handbook differ in the description of opcodes 0o44 and 0o45.
Variants§
Opr = 4
Opcode 04 (which is sometimes known as OPR) is used to encode two kinds of instructions, IOS and AOP.
IOS is the I/O select instruction and is described in the TX-2 Users Handbook, section 4-3.5.
Bits 2.7 and 2.8 of the instruction work determine whether an OPR instruction is IOS or AOP (or invalid).
AOP is (apparently, documentation is a bit thin) the Arithmetic Operation instruction. This operates only on the Arithmetic unit (that is, it makes no memory reference).
See Technical Manual Vol 2 section 10-2.5.3 (AOP instructions), Technical Manual Vol 3 section 16-5.1 (OPR (04) AOP, see physical PDF page number 45). Section 16-5.1 claims that AOP is described in detail in chapter 4 of the Technical Manual.
Jmp = 5
Jpx = 6
Jnx = 7
Aux = 8
Rsx = 9
Skx = 10
Exx = 12
Adx = 13
Dpx = 14
Skm = 15
Lde = 16
Spf = 17
Spg = 18
Lda = 20
Ldb = 21
Ldc = 22
Ldd = 23
Ste = 24
Flf = 25
Flg = 26
Sta = 28
Stb = 29
Stc = 30
Std = 31
Ite = 32
Ita = 33
Una = 34
Sed = 35
Jov = 37
I have two copies of the User Handbook and they differ in their description of opcodes 0o44, 0o45.
In the August 1963 copy, 0o44 is missing and 0045 is JOV.
In the index of the October 1961 copy, 0o44 is JOV and 0o45 is JZA (handwritten). However, in this copy, page 3-32 (which describes JPA, JNA, JOV) gives JOV as 0o45. So I assume this is just an error in the index. This copy does not otherwise describe a JZA opcode.
Jpa = 38
Jna = 39
Exa = 44
Ins = 45
Com = 46
Tsd = 47
Cya = 48
Cyb = 49
Cab = 50
Noa = 52
Dsa = 53
Nab = 54
Add = 55
Sca = 56
Scb = 57
Sab = 58
Tly = 60
Div = 61
Mul = 62
Sub = 63
Implementations§
Trait Implementations§
Source§impl Display for Opcode
Convert an opcode to its text representation.
impl Display for Opcode
Convert an opcode to its text representation.
The primary (i.e. not supernumerary) opcode mnemonic is used,
because the configuration value which would identify a
supernumerary opcode is not passed to the fmt
method of the
Display
trait.
impl Copy for Opcode
impl Eq for Opcode
impl StructuralPartialEq for Opcode
Auto Trait Implementations§
impl Freeze for Opcode
impl RefUnwindSafe for Opcode
impl Send for Opcode
impl Sync for Opcode
impl Unpin for Opcode
impl UnwindSafe for Opcode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.