From af474aaf2dbdf67cc1a3459d1dc3c0eef4d68a71 Mon Sep 17 00:00:00 2001
From: kudzu_cp <6d05c8c8ef5431987001abfdb2eadc9593ac9498>
Date: Sun, 8 Jul 2012 16:22:22 +0000
Subject: [PATCH]
---
.../Cosmos.Compiler.DebugStub/CmdAsmBreak.cs | 16 +++++++++
.../Cosmos.Compiler.DebugStub/CmdAsmBreak.xs | 1 +
.../{Commands.cs => CmdMisc.cs} | 10 +++---
.../{Commands.xs => CmdMisc.xs} | 0
.../Cosmos.Compiler.DebugStub/CmdProcess.cs | 16 +++++++++
.../Cosmos.Compiler.DebugStub/CmdProcess.xs | 1 +
.../Cosmos.Compiler.DebugStub/CmdSend.cs | 16 +++++++++
.../Cosmos.Compiler.DebugStub/CmdSend.xs | 1 +
.../Cosmos.Debug.DebugStub.csproj | 35 ++++++++++++++++---
9 files changed, 88 insertions(+), 8 deletions(-)
create mode 100644 source2/Compiler/Cosmos.Compiler.DebugStub/CmdAsmBreak.cs
create mode 100644 source2/Compiler/Cosmos.Compiler.DebugStub/CmdAsmBreak.xs
rename source2/Compiler/Cosmos.Compiler.DebugStub/{Commands.cs => CmdMisc.cs} (64%)
rename source2/Compiler/Cosmos.Compiler.DebugStub/{Commands.xs => CmdMisc.xs} (100%)
create mode 100644 source2/Compiler/Cosmos.Compiler.DebugStub/CmdProcess.cs
create mode 100644 source2/Compiler/Cosmos.Compiler.DebugStub/CmdProcess.xs
create mode 100644 source2/Compiler/Cosmos.Compiler.DebugStub/CmdSend.cs
create mode 100644 source2/Compiler/Cosmos.Compiler.DebugStub/CmdSend.xs
diff --git a/source2/Compiler/Cosmos.Compiler.DebugStub/CmdAsmBreak.cs b/source2/Compiler/Cosmos.Compiler.DebugStub/CmdAsmBreak.cs
new file mode 100644
index 000000000..1b3a87b40
--- /dev/null
+++ b/source2/Compiler/Cosmos.Compiler.DebugStub/CmdAsmBreak.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Linq;
+using Cosmos.Assembler;
+using Cosmos.Assembler.x86;
+
+namespace Cosmos.Debug.DebugStub {
+ public class CmdAsmBreak : Cosmos.Assembler.Code {
+
+ public CmdAsmBreak(Assembler.Assembler aAssembler) : base(aAssembler) {}
+
+ public override void Assemble() {
+ new Comment("X#: Group DebugStub");
+
+ }
+ }
+}
diff --git a/source2/Compiler/Cosmos.Compiler.DebugStub/CmdAsmBreak.xs b/source2/Compiler/Cosmos.Compiler.DebugStub/CmdAsmBreak.xs
new file mode 100644
index 000000000..20d92fc46
--- /dev/null
+++ b/source2/Compiler/Cosmos.Compiler.DebugStub/CmdAsmBreak.xs
@@ -0,0 +1 @@
+Group DebugStub
\ No newline at end of file
diff --git a/source2/Compiler/Cosmos.Compiler.DebugStub/Commands.cs b/source2/Compiler/Cosmos.Compiler.DebugStub/CmdMisc.cs
similarity index 64%
rename from source2/Compiler/Cosmos.Compiler.DebugStub/Commands.cs
rename to source2/Compiler/Cosmos.Compiler.DebugStub/CmdMisc.cs
index f4f291122..43429a33f 100644
--- a/source2/Compiler/Cosmos.Compiler.DebugStub/Commands.cs
+++ b/source2/Compiler/Cosmos.Compiler.DebugStub/CmdMisc.cs
@@ -4,9 +4,9 @@ using Cosmos.Assembler;
using Cosmos.Assembler.x86;
namespace Cosmos.Debug.DebugStub {
- public class Commands : Cosmos.Assembler.Code {
+ public class CmdMisc : Cosmos.Assembler.Code {
- public Commands(Assembler.Assembler aAssembler) : base(aAssembler) {}
+ public CmdMisc(Assembler.Assembler aAssembler) : base(aAssembler) {}
public override void Assemble() {
new Comment("X#: Group DebugStub");
@@ -31,7 +31,8 @@ namespace Cosmos.Debug.DebugStub {
new Comment("Tracing.On");
- new Comment(".TraceMode = 1");
+ new Comment("X#: .TraceMode = 1");
+ new Mov { DestinationRef = Cosmos.Assembler.ElementReference.New("DebugStub_TraceMode"), DestinationIsIndirect = true , SourceValue = 1 };
new Comment("X#: }");
new Label("DebugStub_TraceOn_Exit");
@@ -42,7 +43,8 @@ namespace Cosmos.Debug.DebugStub {
new Comment("Tracing.Off");
- new Comment(".TraceMode = 0");
+ new Comment("X#: .TraceMode = 0");
+ new Mov { DestinationRef = Cosmos.Assembler.ElementReference.New("DebugStub_TraceMode"), DestinationIsIndirect = true , SourceValue = 0 };
new Comment("X#: }");
new Label("DebugStub_TraceOff_Exit");
diff --git a/source2/Compiler/Cosmos.Compiler.DebugStub/Commands.xs b/source2/Compiler/Cosmos.Compiler.DebugStub/CmdMisc.xs
similarity index 100%
rename from source2/Compiler/Cosmos.Compiler.DebugStub/Commands.xs
rename to source2/Compiler/Cosmos.Compiler.DebugStub/CmdMisc.xs
diff --git a/source2/Compiler/Cosmos.Compiler.DebugStub/CmdProcess.cs b/source2/Compiler/Cosmos.Compiler.DebugStub/CmdProcess.cs
new file mode 100644
index 000000000..54409948c
--- /dev/null
+++ b/source2/Compiler/Cosmos.Compiler.DebugStub/CmdProcess.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Linq;
+using Cosmos.Assembler;
+using Cosmos.Assembler.x86;
+
+namespace Cosmos.Debug.DebugStub {
+ public class CmdProcess : Cosmos.Assembler.Code {
+
+ public CmdProcess(Assembler.Assembler aAssembler) : base(aAssembler) {}
+
+ public override void Assemble() {
+ new Comment("X#: Group DebugStub");
+
+ }
+ }
+}
diff --git a/source2/Compiler/Cosmos.Compiler.DebugStub/CmdProcess.xs b/source2/Compiler/Cosmos.Compiler.DebugStub/CmdProcess.xs
new file mode 100644
index 000000000..20d92fc46
--- /dev/null
+++ b/source2/Compiler/Cosmos.Compiler.DebugStub/CmdProcess.xs
@@ -0,0 +1 @@
+Group DebugStub
\ No newline at end of file
diff --git a/source2/Compiler/Cosmos.Compiler.DebugStub/CmdSend.cs b/source2/Compiler/Cosmos.Compiler.DebugStub/CmdSend.cs
new file mode 100644
index 000000000..2047cf68b
--- /dev/null
+++ b/source2/Compiler/Cosmos.Compiler.DebugStub/CmdSend.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Linq;
+using Cosmos.Assembler;
+using Cosmos.Assembler.x86;
+
+namespace Cosmos.Debug.DebugStub {
+ public class CmdSend : Cosmos.Assembler.Code {
+
+ public CmdSend(Assembler.Assembler aAssembler) : base(aAssembler) {}
+
+ public override void Assemble() {
+ new Comment("X#: Group DebugStub");
+
+ }
+ }
+}
diff --git a/source2/Compiler/Cosmos.Compiler.DebugStub/CmdSend.xs b/source2/Compiler/Cosmos.Compiler.DebugStub/CmdSend.xs
new file mode 100644
index 000000000..20d92fc46
--- /dev/null
+++ b/source2/Compiler/Cosmos.Compiler.DebugStub/CmdSend.xs
@@ -0,0 +1 @@
+Group DebugStub
\ No newline at end of file
diff --git a/source2/Compiler/Cosmos.Compiler.DebugStub/Cosmos.Debug.DebugStub.csproj b/source2/Compiler/Cosmos.Compiler.DebugStub/Cosmos.Debug.DebugStub.csproj
index a0728e3c7..e97e91d29 100644
--- a/source2/Compiler/Cosmos.Compiler.DebugStub/Cosmos.Debug.DebugStub.csproj
+++ b/source2/Compiler/Cosmos.Compiler.DebugStub/Cosmos.Debug.DebugStub.csproj
@@ -64,10 +64,25 @@
-
+
True
True
- Commands.xs
+ CmdAsmBreak.xs
+
+
+ True
+ True
+ CmdMisc.xs
+
+
+ True
+ True
+ CmdProcess.xs
+
+
+ True
+ True
+ CmdSend.xs
True
@@ -115,9 +130,21 @@
-
+
CosmosXSharpGenerator
- Commands.cs
+ CmdAsmBreak.cs
+
+
+ CosmosXSharpGenerator
+ CmdMisc.cs
+
+
+ CosmosXSharpGenerator
+ CmdProcess.cs
+
+
+ CosmosXSharpGenerator
+ CmdSend.cs