For FreeBSD, there are not many 64bit assembler (amd64) examples available on the web and virtually none that are a little bit more complex. To change this, I ported a DOS Tetris game to 64bit FreeBSD, using SVGALIB to max VGA out with 320x200 and 256 colours - it is 2020 after all! Jokes aside, this example shows how to set up an assembler program that uses C runtime functions and also links in additional libraries available in ports/packages.