-
Notifications
You must be signed in to change notification settings - Fork 86
C# Guidelines
Aman Priyadarshi edited this page Dec 21, 2016
·
5 revisions
- Usage
throw new Exception("message");
try
andcatch
- Implementation
ECX
register stores pointer to exception object.- Value of
ECX
is tested after calling a function. if NOT NULL exception is passed.- Thus
ECX
should be cleared to Zero if exception is not expected.
- For loading and linking binaries at Runtime
using System.Runtime.InteropServices; ... [DllImport("disk0/main.o", EntryPoint = "AddTwoNumbers")] public static extern uint Hello(int a, int b); ... Console.WriteLine(Hello(1, 2));
dllName: Absolute path to binary in mounted device.
EntryPoint(optional): Name of symbol to load. If not set then Compiler will pickup method base name (i.e. Hello).
CallingConvention: Leave empty if calling Atomix compiled binaries. And set it toCallingConvention.StdCall
for GCC compiled binaries