Method of use#

Acquisition method#

  1. Through co-disk, selectโ€™ PC simulatorโ€™ to download

  2. Self-compiled, source code address need to be compiled with LuatOS main library

The following is the core tool to demonstrate the PC simulator, executing the lua script

Operation mode#

Script Run#

This way is to execute a lua file, or a batch of lua files

This method executes โ€œsingle scriptโ€ and โ€œmulti-directory executionโ€ in two ways, which need to be operated under the command line.

Take the windows platform as an example, first enter the console and switch to the current directory.

Single script run:

chcp 65001
luatos-pc.exe main.lua
luatos-pc.exe test\001.helloworld\main.lua

Multi-Directory Run:

Note that the folder needs to end with โ€˜โ€™, otherwise it will be regarded as a file.

chcp 65001
luatos-pc.exe test\001.helloworld\  ..\LuatOS\scrips\libs\

Wherein โ€˜chcp 65001โ€™ means to switch the console code to UCS-2, otherwise Chinese will appear garbled

The operation effect is as follows:

Operation effect 1

Operation effect 2

Interactive#

This method is to enter lua statements and execute them line by line.

  • windows Platform, directly double-click โ€˜luatos-pc.exeโ€™ to run

  • linux platform, run directly ./luatos-pc

Running effect 3, interactive