Author Topic: Is MASM-SDK like environment possible under macOS?  (Read 426 times)

Mayuresh Kathe

  • Regular Member
  • *
  • Posts: 11
Is MASM-SDK like environment possible under macOS?
« on: September 11, 2019, 08:51:35 PM »
Just the way MASM-SDK (with it's libraries and headers) is to Microsoft Windows using Microsoft MASM, would it be possible to build a development environment for Apple macOS using GNU Gas?

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 6857
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Is MASM-SDK like environment possible under macOS?
« Reply #1 on: September 12, 2019, 02:54:18 AM »
I don't see why not, GNU AS (GAS) is a very good tool once you understand it and it is part of a matching GNU tool set. You could also look at UASM which supports UNIX style operating systems as it has close to MASM notation and is shaping up into a very good tool.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

Vortex

  • Member
  • *****
  • Posts: 2056
Re: Is MASM-SDK like environment possible under macOS?
« Reply #2 on: January 12, 2020, 06:26:36 AM »
Hello,

Another option for MacOS is the Solar Assembler :

http://www.oby.ro/sol_asm/

anta40

  • Member
  • ***
  • Posts: 310
Re: Is MASM-SDK like environment possible under macOS?
« Reply #3 on: January 13, 2020, 02:07:28 PM »
I guess the harder part is to write MASM32/64 compatible lib for macOS, yes?

LiaoMi

  • Member
  • ****
  • Posts: 624
Re: Is MASM-SDK like environment possible under macOS?
« Reply #4 on: January 13, 2020, 07:14:15 PM »
Hi,

You can see what is present from the libraries in the visual studio for the mac...To develop or use old (32 bit) programs, you must use the version of Sierra, High Sierra or Mojave mac OSX
Beginning Visual Studio for Mac https://www.apress.com/gp/book/9781484230329
Visual Studio for Mac - https://visualstudio.microsoft.com/vs/mac/
visualstudioformacinstaller-8.4.0.142.dmg https://download.visualstudio.microsoft.com/download/pr/5a43bf91-2e15-44c6-8326-612037540572/4c57659c29078f246d715e25c1b6d308/visualstudioformacinstaller-8.4.0.142.dmg

LiaoMi

  • Member
  • ****
  • Posts: 624
Re: Is MASM-SDK like environment possible under macOS?
« Reply #5 on: January 14, 2020, 07:35:18 AM »
Apparently I don’t know something, I installed a Visual Studio for Mac, installed XCode, С++ is not supported, Assembler is not supported  :sad: Where all structure descriptions are stored?!
Assembly language programming under OS X with NASM - http://caswenson.com/2009_09_26_assembly_language_programming_under_os_x_with_nasm

Where are the C headers in MacOS Mojave? - https://stackoverflow.com/questions/53169970/where-are-the-c-headers-in-macos-mojave

Code: [Select]
xcode-select --install
Code: [Select]
gcc -v
Fixing missing headers for homebrew in Mac OS X Mojave https://silvae86.github.io/sysadmin/mac/osx/mojave/beta/libxml2/2018/07/05/fixing-missing-headers-for-homebrew-in-mac-osx-mojave/

That's what happened, now there are all libraries and headers in one folder ..




These headers need to be converted into an assembly-friendly format, then there will be something like sdk for masm.


Now you can install GCC

Brew Install https://www.youtube.com/watch?v=31eTw5xRHBA
Code: [Select]
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"these lines to the command line...
Code: [Select]
brew info gccand
Code: [Select]
brew install gcc
Files can be found here...
Code: [Select]
/usr/local/Cellar/gcc/9.2.0/include/c++/
/usr/local/Cellar/gcc/9.2.0/lib/

Both of these headers(GCC or Mac OS) need to be transformed into an assembly-friendly representation (SDK). To do this, you need to check whether it is possible to convert files with existing utilities. Mac OS .h - https://www.solidfiles.com/v/N4qwDY86xQvGd, GCC .h - I can upload if necessary, like all lib files.