Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- }case 40:{
- // *******
- // * ROR *
- // *******
- // Rotate one bit right
- if(addrMode == 4){ // ADDR_ACC = 4
- readout("Rotate the value in Accumulator right one bit");
- }else{
- readout("Rotate the value at " + addr + " right one bit");
- }
- break;
- }case 41:{
- // *******
- // * RTI *
- // *******
- // Return from interrupt. Pull status and PC from stack.
- readout("Return from interrupt; read CPU status regs and program counter address from the stack");
- break;
- }case 42:{
- // *******
- // * RTS *
- // *******
- // Return from subroutine. Pull PC from stack.
- readout("Return from subroutine; read program counter address off the stack");
- break;
- }case 43:{
- // *******
- // * SBC *
- // *******
- readout("Subtract value at address " + addr + " from Accumulator");
- break;
- }case 44:{
- // *******
- // * SEC *
- // *******
- // Set carry flag
- readout("Set carry bit to 1");
- break;
- }case 45:{
- // *******
- // * SED *
- // *******
- // Set decimal mode
- readout("Set decimal mode bit to 1");
- break;
- }case 46:{
- // *******
- // * SEI *
- // *******
- // Set interrupt disable status
- readout("Disable interrupts");
- break;
- }case 47:{
- // *******
- // * STA *
- // *******
- // Store accumulator in memory
- readout("Move Accumulator to address " + addr);
- break;
- }case 48:{
- // *******
- // * STX *
- // *******
- // Store index X in memory
- readout("Move X-index to address " + addr);
- break;
- }case 49:{
- // *******
- // * STY *
- // *******
- // Store index Y in memory:
- readout("Move Y-index to address " + addr);
- break;
- }case 50:{
- // *******
- // * TAX *
- // *******
- // Transfer accumulator to index X:
- readout("Move Accumulator to X-index");
- break;
- }case 51:{
- // *******
- // * TAY *
- // *******
- // Transfer accumulator to index Y:
- readout("Move Accumulator to Y-index");
- break;
- }case 52:{
- // *******
- // * TSX *
- // *******
- // Transfer stack pointer to index X:
- readout("Move stack pointer address to X-index");
- break;
- }case 53:{
- // *******
- // * TXA *
- // *******
- // Transfer index X to accumulator:
- readout("Move X-index to Accumulator");
- break;
- }case 54:{
- // *******
- // * TXS *
- // *******
- // Transfer index X to stack pointer:
- readout("Set stack pointer address to Index-X");
- break;
- }case 55:{
- // *******
- // * TYA *
- // *******
- // Transfer index Y to accumulator:
- readout("Move Y-index to Accumulator");
- break;
- }default:{
- // *******
- // * ??? *
- // *******
- readout("* NOT A 6502 INSTRUCTION *");
- break;
- }
- }// end of switch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement