Skip to content

Commit

Permalink
Fix: Small items
Browse files Browse the repository at this point in the history
  • Loading branch information
rizwan3d committed Oct 16, 2023
1 parent abe712f commit c458751
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions WebRISCV/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
{
Address.SetAddress(0);
RiscVAssembler.Assamble(fileContent);
string output = string.Empty;
string output = "<span class='fs-5'>";
output += $"-------------------------------------------------------------------------{Environment.NewLine}";
output += $" Entry Address: {Address.EntryPointHax}{Environment.NewLine}";
output += $"-------------------------------------------------------------------------{Environment.NewLine}";
Expand All @@ -125,6 +125,7 @@
output += $" 0x{dump.Key}\t|\t0x{dump.Value}\t|\t{new string(dump.Value.HexToString().Reverse().ToArray())}{Environment.NewLine}";
}
output += $"-------------------------------------------------------------------------{Environment.NewLine}";
output += $"</span>";

this.output = output;
StateHasChanged();
Expand All @@ -135,10 +136,11 @@
Address.SetAddress(0);
RiscVAssembler.Assamble(fileContent);
var hexcode = new SharpRISCV.Core.Hex.Compile("").BuildHexString();
string output = string.Empty;
string output = "<span class='fs-5'>";
output += $"Copy all the code below the spation line and paste it in Notepad, then save it as a .hex file.{Environment.NewLine}";
output += $"-------------------------------------------------------------------------{Environment.NewLine}";
output += hexcode;
output += $"</span>";
this.output = output;
StateHasChanged();
}
Expand Down Expand Up @@ -173,7 +175,7 @@
private async Task DownloadFile(byte[] data, OutputType outputType)
{
var base64 = Convert.ToBase64String(data);
string ext = outputType == OutputType.ELF ? ".elf" : "exe";
string ext = outputType == OutputType.ELF ? "elf" : "exe";
string name = $"SharRISCV-{DateTime.Now:MM-dd-yyyy}.{ext}";
await JSRuntime.InvokeVoidAsync("downloadFile", name, base64);
}
Expand Down

0 comments on commit c458751

Please sign in to comment.