Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Fodor Levente committed Jan 26, 2021
1 parent 19db057 commit efc9cd9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This program compiles and runs and tests assembly project files **at the press of a single button**,
instead of having to struggle with all those pesky terminal commands.

> :warning: **NOTE** You'll need to know how to compile / link / run a project for **exams** manually,
> :warning:**NOTE** You'll need to know how to compile / link / run a project for **exams** manually,
> so make sure you'll know how to do it by then
![demo](https://raw.githubusercontent.com/FLevent29/UBB-NASM-Runner/master/demo.png)
Expand Down Expand Up @@ -32,7 +32,7 @@ instead of having to struggle with all those pesky terminal commands.
> **NOTE** if a currently running program is
> stuck, <kbd>Ctrl</kbd> + <kbd>C</kbd> will kill it without
> killing `UBB-NASM-Runner`
>> :bulb: Unfortunately if the program is stuck asking for input
>> :bulb:Unfortunately if the program is stuck asking for input
>> then this won't help, you should do one of the following
>> (say you run `STRPELDA`, like in the image above) :
>> - close the `UBB-NASM-Runner` window (loss of history), or
Expand Down Expand Up @@ -60,12 +60,14 @@ and the _[tester](https://www.cs.ubbcluj.ro/~scsanad/actest/actest.zip)_ provide
Execute it with a terminal, like [Windows Terminal](https://github.com/microsoft/terminal#installing-and-running-windows-terminal)
or through file explorer.
> **NOTE** Once you start `UBB-NASM-Runner` it will ask you
> if you want your project files moved into `\projects` folder
>> If you answered with _**yes**_, don't panic if your
>> currently open text editor says that your files are
>> missing, they're perfectly safe in the aforementioned
>> directory
>>
>> :information_source: You can change this by deleting `\bin\hushprojects`
> :warning:**NOTE** Once you start `UBB-NASM-Runner` it will ask you
> if you want your project files moved into `\projects` folder or `\ `
> (you probably keep them in `\ ` either way)
> These are your two options, because of how `nasm.exe` handles
> paths, it cannot escape spaces for include files, so
> if you had your projects and it's include files in
> `\my project folder` then `nasm.exe` would start complaining
> about not finding your include files (NASM version 2.11.08)
>> :information_source: You can change the selected
>> directory for your projects by deleting `\bin\hushprojects`
>> and restarting the application
9 changes: 5 additions & 4 deletions UBB-NASM-Runner/Presenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,10 @@ private static async Task<int> CompileApp(string filePath) {

private static async Task<int> LinkApp(string filePath, string argumentLibType) {
try {
// Run Nlink, it doesnt escape spaces within quotation marks in arguments
return await AppRunner.StartConsoleApp(Model.NLinkPath,
$"{GetFileNameWithObjExtension(filePath)} {argumentLibType} " +
$"-o {GetFileNameWithExeExtension(filePath)}");
// Run Nlink, it doesn't escape spaces within quotation marks in arguments
var args = $"{GetFileNameWithObjExtension(filePath)} {argumentLibType} " +
$"-o {GetFileNameWithExeExtension(filePath)}";
return await AppRunner.StartConsoleApp(Model.NLinkPath,args);
}
catch (Exception exception) {
View.PrintError(exception);
Expand Down Expand Up @@ -499,6 +499,7 @@ private static async Task<int> AssembleApp(string filePath, ICollection<string>
var objFullPath = GetFileBinPathWithObjExtension(filePath);
if (!compiledObjects.Contains(objFullPath)) {
// If build failed throw exception
// nasm.exe -i argument option can't escape spaces for some reason
var args = $"-i ..\\{Path.GetFileName(Model.GetProjectsPath())}\\ " +
$"-f win32 " +
$"-o \"{objFullPath}\" \"{filePath}\"";
Expand Down

0 comments on commit efc9cd9

Please sign in to comment.