Yazwh0_BitMagic_Legacy/BitMagic.AsmTemplate/Template.cs
using BitMagic.Common;
using BitMagic.Machines;
using System.Text;

namespace BitMagic.AsmTemplate
{
    public static class Template
    {
        internal static StringBuilder _output = new();

        public static void WriteLiteral(string literal)
        {
            _output.AppendLine(literal);
        }

        public static void StartProject(Project project)
        {
            BitMagicHelper.Machine = project.Machine;
            _output.Clear();
        }

        public static void StartProject()
        {
            _output.Clear();
        }

        public static string GenerateCode() => _output.ToString();
    }
}