- Bug fixes
- Lexer: Allow the lexer to recognize more invalid numeric types
- Lexer: Fix weird handling of
"
and escapes in string literals - Object Files: Ban two overlapping object files from linking
- Object Files: Fix incorrect index when writing into object file during linking
- Object Files: Fix object files with "\r\n" not deserializing correctly on macOS
- Object Files: Small changes to text encoding (// -> # comments, reorder .DEBUG line table)
- Fix bug where overlapping blocks would not be detected during link if there was a matching block location in both files.
- Breaking change: Make
Simulator::load_obj_file
fallible (when it loads an object file with external label)
- Rename
.REL
in text format to.LINKER_INFO
- Removed
Parse
foru16
andi16
(introduced in0.7.2
to fix.fill -32
bug) in favor forparse::simple::IntLiteral
- Added support for a text-based encoding format (
TextFormat::serialize
,TextFormat::deserialize
)- Due to this change,
ObjectFile::read_bytes
andObjectFile::write_bytes
have been removed in favor forBinaryFormat::serialize
/BinaryFormat::deserialize
.
- Due to this change,
- Linking
- Adds support for
.external
in the assembler - Adds
ObjectFile::link
(for linking two object files)
- Adds support for
- Internal refactor resulting in a change in
AsmErr
:AsmErr::ExcessiveBlock
is removedAsmErr::BlockInIO
andAsmErr::WrappingBlock
for object files that write to IO and those that wrap memory
- Fixed bug where
.fill -32
(or any negative number) would error.
- Added new SourceInfo APIs that allow constructing SourceInfo structs from source strings.
SourceInfo::new
,SourceInfo::from(String)
- Revised MMIO system (should be last time!)
- Allows IO to be modularized into separate devices
- Allows IO devices to also trigger interrupts
- Introduces timer interrupt device! (
device::TimerDevice
)
- Expand
use_real_halt
to also handle exceptions (via thex00
,x01
,x02
interrupt vectors) - Added more helpers to observe object file/symbol table state
ObjectFile::addr_iter
: Maps each address in the object file to its value (if not uninitialized)SymbolTable::line_iter
: Maps each line defined in source to its corresponding addressast::asm::disassemble_line
andast::asm::try_disassemble_line
: Disassembles a single instruction.
- Added a simple memory observer API that tracks what memory addresses are written to during an execution.
observer::ChangeObserver::mem_changed
: Gets whether an address changed during an executionobserver::ChangeObserver::take_mem_changes
: Creates an ordered iterator of all memory address changes (and clears the observer)
- Breaking changes (like, everything):
- IO related breaking changes
io
module ->device
moduleSimulator::open_io
andSimulator::close_io
have been moved intosim.device_handler
field (device::DeviceHandler::add_device
anddevice::DeviceHandler::remove_device
)Simulator::add_external_interrupt
andSimulator::clear_external_interrupt
are removed (usedevice::InterruptFromFn
withdevice::Interrupt::External
)io::IODevice
->device::ExternalDevice
io::BufferedIO
->device::BufferedKeyboard
,device::BufferedDisplay
io::BiChannelIO
removed with no current alternative
Simulator::use_real_halt
->Simulator::use_real_traps
mem::Mem
->mem::MemArray
,Simulator::read_mem
,Simulator::write_mem
- Removed
ensemble-cli
- IO related breaking changes
- Converted
Reg
into enum to better support niche optimizations - Deleted
crate::ast::reg_consts
- Fixed bug where program consisting only of new lines wouldn't assemble
- Added
ignore_privilege
flag
- Added significantly more documentation and examples
- Removed unnecessary APIs
- Majority of
ObjectFile
's methods Simulator::set_pc
,Simulator::offset_pc
(just setsim.pc
directly)Simulator::load_os
(useless to expose as this is done always)InterruptErr::new
(adjustedSimulator::add_external_interrupt
to no longer require)SimErr::ProgramHalted
(useless to expose as it is never returned as an error)- Debug API
- Removed
Breakpoint::Generic
,Breakpoint::And
, andBreakpoint::Or
(too niche) - Removed
BreakpointList
(simplification of above allows for use ofHashSet<Breakpoint>
instead)
- Removed
- IO API
- Removed
SimIO
,CustomIO
(adjustedSimulator::open_io
to no longer require)
- Removed
- Majority of
- Renamed
WordCreateStrategy
toMachineInitStrategy
sim.breakpoints
is now aHashSet
and can be appended to directlySimulator::open_io
now accepts allIODevice
s without having to box beforehandSimulator::add_external_interrupt
now accepts allErrors
without having to be wrapped inInterruptErr
beforehandPSR::is_*
,PSR::set_cc_*
for n, z, p
- Replace
slotmap
implementation of BreakpointList with an incremental one - Add
Simulator::hit_halt
- Revise SymbolTable's Debug implementation (does not affect its Debug output)
- External interrupts
- Useful for stopping execution of the program when needed by an external handle around the Simulator (e.g., by a Python binding)
- Interrupts that are triggered are raised as
SimErr::Interrupt
, which holds an opaque Error type which can be downcast and handled properly.
- Fix bug from 0.4.0 where the frame pointer wasn't being computed correctly when tracking a subroutine under standard calling convention
- Fix the JSRR R7 bug
- Create
Simulator::call_subroutine
- IO revisions
- Revise
BiChannelIO
to useRead
andWrite
traits - Change method definitions for
IODevice
IODevice::io_read
andIODevice::io_write
take&mut self
instead of&self
IODevice::close
is removed (useDrop
instead)
- Revise
crate::sim::debug
revisions- Restrict
Breakpoint::PC
to only acceptu16
instead ofComparator
(as comparing against addresses is unnecessary) - Revise
Comparator
to be an enum - Generalize
Breakpoint::And
andBreakpoint::Or
to more than 2 breakpoints - Create
BreakpointList
to replace theVec<Breakpoint>
field of the simulator. This generates an ID that can be used to keep track of a given breakpoint.
- Restrict
FrameStack
(andcrate::sim::frame
)- Intended to aid in keeping track of call frames (for both subroutines and traps)
- Miscellaneous API changes
- Create
Word::get_if_init
andWord::set_if_init
, which replace and expand uponWord::copy_word
- Delete
WordCreateStrategy::SeededFill
- Add
Simulator::run_while
- Add
Reg::try_from
andReg::reg_no
- Move
WordCreateStrategy
back intocrate::sim::mem
- Create
- Various comment patches
- Rename
SymbolTable
's methods to be clearer and more consistentSymbolTable::get_label
->SymbolTable::lookup_label
SymbolTable::get_line
->SymbolTable::lookup_line
SymbolTable::find_label_source
->SymbolTable::get_label_source
SymbolTable::find_line_source
->SymbolTable::rev_lookup_line
- Add
SymbolTable::rev_Lookup_label
- IO revisions
- Create
BufferedIO
, which is a buffered implementation of IO.- This was previously handled by
BiChannelIO
+BlockingQueue
, but that implementation did not have easy access to the input.BufferedIO
allows access to input (and hopefully is easier to use in general).
- This was previously handled by
- Remove
BlockingQueue
- No longer necessary due to introduction of
BufferedIO
.
- No longer necessary due to introduction of
- Create
- Lower the Rust MSRV to 1.70 (from 1.77).
- Move Simulator configuration flags into
sim::SimFlags
- Add a
use_real_halt
configuration flag - Simplify
WordCreateStrategy
and tailor it to pylc3's default configurations instructions_run
counter to allow for runtime limits- Fix bug where
step_over
andstep_out
would run one command unconditionally without checking for breakpoints
- Initial release
- Implements the parser, assembler, simulator, etc.
- I dunno what else to say about this release