Compare commits

..

1 Commits

Author SHA1 Message Date
Darkress
5f1ba4e9e6 implemented btfss Instruction 2023-06-07 21:34:01 +02:00
2 changed files with 0 additions and 63 deletions

View File

@@ -2,11 +2,9 @@ package de.darkress.pic16f84sim;
import de.darkress.pic16f84sim.commands.Command;
import de.darkress.pic16f84sim.decoder.CommandDecoder;
import de.darkress.pic16f84sim.gui.SramTable;
import de.darkress.pic16f84sim.microcontroller.Memory;
import de.darkress.pic16f84sim.microcontroller.ProgramCounter;
import javax.swing.*;
import java.util.ArrayList;
class Main
@@ -21,14 +19,5 @@ class Main
{
program.get(ProgramCounter.getPc()).execute();
}
SramTable table = new SramTable();
JFrame frame = new JFrame("Table Example");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(table.getTable());
frame.pack();
frame.setVisible(true);
//table.setValueAt("test", 15, 7);
}
}

View File

@@ -1,52 +0,0 @@
package de.darkress.pic16f84sim.gui;
import javax.swing.*;
import java.awt.*;
import java.awt.geom.Dimension2D;
public class SramTable
{
private final int rows = 32;
private final int columns = 8;
private Object[][] data = new Object[rows][columns];
public JTable getTable()
{
return table;
}
private JTable table = new JTable(data, createColumns());
public SramTable()
{
int count = 0;
for (int i = 0; i < rows; i++) {
for (int j = 0; j < columns; j++) {
data[i][j] = Integer.toHexString(count).toUpperCase();
table.getColumnModel().getColumn(j).setPreferredWidth(30);
count++;
}
}
}
private Object[] createColumns(){
Object[] columnNames = new Object[columns];
for (int j = 0; j < columns; j++) {
columnNames[j] = j;
}
return columnNames;
}
public void table() {
// Create a scroll pane and add the table to it
JScrollPane scrollPane = new JScrollPane(table);
// Create a panel and add the scroll pane to it
JPanel panel = new JPanel();
panel.add(scrollPane);
// Create a frame and add the panel to it
}
}