mirror of
https://github.com/trudnai/Steve2.git
synced 2024-09-26 22:56:59 +00:00
8f914756eb
- Inverse characters - Flashing characters - Boot - RAM size detection bug fixed - Frame around Text Field - Fixed BRK - Debug Target - Speed Test target
49 lines
1.0 KiB
C
49 lines
1.0 KiB
C
//
|
|
// main.c
|
|
// 6502
|
|
//
|
|
// Created by Tamas Rudnai on 7/14/19.
|
|
// Copyright © 2019 GameAlloy. All rights reserved.
|
|
//
|
|
|
|
#ifndef __6502_INSTR_MISC_H__
|
|
#define __6502_INSTR_MISC_H__
|
|
|
|
|
|
/**
|
|
BRK Force Break
|
|
|
|
interrupt, N Z C I D V
|
|
push PC+2, push SR - - - 1 - -
|
|
|
|
addressing assembler opc bytes cyles
|
|
--------------------------------------------
|
|
implied BRK 00 1 7
|
|
**/
|
|
INLINE void BRK() {
|
|
dbgPrintf("BRK ");
|
|
PUSH_addr(m6502.PC +1); // PC +2, however, fetch already incremented it by 1
|
|
// B flag should be set before pushing flags onto the stack
|
|
m6502.B = 1;
|
|
PUSH(m6502.SR);
|
|
m6502.I = 1;
|
|
JMP(memread16(IRQ_VECTOR));
|
|
}
|
|
|
|
/**
|
|
NOP No Operation
|
|
|
|
--- N Z C I D V
|
|
- - - - - -
|
|
|
|
addressing assembler opc bytes cyles
|
|
--------------------------------------------
|
|
implied NOP EA 1 2
|
|
**/
|
|
INLINE void NOP() {
|
|
dbgPrintf("NOP ");
|
|
}
|
|
|
|
#endif // __6502_INSTR_MISC_H__
|
|
|