Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C Mode, Japanese version support and testing inline assembly #6

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
1523c7f
first build
laqieer Aug 5, 2018
c3c3e2a
add a new command, [C]Compile, to compile event script to assembly so…
laqieer Aug 5, 2018
e07a03e
fixed symbol second definiation warning
laqieer Aug 5, 2018
8328b21
try to prevent label from converting to address
laqieer Aug 5, 2018
f8b39d5
handle alignment
laqieer Aug 6, 2018
0437dd8
Handle label reference
laqieer Aug 6, 2018
2ae5d13
support inline assembly (T)
laqieer Aug 6, 2018
7f65008
fix ASMC
laqieer Aug 6, 2018
eb3d46c
support call extern labels, usually functions written in assembly or C
laqieer Aug 6, 2018
cbc8e1f
Add EXTERN Command to handle extern symbols
laqieer Aug 7, 2018
bcfddf6
add GLOBAL instruction to export symbols for extern use
laqieer Aug 7, 2018
898014c
support language FE7J
laqieer Aug 11, 2018
1467606
add comment from 7743
laqieer Aug 11, 2018
7959a3f
添加了SECTION伪指令
laqieer Aug 12, 2018
00215e5
syntax highlight for notepad++
laqieer Aug 18, 2018
ecddefa
print section address in hex
laqieer Aug 18, 2018
0d529f7
clean up READMEs
laqieer Oct 6, 2018
721c07c
set project language to C#
laqieer Oct 6, 2018
78aa80b
remove repeated README
laqieer Oct 6, 2018
af42479
fix README.md
laqieer Oct 6, 2018
8928983
fix syntax list in the README.md
laqieer Oct 6, 2018
d6e56fa
add TODO.md
laqieer Oct 6, 2018
f651460
handle PUSH/POP/ORG, add ENDSECTION, add -ignoreORG as a command line…
laqieer Nov 11, 2018
4f670b6
update README.md
laqieer Nov 11, 2018
bfa7010
Rename README.md to README(laqieer).md
laqieer Dec 3, 2019
27c4045
Rename README(Crazycolorz5).txt to README.txt
laqieer Dec 3, 2019
eb7d1fe
Rename README.txt to README2.txt
laqieer Dec 3, 2019
2fab15c
Rename README(Nintenlord).md to README.md
laqieer Dec 3, 2019
9768cbb
Rename README(laqieer).md to README3.md
laqieer Dec 3, 2019
39ec03c
Revert "first build"
laqieer Feb 11, 2020
cec1d45
remove Language Raws/Units from project
laqieer Feb 11, 2020
c9719c0
call Assemble & Compile directly
laqieer Feb 13, 2020
631f9bc
Revert "support language FE7J"
laqieer Feb 13, 2020
33a6251
JP version has the same pointer list structure with US version
laqieer Feb 13, 2020
0475220
Remove Contracts because it is not supported in recent Visual Studio …
laqieer Sep 12, 2022
dca2674
Add an argument to ignore sub folders in language raws folder when pa…
laqieer Sep 14, 2022
21698c0
migrate from .Net Framework 4 to .Net Framework 4.8
laqieer Feb 11, 2020
fb6e509
remove unreachable code detected to fix warning CS0162
laqieer Feb 11, 2020
cc0f7e9
disable warning CS0649 for some old code
laqieer Feb 11, 2020
008c6b7
convert project files to .NET SDK-style
laqieer Feb 11, 2020
5e9086c
migrate from .Net Framework 4.8 to .Net Core 3.1
laqieer Feb 11, 2020
9af5fbb
Port Core to NET 6.0
laqieer Sep 14, 2022
c17e676
Switch build target to library
laqieer Sep 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.cs linguist-language=C#
16 changes: 0 additions & 16 deletions Event Assembler/Core/AssemblyInfo.cs

This file was deleted.

13 changes: 12 additions & 1 deletion Event Assembler/Core/Code/Language/EACodeLanguage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Nintenlord.Event_Assembler.Core.IO.Input;
using Nintenlord.Event_Assembler.Core.IO.Logs;
using Nintenlord.Parser;
using Nintenlord.Utility.Strings;
using System;
using System.Collections.Generic;
using System.IO;
Expand Down Expand Up @@ -104,7 +105,7 @@ public EACodeLanguage(string name, IPointerMaker pointerMaker, Tuple<string, Lis
assertion,
protectCode
};
this.assembler = new EAExpressionAssembler(this.codeStorage, (IParser<Token, IExpression<int>>) null);
this.assembler = new EAExpressionAssembler(this.codeStorage, new TokenParser<int> (new Func<string, int> (StringExtensions.GetValue)));
this.disassembler = new EACodeLanguageDisassembler(this.codeStorage, pointerMaker, pointerList);
}

Expand All @@ -113,6 +114,16 @@ public void Assemble(IPositionableInputStream input, BinaryWriter output, ILog m
this.assembler.Assemble(input, output, messageLog);
}

public void Compile(IPositionableInputStream input, TextWriter output, ILog messageLog)
{
this.assembler.Compile(input, output, messageLog);
}

public IEnumerable<KeyValuePair<string, int>> GetGlobalSymbols ()
{
return this.assembler.GetGlobalSymbols();
}

public IEnumerable<string[]> Disassemble(byte[] code, int offset, int length, Priority priority, bool addEndingLinest, ILog messageLog)
{
return this.disassembler.Disassemble(code, offset, length, priority, messageLog, addEndingLinest);
Expand Down
Loading