Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package ca.craigthomas.yacoco3e.components;

import ca.craigthomas.yacoco3e.datatypes.*;
import ca.craigthomas.yacoco3e.datatypes.screen.ScreenMode;

import static ca.craigthomas.yacoco3e.datatypes.RegisterSet.*;

Expand Down
51 changes: 24 additions & 27 deletions src/main/java/ca/craigthomas/yacoco3e/components/Instruction.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,33 +60,30 @@ public int execute(IOController io) throws MalformedInstructionException {
io.incrementPC();
}

if (!isValidInstruction) {
call(io);
return 0;
}

switch (addressingMode) {
case IMMEDIATE:
getImmediate(io);
break;

case INDEXED:
getIndexed(io);
break;

case DIRECT:
getDirect(io);
break;

case EXTENDED:
getExtended(io);
break;

default:
addressRead = new UnsignedWord(0);
wordRead = new UnsignedWord(0);
byteRead = new UnsignedByte(0);
break;
if (isValidInstruction) {
switch (addressingMode) {
case IMMEDIATE:
getImmediate(io);
break;

case INDEXED:
getIndexed(io);
break;

case DIRECT:
getDirect(io);
break;

case EXTENDED:
getExtended(io);
break;

default:
addressRead = new UnsignedWord(0);
wordRead = new UnsignedWord(0);
byteRead = new UnsignedByte(0);
break;
}
}

return call(io);
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/ca/craigthomas/yacoco3e/components/Screen.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
*/
package ca.craigthomas.yacoco3e.components;

import ca.craigthomas.yacoco3e.datatypes.*;
import ca.craigthomas.yacoco3e.datatypes.screen.*;

import java.awt.*;
import java.awt.image.BufferedImage;

public class Screen
Expand Down
36 changes: 0 additions & 36 deletions src/main/java/ca/craigthomas/yacoco3e/datatypes/MemoryResult.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
* Copyright (C) 2018 Craig Thomas
* This project uses an MIT style license - see LICENSE for details.
*/
package ca.craigthomas.yacoco3e.datatypes;
package ca.craigthomas.yacoco3e.datatypes.screen;

import ca.craigthomas.yacoco3e.datatypes.UnsignedByte;

import java.awt.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
* Copyright (C) 2018 Craig Thomas
* This project uses an MIT style license - see LICENSE for details.
*/
package ca.craigthomas.yacoco3e.datatypes;
package ca.craigthomas.yacoco3e.datatypes.screen;

import ca.craigthomas.yacoco3e.datatypes.UnsignedByte;

import java.awt.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
* Copyright (C) 2018 Craig Thomas
* This project uses an MIT style license - see LICENSE for details.
*/
package ca.craigthomas.yacoco3e.datatypes;
package ca.craigthomas.yacoco3e.datatypes.screen;

import ca.craigthomas.yacoco3e.datatypes.UnsignedByte;

import java.awt.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
* Copyright (C) 2018 Craig Thomas
* This project uses an MIT style license - see LICENSE for details.
*/
package ca.craigthomas.yacoco3e.datatypes;
package ca.craigthomas.yacoco3e.datatypes.screen;

import ca.craigthomas.yacoco3e.datatypes.UnsignedByte;

import java.awt.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
* Copyright (C) 2018 Craig Thomas
* This project uses an MIT style license - see LICENSE for details.
*/
package ca.craigthomas.yacoco3e.datatypes;
package ca.craigthomas.yacoco3e.datatypes.screen;

import ca.craigthomas.yacoco3e.datatypes.UnsignedByte;

import java.awt.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
* Copyright (C) 2018 Craig Thomas
* This project uses an MIT style license - see LICENSE for details.
*/
package ca.craigthomas.yacoco3e.datatypes;
package ca.craigthomas.yacoco3e.datatypes.screen;

import ca.craigthomas.yacoco3e.datatypes.UnsignedByte;

import java.awt.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
* Copyright (C) 2018 Craig Thomas
* This project uses an MIT style license - see LICENSE for details.
*/
package ca.craigthomas.yacoco3e.datatypes;
package ca.craigthomas.yacoco3e.datatypes.screen;

import ca.craigthomas.yacoco3e.datatypes.UnsignedByte;

import java.awt.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
* Copyright (C) 2018 Craig Thomas
* This project uses an MIT style license - see LICENSE for details.
*/
package ca.craigthomas.yacoco3e.datatypes;
package ca.craigthomas.yacoco3e.datatypes.screen;

import ca.craigthomas.yacoco3e.datatypes.UnsignedByte;

import java.awt.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
* Copyright (C) 2018 Craig Thomas
* This project uses an MIT style license - see LICENSE for details.
*/
package ca.craigthomas.yacoco3e.datatypes;
package ca.craigthomas.yacoco3e.datatypes.screen;

import ca.craigthomas.yacoco3e.datatypes.UnsignedByte;

import java.awt.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
* Copyright (C) 2018 Craig Thomas
* This project uses an MIT style license - see LICENSE for details.
*/
package ca.craigthomas.yacoco3e.datatypes;
package ca.craigthomas.yacoco3e.datatypes.screen;

import ca.craigthomas.yacoco3e.datatypes.UnsignedByte;

import java.awt.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
* Copyright (C) 2018 Craig Thomas
* This project uses an MIT style license - see LICENSE for details.
*/
package ca.craigthomas.yacoco3e.datatypes;
package ca.craigthomas.yacoco3e.datatypes.screen;

import ca.craigthomas.yacoco3e.datatypes.UnsignedByte;

import java.awt.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
* Copyright (C) 2018 Craig Thomas
* This project uses an MIT style license - see LICENSE for details.
*/
package ca.craigthomas.yacoco3e.datatypes;
package ca.craigthomas.yacoco3e.datatypes.screen;

import ca.craigthomas.yacoco3e.datatypes.UnsignedByte;

import java.awt.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
* Copyright (C) 2018 Craig Thomas
* This project uses an MIT style license - see LICENSE for details.
*/
package ca.craigthomas.yacoco3e.datatypes;
package ca.craigthomas.yacoco3e.datatypes.screen;

import ca.craigthomas.yacoco3e.datatypes.UnsignedByte;

import java.awt.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright (C) 2017-2018 Craig Thomas
* This project uses an MIT style license - see LICENSE for details.
*/
package ca.craigthomas.yacoco3e.datatypes;
package ca.craigthomas.yacoco3e.datatypes.screen;

import ca.craigthomas.yacoco3e.components.IOController;

Expand Down
Loading