0 Members and 1 Guest are viewing this topic.
LD A,15INC A
LD A, 128DEC A
A couple of quick questions regarding the flags register:Is H basically a carry flag for the right nibble of the accumulator? Meaning if I doCode: (TI-ASM) [Select]LD A,15INC Ait should be set, right?[/li][li]Is V set when the 7th bit changes from one to zero? Meaning if I do[/li]Code: (TI-ASM) [Select]LD A, 128DEC Ashould it be set?[/li]
You should probably use better topic titles. I edited your topic name from "F" to "A couple of quick questions regarding the flags register"
Quote from: Deep Thought on September 21, 2010, 07:33:12 pmA couple of quick questions regarding the flags register:Is H basically a carry flag for the right nibble of the accumulator? Meaning if I doCode: (TI-ASM) [Select]LD A,15INC Ait should be set, right?[/li][li]Is V set when the 7th bit changes from one to zero? Meaning if I do[/li]Code: (TI-ASM) [Select]LD A, 128DEC Ashould it be set?[/li]
ld hl, 255inc hl
For some reason, the carry flag is NOT set when a number overflows with inc/dec, not even an 8-bit one.For example:ld l, 255inc ldoes not affect the carry flag.