Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faster execution and a new pseudo-instruction #273

Merged
merged 9 commits into from
Aug 11, 2018

Conversation

guidotack
Copy link
Contributor

This pull request contains some minor UI fixes, and two bigger changes:

  • support for a new pseudo-instruction ADR which is just a synonym for JnS. It makes it less confusing to use JnS to load the address of a label.
  • When the delay is set to < 10ms, make 10 iterations of run per loop. Otherwise JavaScript will use an automatic delay of 10ms, which leads to very slow execution for more complex programs.

… IR (consistent with textbook). Change ALU control signals to be consistent with textbook. Change control signals in SkipCond to reflect the PC increment step rather than the ALU test.
… delay of 10ms is used, makes some programs far too slow)
Can be used to load the address of a label (less confusing than abusing JnS for that purpose)
Copy link
Member

@ericjiang97 ericjiang97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks all good. Just one quick question.

var realDelay = delay;
var itersPerLoop = 1;
if (realDelay < 10) {
realDelay = 10;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this realDelay variable used for?

I don't see it used anywhere else, unless its used to replace the delay variable inside the setInterval function

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course that was the plan... Doesn't make any difference though because JS seems to assume a minimum of 10 ms anyway. I've fixed this (see commit below). I've also added a fix for a travis ci problem.

Copy link
Member

@ericjiang97 ericjiang97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks all good! 💯 👍 🚀 🎉

Copy link
Collaborator

@cyderize cyderize left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ericjiang97 ericjiang97 merged commit 969b854 into MARIE-js:master Aug 11, 2018
@ericjiang97
Copy link
Member

PR has been approved.

Version also increment to v1.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants