

- #Mac file extensions for command line full#
- #Mac file extensions for command line code#
- #Mac file extensions for command line mac#
So compiling is actually the process of turning high level language (ie: prints("hello")) into assembly code, which is then turned into machine code by assembling it.

Where a prints() call will generate 5 or so lines of assembly output, one line of assembly generates exactly one opcode (plus its operands) of machine code output. Unlike C and other languages, converting Assembly to machine code is a 1:1 process, with one line of assembly producing one opcode and its operators. Just as a note - you don't compile assembly code. Without showing the particular project files it is difficult to be more specific with the help, sjasmplus is assembler, so hypothetically you can produce any binary file with it, even x86 win32/pe executable (if you use only "db" statements and write whole file byte by byte in the "source" - does not make any sense, and is highly impractical, but *possible*), so it's not about if it's possible, but whether it makes sense and is practical, and how much extra effort it will take. Then you can try to experiment with sjasmplus and see if it leads somewhere (if you get eventually binary from sjasmplus, you can binary-compare it with the original working file to be sure the result is identical - this way I did help with one MSX project to migrate from tniasm to sjasmplus, the binary comparison helping me to catch subtle syntax differences where sjasmplus in default config was producing somewhat different machine code)

#Mac file extensions for command line mac#
If you are new to this, and you have someones project with MAC files, there's very likely suggested way of building the project (probably using different assembler) - in ideal case make sure you are able to follow the original path first and everything works. I usually use Makefile and GNU make to build my projects, so once I settle down on the particular options for the project, I have the build rules stored in the Makefile (and execute make from the Kate editor with build-plugin). Then you position any machine code in the virtual device memory as needed (by ORG), and finally dump any region of memory with `savebin` into some binary file.Ībout command line options for sjasmplus - see docs for all options for z00m's branch of sjasmplus (v1.14.5 to be released today), by default for my own projects I prefer to use: -syntax=abfw -msg=war -lst -lstlab -nologo -fullpath
#Mac file extensions for command line full#
If the source does do some `org` things and position things in memory and you want to store specific region of memory into final binary (like creating ROM file), you may try one of `device` options, even if your device is not directly supported, if it's for example regular Z80 address space without any banking, using `DEVICE ZXSPECTRUM48` at beginning of source is enough to have full 64kiB address space available.

Whatever assembler-specific directives are used in the source, those may need complete rewrite to achieve the same task with sjasmplus directives (unless they are compatible, like for example "incbin" or "org").Ībout output: If the source does produce raw binary stream of machine code, then you can do even without any modification `sjasmplus x.mac -raw=output.bin`. If yes, then the command line is `sjasmplus your_file.mac`, but that will probably not store the output anywhere if the source file is not aware of sjasmplus directives for output control.Īlso this may or may not work depending on the Z80 assembler syntax dialect, as I believe the MAC files are designed for different assembler, but most of the Z80 dialects are very similar (sjasmplus has medium-relaxed syntax and may work with MAC files). and if you are after porting Colecovision ROM to MSX, then this should be still similar case from the assembling point of view, but may involve more effort on the source to do the conversion - but that's not assembler-specific part of the task) sjasmplus should be enough to write SW for Colecovision, but I would need to learn about specifics to provide some working example. (disclaimer: I know nothing about MAC files, and Colecovision ROM requirements, but it seems like regular Z80 CPU with simple ROM+RAM, i.e.
