Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 0
Varscott11

Memory-Mapped I/O (Or something similar)

Question

Is there some sort of api that allows for a program to write code instructions to a hidden and discrete location not on a filesystem that can be read by something like a hardware driver?

I know that memory itself does not have an api, but is there anything that could emulate such a process?

Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

look at how init.lua works. (maybe also take a look at the boot.lua it calls)

there it is loading/saving code into memory. after that the actual code to make that function doesn't need to exist anymore. (as long as the computer is not shut down or reboots)

so.. if you wanted to have a function not in the filesystem thats the way to go.

load it yourself, maybe even assign it to _G.yourfunctionname (global scope) and then you can run it from any script without the require() function.

if this script to load that function would be placed on a disk, you could load the disk, run the script. and then take the disk back out, so long as openOS doesn't reboot or shut down your code will stay loaded.

 

there probably some other ways to add certain functionalities without leaving a scripting trace :).

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.