-
Notifications
You must be signed in to change notification settings - Fork 175
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
Tests for testing correct implementation? #13
Comments
Other than the two games we don't have a test suite. It is a good idea though since there are a few instructions and trap calls we do not use. One thought I have about writing such a suite is that it needs to be careful about what it decides to enforce. My LC-3 does not follow the LC-3 specification. For example trap codes are not implemented in assembly, and so they behave internally differently. One could write a program that depended on this behavior and it would not work. We want to encourage flexibility of implementation, with a reasonable expectation of program compatibility. With this in mind I think the test suite should just verify the basic operations of the trap codes and instructions. @rpendleton are you interested in this? |
I'm interested in this. I don't know exactly how we'd want to implement these tests (comparing output? or writing a test runner in LC-3?) but I'll look into it. |
I now have an opinion on implementing tests. Is anyone interested in writing an LC-3 program like this? Perhaps there is one out there? |
We want to do this. Here is what I want
|
"..trap codes are not implemented in assembly, and so they behave internally differently. One could write a program that depended on this behavior and it would not work." Hmm..this program when run on the official LC-3 simulator will never HALT (unless
|
@fizaan Good catch. I've created #52 to fix this and will have a PR up soon. Even though we're implementing the TRAPs directly in the VM (as opposed to relying on the assembly-based implementations), we should still be changing |
Hi!
First, thanks for the guide, I enjoyed it 😃 I am wondering if there are test-images or something that extensively test if things are implemented correctly? The code I came up with does not match your example code exactly and I'd like to see if would make a difference in a hypothetical "compliance test suite".
The text was updated successfully, but these errors were encountered: