-
Notifications
You must be signed in to change notification settings - Fork 9
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 frequency, end function, register syntactic sugar array #4
base: gh-pages
Are you sure you want to change the base?
Conversation
- added a faster frequency to make the interpreter run as fast as possible - added a program end function to reduce code reuse and added a reset button click, since most people do that anyway - added array for register syntactic sugar
- made the html have a max height and made it so that the js always scrolls to the bottom. - only start running if there is code
added a sample program so that people can immediately see how awesome this site is
@@ -53,12 +53,14 @@ | |||
<li><a href="#" onclick="setFrequency(64);">64 Hz</a></li> | |||
<li><a href="#" onclick="setFrequency(128);">128 Hz</a></li> | |||
<li><a href="#" onclick="setFrequency(256);">256 Hz</a></li> | |||
<li><a href="#" onclick="setFrequency(1024);">1024 Hz</a></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setInterval
delay
The time, in milliseconds (thousandths of a second), the timer should delay in between executions of the specified function or code. If this parameter is less than 10, a value of 10 is used. Note that the actual delay may be longer; see "Reasons for delays longer than specified" in WindowOrWorkerGlobalScope.setTimeout() for examples.
Setting a timeout of 1024 would mean that the setInterval
call will receive a delay of 1000/1024
, which has no difference when compared to 1000/256
.
</ul> | ||
</div> | ||
</div> | ||
<br> | ||
<div id="recent-instruction" class="well">The most recent instructions will be shown here when stepping.</div> | ||
<hr> | ||
<h4><button id="sample-pgrm" class="btn btn-primary">Try a sample program</button></h4> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think that this feature is necessary and adds additional clutter. There are many tutorials online about how to write a sample MIPS program.
A few suggestions and improvements based on my experience with the site.