Pysix python module
From Just in Time
The pysix python module allows a developer to create a python script that runs an sx lst file, sets breakpoints and manipulates the state of the emulator. This can be used to simulate inputs or to log outputs of the SX while it is running its program.
Trivial example
Pysix classes and functions
ParseListingFile
listing ParseListingFile( fileName)
This function opens a listing (.lst) file and parses it. The results will be returned in the form of a listing object.
Listing
SxState
Simulator
The simulator is the central class of the pysix module. It offers the following attributes and functions:
- state
- SxState. This is the state of the simulator at any given point in time. See #SxState
- load_rom( Listing)
- boolean. Load the rom with the program bytes specified by the #Listing object.
- run( integer)
- integer. Will run for the given amount of clock-cycles or until a breakpoint is hit. Will return the amount of cycles left in this run (i.e. it will return zero if no breakpoint was hit and will return n - i if a breakpoint was hit after i cycles).
- set_breakpoint( integer)
- Sets a breakpoint at the given address.