![]() ![]() This script is automatically executed when the disk is installed in a computer - unless you disable autorun via the the file system API. It has to be named autorun or a and must be in the root of the hard drives folder structure. Every hard drive can have such an autorun script. This can get annoying very quickly, so let's create an autorun script that mounts the disk for us when it is inserted. Meaning if you shut down or reboot your computer, it crashes or runs out of power, you'll have to mount your disk again after restarting. Now, computers do not store any state across reboots. Hard drives can be mounted in multiple locations, so doing that will not invalidate the default mount in the /mnt folder. Type mount to mount the hard drive with the specified label at the specified path. We can now mount the hard drive while referring to it by name. Run df again to verify the hard disk is now named. Once you've named your hard disk that name is also shown in the hard disk's tooltip. ![]() For most programs that need an address you can abbreviate the address, as long as it's still unique among the other components connected to the computer. Run the program with the desired parameters, i.e. We'll use the -a option here, but you could also label it by providing the path to its default mount point in the /mnt folder. Run label to get the usage information of the labeling program. What we want to do now, is to assign a name to our hard drive, so we don't have to reference it by address all the time. That should be the address you saw in the tooltip, earlier. Among them you'll notice one that's only known by address (unlike the ROM and temporary file system). This program lists all present file systems and their current mount points. You don't have to remember that, it's just there for reference. You'll notice in the tooltip of the hard drive that it has been assigned an address (that shortened, alpha-numeric string). Note: all concepts in this tutorial also apply to floppy disks.įirst, insert a fresh hard drive into a computer. This tutorial will introduce the concept of labeling and mounting hard drives. While this may be enough for experimenting, you'll want more flexibility and comfort after a while. When you put a hard drive into a computer it will be automatically mounted in the /mnt folder, named after the first letters of its address. So this section will be on how to use hard drives to store your program. Something to note about the /tmp folder, is that any programs you write in there will be cleared whenever you reboot the computer. Your should see the words "Hello World" in the console. Once you have done this, type in the console a with nothing else in the console, and press enter. Go ahead and save your program by doing ctrl + s, and exit the program with ctrl + w. Now, inside of the parentheses, type "Hello World" with the quotation marks included. What this function does is print a line of text to the screen when the program is run. To start with your first program, type: print() You should see a black screen with a blinking cursor and some text at the bottom pop up. Got one? Good! Now go ahead and type in the console: edit a Once you have done this, take a moment to think of a name for your very first open computers program! To switch to the /tmp folder, write in the console cd /tmp (Yes, that is copied from the wiki directly) Remember, this gets wiped on reboot, so don't put anything valuable in here! First off, let's switch to the /tmp folder, which is a small, writable file system each computer comes with. Well, let's start with the good old, proven, beloved first program. So, you've built your first computer and wonder what to do with it? Now go ahead and connect a power supply cable to the bottom, top, or back of the computer case. After that, place the disk drive on the other side on the Case and place the OpenOS inside of the disk drive. Now place a keyboard in front of the screen. Next, place a Screen next to the computer. Once you have done this, you may exit out of the case screen. Graphics card, CPU, Memory cards, Hard Drive, and Lua BIOS. After you have done that, go ahead and left click on the case and place the following items. To start off, place you case on the floor. This guide is very similar to the guide at Getting Started Items needed: In this mod you will either need to know basic Lua 5.2 programming, or be open to learning Lua 5.2. Open Computers is a mod that, in short, adds computers, drones, and robots to the game. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |