ArkScript
A small, fast, functional and scripting language for video games
Ark::internal::Word Struct Reference

#include <Word.hpp>

Public Member Functions

 Word (const uint8_t inst, const uint16_t arg=0)
 
 Word (const uint8_t inst, const uint16_t primary_arg, const uint16_t secondary_arg)
 Construct a word with two arguments, each on 12 bits. It's up to the caller to ensure that no data is lost.
 

Public Attributes

uint8_t opcode = 0
 Instruction opcode.
 
uint8_t byte_1 = 0
 
uint8_t byte_2 = 0
 
uint8_t byte_3 = 0
 

Detailed Description

Definition at line 17 of file Word.hpp.

Constructor & Destructor Documentation

◆ Word() [1/2]

Ark::internal::Word::Word ( const uint8_t inst,
const uint16_t arg = 0 )
inlineexplicit

Definition at line 24 of file Word.hpp.

◆ Word() [2/2]

Ark::internal::Word::Word ( const uint8_t inst,
const uint16_t primary_arg,
const uint16_t secondary_arg )
inline

Construct a word with two arguments, each on 12 bits. It's up to the caller to ensure that no data is lost.

Parameters
inst
primary_argargument on 12 bits, the upper 4 bits are lost
secondary_arg2nd argument on 12 bits, the upper 4 bits are lost

Definition at line 34 of file Word.hpp.

References byte_1, byte_2, and byte_3.

Member Data Documentation

◆ byte_1

uint8_t Ark::internal::Word::byte_1 = 0

Definition at line 20 of file Word.hpp.

Referenced by Ark::internal::IRCompiler::pushWord(), and Word().

◆ byte_2

uint8_t Ark::internal::Word::byte_2 = 0

Definition at line 21 of file Word.hpp.

Referenced by Ark::internal::IRCompiler::pushWord(), and Word().

◆ byte_3

uint8_t Ark::internal::Word::byte_3 = 0

Definition at line 22 of file Word.hpp.

Referenced by Ark::internal::IRCompiler::pushWord(), and Word().

◆ opcode

uint8_t Ark::internal::Word::opcode = 0

Instruction opcode.

Definition at line 19 of file Word.hpp.

Referenced by Ark::internal::IRCompiler::pushWord().


The documentation for this struct was generated from the following file: