Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
final fixes for module system
Browse files Browse the repository at this point in the history
  • Loading branch information
0xF6 committed May 22, 2020
1 parent 5933541 commit d27da15
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Authors>Yuuki Wesp</Authors>
<Company>Ancient Project</Company>
<Version>0.70.699.120</Version>
<Version>0.70.701.120</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Sprache" Version="2.3.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>0.70.673.37</Version>
<Version>0.70.675.37</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageIconUrl>https://raw.githubusercontent.com/ancientproject/cli/master/resource/icon.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/0xF6/ancient_cpu</PackageProjectUrl>
Expand Down
2 changes: 1 addition & 1 deletion submodules/runtime
34 changes: 2 additions & 32 deletions vm/csharp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static void InitializeProcess()
public static void InitializeFlags(Bus bus)
{
/* @0x11 */
bus.State.tc = AppFlag.GetVariable("VM_TRACE", true);
bus.State.tc = AppFlag.GetVariable("VM_TRACE", false);
/* @0x12 */
bus.State.ec = AppFlag.GetVariable("VM_ERROR", false);
/* @0x13 */
Expand All @@ -61,37 +61,7 @@ public static void InitializeMemory(Bus bus, params string[] args)
if (bus.State.halt != 0)
return;
if (!args.Any())
{
//var ev = new SignatureEvolve(new List<string> {"u32", "f32"}, "FuckingXuy");

//(ev as IEvolveEvent).OnBuild();

//bus.State.Load("<exec>", ev
// .GetInstructions().Select(x =>(ulong)x).ToArray());
var mem = new Instruction[]
{
new ldx(0x11, 0x1),
new sig("test1", 0, "void"), new lpstr("test1"),
new ldi(0x0, 0x5),
new __static_extern_call("sys->DumpCallStack()"),
new ret(),
new nop(),
new sig("test2", 0, "void"), new lpstr("test2"),
new ldi(0x1, 0x6),
new call_i("test1()"),
new ret(),
new nop(),
new sig("test3", 0, "void"), new lpstr("test3"),
new call_i("test2()"),
new mul(0x3, 0x0, 0x1),
new ret(),
new nop(),
new call_i("test3()")
};
bus.State.Load("<exec>", mem.Select(x => (ulong)x).ToArray());
bus.State.LoadMeta(mem.SelectMany(x => x.GetMetaDataILBytes()).ToArray());
//bus.State.Load("<chip>", 0xB00B50000);
}
bus.State.Load("<chip>", 0xB00B50000);
else
{
var nameFile = Path.Combine(Path.GetDirectoryName(args.First()), Path.GetFileNameWithoutExtension(args.First()));
Expand Down
2 changes: 1 addition & 1 deletion vm/csharp/vm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
win10-arm64;
win10-arm;
</RuntimeIdentifiers>
<Version>0.70.754-beta</Version>
<Version>0.70.756-beta</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Copyright>Yuuki Wesp (C) 2020</Copyright>
</PropertyGroup>
Expand Down

0 comments on commit d27da15

Please sign in to comment.