
Member-only story
Writing an X86–64 Assembly Language Program
Part II: Finding an Efficient Development Cycle for writing Assembly Language
This guide is part two of a series
This guide is followed by
- Part three: Printing Command Line Arguments
- Part four: Sending Function Arguments and Receiving a Return Value
- Part five: Conditionals, Jumping, and Looping
- Part six: How to Determine String Length
- Part seven: Quick Reference
Now that GDB is working well with Docker, the next step is to find a development cycle that enables you to quickly run code and debug it if needed.
I prefer to develop within VS Code rather than having to develop directly on the Docker container with vim
. The question is how to develop on VS Code, then quickly compile, link, run and debug the code on the docker container that is now set up?

The answer came from this helpful blog post. This blog post provides a useful starting point regarding how to leverage an image to build an executable, then run another container to run the executable. Although it does not cover assembly language, it is exactly the sort of workflow we need to use.
The blog post suggests a command like this to handle a build or compiling step.
docker run --rm -v "$(pwd)":/app -w /app iron/node:dev sh -c 'npm install'
But the post does not describe what each of these options does, so let’s break it down for those of use that are not proficient with Docker. Note that this is just an example command to demonstrate how Docker can be used to run a build step.
Break Down of Docker Command Line Arguments
Clean Up
--rm
This is just a build step. The container does not need to be up and running once it’s been used…