Exemple #1
0
        public void ExprWithQuotesAndEscapedCharsCommentTest()
        {
            var asmLine = AsmLine.Parse("String BYTE \", wor\\\"ld\",#a,0 hello world");

            Assert.AreEqual("String", asmLine.Label);
            Assert.AreEqual("BYTE", asmLine.Op);
            Assert.AreEqual(", wor\\\"ld,#a,0", asmLine.Expr);
            Assert.AreEqual("hello world", asmLine.Comment);
        }
Exemple #2
0
        public void LocLineTest()
        {
            var asmLine = AsmLine.Parse("LOC #100");

            Assert.AreEqual("", asmLine.Label);
            Assert.AreEqual("LOC", asmLine.Op);
            Assert.AreEqual("#100", asmLine.Expr);
            Assert.AreEqual("", asmLine.Comment);
        }
Exemple #3
0
        public void MainLineTest()
        {
            var asmLine = AsmLine.Parse("Main LDOU $255,argv,0");

            Assert.AreEqual("Main", asmLine.Label);
            Assert.AreEqual("LDOU", asmLine.Op);
            Assert.AreEqual("$255,argv,0", asmLine.Expr);
            Assert.AreEqual("", asmLine.Comment);
        }
Exemple #4
0
        public void ExprWithQuotesAndCommentTest()
        {
            var asmLine = AsmLine.Parse("String BYTE \", world\",#a,0 hello world");

            Assert.AreEqual("String", asmLine.Label);
            Assert.AreEqual("BYTE", asmLine.Op);
            Assert.AreEqual("\", world\",#a,0", asmLine.Expr);
            Assert.AreEqual("\", world\"", asmLine.X);
            Assert.AreEqual("#a", asmLine.Y);
            Assert.AreEqual("0", asmLine.Z);
            Assert.AreEqual("hello world", asmLine.Comment);
        }
Exemple #5
0
        public void MainLineWithCommentsTest()
        {
            var asmLine = AsmLine.Parse("Main LDOU $255,argv,0 this is the main entry");

            Assert.AreEqual("Main", asmLine.Label);
            Assert.AreEqual("LDOU", asmLine.Op);
            Assert.AreEqual("$255,argv,0", asmLine.Expr);
            Assert.AreEqual("$255", asmLine.X);
            Assert.AreEqual("argv", asmLine.Y);
            Assert.AreEqual("0", asmLine.Z);
            Assert.AreEqual("this is the main entry", asmLine.Comment);
        }