MOVZ

VAX11

 

MOVZ   MOVE ZERO-EXTENDED

 

Purpose

convert an unsigned integer to a wider unsigned integer

Format

opcode src.rx, dst.wy

Operation

dst ß ZEXT (src);

Condition codes

N ß 0;

Z ß dst EQL 0;

V ß 0;

C ß C;

Exceptions

None

Opcodes

9B        MOVZBW      Move Zero-Extended Byte to Word

9A       MOVZBL        Move Zero-Extended Byte to Long

3C       MOVZWL       Move Zero-Extended Word to Long

Description

For MOVZBW, bits 7:0 of the destination operand are replaced by the source operand; bits 15:8 are replaced by zero. For MOVZBL, bits 7:0 of the destination operand are replaced by the source operand; bits 31:8 are replaced by 0. For MOVZWL, bits 15:0 of the destination operand are replaced by the source operand; bits 31:16 are replaced by 0.

 

 

Example 1

 

.text

main: .word 0

      movb $255, r0

      movzbl r0, r1

      pushl r1

      pushal format

      calls $2, .printf

      pushl $0

      calls $1, .exit

 

.data

format: .asciz "R1 is %d"