NED@YMIR.BITNET (Ned Freed) (08/06/87)
==Instruction set help file part 3==cut here==cut here==cut here==cut here== double length and added to the result. The result is then stored in prod. .if manual .s 1 .endif manual Notes: The time listed is for all operands equal to one. If all operands are zero the time is [780-3.00]. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*EXTxV instructions\* .restore .send toc .endif global .else manual 2 EXTxV .endif manual .nf Purpose: extract field - moves bit field to integer .if manual .s 1 .endif manual Format: opcode pos.rl,size.rb,base.vb,dst.wl .if manual .s 1 .endif manual Operation: EXTV: dst = if size NEQU 0 then SEXT ( FIELD (pos, size, base)) else 0 EXTZV: dst = if size NEQU 0 then ZEXT ( FIELD (pos, size, base)) else 0 .if manual .s 1 .endif manual C. Codes: N = {dst LSS 0}, Z = {dst EQL 0}, V = 0, C = 0 .if manual .s 1 .endif manual Exceptions: Reserved operand .if manual .s 1 .endif manual Opcodes: EE EXTV Extract field, sign extend .index ^Instructions, machine><EXTV [780-3.01, 750-3.61, 730-12.77] [780F-3.01, 750F-3.61, 730F-13.24] EF EXTZV Extract field, zero extend .index ^Instructions, machine><EXTZV [780-2.66, 750-3.29, 730-12.76] [780F-2.61, 750F-3.29, 730F-12.63] .if manual .s 1 .endif manual Description: For EXTV, dst is replaced by the sign-extended field specified by pos, size and base. For EXTZV, dst is replaced by the zero-extended field specified by pos, size and base. If size is 0 dst is replaced by 0. .if manual .s 1 .endif manual Notes: A reserved operand fault occurs if size GTRU 32 or pos GTRU 31, size NEQU 0 and the field is contained in the registers. On such a fault the condition codes are unpredictable and dst is left unchanged. The times shown assume 10 bits extracted at bit position 4. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*FFx instructions\* .restore .send toc .endif global .else manual 2 FFx .endif manual .nf Purpose: find first - locate first bit in bit field .if manual .s 1 .endif manual Format: opcode startpos.rl,size.rb,base.vb,findpos.wl .if manual .s 1 .endif manual Operation: Find first set or clear bit searching left across field .if manual .s 1 .endif manual C. Codes: N = 0, Z = {bit not found}, V = 0, C = 0 .if manual .s 1 .endif manual Exceptions: Reserved operand .if manual .s 1 .endif manual Opcodes: EB FFC Find first clear [780-3.60] .index ^Instructions, machine><FFC EA FFS Find first set [780-3.40] .index ^Instructions, machine><FFS .if manual .s 1 .endif manual Description: A field specified by the startpos, size and base operands is extracted. The field is tested for a bit in the indicated state starting at bit 0 and extending to the highest bit in the field. If a bit in the desired state is found, the findpos operand is replaced with the bit position and the Z condition bit is cleared. If no bit in the indicated state is found, findpos is replaced by the position relative to base of a bit one to the left of the specified field and the Z condition bit is set. If size = 0, findpos is replaced by startpos and Z is set. .if manual .s 1 .endif manual Notes: If startpos + size GEQU 2**31, findpos may be set to a negative value that would be unusable in a subsequent instruction. The times shown are valid for first bit set (or clear) and no bits set (or clear). .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*HALT instruction\* .restore .send toc .endif global .index ^Instructions, machine><HALT .else manual 2 HALT .endif manual .nf Purpose: stop processor operation .if manual .s 1 .endif manual Format: opcode .if manual .s 1 .endif manual Operation: If PSL_<current__mode_> NEQU kernel then {reserved to Digital opcode fault} else {halt the processor} .if manual .s 1 .endif manual C. Codes: N = 0, Z = 0, V = 0, C = 0 (fault) Unaffected (processor halt) .if manual .s 1 .endif manual Exceptions: Reserved to Digital opcode .if manual .s 1 .endif manual Opcode: 00 HALT Halt .if manual .s 1 .endif manual Description: If process is running in kernel mode, the processor is halted. Otherwise, an opcode reserved to Digital fault occurs. This opcode is 0 to trap many branches to data. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*INCx instructions\* .restore .send toc .endif global .else manual 2 INCx .endif manual .nf Purpose: increment - add 1 to an integer .if manual .s 1 .endif manual Format: opcode sum.mx .if manual .s 1 .endif manual Operation: sum = sum + 1 .if manual .s 1 .endif manual C. Codes: N = {sum LSS 0}, Z = {sum EQL 0}, V = {integer overflow}, C = {carry from MSB} .if manual .s 1 .endif manual Exceptions: Integer overflow .if manual .s 1 .endif manual Opcodes: 96 INCB Increment byte [780-0.40] .index ^Instructions, machine><INCB B6 INCW Increment word [780-0.40] .index ^Instructions, machine><INCW D6 INCL Increment long [780-0.40] .index ^Instructions, machine><INCL .if manual .s 1 .endif manual Description: One is added to the sum operand and the sum operand is replaced by the result. .if manual .s 1 .endif manual Notes: Arithmetic overflow occurs if the largest positive integer is incremented. On overflow, sum is replaced by the largest negative integer. INCx sum is equivalent to ADDx2 _#1,sum, but is shorter. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*INDEX instruction\* .restore .send toc .endif global .index ^Instructions, machine><INDEX .else manual 2 INDEX .endif manual .nf Purpose: index calculation of arrays of fixed length data, bit fields and strings .if manual .s 1 .endif manual Format: opcode subscript.rl,low.rl,high.rl,size.rl,indexin.rl, indexout.rl .if manual .s 1 .endif manual Operation: indexout = {indexin + subscript}*size; if {subscript LSS low} or {subscript GTR high} then {subscript range trap} .if manual .s 1 .endif manual C. Codes: N = {indexout LSS 0}, Z = {indexout EQL 0}, V = 0, C = 0 .if manual .s 1 .endif manual Exceptions: Subscript range .if manual .s 1 .endif manual Opcode: 0A INDEX Index [780-4.60] .if manual .s 1 .endif manual Description: indexin is added to subscript and the sum is multiplied by size. The result is placed in indexout. If subscript is less than low or greater than high a subscript range trap is taken. .if manual .s 1 .endif manual Notes: No arithmetic trap other than subscript range can result from this instruction. In particular integer overflow is not checked. In normal use integer overflow cannot occur without a subscript range trap. The indexin operand is useful for cascading a series of INDEX operations. The time shown assumes size = 0. Various other values are: size = 1 - [780-3.60], size = 2 or 100 - [780-9.20]. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*INSQUE instruction\* .restore .send toc .endif global .else manual 2 INSQUE .endif manual .nf Purpose: add entry to head or tail of queue .if manual .s 1 .endif manual Format: opcode entry.ab,pred.ab .if manual .s 1 .endif manual Operation: if {all memory accesses can be completed} then begin (entry) = (pred); ;forward link (entry+4) = pred; ;backward link ((pred)+4) = entry; ;backward successor (pred) = entry; ;forward predessor end; else begin {backup instruction}; {initiate fault}; end; .if manual .s 1 .endif manual C. Codes: N = {(entry) LSS (entry + 4)}, V = 0, C = {(entry) LSSU (entry + 4)}, Z = {(entry) EQL (entry + 4)} .if manual .s 1 .endif manual Exceptions: None .if manual .s 1 .endif manual Opcode: 0E INSQUE Insert entry in queue [780-6.40] .if manual .s 1 .endif manual Description: The queue entry specified by the operand entry is inserted into the queue following the entry specified by pred. If the entry inserted is the first one in the queue, the Z bit is set; otherwise it is cleared. The insertion is a noninterruptable operation. The entire operation is validated before any portion of it is attempted. The queue will be left in a consistent state if a memory management violation occurs. .if manual .s 1 .endif manual Notes: Processes running in kernel mode may share queues with interrupt service routines. INSQUE can be used by multiple processes in a single processor to access a shared list if entries and removals are confined to the head and tail of the list. The time shown is valid for both empty and nonempty queues. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*INSV instruction\* .restore .send toc .endif global .index ^Instructions, machine><INSV .else manual 2 INSV .endif manual .nf Purpose: insert field - moves integer to bit field .if manual .s 1 .endif manual Format: opcode src.rl,pos.rl,size.rb,base.vb .if manual .s 1 .endif manual Operation: if size NEQU 0 then FIELD (pos, size, base) = src _<{size -1 }_> .if manual .s 1 .endif manual C. Codes: Not affected .if manual .s 1 .endif manual Exceptions: Reserved operand .if manual .s 1 .endif manual Opcode: F0 INSV Insert field [780-3.40] [780-3.51, 750-4.10, 730-14.83] [780F-3.41, 750F-4.10, 730F-14.63] .if manual .s 1 .endif manual Description: The field specified by pos, size and base is replaced by bits {size-1}:0 of src. If size is 0 no action occurs. .if manual .s 1 .endif manual Notes: A reserved operand fault occurs if size GTRU 32 or pos GTRU 31, size NEQU 0 and the field is contained in the registers. On such a fault the condtion codes are unpredictable and the field is left unchanged. The times shown assume all register operands (as is usual for instruction timings). However, if base is changed to a register indexed operand the time is [780-4.00]. All times assume 10 bits extracted starting at bit 4. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*JMP instruction\* .restore .send toc .endif global .index ^Instructions, machine><JMP .else manual 2 JMP .endif manual .nf Purpose: transfer control .if manual .s 1 .endif manual Format: opcode dst.ab .if manual .s 1 .endif manual Operation: PC = dst .if manual .s 1 .endif manual C. Codes: Not affected .if manual .s 1 .endif manual Exceptions: None .if manual .s 1 .endif manual Opcode: 17 JMP Jump [780-1.00] .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*JSB instruction\* .restore .send toc .endif global .index ^Instructions, machine><JSB .else manual 2 JSB .endif manual .nf Purpose: jump to subroutine - transfer control to subroutine .if manual .s 1 .endif manual Format: opcode dst.ab .if manual .s 1 .endif manual Operation: -(SP) = PC; PC = dst .if manual .s 1 .endif manual C. Codes: Not affected .if manual .s 1 .endif manual Exceptions: None .if manual .s 1 .endif manual Opcode: 16 JSB Jump to subroutine [780-1.60] .if manual .s 1 .endif manual Description: PC is pushed onto the stack as a longword and the jump is taken. .if manual .s 1 .endif manual Notes: Since the operand specifier conventions cause the evaluation of dst before saving PC, JSB can be used for coroutine calls with the stack used for linkage. The form of such calls is JSB @(SP)+. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*LDPCTX instruction\* .restore .send toc .endif global .index ^Instructions, machine><LDPCTX .else manual 2 LDPCTX .endif manual .nf Purpose: load processor context - restore register and memory management context .if manual .s 1 .endif manual Format: opcode .if manual .s 1 .endif manual Operation: if PSL_<current-mode_> NEQU 0 then {opcode reserved to Digital fault}; {invalidate per-process translation buffer entries}; {load process general registers from process control block}; {load process map, ASTLVL and PME from PCB}; {save PSL and PC on stack for subsequent REI} .if manual .s 1 .endif manual C. Codes: Not affected .if manual .s 1 .endif manual Exceptions: Reserved operand, privileged instruction .if manual .s 1 .endif manual Opcodes: 06 LDPCTX Load process context .if manual .s 1 .endif manual Description: The process control block is specified by the internal processor register PCBB (process control block base). The general registers are loaded from the PCB, along with the memory management registers describing the address space. The process entries in the translation buffer are cleared. Execution is switched to the kernel stack. The PC and PSL are moved from the PCB to the stack, suitable for use by a REI instruction. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*LOCC instruction\* .restore .send toc .endif global .index ^Instructions, machine><LOCC .else manual 2 LOCC .endif manual .nf Purpose: to locate a character in a string .if manual .s 1 .endif manual Format: opcode char.rb,len.rw,addr.ab .if manual .s 1 .endif manual Operation: {compare each character until equal} .if manual .s 1 .endif manual C. Codes: N = 0, Z = {R0 EQL 0}, Z = 0, C = 0 .if manual .s 1 .endif manual Exceptions: None .if manual .s 1 .endif manual Opcode: 3A LOCC Locate character .if manual .s 1 .endif manual Description: char is compared with the bytes of the string specified by addr and len. Comparison continues until char equals the character in the string or until the string is exhausted. If equality is detected the Z bit is set, otherwise it is cleared. .if manual .s 1 .endif manual Notes: After execution R0 = number of bytes remaining in the string (R0 = 0 only if Z is clear) and R1 = address of the byte which produced equality or the address of one byte beyond the string. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*MATCHC instruction\* .restore .send toc .endif global .index ^Instructions, machine><MATCHC .else manual 2 MATCHC .endif manual .nf Purpose: to find a substring (object) in a character string .if manual .s 1 .endif manual Format: opcode objlen.rw,objaddr.ab,srclen.rw,srcaddr.ab .if manual .s 1 .endif manual Operation: {compare object substring with srcstring until match} .if manual .s 1 .endif manual C. Codes: N = 0, Z = {R0 EQL 0}, Z = 0, C = 0 .if manual .s 1 .endif manual Exceptions: None .if manual .s 1 .endif manual Opcode: 39 MATCHC Match characters .if manual .s 1 .endif manual Description: src as specified by srclen and srcaddr is searched for a substring which matches the object string as specified by objlen and objaddr. If the substring is found the Z bit is set, otherwise it is cleared. The search continues until src is exhausted or until a match is found. .if manual .s 1 .endif manual Notes: After execution R0 = number of bytes in the object string if no match occured, otherwise R0 = 0, R1 = address of one byte beyond the object string if a match occured, otherwise R1 = address of the object string, R2 = number of bytes remaining in src after a match (if no match then R2 = 0), R3 = address of one beyond the last accessed byte in src. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*MCOMx instructions\* .restore .send toc .endif global .else manual 2 MCOMx .endif manual .nf Purpose: move the logical complement of an integer .if manual .s 1 .endif manual Format: opcode src.rx,dst.wx .if manual .s 1 .endif manual Operation: dst = NOT src .if manual .s 1 .endif manual C. Codes: N = {dst LSS 0}, Z = {dst EQL 0}, V = 0, C = C .if manual .s 1 .endif manual Exceptions: None .if manual .s 1 .endif manual Opcodes: 92 MCOMB Move complemented byte [780-0.40] .index ^Instructions, machine><MCOMB B2 MCOMW Move complemented word [780-0.40] .index ^Instructions, machine><MCOMW D2 MCOML Move complemented long [780-0.40] .index ^Instructions, machine><MCOML .if manual .s 1 .endif manual Description: The destination operand is replaced by the ones complement of the source operand. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*MFPR instruction\* .restore .send toc .endif global .index ^Instructions, machine><MFPR .else manual 2 MFPR .endif manual .nf Purpose: move from processor register - access internal privileged registers .if manual .s 1 .endif manual Format: opcode procreg.rl,dst.wl .if manual .s 1 .endif manual Operation: if {PSL_<current-mode_> NEQ 0} then {reserved instruction fault}; dst = PRS[procreg] .if manual .s 1 .endif manual C. Codes: N = {dst LSS 0}, Z = {dst EQL 0}, V = 0, C = C C. Codes not affected if destination is not replaced. .if manual .s 1 .endif manual Exceptions: Reserved operand, privileged instruction .if manual .s 1 .endif manual Opcode: DB MFPR Move from processor register .if manual .s 1 .endif manual Description: The specified register is stored in dst. The first operand procreg is a longword that contains the register number. Execution may have register specific side effects. A reserved operand fault can occur if the register does not exist. A reserved instruction fault will occur if MFPR is executed in other than kernel mode. .if manual .send toc .ifnot global .save .flags bold .hl 2 ^*Processor registers\* .restore .send toc .endif global .else manual 3 Processor_registers .endif manual .nf The following table is a summary of the registers accessible in the privileged register space. Each mnemonic can be used to form a symbol by prefixing it with "PR_$__". The number of a register, once assigned, will not change across implementations of the VAX of within an implementation. All unsigned positive number are reserved to Digital, all negative number are reserved for customers. .s 1 The type column indicates whether the register is read-only, write-only, or may be both read and written. The scope column indicates whether the register is maintained on a per-process basis or a per-CPU basis. The init column indicates whether the register is set to some predefined initial value. The dashes mean initialization is optional. .s 1 .if manual .test page 15 .endif manual Register Name Mnemonic Number Type Scope Init ======== ==== ======== ====== ==== ===== ==== Kernel stack pointer KSP 0 R/W PROC --- Executive stack pointer ESP 1 R/W PROC --- Supervisor stack pointer SSP 2 R/W PROC --- User stack pointer USP 3 R/W PROC --- Interrupt stack pointer ISP 4 R/W CPU --- P0 base register P0BR 8 R/W PROC --- P0 length register P0LR 9 R/W PROC --- P1 base register P1BR 10 R/W PROC --- P1 length register P1LR 11 R/W PROC --- System base register SBR 12 R/W CPU --- System length register SLR 13 R/W CPU --- Process control block base PCBB 16 R/W PROC --- System block base SCBB 17 R/W CPU --- Interrupt level IPL 18 R/W CPU yes AST level ASTLVL 19 R/W PROC yes Software interrupt request SIRR 20 W CPU --- Software interrupt summary SISR 21 R/W CPU yes Interval clock control ICCS 24 R/W CPU yes .if manual .test page 12 .endif manual Next interval count NICR 25 W CPU --- Interval count ICR 26 R CPU --- Time of year TODR 27 R/W CPU no Console receiver C/S RXCS 32 R/W CPU yes Console receiver D/B RXDB 33 R CPU --- Console transmit C/S TXCS 34 R/W CPU yes Console transmit D/B TXDB 35 W CPU --- Memory management enable MAPEN 56 R/W CPU yes Trans. buf. inval. all TBIA 57 W CPU --- Trans. buf. inval. single TBIS 58 W CPU --- Performance monitor enable PMR 61 R/W PROC yes System identification SID 62 R CPU no .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*MNEGx instructions\* .restore .send toc .endif global .else manual 2 MNEGx .endif manual .nf Purpose: move the arithmetic negation of a scalar quantity .if manual .s 1 .endif manual Format: opcode src.rx,dst.wx .if manual .s 1 .endif manual Operation: dst = -scr .if manual .s 1 .endif manual C. Codes: N = {dst LSS 0}, Z = {dst EQL 0}, V = 0 (floating), V = overflow (integer), C = {dst NEQ 0} (integer), C = 0 (floating) .if manual .s 1 .endif manual Exceptions: Integer overflow, reserved operand (floating) .if manual .s 1 .endif manual Opcodes: 8E MNEGB Move negated byte [780-0.40] .index ^Instructions, machine><MNEGB AE MNEGW Move negated word [780-0.40] .index ^Instructions, machine><MNEGW CE MNEGL Move negated long [780-0.40] .index ^Instructions, machine><MNEGL 52 MNEGF Move negated F__floating [780-1.00] .index ^Instructions, machine><MNEGF 72 MNEGD Move negated D__floating [780-2.00] .index ^Instructions, machine><MNEGD 52FD MNEGG Move negated G__floating .index ^Instructions, machine><MNEGG 72FD MNEGH Move negated H__floating .index ^Instructions, machine><MNEGH .if manual .s 1 .endif manual Description: The destination operand is replaced by the negative of the source operand. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*MOVx instructions\* .restore .send toc .endif global .else manual 2 MOVx .endif manual .nf Purpose: move a scalar quantity .if manual .s 1 .endif manual Format: opcode src.rx,dst.wx .if manual .s 1 .endif manual Operation: dst = src .if manual .s 1 .endif manual C. Codes: N = {dst LSS 0}, Z = {dst EQL 0}, V = 0, C = C .if manual .s 1 .endif manual Exceptions: None (integer), reserved operand (floating point) .if manual .s 1 .endif manual Opcodes: 90 MOVB Move byte [780-0.40] .index ^Instructions, machine><MOVB B0 MOVW Move word [780-0.40] .index ^Instructions, machine><MOVW D0 MOVL Move long .index ^Instructions, machine><MOVL [780-0.40, 750-0.93, 730-1.71] [780F-0.40, 750F-0.93, 730F-1.69] 7D MOVQ Move quad [780-1.40] .index ^Instructions, machine><MOVQ 7DFD MOVO Move octa .index ^Instructions, machine><MOVO 50 MOVF Move F__floating [780-1.00] .index ^Instructions, machine><MOVF 70 MOVD Move D__floating [780-2.00] .index ^Instructions, machine><MOVD 50FD MOVG Move G__floating .index ^Instructions, machine><MOVG 70FD MOVH Move H__floating .index ^Instructions, machine><MOVH .if manual .s 1 .endif manual Description: The destination operand is replaced by the source operand. The source operand is not affected. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*MOVAx instructions\* .restore .send toc .endif global .else manual 2 MOVAx .endif manual .nf Purpose: move address - calculate address of quantity .if manual .s 1 .endif manual Format: opcode src.ax,dst.wl .if manual .s 1 .endif manual Operation: dst = src .if manual .s 1 .endif manual C. Codes: N = {dst LSS 0}, Z = {dst EQL 0}, V = 0, C = 0 .if manual .s 1 .endif manual Exceptions: None .if manual .s 1 .endif manual Opcodes: 9E MOVAB Move address of byte [780-0.80] .index ^Instructions, machine><MOVAB 3E MOVAW Move address of word [780-0.80] .index ^Instructions, machine><MOVAW DE MOVAL Move address of long [780-0.80] .index ^Instructions, machine><MOVAL 7E MOVAQ Move address of quad [780-0.80] .index ^Instructions, machine><MOVAQ 7EFD MOVAO Move address of octa .index ^Instructions, machine><MOVAO DE MOVAF Move address of F__floating [780-0.80] .index ^Instructions, machine><MOVAF 7E MOVAD Move address of D__floating [780-0.80] .index ^Instructions, machine><MOVAD 7E MOVAG Move address of G__floating [780-0.80] .index ^Instructions, machine><MOVAG 7EFD MOVAH Move address of H__floating .index ^Instructions, machine><MOVAH .if manual .s 1 .endif manual Description: dst is replaced by the address of src. The context in which src is evaluated is given by the data type of the instruction. The operand at the address of src is not referenced. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*MOVCx instructions\* .restore .send toc .endif global .else manual 2 MOVCx .endif manual .nf Purpose: move character string or block of memory .if manual .s 1 .endif manual Format: opcode len.rw,srcaddr.ab,dstaddr.ab ;3 operand opcode srclen.rw,srcaddr.ab,fill.rb, ;5 operand dstlen.rw,dstaddr.ab .if manual .s 1 .endif manual Operation: {dst string} = {src string} .if manual .s 1 .endif manual Exceptions: None .if manual .s 1 .endif manual Opcodes: 28 MOVC3 Move character 3 operand .index ^Instructions, machine><MOVC3 2C MOVC5 Move character 5 operand .index ^Instructions, machine><MOVC5 [780-111.42, 750-142.40, 730-151.12] [780F-111.42, 750F-142.40, 730F-160.36] .if manual .s 1 .endif manual Description: dst as specified by dstaddr and len (3 operand) or dstlen (5 operand) is replaced by src as specified by srcaddr and len (3 operand) or srclen (5 operand). If dst is longer than src (5 operand only), the highest addresses of dst that are not filled by src are instead filled with fill. If dst is shorter than src, the copied string is truncated to fit in src. The operation of the instruction is such that any overlap of src and dst will not affect the result. .if manual .s 1 .endif manual Notes: After execution R2 = R4 = R5 = 0, R0 = number of unmoved bytes in src (always 0 for 3 operand), R1 = address of one byte beyond the last byte in src that was moved and R3 = address of one byte beyond the end of dst. MOVC3 is the preferred way to copy a block of memory. MOVC5 with srclen = 0 is the preferred way to fill a block of memory with fill. The times shown assume a 0 length src string (fill operation) and a move of 512 bytes. For src and dst lengths of 4 the times are MOVC3 - [780-6.00], MOVC5 - [780-8.20]. For a length of 64 the times are MOVC3 - [780-27.0], MOVC5 - [780-29.60]. More times for MOVC5 with a 0 length src are with dstlen = 4 - [780-9.20], dstlen = 64 - [780-30.40]. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*MOVP instruction\* .restore .send toc .endif global .index ^Instructions, machine><MOVP .else manual 2 MOVP .endif manual .nf Purpose: moved a packed decimal string from one memory location to another .if manual .s 1 .endif manual Format: opcode len.rw,srcaddr.ab,dstaddr.ab .if manual .s 1 .endif manual Operation: ({dstaddr + ZEXT (len/2)} : dstaddr) = ({srcaddr + ZEXT (len/2)} : srcaddr) .if manual .s 1 .endif manual C. Codes: N = {{dst string} LSS 0}, V = 0, Z = {{dst string} EQL 0}, C = C .if manual .s 1 .endif manual Exceptions: Reserved operand .if manual .s 1 .endif manual Opcodes: 34 MOVP Move packed [780-8.04, 750-17.44, 730-39.55] [780F-8.04, 750F-17.44, 730F-38.97] .if manual .s 1 .endif manual Description: The string dst specified by dstaddr and len is replaced by the string src specified by srcaddr and len. .if manual .s 1 .endif manual Notes: After execution R0 = R2 = 0, R1 = address of the most significant digit of src, R3 = address of the most significant digit of dst. dst and R0-R3 are unpredicatable if src overlaps dst, src contains an invalid nibble, or a reserved operand fault occurs. If src is -0, dst is set to +0, N is cleared and Z is set. The times shown above assume that 7 digits are moved; for 18 digits the times are: [780-19.31, 750-38.21, 730-40.05] [780F-19.31, 750F-38.21, 730F-39.46] .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*MOVPSL instruction\* .restore .send toc .endif global .index ^Instructions, machine><MOVPSL .else manual 2 MOVPSL .endif manual .nf Purpose: Obtain processor status .if manual .s 1 .endif manual Format: opcode dst.wl .if manual .s 1 .endif manual Operation: dst = PSL .if manual .s 1 .endif manual C. Codes: Not affected .if manual .s 1 .endif manual Exceptions: None .if manual .s 1 .endif manual Opcode: DC MOVPSL Move from PSL [780-0.80] .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*MOVTC instruction\* .restore .send toc .endif global .index ^Instructions, machine><MOVTC .else manual 2 MOVTC .endif manual .nf Purpose: to move and translate a character string .if manual .s 1 .endif manual Format: opcode srclen.rw,srcaddr.ab,fill.rb,tbladdr.ab, dstlen.rw,dstaddr.ab .if manual .s 1 .endif manual C. Codes: N = {srclen LSS dstlen}, Z = {srclen EQL dstlen}, V = 0, C = {srclen LSSU dstlen} .if manual .s 1 .endif manual Exceptions: None .if manual .s 1 .endif manual Opcode: 2E MOVTC Move translated characters [780-113.80] .if manual .s 1 .endif manual Description: The source operand string specified by srclen and srcaddr is translated and replaces the destination string as specified by dstlen and dstaddr. Translation is done by using each byte of src as an index into tbl (a 256 byte array). The selected byte is placed in dst. If the dst is longer than src, dst is filled using fill. If dst is shorter than src, the highest bytes of src are not moved. dst and src may overlap with no ill effects -- but if dst overlaps tbl the result is unpredictable. .if manual .s 1 .endif manual Notes: After execution: R0 = _# of untranslated bytes in src, R1 = address of one byte beyond last translated byte in src, R2 = 0, R3 = tbladdr, R4 = 0, R5 = the address one byte beyond dst. The time shown is for a srclen and dstlen of 64. If the lengths are 4, the time is [780-8.20]. If the lengths are 512, the time is [780-834.60]. If srclen is 0, the times are: dstlen = 4 - [780-17.60], dstlen = 64 - [780-106.20], dstlen = 512 - [780-764.80]. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*MOVTUC instruction\* .restore .send toc .endif global .index ^Instructions, machine><MOVTUC .else manual 2 MOVTUC .endif manual .nf Purpose: to move and translate a character string, handling escape codes (until character) .if manual .s 1 .endif manual Format: opcode srclen.rw,srcaddr.ab,esc.rb,tbladdr.ab, dstlen.rw,dstaddr.ab .if manual .s 1 .endif manual C. Codes: N = {srclen LSS dstlen}, Z = {srclen EQL dstlen}, V = {terminated by escape}, C = {srclen LSSU dstlen} .if manual .s 1 .endif manual Exceptions: None .if manual .s 1 .endif manual Opcode: 2F MOVTUC Move translated until character [780-126.60] .if manual .s 1 .endif manual Description: The source operand string specified by srclen and srcaddr is translated and replaces the destination string as specified by dstlen and dstaddr. Translation is done by using each byte of src as an index into tbl (256 byte array). The selected byte is placed in dst. Translation continues until a translated byte equals esc or either string is exhausted. If translation is terminated by esc, the condtion code V-bit is set. If dst overlaps src or tbl, dst and the registers are unpredictable. .if manual .s 1 .endif manual Notes: After execution: R0 = _# of untranslated bytes in src, R1 = address of one byte beyond last translated byte in src, R2 = 0, R3 = tbladdr, R4 = _# of bytes remaining in dst, R5 = one past address of last translated byte in dst. The time shown is for a string length of 64. If the lengths are 4 the time is [780-17.20]. If the lengths are 512 the time is [780-937.40]. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*MOVZxx instructions\* .restore .send toc .endif global .else manual 2 MOVZxx .endif manual .nf Purpose: convert an unsigned integer to a wider unsigned integer (move zeroed) .if manual .s 1 .endif manual Format: opcode src.rx,dst.wy .if manual .s 1 .endif manual Operation: dst = ZEXT (src) .if manual .s 1 .endif manual C. Codes: N = 0, Z = {dst EQL 0}, V = 0, C = C .if manual .s 1 .endif manual Exceptions: None .if manual .s 1 .endif manual Opcodes: 9B MOVZBW Move zero-extended byte to word .index ^Instructions, machine><MOVZBW [780-0.80] 9A MOVZBL Move zero-extended byte to long .index ^Instructions, machine><MOVZBL [780-0.80] 3C MOVZWL Move zero-extended word to long .index ^Instructions, machine><MOVZWL [780-0.80] .if manual .s 1 .endif manual Description: For MOVZBW, bits 7:0 of dst are replaced by src, bits 15:8 are zeroed. For MOVZBL, bits 7:0 of dst are replaced by src, bits 31:8 are zeroed. For MOVZWL, bits 15:0 of dst are replaced by src, bits 31:16 are zeroed. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*MTPR instruction\* .restore .send toc .endif global .index ^Instructions, machine><MTPR .else manual 2 MTPR .endif manual .nf Purpose: move to processor register - change internal privileged registers .if manual .s 1 .endif manual Format: opcode src.rl,procreg.rl .if manual .s 1 .endif manual Operation: if {PSL_<current-mode_> NEQ 0} then {reserved instruction fault}; PRS[procreg] = src .if manual .s 1 .endif manual C. Codes: N = {dst LSS 0}, Z = {dst EQL 0}, V = 0, C = C C. Codes not affected if register is not replaced. .if manual .s 1 .endif manual Exceptions: Reserved operand, privileged instruction .if manual .s 1 .endif manual Opcode: DA MTPR Move to processor register .if manual .s 1 .endif manual Description: The specified register is loaded. The second operand procreg is a longword that contains the register number. Execution may have register-specific side effects. A reserved operand fault can occur if the register does not exist. A reserved instruction fault will occur if the instruction is executed in other than kernel mode. See the instruction MFPR for a list of processor registers. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*MULxx instructions\* .restore .send toc .endif global .else manual 2 MULxx .endif manual .nf Purpose: perform arithmetic multiplication .if manual .s 1 .endif manual Format: opcode mulr.rx,prod.mx ;2 operand opcode mulr.rx,muld.rx,prod.wx ;3 operand .if manual .s 1 .endif manual Operation: prod = prod * mulr ;2 operand prod = muld * mulr ;3 operand .if manual .s 1 .endif manual C. Codes: N = {prod LSS 0}, Z = {prod EQL 0}, V = {overflow}, C = 0 .if manual .s 1 .endif manual Exceptions: Integer, floating overflow Floating underflow, reserved operand .if manual .s 1 .endif manual Opcodes: 84 MULB2 Multiply byte 2 operand [780-4.00] .index ^Instructions, machine><MULB2 85 MULB3 Multiply byte 3 operand [780-4.00] .index ^Instructions, machine><MULB3 A4 MULW2 Multiply word 2 operand [780-4.80] .index ^Instructions, machine><MULW2 A5 MULW3 Multiply word 3 operand [780-4.80] .index ^Instructions, machine><MULW3 C4 MULL2 Multiply long 2 operand .index ^Instructions, machine><MULL2 [780-6.43, 750-8.35, 730-17.33] [780F-1.85, 750F-5.68, 730F-12.05] C5 MULL3 Multiply long 3 operand [780-6.40] .index ^Instructions, machine><MULL3 44 MULF2 Multiply F__floating 2 operand .index ^Instructions, machine><MULF2 [780-5.63, 750-12.62, 730-36.34] [780F-1.20, 750F-2.29, 730F-9.66] 45 MULF3 Multiply F__floating 3 operand .index ^Instructions, machine><MULF3 [780-5.89] 64 MULD2 Multiply D__floating 2 operand .index ^Instructions, machine><MULD2 [780-27.74, 750-39.05, 730-89.47] [780F-3.41, 750F-4.75, 730F-19.11] 65 MULD3 Multiply D__floating 3 operand .index ^Instructions, machine><MULD3 44FD MULG2 Multiply G__floating 2 operand .index ^Instructions, machine><MULG2 [780-29.57, 750-50.64, 730-92.39] [780F-29.56, 750F-50.64, 730F-22.41] 45FD MULG3 Multiply G__floating 3 operand .index ^Instructions, machine><MULG3 64FD MULH2 Multiply H__floating 2 operand .index ^Instructions, machine><MULH2 [780-85.21, 750-155.54, 730-286.06] [780F-85.21, 750F-155.54, 730F-86.24] ==End of part 3=============================================================