mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-11 10:41:33 +00:00
This commit is contained in:
parent
0583c7e7b6
commit
b8669c55d7
5 changed files with 57 additions and 12 deletions
|
|
@ -64,6 +64,11 @@
|
|||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Init.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Init.xs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Old\CmdAsmBreak.cs" />
|
||||
<Compile Include="Old\CmdPing.cs" />
|
||||
<Compile Include="Old\CmdTrace.cs" />
|
||||
|
|
@ -110,6 +115,10 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Cosmos.snk" />
|
||||
<None Include="Init.xs">
|
||||
<Generator>CosmosXSharpGenerator</Generator>
|
||||
<LastGenOutput>Init.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Screen.xs">
|
||||
<Generator>CosmosXSharpGenerator</Generator>
|
||||
<LastGenOutput>Screen.cs</LastGenOutput>
|
||||
|
|
|
|||
37
source2/Compiler/Cosmos.Compiler.DebugStub/Init.cs
Normal file
37
source2/Compiler/Cosmos.Compiler.DebugStub/Init.cs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using Cosmos.Assembler;
|
||||
using Cosmos.Assembler.x86;
|
||||
|
||||
namespace Cosmos.Debug.DebugStub {
|
||||
public class Init : Cosmos.Assembler.Code {
|
||||
public override void Assemble() {
|
||||
new Comment("X#: Group DebugStub");
|
||||
|
||||
new Comment("Called before Kernel runs. Inits debug stub, etc");
|
||||
|
||||
new Comment("X#: procedure Init {");
|
||||
new Label("DebugStub_Init");
|
||||
|
||||
new Comment("X#: Call .Cls");
|
||||
new Call { DestinationLabel = "DebugStub_Cls" };
|
||||
|
||||
new Comment("X#: Call .DisplayWaitMsg");
|
||||
new Call { DestinationLabel = "DebugStub_DisplayWaitMsg" };
|
||||
|
||||
new Comment("X#: Call .InitSerial");
|
||||
new Call { DestinationLabel = "DebugStub_InitSerial" };
|
||||
|
||||
new Comment("X#: Call .WaitForDbgHandshake");
|
||||
new Call { DestinationLabel = "DebugStub_WaitForDbgHandshake" };
|
||||
|
||||
new Comment("X#: Call .Cls");
|
||||
new Call { DestinationLabel = "DebugStub_Cls" };
|
||||
|
||||
new Comment("X#: }");
|
||||
new Label("DebugStub_Init_Exit");
|
||||
new Return();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
10
source2/Compiler/Cosmos.Compiler.DebugStub/Init.xs
Normal file
10
source2/Compiler/Cosmos.Compiler.DebugStub/Init.xs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
Group DebugStub
|
||||
|
||||
# Called before Kernel runs. Inits debug stub, etc
|
||||
procedure Init {
|
||||
Call .Cls
|
||||
Call .DisplayWaitMsg
|
||||
Call .InitSerial
|
||||
Call .WaitForDbgHandshake
|
||||
Call .Cls
|
||||
}
|
||||
|
|
@ -23,17 +23,6 @@ namespace Cosmos.Debug.DebugStub {
|
|||
});
|
||||
}
|
||||
|
||||
// Called before Kernel runs. Inits debug stub, etc
|
||||
public class Init : CodeBlock {
|
||||
public override void Assemble() {
|
||||
Call("DebugStub_Cls");
|
||||
Call("DebugStub_DisplayWaitMsg");
|
||||
Call<InitSerial>();
|
||||
Call<WaitForDbgHandshake>();
|
||||
Call("DebugStub_Cls");
|
||||
}
|
||||
}
|
||||
|
||||
public class WaitForSignature : CodeBlock {
|
||||
public override void Assemble() {
|
||||
EBX = 0;
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ namespace Cosmos.IL2CPU.X86 {
|
|||
new Comment(this, "END - SSE Init");
|
||||
|
||||
if (mComNumber > 0) {
|
||||
CodeBlock.Call<DebugStub.Init>();
|
||||
new Call { DestinationLabel = "DebugStub_Init" };
|
||||
}
|
||||
|
||||
// Jump to Kernel entry point
|
||||
|
|
|
|||
Loading…
Reference in a new issue