Fixed borrow issues

This commit is contained in:
Jan-Peter von Hunnius 2025-09-24 13:52:35 +02:00
parent f66f4c5d6c
commit 974fa25a3c
6 changed files with 34 additions and 39 deletions

View file

@ -26,7 +26,7 @@ pub struct Intel4004 {
accumulator: u8,
carry: bool,
index_registers: [u8; 16],
program_counter: U12,
pub(crate) program_counter: U12,
stack: [U12; 3],
stack_pointer: u8,
cycle_count: u64,

View file

@ -101,7 +101,7 @@ impl MOS6502 {
}
}
fn read_data_bus(&self) -> u8 {
fn _read_data_bus(&self) -> u8 {
let mut data = 0;
for i in 0..8 {

View file

@ -352,11 +352,11 @@ impl Intel4001 {
self.input_latch
}
pub fn get_io_mode(&self) -> IoMode {
fn get_io_mode(&self) -> IoMode {
self.io_mode
}
pub fn set_io_mode(&mut self, mode: IoMode) {
fn set_io_mode(&mut self, mode: IoMode) {
self.io_mode = mode;
match mode {
IoMode::Input => self.tri_state_io_pins(),