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

is it possible to do syscall since its a linux port? #3

Open
yunfan opened this issue Mar 2, 2025 · 3 comments
Open

is it possible to do syscall since its a linux port? #3

yunfan opened this issue Mar 2, 2025 · 3 comments

Comments

@yunfan
Copy link

yunfan commented Mar 2, 2025

hi i recently want to use forth to build an busybox like toolsets
since the tiny size, i choose this forth but i dont know how to do syscall via forth code on it

will you please gave any sample about this? i think after that i could build my own libc like words for further tasks

@kt97679
Copy link
Owner

kt97679 commented Mar 3, 2025

Hi, please check implementation of the "accept" word. It uses syscall under the hood. Please let me know if this answers your question or something is still unclear.

@yunfan
Copy link
Author

yunfan commented Mar 3, 2025

sorry what i mean is call syscall in forth code not in your asm sourcecode

like those you wrote in eforth.forth

@kt97679
Copy link
Owner

kt97679 commented Mar 3, 2025

It is totally possible to create a "syscall" forth word that would take parameters from the stack, put them in the appropriate registers and call a syscall. I may implement this sometime in the future but as of now unfortunately I don't have time for that :(.

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

No branches or pull requests

2 participants