|
Weird that your loop is faster than 2 for's, because technically your loop is doing the same: increment, test, set to 0, jump.
I've done some reading on the HP48 flags, and now I'm pretty certain that it's battery RAM, so you'll have to save it to a cookie on exit (and me too, in a file then). The only game I've seen using it is s-chip Piper.
*edit* regarding your previous topic in this sub-forum. Just use unsigned char (if Flash supports it). You've probably fixed that problem by now, but here's how I do it:
#define BYTE unsigned char /* 8 bit */ #define WORD unsigned short /* 16 bit */
REGV2 is defined as the V register of the value in the (1234) 2nd nibble of the opcode, REGV3 the 3rd.
static void addrr(void) { /* 0x8XY4 - add_register_register */ /* v[X]=v[X] [plus] v[Y], carry */ reg_v[15]=((WORD)REGV2 [plus] REGV3)>>8; REGV2 [plus] =REGV3; }
|