javascript-dcpu-16-simulator's Issues
Assigning to a literal value updates memory
From the spec:
If any instruction tries to assign a literal value, the assignment
fails silently. Other than that, the instruction behaves as normal.
Your sample display code should not output anything to the display, as written:
7df1 8000 0041 7df1 8001 0042 7df1 8002 0043 7df1 8003 0044
compiles to assignments to literal values:
SET 8000, 41
SET 8001, 42
SET 8002, 43
SET 8003, 44
I believe the intended code is:
7DE1 8000 0041 7DE1 8001 0042 7DE1 8002 0043 7DE1 8003 0044
Which compiles to :
SET [8000], 41
SET [8001], 42
SET [8002], 43
SET [8003], 44
Below is a little test case to show that the memory is actually being modified
7df1 8000 0041 79E1 8001 8000
SET 8000, 41 ; try to write 41 to the literal 8000, should fail leaving the memory unmodified
SET [8001], [8000] ; read the memory location 8000 and write that value to memory location 8001
If the test passes, nothing should be displayed on the screen. In the current implementation "A" is written twice to the screen.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.