Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Writing your first perling program

Tarith Jayasooriya edited this page Apr 23, 2021 · 1 revision

first create a file named first_program.perling. then open it with any text editor and copy the following code.

LOAD 01 00 23 # value to print (try changing 23 to any hex value)
LOAD 02 00 01 # pointer to value to print

LOAD 03 00 01 # print mode
LOAD 04 00 03 # pointer to print mode

VMCALL 1F 04 02 # print
after that open a terminal and run the PASM compiler using python3 main.py first_program.perling this will create a new file named first_program.perling.bin run the command perling_vm first_program.perling.bin and see the result.

Note: 1F always points to 0

Clone this wiki locally