<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.html.cs" Inherits="XSharp_index" %>

binX#

X# is a combination of a high level machine language, and assembler.

C# versus External

At some point X# may be externalized and receive its own seperate compiler / assembler.

Usage

Register Arithmetic

 EBP = EBP + 32;
This is not possible because C# operator overloading does not look at return type but only the operand types. That is C# sees Register + int. If we supported the previous example, then X# could not support:
EAX = Memory[EBP + 4];
In short, C# sees these two as the same and so X# can only support one. Because the memory addressing is used more frequently than adding a constant to a register, X# supports it.
To add a constant to a register use:
EBP.Add(32);

Register Methods

Register = int

Example:
EAX = 0x40;

Register = Register

Example:
EAX = EBP;

Register = Memory[Address];
Register = Memory[Address + int];

Address can be a string label. i.e. EAX = Memory["Data1"]

Register = Port[x]
Register = Port[EAX]

public static implicit operator RegisterEAX(ElementReference aReference) { Instance.Move(aReference); return Instance; }

Register = Label

Example:
EAX = AddressOf("Labelname");