Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 0x96: //ASL (abs)
- HB = fetch();
- LB = fetch();
- address += (WORD)((WORD)HB << 8) + LB;
- temp_word = Memory[address];
- if (address >= 0 && address < MEMORY_SIZE) {
- if ((temp_word & 0x80) != 0) {
- Flags |= FLAG_C;
- }
- else {
- Flags &= (0xFF - FLAG_C);
- }
- temp_word <<= 1;
- if ((temp_word & 0x40) != 0) {
- temp_word += 0xFE;
- }
- }
- set_flag_z(temp_word);
- set_flag_n(temp_word);
- Memory[address] = (BYTE)temp_word;
- break;
- case 0xA6: //ASL Absolute X
- address += Index_Registers[REGISTER_X];
- HB = fetch();
- LB = fetch();
- address += (WORD)((WORD)HB << 8) + LB;
- temp_word = Memory[address];
- if (address >= 0 && address < MEMORY_SIZE) {
- if ((temp_word & 0x80) != 0) {
- Flags |= FLAG_C;
- }
- else {
- Flags &= (0xFF - FLAG_C);
- }
- temp_word <<= 1;
- if ((temp_word & 0x40) != 0) {
- temp_word += 0xFE;
- }
- }
- set_flag_z(temp_word);
- set_flag_n(temp_word);
- Memory[address] = (BYTE)temp_word;
- break;
- case 0xB6: //ASL Absolute Y
- address += Index_Registers[REGISTER_Y];
- HB = fetch();
- LB = fetch();
- address += (WORD)((WORD)HB << 8) + LB;
- temp_word = Memory[address];
- if (address >= 0 && address < MEMORY_SIZE) {
- if ((temp_word & 0x80) != 0) {
- Flags |= FLAG_C;
- }
- else {
- Flags &= (0xFF - FLAG_C);
- }
- temp_word <<= 1;
- if ((temp_word & 0x40) != 0) {
- temp_word += 0xFE;
- }
- }
- set_flag_z(temp_word);
- set_flag_n(temp_word);
- Memory[address] = (BYTE)temp_word;
- break;
- case 0xC6: //ASL Absolute XY
- address += (WORD)((WORD)Index_Registers[REGISTER_Y] << 8)
- + Index_Registers[REGISTER_X];
- HB = fetch();
- LB = fetch();
- address += (WORD)((WORD)HB << 8) + LB;
- temp_word = Memory[address];
- if (address >= 0 && address < MEMORY_SIZE) {
- if ((temp_word & 0x80) != 0) {
- Flags |= FLAG_C;
- }
- else {
- Flags &= (0xFF - FLAG_C);
- }
- temp_word <<= 1;
- if ((temp_word & 0x40) != 0) {
- temp_word += 0xFE;
- }
- }
- set_flag_z(temp_word);
- set_flag_n(temp_word);
- Memory[address] = (BYTE)temp_word;
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement