This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Mads's profile picture

Lower Level

Started by Mads, 10 November 2012 - 02:45 AM
Mads #1
Posted 10 November 2012 - 03:45 AM
ComputerCraft would be so awesome, if we had access to lower level functions. Like memory manipulation, and so on. We would not use Lua for this, but something more like Assembly.

Like, reading and writing from/to memory, manipulating registers etc. This would allow people to make complete OS'es.
Tiin57 #2
Posted 10 November 2012 - 03:50 AM
ComputerCraft would be so awesome, if we had access to lower level functions. Like memory manipulation, and so on. We would not use Lua for this, but something more like Assembly.

Like, reading and writing from/to memory, manipulating registers etc. This would allow people to make complete OS'es.
This is not really possible in Lua, to my knowledge.
Mads #3
Posted 10 November 2012 - 04:41 AM
@tiin57, ComputerCraft is not written in Lua. It is written in Java, and you could easily recreate RAM with a byte array.
Tiin57 #4
Posted 10 November 2012 - 05:24 AM
@tiin57, ComputerCraft is not written in Lua. It is written in Java, and you could easily recreate RAM with a byte array.
I'm not an idiot; I know what language CC is in. I suppose you could do what you're talking about; I misunderstood the original suggestion. My apologies.
1v2 #5
Posted 10 November 2012 - 06:43 AM
Would be pretty cool if we had a low-level language.
matejdro #6
Posted 10 November 2012 - 07:50 AM
That would probably require rewrite of the major parts of the mod. And it would create a lof of potential security holes.

If you want low level computer, go with redpower control.
Mads #7
Posted 10 November 2012 - 08:17 AM
How would it create a lot of security holes? It would only be using virtually immitated memory, which means that it would automatically be sandboxed.
ElvishJerricco #8
Posted 10 November 2012 - 10:04 AM
This would require a HUGE rewrite of the mod. Eloraam spent months writing Redpower Control to behave this way (it actually emulates a modified Motorola 6502 processor) and CC just isn't written that way. Processor emulators are no small task and what you're asking for pretty much is a processor emulator

So point is: probably not gonna happen, but try out Redpower Control if you want to do that stuff.
PixelToast #9
Posted 10 November 2012 - 12:23 PM
This would require a HUGE rewrite of the mod. Eloraam spent months writing Redpower Control to behave this way (it actually emulates a modified Motorola 6502 processor) and CC just isn't written that way. Processor emulators are no small task and what you're asking for pretty much is a processor emulator

So point is: probably not gonna happen, but try out Redpower Control if you want to do that stuff.
why would it be a huge rewrite, its just a simple assembly inturpreter
you dont have to rewrite the os completely and RPC isnt assembly :unsure:/>/>
Cloudy #10
Posted 10 November 2012 - 01:15 PM
Nah. ComputerCraft brings Lua to ingame computers. Not the place for lots of memory management, or lower level stuff. Feel free to code it inside CC though.