On Wed, Apr 02, 2003 at 05:58:48PM +0100, Eddie Edwards wrote:
> > you completely missed my point. i was pointing out the problem with
> > operating the carry bit in this manner.
>
> You haven't pointed out any problem at all. What *is* the problem with
> operating the carry bit in this manner?
>
> If there's a genuine problem with the ARM architecture that has somehow gone
> unnoticed for 15 years I'd like to know what it is.
Can you justify why the carry flag should be set in this case?
> mov r10,#0x7f000000
> mov r11,#0x1fc00000
> adds r12,r10,r11,LSL #2 (0x7f00_0000+0x7F00_0000==0xfe00_0000), carry
> flag set !?!?
I confirmed that this is does occur (at least in the VisualBoy
emulator). This is not right. The ARM manual says that the carry may
be set by the output of the barrel shifter on logical instructions,
but is set by the ALU on arithmetic instructions. In this case there
is neither a carry from the shift or the addition.
which results in the same final operands and it works correctly, so
the problem seems shift related.
Bizarre. When should I trust that the CPU will set the flag correctly
and when not? Does anyone know if this is documented, and is there a
description of what class of operands it fails on? It would be hard
to believe it has gone unnoticed for 15 years.
... You haven't pointed out any problem at all. What *is* the problem with operating the carry bit in this manner? If there's a genuine problem with the ARM...
Eddie Edwards
eddie@...
Apr 2, 2003 5:20 pm
... Can you justify why the carry flag should be set in this case? ... I confirmed that this is does occur (at least in the VisualBoy emulator). This is not...
... You're simply labouring under a misunderstanding of how carry flags work. The only thing incorrect here is following SUBS with ADC. There is no meaning to...
Eddie Edwards
eddie@...
Apr 3, 2003 2:16 am
Is there a quick and simple test for detecting the SP version ? over the older GBA? I have a help page screen that lists controls for GBA, and wish to display...
... unfortunately, no. there isn't even a long and complicated test for detecting the SP. it's totally transparent to the programmer. regards, matthew....
Hi Bollo, I asked this on the gbadev.org forums, and there was no method known as of yet. I tried dumping the BIOS as well, to see if anything had changed,...
but doesn't final fantasy tactics advance change its colors depending on whether its running on the GBA or the SP? if so, then there must be some way to detect...
Metroid Fusion asks you if you are using headphones or internal speaker and changes the sound depending on your selection. Although its nice to autodetect to...
Aaron Isaksen
aisaksen@...
Apr 4, 2003 2:35 am
Hi, You can choose the color settings from the menu. There are even settings for when you're playing through the Gameboy Player for the NGC. Bye, Collin ... ...
... that would also be a reliable way to make sure you are on a gba ;) cheers, x -- chris@... Postmodernism is german romanticism with better ...
CK
x@...
Apr 4, 2003 10:59 am
... OK, I can't reproduce it now with the same conditions as before, so I retract my complaint. If I investigate again, I will confirm on actual hardware. It...
Hi Jay, ... Both correct. CMP is *exactly* just SUBS without a destination register. ... <=> BCC. ... Well you should avoid BCC/BCS except (a) after ADD and...
Eddie Edwards
eddie@...
Apr 3, 2003 1:27 pm
... maybe an old speccy owner that still cant resist any 6502-ish behaviour no matter what? :o) gpz...
... yes, I was taking about the old 6502 (history of the Arm being the replacement for the 6502 in acorn computers) (still it was sbc without the sub etc etc)....
Mike Wynn
mike.wynn@...
Apr 2, 2003 2:43 am
of course this might very well be purely academic, but the result is still incorrect regardless of how you turn it. ((0-0)+0+(c)) should never result in 1. as...
Morten Pedersen
escapekey@...
Apr 2, 2003 11:36 pm
... Academically, does Peano arithmetic define 'c'? What's incorrect academically is to use the carry flag for anything other than carrying from less...
... This really perplexed me so I tried it out myself as a sanity check. I was unable to reproduce this behaviour either in VBA or on the hardware. ?!?...