Comments (4)
Over at https://github.com/redfast00/RCPU (a similar project in Python with instructions inspired by 16bitjs), I simply push the syscall number onto the stack, along with arguments, and place return values on the stack as well. The SYS instruction then pop's and pushes onto the stack.
from 16bitjs.
@hlide I agree that these instructions can be merged. What would you name this common instruction? Also as a side note, if you want to implement this feature and a rewrite of LDV, please keep make them in separate pull requests.
@redfast00 ah that's also a nice way to do it. I was going for a similar kind of approach to to x86 0x80 interrupt (https://en.wikibooks.org/wiki/X86_Assembly/Interfacing_with_Linux), which basically has the registers set up with arguments. I don't think this needs to be changed to be honest, but there are definitely a bunch of different ways you could do it.
from 16bitjs.
@francisrstokes it does indeed not have to be changed, I think it works the way it is. Sorry for hijacking this issue, but is there a roadmap of things to do? Don't have time for it now (working on RCPU), but I'd love to contribute in the future.
from 16bitjs.
@redfast00 no worries. I'm starting to use the git issues with enhancement tags to create extension proposals. Discussion can take place in the issues (like this one). I've created a CONTRIBUTING.md file repo that kind of lays out the main ideas with creating proposals. Your project is looking great by the way, it's really coming along!
from 16bitjs.
Related Issues (20)
- LDV16 B, value probably doesn't work HOT 1
- LICENCE isn't filled in HOT 2
- Replace JMP with a CMP instruction, and rename JMR to JMP HOT 11
- Extend LDR with offset mode HOT 4
- LDV - a better way to deal with 16-bit immediate value HOT 7
- Security issue: code execution when assembling files HOT 2
- Trouble to use "node src/assembler" HOT 2
- MOV - using the upper 8 bits to store a sign-extended immediate as an addend HOT 2
- Add optional offset to LDR HOT 1
- Rename LDM to STA HOT 1
- Rename LDP to STR with an optional 8 bit offset HOT 6
- LDA/LDM/LDR/LDP become LDA/STA/LDR/STR HOT 7
- Refactor JLT to JCP (Jump ComPare) HOT 1
- An example (but incomplete) of ISA using almost the same rules of 16bitjs
- Improve debugger HOT 6
- Convert to signed 16 but integer format HOT 1
- SWAP - this pseudo can be done through 3 XORs HOT 10
- STACK - some RISC CPUs don't have a PUSH and POP instructions
- Missing ESLint configuration HOT 2
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.
from 16bitjs.