CLR

VAX11

 

CLR     CLEAR

 

Purpose

clear a scalar quantity

Format

opcode dst.wx

Operation

dst ß 0;

Condition codes

N ß 0:

Z ß 1;

V ß 0;

C ß C;

Exceptions

None

Opcodes

94        CLRB  Clear Byte

B4        CLRW Clear Word

D4       CLRL  Clear Long

D4       CLRF  Clear Floating

7C       CLRQ  Clear Quad

7C       CLRD  Clear Double

Description

The destination operand is replaced by 0.

Notes

CLRx dst is equivalent to MOVx 0,dst, but is shorter.

 

 

Example 1:

 

The following program's output is "56780000 0".

 

.text

main: .word 0

movl $0x12345678, r0

movl $0x56781234, r1

clrl r0

clrw r1

pushl r0

pushl r1

pushal format

calls $3, .printf

halt

.data

format: .asciz "%lX %lX\n"