A Linux container for VASM multi platform assember.
The container was originally built to target the 68000 CPU with Motorola syntax. When a new release was available the Dockerfile is updated and tagged. Although this fulfilled the immediate requirement for an assembler that would assemble m68k code with Motorola syntax, the project would be more useful if it could target more CPUs.
The new container design will create multiple binaries that each target a different CPU within a single container.
The vasm assembler can target multiple CPUs and be built to run on multiple platforms depending on the Makefile and options used to build vasm from source.
The vasm assembler release tar file contains the source code and Makefiles to build the latest version for various platforms. The tar file containing the source can downloaded prior to to building the image and copied into the image or can be downloaded during the build process.
The image is created in two stages, the first stage is where the binaries are created and is known as the build stage. The second and final stage is where the binaries from the build stage are copied to /home/dev, the directory /home/dev/vasm/bin is added to 'PATH' environment variable. The directory /usr/src is set as WORKDIR and is used to map the project folder from the host into the container. The final image has a CMD set to 'make', this defines the default action to process a 'Makefile' from the project source directory.
In this container all commands are run as 'root', this should not be a problem and does not affect the asembly of the project but the user may end up having to manually change permissions on the assembled binary.
The Dockerfile will build an image that has the following binaries:
| Binary | Description |
|---|---|
| vasmm68k_mot | M68000 assembler using Motorola syntax. |
| vasmz80_oldstyle | Z80 assembler using old style syntax. |
| vasm6502_oldstyle | 6502 assembler using old style syntax. |
| vobjdump | Outputs a stripped down final binary. |
The container can be run directly from the command line or from within an IDE or text editor such as Visual Studio Code as part of a build command.
The command to run the container will be slightly different depending on the OS and CLI being used. The following assumes that the command is run from the project source directory:
| OS | CLI | Command |
|---|---|---|
| Windows | cmd.exe | docker run --rm -v %CD%:/usr/project gkbmdz/vasm:latest |
| Windows | powershell | docker run --rm -v ${PWD}:/usr/project gkbmdz/vasm:latest |
| Linux | (bash, etc) | docker run --rm -v $(pwd):/usr/project gkbmdz/vasm:latest |
When the above commands are run the Makefile in the source directory will be processed.
Content type
Image
Digest
Size
9.8 MB
Last updated
over 5 years ago
docker pull gkbmdz/vasm