This the multi-page printable view of this section.Click here to print.

Return to the regular view of this page.

STZ

Store Zero to Memory

Table of Contents

Stores zero to memory.

On all processors, the data written to memory is 8-bit. However, for 16-bit processors with the m flag is clear then the data written is 16-bit with the low-order 8-bits at the effective address and the high-order 8-bits at the effective address plus one.

Flags Affected
None.
Instructions
SyntaxOpcode Available on: # of # of Addressing Mode
(hex) 6502 65C02 65816 bytes cycles
STZ addr9C x x 3 41 Absolute
STZ dp64 x x 2 31, 2 Direct Page
STZ addr,X9E x x 3 51 Absolute Indexed X
STZ dp,X74 x x 2 41, 2 Direct Page Indexed X

Notes:

  1. 65816: Add 1 cycle if m=0 (16-bit memory/accumulator)
  2. 65816: Add 1 cycle if low byte of Direct Page register is not 0