Difference between revisions of "FF7/Field/Script/Opcodes/80 SETBYTE"

From Final Fantasy Inside
< FF7‎ | Field‎ | Script‎ | Opcodes
Jump to navigation Jump to search
my_wiki>Synergy Blades
 
my_wiki>Lasyan3@hotmail.com
m (Description)
Line 18: Line 18:
  
 
==== Description ====
 
==== Description ====
Writes the byte value from the source address, or the value argument itself, into the destination 8-bit bank. If the source bank '''S''' is zero, the value given by '''V''' is written directly into the destination address; otherwise, the value is retrieved from the source bank/address '''S'''/'''V''', and then written to the destination bank/address '''D'''/'''A'''.
+
Writes the byte value from the source address, or the value argument itself, into the destination 8-bit bank. If the source bank '''S''' is zero, the value given by '''V''' is written directly into the destination address; otherwise, the value is retrieved from the source bank/address '''S'''/'''V''', and then written to the destination bank/address '''D'''/'''A'''. If the destination is a 16-bit bank, the high byte of the destination will remain unchanged.

Revision as of 12:55, 12 June 2011

  • Opcode: 0x80
  • Short name: SETBYTE
  • Long name: Byte Set

Memory layout

0x80 D / S A V

Arguments

  • const Bit[4] D: Destination bank.
  • const Bit[4] S: Source bank.
  • const UByte A: Destination address.
  • const UByte V: Value to be written/Source address.

Description

Writes the byte value from the source address, or the value argument itself, into the destination 8-bit bank. If the source bank S is zero, the value given by V is written directly into the destination address; otherwise, the value is retrieved from the source bank/address S/V, and then written to the destination bank/address D/A. If the destination is a 16-bit bank, the high byte of the destination will remain unchanged.