Giter VIP home page Giter VIP logo

epater's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

epater's Issues

Installation

Hey,
i need to code in ARM for my studies and i am trying to install Epater.
When i run the command python mainweb.py DEBUG "
i got an error in the mainweb.py line 39 saying that the file emaipass.txt deon't exist, and i don't have that file. what should i do ?
Thank you ^^

Step forward never stops in case of unmatched BL calls

Assuming the following code:

BL function1
MOV R0, #42

function1
MOV R8, LR
MOV R1, R2
BL label2

label2
MOV LR, R8
BX LR

Then doing a step forward on the first line (which should execute function1 and stop at the next instruction, namely MOV R0, #42) will not stop until the max number of iterations is reached. The reason is that step forward counts the number of BL, assuming they are function calls, and decrease them by the number of BX LR, assuming they are function returning. The underlying assumption is that each BL has a matched BX LR. When it is not the case, as in the code above, then the execution will not stop as expected.

Note that this is not a bug in the emulator itself (e.g. the emulation result is the correct one), but in the interface provided to the user (the emulator does not stop when expected).

Assertion system does not support SP, LR or PC

Currently, the assertion system supports register comparison, but only with R* syntax. That is:
ASSERT R13=8 is valid, but
ASSERT SP=8 will crash

The tokenizer already supports both modes, but the execAssert function in simulator.py should be changed accordingly (it currently only checks for "R" as the first character).

As of right now, a simple workaround is to use R13, R14 and R15 instead of SP, LR, and PC. Again, this is only for assertions, the alternative names may safely be used in any instruction.

Labels beginning by a "B" (uppercase letter b) are marked as invalid

The tokenizer currently parses them as a branch instruction, and thus raises a syntax error when the following letters are not a valid condition code. Since labels like MOVlabel are deemed as valid, this should be possible to modify the parser such that it accepts labels like "Boucle", but we have to be careful not to break anything. Remember to use test_assembler to run unit tests on the parser and assembler prior to any deployment.

In the meantime, using a lowercase first letter for labels is a simple workaround.

Separate the different parts of the project in independant Python packages

I discovered this project when looking to some ARM simulator with good introspection capability from Python code.
For the project I have in mind (also educational, at Toulouse University), I only require for now the simulator part (not the web front end nor the assembler).

At a first glance, I think I can quite easily do some modification in your code to make the integration with my project easy.
However, it would be far easier for me to make a Python package with only the simulator-related modules, and install it as a dependency of my project (using a setup.py file for instance).
It seems you have something like 3 main packages that can be extracted from your current code base:

  • the simulator/bytecode interpreter
  • the assembler
  • the web/cli front-ends

I believe such a modular infrastructure could also increase the interest in this -pretty cool- project, but I don't know if you have the time and/or desire to go in this direction?
Such work may also helps to make the different packages or the whole project accessible on PyPi for an easy installation with pip and similar tools! :)

If you are interested, I may find some time to propose a pull request in the upcoming month or so.

Assembler doesn't recognize shifts with registers

Hello,

As said in the title, the assembler produce errors when trying to any data processing instruction that has a shift with the amount being specified as a register.

I can't find anything about this in the unimplemented instructions part of the readme or in the manual v2. So I assume it's a bug.

Minimal reproduction:

SECTION INTVEC

B main


SECTION CODE

main
MOV R12, R4, ROR #12
MOV R1, R0, LSR R4

SECTION DATA

The assembler complains about the second instruction "Impossible d'interpréter l'instruction" but is fine with the first one.

Thanks a lot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.