Releases: AsmXFoundation/AsmX-G2
AsmX G2 v13 Technical Overview
AsmX G2 v13 Release Notes
Welcome to the new version of AsmX G2, v13! This release includes a significant new feature: our very own Real-Time Clock (RTC) component.
What's New
RTC Component: We have developed a custom RTC component for AsmX G2. This component allows you to access real-time clock information directly in your assembly code.
Once in RTC mode, the following functions will be available:
- get_seconds()
- get_minutes()
- get_hours()
- get_day()
- get_month()
- get_year()
The results of these functions will be stored in the $eax
register, making it easy to access and use the time-related data in your code.
We hope you enjoy this new addition to the AsmX G2 v13 and find it useful in your assembly programming projects. As always, feel free to provide feedback or report any issues you encounter.
AsmX G2 v12 Technical Overview
AsmX G2 v12 Release Notes
AsmX G2 v12: Revolutionary Graphics Capabilities
We are thrilled to announce the release of AsmX G2 v12, which brings a game-changing feature to our language: a custom-built graphics processing unit (GPU)!
What's New?
In this release, we have developed our own GPU, offering unprecedented control over graphics processing. This milestone achievement enables developers to unlock the full potential of AsmX G2 and create stunning visual experiences.
GPU Architecture
Our GPU features:
- Registers: Five 16-bit registers:
$sp
,$wdx
,$wdy
,$wsw
, and$wsh
- Video Memory (VRAM): An 8-bit (1-byte) memory cell with a capacity of 64KB, each storing a uint8 value
- Color RAM (CRAM): A separate memory with the same architecture as VRAM, but filled with 256 colors for text and 256 colors for background, with a 7-times larger capacity (448KB).
- Buffer: A small memory with a height and width equal to the screen pixels, configurable by the graphics processor; can be used to store an entire frame.
- Stack: A 16-bit memory for storing pointers to VRAM and CRAM, with a capacity of 64KB.
New Instruction: mode
To facilitate interactions with other drivers and devices, we have introduced the mode
instruction, allowing you to switch between different modes. This instruction is essential for harnessing the power of our custom GPU.
Syntax:
@mode <number>
Arguments:
<number>
: A single argument specifying the mode number
# Mode List:
0
: CPU (default mode, default value set at program start)1
: GPU
When switching to GPU mode, you will gain access to GPU registers, and we will add GPU-specific instructions in the future. Note that switching back to CPU mode will make GPU registers unavailable.
Controller Component
Our innovative Controller component is responsible for managing mode transitions and other tasks. It also searches for existing devices and drivers, ensuring seamless interactions.
Example:
Check out the gpu.asmx
file for an example of how to interact with our GPU.
Get Started
Explore the possibilities of AsmX G2 v12 and unlock the full potential of our custom GPU. Happy coding!
AsmX G2 v11 Technical Overview
AsmX G2 v11 Release Notes
New Features
MMX Architecture Enhancement
We are excited to introduce a new procedure to the MMX architecture in this release:
load
Procedure
The load
procedure has been added to facilitate the loading of values from the MMX register vector into registers or memory.
Syntax
@load [destination], $mmx_register
destination
: The target register or memory address where the value will be loaded.$mmx_register
: The source MMX register from which the value will be loaded.
Example Usage
@store $mm0, uint32 [120]
@store $mm0, uint32 [150]
@mov $mmi0, 0
@mov $ax, 4
@load [$ax], $mm0
@push [$ax]
@system 4
In this example, the value 120 is loaded from $mm0
into the memory address pointed to by $ax
, and then pushed onto the stack and printed.
Output
120
Compatibility
This release is fully compatible with existing AsmX G2 code. However, please ensure that you update your development environment to take advantage of the new load
procedure.
AsmX G2 v10 Technical Overview
AsmX G2 v10 Release Notes
New Features & Enhancements
We are thrilled to present the release of AsmX G2 v10, a substantial update to our assembly language programming environment. This release introduces support for the SSE (Streaming SIMD Extensions) architecture, offering developers novel capabilities for vector processing and floating-point computations.
SSE Architecture Support
The SSE architecture is a potent feature that enables parallel operations on multiple data elements, enhancing the performance of multimedia, scientific, and financial applications. With this release, AsmX G2 v10 now supports the SSE architecture, bringing with it the following advancements:
New 128-bit Vector Registers
We have added 16 new 128-bit registers, xmm0
through xmm15
, which are designed to hold vector data. These registers can store data in various configurations, including arrays of 2 64-bit elements or 4 32-bit elements, making them ideal for vector and floating-point operations.
New 8-bit Index Registers
To complement the vector registers, we have also introduced 16 new 8-bit index registers, xmmi0
through xmmi15
. These registers serve as indexes for the xmm0
through xmm15
vector registers, providing a convenient way to access individual elements within a vector.
New Data Types: float32 and float64
Alongside the new registers, AsmX G2 v10 now supports two new data types: float32
and float64
. These types allow for single-precision and double-precision floating-point operations, respectively, enabling more accurate and efficient numerical computations.
New Instruction: storeft
To facilitate the use of vectors, we have introduced a new instruction, storeft
(store float), which is exclusive to the SSE architecture. This instruction simplifies the assignment of vectors with the following syntax:
@storeft <mmx register vec>, type [element]
Here, type
specifies the data type of the vector element(s). This instruction requires exactly one element. The type must be from the float family.
When the vector index is zero, type
instructs the compiler to create a vector of the specified type, initializing the first element with the provided value. If the vector index exceeds the vector size, it is reset to zero, ensuring circular access within the vector.
Examples
To help developers get started with the SSE architecture, we have included an additional example file, sse.asmx
, which demonstrates the use of the SSE architecture. This example showcases the storeft
instruction in action, providing a comprehensive guide to manipulating vectors and utilizing the SSE registers.
We encourage all AsmX G2 users to explore these new features and enhance their assembly language programming experience. For more information, please refer to the updated documentation and examples provided with this release.
AsmX G2 v9 Technical Overview
AsmX G2 v9 Release Notes
New Features & Enhancements
We are pleased to announce the release of AsmX G2 version 9.0.0, which includes a number of significant enhancements and improvements to our programming language. This release emphasizes robustness and performance, with a focus on extending the capabilities of MMX vector register operations and refining the behavior of the mov
and push
instructions.
What's New in AsmX G2 v9.0.0
MMX Vector Register Reset Enhancement
-
Added the Ability to Reset All MMX Vector Registers: Users can now reset all MMX vector registers to their initial state using the new
emms
instruction. This is particularly useful for cleaning up the MMX state after performing SIMD operations and before transitioning back to floating-point operations to avoid state corruption.Example usage:
emms ;; This will reset the MMX vector registers
MOV Instruction Error Handling
-
Error on Invalid MMX Vector Register Specification in
mov
: In order to prevent unintended behavior and improve code safety, themov
instruction has been updated to generate an error if an attempt is made to specify an MMX vector register as one of the arguments. This change enforces proper usage and ensures that developers are guided towards the correct instructions for MMX register manipulation.Example of incorrect usage that will now trigger an error:
mov mm0, eax ;; This will now result in an error
Enhanced PUSH Instruction Flexibility
-
Flexibility Added to
push
Instruction: Thepush
instruction now allows users to add a value directly from memory, offering greater flexibility and simplifying code that requires manipulating the stack with values that are not immediately present in registers.Example of new usage:
push [$eax] ;; This will push the value at the memory address contained in the $eax register onto the stack
Upgrade Instructions
To upgrade to AsmX G2 v9.0.0, please follow the standard upgrade procedures for your environment or consult the AsmX G2 documentation for detailed instructions. Ensure that you review your existing code for compatibility with the changes, especially if you have used the mov
instruction with MMX registers in the past.
AsmX G2 v8 Technical Overview
AsmX G2 v8 Release Notes
New Features & Enhancements
MMX Instruction Architecture and Register Expansion
AsmX G2 v8 introduces support for the MMX instruction architecture alongside a significant increase in the number of available registers. This enhancement caters to complex mathematical computations and high-performance tasks, leveraging the power of MMX for optimized data processing.
Syntax Changes
To improve code readability and align with best practices, the syntax for initiating single-line comments has been updated. Instead of using the #
symbol, developers should now use ;;
to denote comments. For instance:
;; This is a single-line comment
The documentation in README.md has also been corrected to reflect this change accurately.
Examples
A new example file, pow.asmx
, has been added to illustrate the implementation of the pow
function. This serves as a practical guide for utilizing AsmX G2 v8's capabilities in mathematical operations.
Error Fixes and Edits
Addressing a critical issue, the handling of 64-bit register assignments has been resolved. Previously problematic statements like:
@mov $rax, 4
now execute without errors. Additionally, displaying 64-bit values, which was previously problematic, has been fixed, ensuring seamless operation with larger data types.
Mathematical Instructions
AsmX G2 v8 now allows for the omission of one argument in mathematical instructions, facilitating simpler code structure. For example:
@mov $ebx, 4 ;; $ebx = 4
@add $ebx ;; $ebx += $ebx ($eax = 8)
This feature builds upon the established thesis from AsmX G2 v4 regarding the handling of mathematical operation results:
- Results up to 32 bits are stored in the $eax register.
- Results exceeding 32 bits are split, with the lower 32 bits in $eax and the higher 32 bits in $edx.
New Registers
The register set has been expanded to include:
- Sixteen-bit registers:
$bx
,$cx
,$dx
,$si
,$di
,$bp
. - Eight-bit registers:
$imm0
-$imm10
for versatile storage and function argument passing. - MMX registers:
$mm0
-$mm7
and$imm0
-$imm7
(8-bit), serving as indexes for each MMX register. Each$mm0
-$mm7
register can store up to 64 bits, arranged in various configurations:- An array with one 64-bit element.
- An array of two 32-bit elements.
- An array of four 16-bit elements.
- An array of eight 8-bit elements.
New Instruction: Store
The store
instruction, exclusive to the MMX architecture, facilitates vector assignment with the following syntax:
@store <mmx register vec>, type [element]
Where type
denotes the data type of the vector element(s). This instruction requires exactly one element.
When the vector index is zero, type
instructs the compiler to create a vector of the specified type, initializing the first element with the provided value. If the vector index surpasses the vector size, it resets to zero, ensuring circular access within the vector.
Examples
An additional example file, mmx.asmx
, has been included to demonstrate the utilization of the MMX architecture. This showcases the store
instruction in action, providing a comprehensive guide on vector manipulation and MMX register usage.
These enhancements and fixes in AsmX G2 v8 contribute significantly to its robustness and versatility, making it an even more powerful tool for assembly language programming.
AsmX G2 v7 Technical Overview
AsmX G2 v7 Release Notes
AsmX G2 v7.0.0
We are excited to announce the release of AsmX G2 v7.0.0, which includes significant updates and improvements to the AsmX programming language. In this version, substantial effort has been dedicated to code refactoring to enhance performance, readability, and maintainability.
New Features
Update Command
We have introduced a new update
command that allows users to seamlessly update AsmX to the latest version. This feature simplifies the update process, ensuring that you always have access to the most recent improvements and bug fixes. To update to a new version, simply run the following command:
asmx update
Improvements
Code Refactoring
- Enhanced Performance: Refactored codebase to optimize performance, resulting in faster execution and improved efficiency.
- Improved Readability: Cleaned up code to make it more readable and easier to understand, facilitating better collaboration and code maintenance.
- Increased Maintainability: Reorganized code structure to make it more modular and maintainable, simplifying future development and bug fixing.
Bug Fixes
- Resolved various minor bugs to improve overall stability and user experience.
Miscellaneous
- Updated documentation to reflect the new update command and other changes in this version.
- Improved error messages and logging for better troubleshooting and support.
AsmX G2 v6 Technical Overview
Introduction
We are excited to announce the release of AsmX G2 v6, a new version of our programming language designed to enhance the power and flexibility of assembly language programming. This update introduces a series of new features, including support for 64-bit registers, new instructions, system call enhancements, improved comparison operations, and advanced branching mechanisms.
New Features
64-bit Registers
We've expanded the register set to include 64-bit registers, providing more flexibility and performance for operations on large data. The new registers are:
$rax
$rbx
$rcx
$rdx
$rsi
$rdi
$rsp
$rbp
These registers can be used in operations where 64-bit data manipulation is required, enhancing the capabilities of AsmX G2 for modern computing tasks.
New Flags
Three new flags have been introduced to support more sophisticated flow control and conditional execution. However, it's important to note that these flags are private and cannot be directly accessed through the assembler:
$cf
(Carry Flag)$zf
(Zero Flag)$of
(Overflow Flag)
These flags are set automatically by certain instructions and are used internally for conditional jumps and other operations.
New Instructions
Increment and Decrement
Two new instructions, @inc
and @dec
, have been added for efficient incrementing and decrementing of register values. The argument must be a register, and it strictly modifies the register's value.
Example:
@inc $eax # $eax = $eax + 1
Write System Call
A new system call, number 3, has been introduced. This system call is a write operation that does not start on a new line, providing finer control over output formatting.
Example:
@system 3
Note: Recall that system call 4 is used for printing on a new line.
Comparison Instruction
The @cmp
instruction has been added for comparing values. This instruction sets all three existing flags based on the comparison result, enabling conditional execution based on the comparison outcome.
Example:
@cmp $ah, 4
Control Flow Enhancements
Labels and Branching
The ability to define labels and use them for branching has been added, significantly enhancing the control flow capabilities of AsmX G2. The syntax for defining a label is:
@label name {
# code
}
Conditional Jumps
New instructions for navigating to labels based on flag conditions have been introduced:
@jnz name
: Jump to the labelname
if the Zero Flag (ZF
) is 0.@jle name
: Jump to the labelname
if the Zero Flag (ZF
) is 1.@jmp name
: Unconditional jump to the labelname
.
These instructions provide the necessary tools for implementing loops, conditional execution, and complex program logic.
Conclusion
AsmX G2 v6 represents a significant step forward in the evolution of the AsmX programming language, offering new capabilities and improved performance for low-level programming tasks. We encourage all users to update to this version and take advantage of the new features and enhancements it brings.
AsmX G2 v5 Technical Overview
AsmX G2 v5: Enhanced 32-bit Registers and Sign Extension Instructions
This release of AsmX G2 introduces two new 32-bit registers and two powerful sign extension instructions:
New Registers:
$ebx
: A general-purpose 32-bit register.$ecx
: A general-purpose 32-bit register.
New Instructions:
-
movzx
: Move with Zero Extension. This instruction copies the value of a source operand into the destination register, zero-extending it to the size of the destination register. This means that the higher bits of the destination register are filled with zeros.Example:
@movzx $eax, 10
This will move the value 10 (0x0A) into the
$eax
register, resulting in$eax
holding the value 0x0000000A. -
movsx
: Move with Sign Extension. This instruction copies the value of a source operand into the destination register, sign-extending it to the size of the destination register. This means that the higher bits of the destination register are filled with the sign bit of the source operand.Example:
@movsx $ax, 10
This will move the value 65530 (0x0000fffa) into the
$ax
register, resulting in$ax
holding the value 0x0000fffa.
Example Usage:
@function main {
@mov $eax, 14 # Assign 14 to $eax
@push $eax # Push $eax onto the stack
@system 4 # Print 14 (0x0000000e)
@mov $ebx, $eax # Copy the value of $eax into $ebx
@call calloc(4, sizeof(uint8)) # Call calloc to allocate memory
@push $ax # Push the return value (memory address) onto the stack
@system 4 # Print the <ptr *> address
@mov $eax, $ebx # Copy the value of $ebx back into $eax
@push $eax # Push $eax onto the stack
@system 4 #0x0000000e # Print 14 (0x0E) again
@movzx $eax, 65535 # Zero-extend 65535 (0xFFFF) into $eax
@push $eax # Push $eax onto the stack
@system 4 #0x0000ffff # Print 65535 (0xFFFF)
@movsx $ax, 139 # Sign-extend 139 (0x8B) into $ax
@push $ax # Push $ax onto the stack
@system 4 #0x0000ff8b # Print 65419 (0xFF8B)
}
Benefits:
- Increased Register Availability: The addition of $ebx and $ecx provides more flexibility for storing and manipulating data.
- Enhanced Sign Handling: The
movzx
andmovsx
instructions allow for precise control over how values are extended during data movement, preventing unexpected sign-related errors.
This release significantly enhances the capabilities of AsmX G2, making it more powerful and versatile for low-level programming tasks.
AsmX G2 v4
AsmX G2 v4 Release Notes
This release introduces several key enhancements to the AsmX G2 v4 programming language, focusing on expanded functionality and improved performance.
New Features:
-
32-bit Register
$edx
: A new 32-bit general-purpose register,$edx
, has been added to the register set. This expands the available registers for storing and manipulating data. -
Mathematical Instructions: Fundamental mathematical instructions have been added, enabling basic arithmetic operations:
add
: Performs addition of two operands.sub
: Performs subtraction of two operands.mul
: Performs multiplication of two operands.div
: Performs division of two operands.
Result Handling:
The result of mathematical operations is handled as follows:
- Results up to 32 bits: The result is stored in the
$eax
register. - Results exceeding 32 bits: The low-order 32 bits of the result are stored in the
$eax
register, while the high-order 32 bits are stored in the$edx
register.
These additions significantly enhance the capabilities of AsmX G2 v4, providing greater flexibility and power for programmers to handle complex mathematical operations within the language.