From 64ff7fc04b62b8830add22fe31eaf601e021bfa2 Mon Sep 17 00:00:00 2001 From: NiTiSon Date: Mon, 9 Sep 2024 21:25:08 +0300 Subject: [PATCH] updated push instruction info --- docs/runtime/bytecode/push.md | 54 +++++++++++++++++++++++++---------- docs/runtime/versions/zero.md | 26 ----------------- 2 files changed, 39 insertions(+), 41 deletions(-) delete mode 100644 docs/runtime/versions/zero.md diff --git a/docs/runtime/bytecode/push.md b/docs/runtime/bytecode/push.md index 01d5736..624dc7a 100644 --- a/docs/runtime/bytecode/push.md +++ b/docs/runtime/bytecode/push.md @@ -1,7 +1,7 @@ # `push` instructions Push instructions are pushing values onto stack for future using -## Push argument +## Push arguments Property|Value --:|--- @@ -10,21 +10,36 @@ Assembly|`push arg `
`push arg ` Description|Push argument value onto stack Size|3 -## Push local Property|Value --:|--- Code|`0x03` -Assembly|`push `
`push ` +Assembly|`push &arg `
`push &arg ` +Description|Push argument reference onto stack +Size|3 + +## Push locals + +Property|Value +--:|--- +Code|`0x05` +Assembly|`push local `
`push local ` Description|Push local variable value onto stack Size|3 -## Push literals +Property|Value +--:|--- +Code|`0x06` +Assembly|`push &local `
`push &local ` +Description|Push local variable reference onto stack +Size|3 + +## Push numerics === "i8" Property|Value --:|--- - Code|`0x20` + Code|`0x10` Assembly|`push ` Description|Push 8-bit integer onto stack Size|2 @@ -33,7 +48,7 @@ Size|3 Property|Value --:|--- - Code|`0x21` + Code|`0x11` Assembly|`push ` Description|Push 16-bit integer onto stack Size|3 @@ -42,7 +57,7 @@ Size|3 Property|Value --:|--- - Code|`0x22` + Code|`0x12` Assembly|`push ` Description|Push 32-bit integer onto stack Size|5 @@ -51,7 +66,7 @@ Size|3 Property|Value --:|--- - Code|`0x23` + Code|`0x13` Assembly|`push ` Description|Push 64-bit integer onto stack Size|9 @@ -60,7 +75,7 @@ Size|3 Property|Value --:|--- - Code|`0x25` + Code|`0x14` Assembly|`push ` Description|Push 8-bit unsigned integer onto stack Size|2 @@ -69,7 +84,7 @@ Size|3 Property|Value --:|--- - Code|`0x26` + Code|`0x15` Assembly|`push ` Description|Push 16-bit unsigned integer onto stack Size|3 @@ -78,7 +93,7 @@ Size|3 Property|Value --:|--- - Code|`0x27` + Code|`0x16` Assembly|`push ` Description|Push 32-bit unsigned integer onto stack Size|5 @@ -87,7 +102,7 @@ Size|3 Property|Value --:|--- - Code|`0x28` + Code|`0x17` Assembly|`push ` Description|Push 64-bit unsigned integer onto stack Size|9 @@ -96,7 +111,7 @@ Size|3 Property|Value --:|--- - Code|`0x2B` + Code|`0x18` Assembly|`push ` Description|Push float integer onto stack Size|5 @@ -105,7 +120,16 @@ Size|3 Property|Value --:|--- - Code|`0x2C` + Code|`0x19` Assembly|`push ` Description|Push double float integer onto stack - Size|9 \ No newline at end of file + Size|9 + +## Push null + +Property|Value +--:|--- +Code|`0x1B` +Assembly|`push null` +Description|Push null onto stack +Size|1 \ No newline at end of file diff --git a/docs/runtime/versions/zero.md b/docs/runtime/versions/zero.md deleted file mode 100644 index c36becc..0000000 --- a/docs/runtime/versions/zero.md +++ /dev/null @@ -1,26 +0,0 @@ -# NLR vZero -NiTiS Languages' Runtime version Zero is the initial version containing all basic instructions and features, all following updates are based on this version. - -## Instructions - -Byte range|Instructions -:-:|--- -0x00|[`nope`](/runtime/bytecode/nope/) -0x01|[`break`](/runtime/bytecode/break/) -0x02|[`push arg`](/runtime/bytecode/push/#push-argument) -0x03|[`push`](/runtime/bytecode/push/#push-local) -0x04|[`pop`](/runtime/bytecode/pop/) -0x05|[`ret`](/runtime/bytecode/ret/) -0x06

0x1F|Unused -0x20

0x2D|[`push`](/runtime/bytecode/push/#push-literals) -0x2E|[`add`](/runtime/bytecode/add/) -0x2F|[`sub`](/runtime/bytecode/sub/) -0x30|[`div`](/runtime/bytecode/div/) -0x31|[`mul`](/runtime/bytecode/mul/) -0x32|[`rem`](/runtime/bytecode/rem/) -0x33|[`and`](/runtime/bytecode/and/) -0x34|[`or`](/runtime/bytecode/or/) -0x35|[`xor`](/runtime/bytecode/xor/) -0x36|[`neg`](/runtime/bytecode/neg/) -0x37|[`not`](/runtime/bytecode/not/) -0x38

0xFF|Unused \ No newline at end of file