Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!ames!sdcsvax!ucbvax!YMIR.BITNET!NED From: NED@YMIR.BITNET (Ned Freed) Newsgroups: comp.os.vms Subject: Instruction set help file part 1 of 4 Message-ID: <8708100247.AA23858@ucbvax.Berkeley.EDU> Date: Thu, 6-Aug-87 00:39:00 EDT Article-I.D.: ucbvax.8708100247.AA23858 Posted: Thu Aug 6 00:39:00 1987 Date-Received: Mon, 10-Aug-87 03:51:53 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 1402 ==Instruction set help file part 1==cut here==cut here==cut here==cut here== .!INSTR.RNO - Concise description of the VAX instruction set .! .! RUNOFF operation instructions: .! This file can either produce a printed document or an entry .! for VMS online HELP. Use the command .! .! $ RUNOFF/NOBOLD/NOUNDER/OUT=INSTR.HLP INSTR.RNO .! .! to create the online help entry. INSTR.HLP can be inserted .! into any VMS help library. Use the command .! .! $ RUNOFF/OUT=INSTR.MEM/VAR=MANUAL INSTR.RNO .! .! To create a document for printing. .! .if manual .! .! We set the layout so that running page numbers are on the bottom .! .lo 1,2 .st .! .! Initial right margin - sections should never set it higher than this. .! Set page size too. .ps 60,70 .rm 70 .! .! Header level setup .sthl 6,0,0,8,9,1,1,9,2 .dhl D,D,lu,d,ll,ll .! .! .c; .sk 2 .c;THE VAX INSTRUCTION SET .title VAX INSTRUCTION SET .sk 2 .c;Ned Freed, 18-Jan-1985 .c;MATHLIB Project .c;Harvey Mudd College .sk 3 .else manual .NO NUMBER .NO PAGING .STHL 5,1,1 .endif manual .! .ifnot manual 1 Instruction .br This help file describes the formats and types of available VAX-11 machine instructions. To use this help facility, just specify the specific instruction to be described as a subtopic. .s 1 These descriptions are adapted from the VAX-11 Architecture Handbook, with the addition of some extra tables. All instruction timing measurements were done either by Oregon Software or by Digital. .else manual .save .flags bold .hl 1 ^*Overview\* .restore This document describes the instruction set of the VAX-11 computer. These descriptions are useful both to the assembly language programmer and to the high-level language programmer who wishes to examine the machine code produced for his or her program. All the VAX/VMS compilers will optionally list the generated machine instructions. .s 1 These descriptions are adapted from the ^&VAX-11 Architecture Handbook\&. This document is more concise and is better organized (alphabetically by instruction) than the original handbook. In addition some new tables are included. .endif manual .s 1 At the present time the instructions EDITPC, INSQHI [780-12.80], .index ^Instructions, machine>^Operand>^Source mode S_^_#literal . . .[0.00] (Rn) . . . . . .[0.40] -(Rn) . . . . .[0.40] (Rn)+ . . . . .[0.40] @(Rn)+ . . . . .[1.00] B_^D(Rn) . . . .[0.40] W_^D(Rn) . . . .[0.40] L_^D(Rn) . . . .[0.80] @B_^D(Rn) . . . .[1.00] @W_^D(Rn) . . . .[1.00] @L_^D(Rn) . . . .[1.40] _#literal . . . .[0.80] @_#address . . .[0.80] (Rn)[Rn] . . . .[1.00] -(Rn)[Rn] . . .[1.00] (Rn)+[Rn] . . .[1.00] @(Rn)+[Rn] . . .[1.40] B_^D(Rn)[Rn] . .[1.00] W_^D(Rn)[Rn] . .[1.00] L_^D(Rn)[Rn] . .[0.80] @B_^D(Rn)[Rn] . .[1.40] @W_^D(Rn)[Rn] . .[1.40] @L_^D(Rn)[Rn] . .[1.40] @_#address[Rn] .[1.00] .s 1 .test page 11 Destination mode times for a 780 with or without FPA: .s 1 .index ^Instructions, machine>^Operand>^Destination mode (Rn) . . . . . .[0.40] -(Rn) . . . . .[0.40] (Rn)+ . . . . .[0.60] @(Rn)+ . . . . .[1.00] B_^D(Rn) . . . .[0.40] W_^D(Rn) . . . .[0.60] L_^D(Rn) . . . .[0.60] @B_^D(Rn) . . . .[1.00] @W_^D(Rn) . . . .[1.20] @L_^D(Rn) . . . .[1.20] @_#address . . .[0.60] (Rn)[Rn] . . . .[1.00] -(Rn)[Rn] . . .[1.00] (Rn)+[Rn] . . .[1.00] @(Rn)+[Rn] . . .[1.40] B_^D(Rn)[Rn] . .[1.00] W_^D(Rn)[Rn] . .[1.00] L_^D(Rn)[Rn] . .[0.60] @B_^D(Rn)[Rn] . .[1.40] @W_^D(Rn)[Rn] . .[1.40] @L_^D(Rn)[Rn] . .[1.40] @_#address[Rn] .[1.00] .s 1 .test page 6 Source mode times for a 750 with or without FPA: .s 1 .index ^Instructions, machine>^Operand>^Source mode (Rn) . . . . . .[0.20] B_^D(Rn) . . . .[0.40] B_^W(Rn) . . . .[0.70] (RN)[Rn] . . . .[0.90] .s 1 .test page 6 Destination mode times for a 750 with or without FPA: .s 1 .index ^Instructions, machine>^Operand>^Destination mode (Rn) . . . . . .[0.70] .s 1 .test page 6 Source mode times for a 730 with or without FPA: .s 1 .index ^Instructions, machine>^Operand>^Source mode (Rn) . . . . . .[0.70] B_^D(Rn) . . . .[1.20] B_^W(Rn) . . . .[3.00] (RN)[Rn] . . . .[2.63] .s 1 .test page 6 Destination mode times for a 730 with or without FPA: .s 1 .index ^Instructions, machine>^Operand>^Destination mode (Rn) . . . . . .[1.70] .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*ACB instructions\* .restore .send toc .endif global .index ^Instructions, machine>* (10**(-cnt-1))}} * (10**cnt); .if manual .s 1 .endif manual C. Codes: N = {{dst string} LSS 0}, Z = {{dst string} EQL 0}, V = {decimal overflow}, C = 0 .if manual .s 1 .endif manual Exceptions: Reserved operand, decimal overflow .if manual .s 1 .endif manual Opcodes: F8 ASHP Arithmetic shift packed .if manual .s 1 .endif manual Description: src as specified by srclen and srcaddr is scaled by a power of 10 specified by cnt. dst is replaced by the result. A positive cnt effectively multiplies, a negative cnt effectively divides and a zero cnt just moves src to dst while affecting the condition codes. If cnt is negative the result is rounded using round. .if manual .s 1 .endif manual Notes: After execution R0 = 0, R1 = address of the byte of the most significant digit of src, R2 = 0, R3 = address of the most significant digit of dst. All condition codes and R0-R3 are unpredictable if src overlaps dst, src contains an invalid nibble, or a reserved operand exception occurs. When cnt is negative the result is rounded by adding bits 3:0 of round to the most significant low order digit discarded and propogating any carry through to higher order digits of dst. If bits 7:4 of round are nonzero or if 3:0 contain an illegal packed decimal digit the result is unpredictable. round should normally be 5, or 0 if truncation is desired. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*Bxxx instructions\* .restore .send toc .endif global .else manual 2 Bxxx .endif manual .nf Purpose: branch - test condition code(s) .if manual .s 1 .endif manual Format: opcode displ.bb .if manual .s 1 .endif manual Operation: if {condition} then PC = {PC + SEXT (displ)} .if manual .s 1 .endif manual C. Codes: Not affected .if manual .s 1 .endif manual Exceptions: None .if manual .s 1 .endif manual Opcodes: 12 {Z EQL 0} BNEQ Branch not equal (s) .index ^Instructions, machine>}; Z = Z AND {NOT mask_<2_>} V = V AND {NOT mask_<1_>}; C = C AND {NOT mask_<0_>} .if manual .s 1 .endif manual Exceptions: Reserved operand .if manual .s 1 .endif manual Opcode: B8 BICPSW Bit clear PSW [780-1.00] .if manual .s 1 .endif manual Description: The PSW is ANDed with the complement of mask and PSW is replaced by the result. .if manual .s 1 .endif manual Notes: A reserved operand fault occurs if mask_<15:8_> is not zero. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*BISxx instructions\* .restore .send toc .endif global .else manual 2 BISxx .endif manual .nf Purpose: bit set - perform logical inclusive OR of two integers .if manual .s 1 .endif manual Format: opcode mask.rx,dst.mx ;2 operand opcode mask.rx,src.rx,dst.rx ;3 operand .if manual .s 1 .endif manual Operation: dst = dst OR mask ;2 operand dst = src OR mask ;3 operand .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: 88 BISB2 Bit set byte, 2 operand [780-0.40] .index ^Instructions, machine>; Z = Z OR mask_<2_> V = V OR mask_<1_>; C = C OR mask_<0_> .if manual .s 1 .endif manual Exceptions: Reserved operand .if manual .s 1 .endif manual Opcode: B8 BISPSW Bit set PSW [780-1.00] .if manual .s 1 .endif manual Description: The PSW is ORed with mask and PSW is replaced by the result. .if manual .s 1 .endif manual Notes: A reserved operand fault occurs if mask_<15:8_> is not zero. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*BITx instructions\* .restore .send toc .endif global .else manual 2 BITx .endif manual .nf Purpose: test a set of bits for all zero .if manual .s 1 .endif manual Format: opcode mask.rx,src.rx .if manual .s 1 .endif manual Operation: tmp = {src AND mask} .if manual .s 1 .endif manual C. Codes: N = {tmp LSS 0}, Z = {tmp EQL 0}, V = 0, C = C .if manual .s 1 .endif manual Exceptions: None .if manual .s 1 .endif manual Opcodes: 93 BITB Bit test byte [780-0.40] .index ^Instructions, machine> EQL teststate then PC = {PC + SEXT (displ)} .if manual .s 1 .endif manual C. Codes: Not affected .if manual .s 1 .endif manual Exceptions: None .if manual .s 1 .endif manual Opcodes: E8 BLBS Branch on low bit set [780-1.00] .index ^Instructions, machine> = 0; {breakpoint fault} .if manual .s 1 .endif manual C. Codes: N = 0, Z = 0, V = 0, C = 0 .if manual .s 1 .endif manual Exceptions: None .if manual .s 1 .endif manual Opcode: 03 BPT Breakpoint fault .if manual .s 1 .endif manual Description: This instruction is used, together with the T-bit, to implement debugging facilities. .if manual .test page 10 .send toc .ifnot global .save .flags bold .hl 1 ^*BR instructions\* .restore .send toc .endif global .index ^Instructions, machine>