Difference between revisions of "FF7/Field/Script/Opcodes/97 DEC"

From Final Fantasy Inside
< FF7‎ | Field‎ | Script‎ | Opcodes
Jump to navigation Jump to search
my_wiki>Synergy Blades
 
m (3 revisions imported)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
* Opcode: '''0x95'''
+
* Opcode: '''0x97'''
 
* Short name: '''DEC'''
 
* Short name: '''DEC'''
 
* Long name: Decrement (8-bit)
 
* Long name: Decrement (8-bit)
Line 5: Line 5:
 
==== Memory layout ====
 
==== Memory layout ====
 
{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse;"
 
{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse;"
! width="40" | 0x95
+
! width="40" | 0x97
 
! width="40" | ''B''
 
! width="40" | ''B''
 
! width="40" | ''A''
 
! width="40" | ''A''

Latest revision as of 05:18, 23 May 2019

  • Opcode: 0x97
  • Short name: DEC
  • Long name: Decrement (8-bit)

Memory layout

0x97 B A

Arguments

  • const UByte B: Destination bank.
  • const UByte A: Address.

Description

Decrements the 8-bit value found at bank B, address A. If the value is 0x00, it will roll over to 0xFF. If you specify a 16-bit bank, only the lower byte will be decremented, and if the lower byte is 0x00, the higher byte will be unaffected whilst the lower byte will return to 0xFF.