The MASM Forum

Specialised Projects => Assembler/Compiler Technology => Topic started by: TouEnMasm on December 14, 2020, 07:49:08 PM

Title: Jwasm 2.14
Post by: TouEnMasm on December 14, 2020, 07:49:08 PM
Hello,
It is not really easy to found so I put the link here

https://github.com/Baron-von-Riedesel/JWasm
(https://github.com/Baron-von-Riedesel/JWasm)

New Msvc64.mak for vs2019 is provided  :thumbsup:
Title: Re: Jwasm 2.14
Post by: _japheth on December 15, 2020, 02:18:23 AM

> New Msvc64.mak for vs2019 is provided  :thumbsup:

Yes. However, it works with the "Native Tools Command Prompt" only.

I'd like to also supply a makefile that could be opened inside the IDE - socalled "Open Folder" development, where you can define "build tasks" (JSON scripts) and attach them to a makefile. My tries so far were not successful, I could't convince VS Community to generate a 64-bit jwasm - this intransparency is the main reason why I don't like IDEs anymore.
Title: Re: Jwasm 2.14
Post by: hutch-- on December 15, 2020, 09:20:17 AM
Build it with a batch file, solves all of those problems. That is how I built your older versions.
Title: Re: Jwasm 2.14
Post by: _japheth on December 15, 2020, 06:29:05 PM
Quote from: hutch-- on December 15, 2020, 09:20:17 AM
Build it with a batch file, solves all of those problems. That is how I built your older versions.

That's the simplest and best approach - if you're just interested in having a working binary.

However, if you want to play with the assembler source and run the assembler inside the VC debugger, it's a bit easier if you can create and debug the executable inside the IDE.

In the meantime, I found the (minimal) correct settings.

file tasks.vs.json:

{
  "version": "0.2.1",
  "tasks": [
    {
      "taskLabel": "Task-Msvc64",
      "appliesTo": "Msvc64.mak",
      "type": "launch",
      "contextType": "build",
      "command": "nmake",
      "args": [
        "-f Msvc64.mak",
        "debug=1"
      ]
    },
    {
      "taskLabel": "Task-Msvc64",
      "appliesTo": "Msvc64.mak",
      "type": "launch",
      "contextType": "clean",
      "command": "nmake",
      "args": [
        "-f Msvc64.mak",
        "clean",
        "debug=1"
      ]
    }
  ]
}


file launch.vs.json:

{
  "version": "0.2.1",
  "defaults": {},
  "configurations": [
    {
      "type": "default",
      "project": "build\\MSVC64D\\jwasm.exe",
      "projectTarget": "",
      "name": "jwasm.exe"
    }
  ]
}


Finally, in file Msvc64.mak, you should change a line:


!if $(DEBUG)
extra_c_flags = -ZI -Od -DDEBUG_OUT
!else


Title: Re: Jwasm 2.14
Post by: TouEnMasm on December 15, 2020, 06:54:02 PM
To debug jwasm,inside visual studio ,there is a debugging setting in the properties of the project.
https://docs.microsoft.com/en-us/visualstudio/debugger/project-settings-for-a-cpp-debug-configuration?view=vs-2019 (https://docs.microsoft.com/en-us/visualstudio/debugger/project-settings-for-a-cpp-debug-configuration?view=vs-2019)
This work not so bad and is fully documented.
Title: Re: Jwasm 2.14
Post by: TouEnMasm on December 21, 2020, 08:03:32 PM

Here the visual studio soluce to debug the compiler.