Some helps in register Window of VICE Monitor.

You need an actual VIC.

Moderator: Moderators

Post Reply
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Some helps in register Window of VICE Monitor.

Post by nbla000 »

Using the register windows in VICE MONITOR (View --> Register window) for debugging purpose, i don't understand some bytes and flag as show in image below.
Someone know the meaning of bytes SP, 00, 01, FL and flags - and B ?

Image
User avatar
Schlowski
NoMess!
Posts: 892
Joined: Tue Jun 08, 2004 12:20 pm

Post by Schlowski »

SP is stack pointer, 00 and 01 are the contents of memory bytes 0 and 1 (especially useful on C-64, not on VIC). B is break-flag (set after BRK opcode) and - is unused.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

And in case you don't know where 6502 stores its stack, it is page 1 ($0100-$01FF) counting from top to bottom. SP=F3 means the stack pointer is at $01F3. If you pop it (PLA, PLP) it will become F4. If you instead would push (PHA, PHP) something onto it, it is at F2. TSX transfers SP to X register. TXS does the opposite.
Anders Carlsson

Image Image Image Image Image
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Post by nbla000 »

Thanks guys :wink:

OPS, the FL value what does mean ? and why if - flag is not used sometime is 1 and other 0 ?
MacbthPSW
Vic 20 Afficionado
Posts: 478
Joined: Wed Apr 06, 2005 1:56 pm

Post by MacbthPSW »

nbla000 wrote:OPS, the FL value what does mean ? and why if - flag is not used sometime is 1 and other 0 ?
FL is just the hex representation of the flag register... %00100010 in your example is $22. Kind of redundant, but I guess somebody might care.

The unused flag is called the "expansion bit". According to one book of mine "It is most likely that this bit will appear to be on when one is analyzing the bit pattern in the processor status register; however, no guarantee as to its state is made as this bit will be used in expanded versions of the microprocessor".
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Post by nbla000 »

MacbthPSW wrote: FL is just the hex representation of the flag register... %00100010 in your example is $22.
ops.. :oops:
Post Reply