Jump to content

GB Programming: Difference between revisions

→‎Instructions get!: Remove instructions that don't exist on the Game Boy
>ISSOtm
m (→‎Chaining conditionals: Fixed a mistake.)
>ISSOtm
(→‎Instructions get!: Remove instructions that don't exist on the Game Boy)
Line 501:
!Syntax
!Effect
!S
!Z
!P/V
!C
|-
Line 509 ⟶ 507:
|Adds one to the operand ("increments" it)
|Affected, except for reg16
|Affected, except for reg16
|Detects overflow, except for reg16
|Not affected
|-
Line 516 ⟶ 512:
|Subtracts one to the operand ("decrements" it)
|Affected, except for reg16
|Affected, except for reg16
|Detects overflow, except for reg16
|Not affected
|-
|ADD A, <nowiki>{reg8 | imm8 | reg16 | (hl)}</nowiki>
|Adds the operand to the accumulator
|Affected
|Affected
|Detects overflow
|Not affected
|-
Line 530 ⟶ 522:
|Adds the operand to HL
|Affected
|Affected
|Detects overflow
|Not affected
|-
|SUB <nowiki>{reg8 | imm8 | reg16 | (hl)}</nowiki>
|Subtracts the operand from the accumulator. The syntax SUB A, <nowiki>{...}</nowiki> is also valid but less common.
|Affected
|Affected
|Detects overflow
|Not affected
|-
|SBC HL, reg16
|Subtracts the operand plus the carry flag from HL
|Affected
|Affected
|Detects overflow
|Not affected
|}
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.