Skip to content

Commit

Permalink
updated push instruction info
Browse files Browse the repository at this point in the history
  • Loading branch information
NiTiSon committed Sep 9, 2024
1 parent a8fef0b commit 64ff7fc
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 41 deletions.
54 changes: 39 additions & 15 deletions docs/runtime/bytecode/push.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# `push` instructions
Push instructions are pushing values onto stack for future using

## Push argument
## Push arguments

Property|Value
--:|---
Expand All @@ -10,21 +10,36 @@ Assembly|`push arg <name: literal>`<br/>`push arg <index: u16>`
Description|Push argument value onto stack
Size|3

## Push local
Property|Value
--:|---
Code|`0x03`
Assembly|`push <name: literal>`<br/>`push <index: u16>`
Assembly|`push &arg <name: literal>`<br/>`push &arg <index: u16>`
Description|Push argument reference onto stack
Size|3

## Push locals

Property|Value
--:|---
Code|`0x05`
Assembly|`push local <name: literal>`<br/>`push local <index: u16>`
Description|Push local variable value onto stack
Size|3

## Push literals
Property|Value
--:|---
Code|`0x06`
Assembly|`push &local <name: literal>`<br/>`push &local <index: u16>`
Description|Push local variable reference onto stack
Size|3

## Push numerics

=== "i8"

Property|Value
--:|---
Code|`0x20`
Code|`0x10`
Assembly|`push <value: i8>`
Description|Push 8-bit integer onto stack
Size|2
Expand All @@ -33,7 +48,7 @@ Size|3

Property|Value
--:|---
Code|`0x21`
Code|`0x11`
Assembly|`push <value: i16>`
Description|Push 16-bit integer onto stack
Size|3
Expand All @@ -42,7 +57,7 @@ Size|3

Property|Value
--:|---
Code|`0x22`
Code|`0x12`
Assembly|`push <value: i32>`
Description|Push 32-bit integer onto stack
Size|5
Expand All @@ -51,7 +66,7 @@ Size|3

Property|Value
--:|---
Code|`0x23`
Code|`0x13`
Assembly|`push <value: i64>`
Description|Push 64-bit integer onto stack
Size|9
Expand All @@ -60,7 +75,7 @@ Size|3

Property|Value
--:|---
Code|`0x25`
Code|`0x14`
Assembly|`push <value: u8>`
Description|Push 8-bit unsigned integer onto stack
Size|2
Expand All @@ -69,7 +84,7 @@ Size|3

Property|Value
--:|---
Code|`0x26`
Code|`0x15`
Assembly|`push <value: u16>`
Description|Push 16-bit unsigned integer onto stack
Size|3
Expand All @@ -78,7 +93,7 @@ Size|3

Property|Value
--:|---
Code|`0x27`
Code|`0x16`
Assembly|`push <value: u32>`
Description|Push 32-bit unsigned integer onto stack
Size|5
Expand All @@ -87,7 +102,7 @@ Size|3

Property|Value
--:|---
Code|`0x28`
Code|`0x17`
Assembly|`push <value: u64>`
Description|Push 64-bit unsigned integer onto stack
Size|9
Expand All @@ -96,7 +111,7 @@ Size|3

Property|Value
--:|---
Code|`0x2B`
Code|`0x18`
Assembly|`push <value: f32>`
Description|Push float integer onto stack
Size|5
Expand All @@ -105,7 +120,16 @@ Size|3

Property|Value
--:|---
Code|`0x2C`
Code|`0x19`
Assembly|`push <value: f64>`
Description|Push double float integer onto stack
Size|9
Size|9

## Push null

Property|Value
--:|---
Code|`0x1B`
Assembly|`push null`
Description|Push null onto stack
Size|1
26 changes: 0 additions & 26 deletions docs/runtime/versions/zero.md

This file was deleted.

0 comments on commit 64ff7fc

Please sign in to comment.