mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-07 00:32:29 +00:00
This commit is contained in:
parent
d56063a105
commit
100a788757
4 changed files with 16 additions and 2 deletions
|
|
@ -10,6 +10,9 @@ using Cosmos.IL2CPU.ILOpCodes;
|
||||||
using Indy.IL2CPU;
|
using Indy.IL2CPU;
|
||||||
|
|
||||||
namespace Cosmos.IL2CPU.X86 {
|
namespace Cosmos.IL2CPU.X86 {
|
||||||
|
// TODO: I think we need to later elminate this class
|
||||||
|
// Much of it is left over from the old build stuff, and info
|
||||||
|
// here actually belongs else where, not in the assembler
|
||||||
public abstract class CosmosAssembler : Cosmos.IL2CPU.Assembler
|
public abstract class CosmosAssembler : Cosmos.IL2CPU.Assembler
|
||||||
{
|
{
|
||||||
//TODO: COM Port info - should be in assembler? Assembler should not know about comports...
|
//TODO: COM Port info - should be in assembler? Assembler should not know about comports...
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,11 @@ namespace Cosmos.IL2CPU.X86 {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void MethodBegin(MethodInfo aMethod) {
|
protected override void MethodBegin(MethodInfo aMethod) {
|
||||||
|
base.MethodBegin(aMethod);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void MethodEnd(MethodInfo aMethod) {
|
protected override void MethodEnd(MethodInfo aMethod) {
|
||||||
|
base.MethodEnd(aMethod);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AssemblerBin() : base(0) { }
|
public AssemblerBin() : base(0) { }
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,12 @@ namespace Cosmos.IL2CPU.X86 {
|
||||||
public AssemblerNasm() : base( 0 ) { }
|
public AssemblerNasm() : base( 0 ) { }
|
||||||
|
|
||||||
protected override void MethodBegin(MethodInfo aMethod) {
|
protected override void MethodBegin(MethodInfo aMethod) {
|
||||||
|
base.MethodBegin(aMethod);
|
||||||
|
new Label(aMethod.MethodBase);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void MethodEnd(MethodInfo aMethod) {
|
protected override void MethodEnd(MethodInfo aMethod) {
|
||||||
|
base.MethodEnd(aMethod);
|
||||||
}
|
}
|
||||||
|
|
||||||
// These are all temp functions until we move to the new assembler.
|
// These are all temp functions until we move to the new assembler.
|
||||||
|
|
|
||||||
|
|
@ -105,8 +105,14 @@ namespace Cosmos.IL2CPU {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void MethodBegin(MethodInfo aMethod);
|
protected virtual void MethodBegin(MethodInfo aMethod) {
|
||||||
protected abstract void MethodEnd(MethodInfo aMethod);
|
new Comment(this, "---------------------------------------------------------");
|
||||||
|
new Comment(this, "Begin Method: " + aMethod.MethodBase.Name);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void MethodEnd(MethodInfo aMethod) {
|
||||||
|
new Comment(this, "End Method: " + aMethod.MethodBase.Name);
|
||||||
|
}
|
||||||
|
|
||||||
public void ProcessMethod(MethodInfo aMethod, List<ILOpCode> aOpCodes) {
|
public void ProcessMethod(MethodInfo aMethod, List<ILOpCode> aOpCodes) {
|
||||||
// We check this here and not scanner as when scanner makes these
|
// We check this here and not scanner as when scanner makes these
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue