Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 590892
Collapse All | Expand All

(-)a/src/console/Spc_Cpu.h (-6 / +6 lines)
Lines 76-83 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ Link Here
76
// TODO: remove non-wrapping versions?
76
// TODO: remove non-wrapping versions?
77
#define SPC_NO_SP_WRAPAROUND 0
77
#define SPC_NO_SP_WRAPAROUND 0
78
78
79
#define SET_SP( v )     (sp = ram + 0x101 + (v))
79
#define SET_SP( v )     (sp = ram + 0x101 + ((uint8_t) v))
80
#define GET_SP()        (sp - 0x101 - ram)
80
#define GET_SP()        (uint8_t) (sp - 0x101 - ram)
81
81
82
#if SPC_NO_SP_WRAPAROUND
82
#if SPC_NO_SP_WRAPAROUND
83
#define PUSH16( v )     (sp -= 2, SET_LE16( sp, v ))
83
#define PUSH16( v )     (sp -= 2, SET_LE16( sp, v ))
Lines 485-491 loop: Link Here
485
485
486
	case 0xAF: // MOV (X)+,A
486
	case 0xAF: // MOV (X)+,A
487
		WRITE_DP( 0, x, a + no_read_before_write  );
487
		WRITE_DP( 0, x, a + no_read_before_write  );
488
		x++;
488
		x = (uint8_t) (x + 1);
489
		goto loop;
489
		goto loop;
490
490
491
// 5. 8-BIT LOGIC OPERATION COMMANDS
491
// 5. 8-BIT LOGIC OPERATION COMMANDS
Lines 808-814 loop: Link Here
808
		unsigned temp = y * a;
808
		unsigned temp = y * a;
809
		a = (uint8_t) temp;
809
		a = (uint8_t) temp;
810
		nz = ((temp >> 1) | temp) & 0x7F;
810
		nz = ((temp >> 1) | temp) & 0x7F;
811
		y = temp >> 8;
811
		y = (uint8_t) (temp >> 8);
812
		nz |= y;
812
		nz |= y;
813
		goto loop;
813
		goto loop;
814
	}
814
	}
Lines 838-843 loop: Link Here
838
838
839
		nz = (uint8_t) a;
839
		nz = (uint8_t) a;
840
		a = (uint8_t) a;
840
		a = (uint8_t) a;
841
		y = (uint8_t) y;
841
842
842
		goto loop;
843
		goto loop;
843
	}
844
	}
Lines 1004-1010 loop: Link Here
1004
	case 0x7F: // RET1
1005
	case 0x7F: // RET1
1005
		temp = *sp;
1006
		temp = *sp;
1006
		SET_PC( GET_LE16( sp + 1 ) );
1007
		SET_PC( GET_LE16( sp + 1 ) );
1007
		sp += 3;
1008
		SET_SP( GET_SP() + 3 );
1008
		goto set_psw;
1009
		goto set_psw;
1009
	case 0x8E: // POP PSW
1010
	case 0x8E: // POP PSW
1010
		POP( temp );
1011
		POP( temp );
1011
- 

Return to bug 590892