Skip to content

Commit

Permalink
field shadows other declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
folkertvanheusden committed Apr 28, 2024
1 parent 816d772 commit 11aefff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,12 +584,12 @@ bool cpu::double_operand_instructions(const uint16_t instr)
const uint8_t dst_mode = (dst >> 3) & 7;
const uint8_t dst_reg = dst & 7;

bool set_flags = true;

switch(operation) {
case 0b001: { // MOV/MOVB Move Word/Byte
gam_rc_t g_src = getGAM(src_mode, src_reg, word_mode, rm_cur);

bool set_flags = true;

if (word_mode == wm_byte && dst_mode == 0)
setRegister(dst_reg, int8_t(g_src.value.value())); // int8_t: sign extension
else {
Expand Down Expand Up @@ -945,7 +945,6 @@ bool cpu::single_operand_instructions(const uint16_t instr)
const uint8_t dst_mode = (dst >> 3) & 7;
const uint8_t dst_reg = dst & 7;
const word_mode_t word_mode = instr & 0x8000 ? wm_byte : wm_word;
bool set_flags = true;

switch(opcode) {
case 0b00000011: { // SWAB
Expand All @@ -959,7 +958,7 @@ bool cpu::single_operand_instructions(const uint16_t instr)

v = (v << 8) | (v >> 8);

set_flags = putGAM(g_dst, v);
bool set_flags = putGAM(g_dst, v);

if (set_flags) {
setPSW_flags_nzv(v, wm_byte);
Expand Down
8 changes: 4 additions & 4 deletions debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,20 +236,20 @@ std::optional<disk_backend *> select_disk_backend(console *const cnsl)
void configure_disk(bus *const b, console *const cnsl)
{
// TODO tape
int ch = wait_for_key("1. RK05, 2. RL02, 9. abort", cnsl, { '1', '2', '3', '9' });
int type_ch = wait_for_key("1. RK05, 2. RL02, 9. abort", cnsl, { '1', '2', '3', '9' });

bootloader_t bl = BL_NONE;
disk_device *dd = nullptr;

if (ch == '1') {
if (type_ch == '1') {
dd = b->getRK05();
bl = BL_RK05;
}
else if (ch == '2') {
else if (type_ch == '2') {
dd = b->getRL02();
bl = BL_RL02;
}
else if (ch == '9') {
else if (type_ch == '9') {
return;
}

Expand Down

0 comments on commit 11aefff

Please sign in to comment.