-
Notifications
You must be signed in to change notification settings - Fork 572
[WIP] Update Nasm Build version... #1728
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
Conversation
This build of Nasm resolved the tedious error, which is known as an Interminable Macro Recursion. For verification, it was capable of loading a larger byte array without displaying the error. Now, you can add more code to your project without it displaying an error. Just one thing to note: if the asset (or array) that you are importing is too large, VS will start to slow down because of the amount of RAM usage. Also, if (the asset) is way too large VS might restart itself.
|
Would there be anything else that is required, in order to submit this pull request? |
|
Is this an official build of nasm? If so, what version and is there an official link to download it? I don't feel comfortable merging an executable if we don't know the contents or where the build came from. |
|
The build was unofficial. So, instead of importing that unofficial Nasm build, I will erase this build from the pull request and research online to see and test if a modern Nasm official build will get rid of this error. Also, I will send the build link of the official build and the source code if needed. So, I will be changing this pull request to Update Nasm Build Version. |
|
Now, all that is left is testing... |
|
Also, this is where I downloaded the official build: https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/win32/ |
|
We had talked about switching to FASM at some point, which I think also fixes the infinite recursion, while also providing a speed up. @elkaamee326 could you compare the new nasm version with fasm? |
|
I will document the fasm and nasm build times and see if it resolves the interminable macro recursion error. |
|
If we use FASM, then we will have to change Cosmos.Build.Targets. I am not sure exactly how to make it work. When I tried to do it, it invoked fasm, but it then said FASM exited with the code 0. It was not an interminable macro recursion error, it is a Cosmos.Build.Tasks error. Some help with changing this would be apprectiated. Also, the new official NASM build resolved the interminable Macro recursion error with a build time of |
|
Thanks for looking into it. I must have misremebered since I thought we could just replace the NASM exe with FASM. Sorry about that. |
|
It turns out I was thinking of yasm, not fasm. https://yasm.tortall.net/ Could you please compare the new nasm with yasm? |
|
Any assembler should work, as long as the command line params are the same for Nasm and as long as most things are similar, I will give it a shot. :) |
|
We can update our build targets if the arguments are different between assemblers. The important thing is to make sure we get all the features that nasm has.
… On Apr 21, 2021, at 1:44 PM, elkaamee326 ***@***.***> wrote:
Any assembler should work, as long as the command line params are the same for Nasm and as long as most things are similar, I will give it a shot. :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
|
Since yasm states |
|
Just to make sure that I am using the right args for Yasm, what is the default Nasm arg that is used without going into the Project Properties settings? This is necessary, to ensure the correct compilation using Yasm. |
|
The code for executing NASM is here |
|
Apparently, for the new version of Nasm, it didn't completely resolve the interminable macro recursion error. I will do a yasm test to confirm it resolves the error. |
What does the new version do? Does it allow larger byte arrays or is there another limitation? |
|
I just figured out the cause of those two errors. I compiled a program as |
|
Good find! Looking at the emitted asm file, does that mean our |
|
No, its just that Elf doesn't support the map directive (as well as mapping) anymore because now only |
|
Okay, I got As you can see, it displays this error when we try to extract a map file. |
|
Okay, I fixed the error. Finally, Yasm supports |
|
There is still a map file for with address/method names? Does bin also still work? Debugging is working in visual studio? (ie. Breakpoints) |
|
For some reason, Also, I don't know why but with a Everytime I would try to do a .bin compilation with Cosmos, it would successfully build but this would also happen when I try to debug / run an OS with Cosmos: This is my build log when I try to compile with As you can see, there are many of |
|
Thank you for all your work on this issue. Due to how much there is to gain from switching to yasm, I would like to keep this pr open, even if you are no longer interested in working on it, which is understandable. If I have time, I will take a look and see if I can figure out what is needed to get .bin running. |
|
I tried nasm and yasm side by side like this: I got a single warning about globals not supported using bin format, but I didn't have to change anything in the asm. The output and map file were created with no issues. |
|
Did you make any modifications to your installed version of IL2CPU itself to make it work? Because, when I tried to make it work, Cosmos just corrupted it somehow by displaying a bunch of warnings and I don't know why. Like those |
|
I didn't make any changes except to call yasm instead of nasm.
… On May 25, 2021, at 4:40 PM, elkaamee326 ***@***.***> wrote:
Did you make any modifications to IL2CPU or Cosmos itself? Because, when I tried to make it work my Cosmos it just corrupted it somehow by displaying a bunch of warnings and I don't know why. Like those .bin warnings...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
|
Not needed anymore because of #1993 |
|
Now works using multiboot2, no more invalid multiboot image |

This build of NASM was confirmed (unofficially) that it resolved the error, by loading a large byte array in the Userkit. If you are currently using the User Kit, download the build of NASM to
C:\Users\YourUserName\.nuget\packages\cosmos.build\0.1.0-localbuild{YourUserKitVersionOfCosmos.Build}\tools\nasm\win. It should also work with the dev kit as well. (Both builds should say the Cosmos.Build package version in your local directory).Note: * replace
{YourUserKitVersionOfCosmos.Build}with the nuget build version of Cosmos.Build...The build was built from an open source 2012 version of NASM's source code. The cause of the error was
#define DEADMAN_LIMIT. The evident solution was to increase the value and then rebuild NASM.