The F100-L Emulator

The F100-L Emulator is written in Python and is still a work in progress. Currently it is able to run all internal instructions (the external functions for co-processor handling are not yet addressed) but testing has been minimal.

Invoking The Emulator

USAGE:

F100Emu is a very simple emulator for the Ferranti F100-L CPU.

REQUIRED SWITCHES

-f --filename  <filename>      specify the assembled object file

-g --format    <bin|ihex|hex>  set the file format for the assembled code

OPTIONAL SWITCHES

-a --adsel      <0|1>          specify the state of the AdSel pin
                               - defaults to 1 if not specified

-e --endianness <little|big>   set endianness of byte oriented input file
                               - default is little-endian

-n --nolisting                 suppress the listing to stdout while the
                               program runs

-t --traceon                   print all memory transactions to stdout

-m  --memorydump <filename>    dump memory to file at end of run.

                               Memory dump will by default write address and data for all
                               memory locations written during program execution. Use the
                               -p/-q switches to override this and instead dump a fixed
                               block if required.


-p  --memorystart <int>        start of memory dump range

-q  --memoryend   <int>        end of memory dump range

-s  --statistics               print extended statistics summary at end of run

-h --help                      print this help message

EXAMPLES

python3.5 F100Emu.py -f test.hex -g hex

Example

python3.5 F100Emu.py -f test2.hex -g hex

  # -------------------------------------------------------------------------------------------
  #    _____________  ____        __       ______                __      __
  #   / ____<  / __ \/ __ \      / /      / ____/___ ___  __  __/ /___ _/ /_____  _____
  #  / /_   / / / / / / / /_____/ /      / __/ / __ `__ \/ / / / / __ `/ __/ __ \/ ___/
  # / __/  / / /_/ / /_/ /_____/ /___   / /___/ / / / / / /_/ / / /_/ / /_/ /_/ / /
  #/_/    /_/\____/\____/     /_____/  /_____/_/ /_/ /_/\__,_/_/\__,_/\__/\____/_/
  #
  #
  # F 1 0 0 - L * E M U L A T O R (c) 2016 Revaldinho & BigEd
  # -------------------------------------------------------------------------------------------
  #                                   Condition Reg.
  # PC   : Memory         : Acc. OR.  I Z V S C M F  : Instruction
  # -------------------------------------------------------------------------------------------
    0800 : C000 0000 D000 : 0000 0000 0 0 0 0 0 0 0  : AND
    0802 : D000 00FF A000 : 0000 0000 0 1 0 0 1 0 0  : NEQ
    0804 : A000 0001 9000 : 00FF 00FF 0 0 0 0 1 0 0  : SUB
    0806 : 9000 0001 9000 : FF02 0001 0 0 1 1 1 0 0  : ADD
    0808 : 9000 0001 8000 : FF03 0001 0 0 0 1 1 0 0  : ADD
    080A : 8000 FFFB 4800 : FF04 0001 0 0 0 1 1 0 0  : LDA
    080C : 4800 0010 9000 : FFFB 0001 0 0 0 1 1 0 0  : STO
    080E : 9000 0001 7010 : FFFB 0010 0 0 0 1 1 0 0  : ADD
    0810 : 7010 080E 0523 : FFFC 0001 0 0 0 1 0 0 0  : ICZ
    080E : 9000 0001 7010 : FFFC FFFB 0 0 0 1 0 0 0  : ADD
    0810 : 7010 080E 0523 : FFFD 0001 0 0 0 1 0 0 0  : ICZ
    080E : 9000 0001 7010 : FFFD FFFC 0 0 0 1 0 0 0  : ADD
    0810 : 7010 080E 0523 : FFFE 0001 0 0 0 1 0 0 0  : ICZ
    080E : 9000 0001 7010 : FFFE FFFD 0 0 0 1 0 0 0  : ADD
    0810 : 7010 080E 0523 : FFFF 0001 0 0 0 1 0 0 0  : ICZ
    080E : 9000 0001 7010 : FFFF FFFE 0 0 0 1 0 0 0  : ADD
    0810 : 7010 080E 0523 : 0000 0001 0 1 0 0 1 0 0  : ICZ
    0812 : 0523 0000 0000 : 0000 FFFF 0 1 0 0 1 0 0  : HALT
  CPU Halted with halt number 0x0123
  # -------------------------------------------------------------------------------------------
  # Program execution Statistics
  # -------------------------------------------------------------------------------------------
  #          Instruction count:      17
  #          Logic cycle count:       0
  #      Total Memory accesses:      64
  #               memory reads:      58
  #              memory writes:       6
  # -------------------------------------------------------------------------------------------
  # Emulator Performance Statistics
  # -------------------------------------------------------------------------------------------
  # Run time                  :       0.00 s
  # Instructions per second   :       0.01 MIPS
  # -------------------------------------------------------------------------------------------