mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-03 07:33:29 +00:00
Fix immediate offset and data processing operation.
This commit is contained in:
parent
62da0dee7f
commit
99f0233b76
@ -142,7 +142,7 @@ struct DataProcessingFlags {
|
||||
|
||||
/// @returns The operation to apply.
|
||||
constexpr DataProcessingOperation operation() const {
|
||||
return DataProcessingOperation((flags_ >> 21) & 0xf);
|
||||
return DataProcessingOperation((flags_ >> (21 - FlagsStartBit)) & 0xf);
|
||||
}
|
||||
|
||||
/// @returns @c true if operand 2 is defined by the @c rotate() and @c immediate() fields;
|
||||
@ -232,7 +232,7 @@ struct SingleDataTransferFlags {
|
||||
return flag_bit<20>(flags_) ? Operation::LDR : Operation::STR;
|
||||
}
|
||||
|
||||
constexpr bool offset_is_immediate() const { return flag_bit<25>(flags_); }
|
||||
constexpr bool offset_is_immediate() const { return !flag_bit<25>(flags_); }
|
||||
constexpr bool pre_index() const { return flag_bit<24>(flags_); }
|
||||
constexpr bool add_offset() const { return flag_bit<23>(flags_); }
|
||||
constexpr bool transfer_byte() const { return flag_bit<22>(flags_); }
|
||||
|
@ -203,7 +203,7 @@ struct Memory {
|
||||
executor.bus_.rom = roms.find(rom_name)->second;
|
||||
|
||||
uint32_t pc = 0;
|
||||
for(int c = 0; c < 100; c++) {
|
||||
for(int c = 0; c < 200; c++) {
|
||||
uint32_t instruction;
|
||||
executor.bus_.read(pc, instruction, executor.mode(), false);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user