Re: now wait just a minute Re: [Tuxnes-devel] yet more asm stuff--carry f
Brought to you by:
tmmm
|
From: Jim U. <ji...@3e...> - 2001-04-17 21:20:56
|
At 03:31pm on 2001 April 17, Rigel did write: > okay, technically, A = 0000 0001 (1,or 0x1). So > when you sh left one bit, A = 0000 0010 (2, or 0x2). > This is a binary carry! You need to go back and read the descriptions of the 6502 flags. Carry has nothing to do with "binary carry." The _point_ of ASL is to shift the leftmost bit into the carry. "ASL shifts all bits left one position. 0 is shifted into bit 0 and the original bit 7 is shifted into the Carry." Overflow is only used for add/subtract. "The Overflow flag is generally misunderstood and therefore under- utilised. Following addition or subtraction, the overflow will equal the EOR (exclusive or) of the Carry and Sign flags. This flag is not affected by increments, decrements, shifts and logical operations i.e. only ADC, SBC, CLV, PLP and RTI affect it. There is no op code to set the overflow but a BIT test on an RTS instruction will do the trick." --- http://www.asw.cz/~kubecj/aopc.htm#VFLAG Please RTFM, there are many good references on the net. You will need a good understanding of 6502 and intel assembly to port the core to MIPS. -- ji...@3e... / 0x43340710 / 517B C658 D2CB 260D 3E1F 5ED1 6DB3 FBB9 4334 0710 |