├── 01_hello ├── README.md └── hint.md ├── 02_multi ├── README.md ├── foo.c ├── hint.md └── main.c ├── 03_lib ├── README.md ├── hint.md ├── lib.c └── main.c ├── 04_zlib ├── README.md ├── test.c └── test.z ├── 05_assemble ├── README.md ├── test.asm └── test.c ├── 06_nasm └── README.md ├── 07_package_management ├── README.md ├── test.asm └── test.c ├── slides.pdf └── solutions ├── 01 ├── build.zig └── hello.c ├── 02 ├── build.zig ├── foo.c └── main.c ├── 03 ├── build.zig ├── lib.c └── main.c ├── 04 ├── build.zig ├── test.c ├── test.z └── zlib-1.3.1 │ ├── CMakeLists.txt │ ├── ChangeLog │ ├── FAQ │ ├── INDEX │ ├── LICENSE │ ├── Makefile │ ├── Makefile.in │ ├── README │ ├── adler32.c │ ├── amiga │ ├── Makefile.pup │ └── Makefile.sas │ ├── compress.c │ ├── configure │ ├── contrib │ ├── README.contrib │ ├── ada │ │ ├── buffer_demo.adb │ │ ├── mtest.adb │ │ ├── read.adb │ │ ├── readme.txt │ │ ├── test.adb │ │ ├── zlib-streams.adb │ │ ├── zlib-streams.ads │ │ ├── zlib-thin.adb │ │ ├── zlib-thin.ads │ │ ├── zlib.adb │ │ ├── zlib.ads │ │ └── zlib.gpr │ ├── blast │ │ ├── Makefile │ │ ├── README │ │ ├── blast.c │ │ ├── blast.h │ │ ├── test.pk │ │ └── test.txt │ ├── delphi │ │ ├── ZLib.pas │ │ ├── ZLibConst.pas │ │ ├── readme.txt │ │ └── zlibd32.mak │ ├── dotzlib │ │ ├── DotZLib.build │ │ ├── DotZLib.chm │ │ ├── DotZLib.sln │ │ ├── DotZLib │ │ │ ├── AssemblyInfo.cs │ │ │ ├── ChecksumImpl.cs │ │ │ ├── CircularBuffer.cs │ │ │ ├── CodecBase.cs │ │ │ ├── Deflater.cs │ │ │ ├── DotZLib.cs │ │ │ ├── DotZLib.csproj │ │ │ ├── GZipStream.cs │ │ │ ├── Inflater.cs │ │ │ └── UnitTests.cs │ │ ├── LICENSE_1_0.txt │ │ └── readme.txt │ ├── gcc_gvmat64 │ │ └── gvmat64.S │ ├── infback9 │ │ ├── README │ │ ├── infback9.c │ │ ├── infback9.h │ │ ├── inffix9.h │ │ ├── inflate9.h │ │ ├── inftree9.c │ │ └── inftree9.h │ ├── iostream │ │ ├── test.cpp │ │ ├── zfstream.cpp │ │ └── zfstream.h │ ├── iostream2 │ │ ├── zstream.h │ │ └── zstream_test.cpp │ ├── iostream3 │ │ ├── README │ │ ├── TODO │ │ ├── test.cc │ │ ├── zfstream.cc │ │ └── zfstream.h │ ├── minizip │ │ ├── Makefile │ │ ├── Makefile.am │ │ ├── MiniZip64_Changes.txt │ │ ├── MiniZip64_info.txt │ │ ├── configure.ac │ │ ├── crypt.h │ │ ├── ioapi.c │ │ ├── ioapi.h │ │ ├── iowin32.c │ │ ├── iowin32.h │ │ ├── make_vms.com │ │ ├── miniunz.c │ │ ├── miniunzip.1 │ │ ├── minizip.1 │ │ ├── minizip.c │ │ ├── minizip.pc.in │ │ ├── mztools.c │ │ ├── mztools.h │ │ ├── unzip.c │ │ ├── unzip.h │ │ ├── zip.c │ │ └── zip.h │ ├── nuget │ │ ├── nuget.csproj │ │ └── nuget.sln │ ├── pascal │ │ ├── example.pas │ │ ├── readme.txt │ │ ├── zlibd32.mak │ │ └── zlibpas.pas │ ├── puff │ │ ├── Makefile │ │ ├── README │ │ ├── puff.c │ │ ├── puff.h │ │ ├── pufftest.c │ │ └── zeros.raw │ ├── testzlib │ │ ├── testzlib.c │ │ └── testzlib.txt │ ├── untgz │ │ ├── Makefile │ │ ├── Makefile.msc │ │ └── untgz.c │ └── vstudio │ │ ├── readme.txt │ │ ├── vc10 │ │ ├── miniunz.vcxproj │ │ ├── miniunz.vcxproj.filters │ │ ├── minizip.vcxproj │ │ ├── minizip.vcxproj.filters │ │ ├── testzlib.vcxproj │ │ ├── testzlib.vcxproj.filters │ │ ├── testzlibdll.vcxproj │ │ ├── testzlibdll.vcxproj.filters │ │ ├── zlib.rc │ │ ├── zlibstat.vcxproj │ │ ├── zlibstat.vcxproj.filters │ │ ├── zlibvc.def │ │ ├── zlibvc.sln │ │ ├── zlibvc.vcxproj │ │ └── zlibvc.vcxproj.filters │ │ ├── vc11 │ │ ├── miniunz.vcxproj │ │ ├── minizip.vcxproj │ │ ├── testzlib.vcxproj │ │ ├── testzlibdll.vcxproj │ │ ├── zlib.rc │ │ ├── zlibstat.vcxproj │ │ ├── zlibvc.def │ │ ├── zlibvc.sln │ │ └── zlibvc.vcxproj │ │ ├── vc12 │ │ ├── miniunz.vcxproj │ │ ├── minizip.vcxproj │ │ ├── testzlib.vcxproj │ │ ├── testzlibdll.vcxproj │ │ ├── zlib.rc │ │ ├── zlibstat.vcxproj │ │ ├── zlibvc.def │ │ ├── zlibvc.sln │ │ └── zlibvc.vcxproj │ │ ├── vc14 │ │ ├── miniunz.vcxproj │ │ ├── minizip.vcxproj │ │ ├── testzlib.vcxproj │ │ ├── testzlibdll.vcxproj │ │ ├── zlib.rc │ │ ├── zlibstat.vcxproj │ │ ├── zlibvc.def │ │ ├── zlibvc.sln │ │ └── zlibvc.vcxproj │ │ ├── vc17 │ │ ├── miniunz.vcxproj │ │ ├── minizip.vcxproj │ │ ├── testzlib.vcxproj │ │ ├── testzlibdll.vcxproj │ │ ├── zlib.rc │ │ ├── zlibstat.vcxproj │ │ ├── zlibvc.def │ │ ├── zlibvc.sln │ │ └── zlibvc.vcxproj │ │ └── vc9 │ │ ├── miniunz.vcproj │ │ ├── minizip.vcproj │ │ ├── testzlib.vcproj │ │ ├── testzlibdll.vcproj │ │ ├── zlib.rc │ │ ├── zlibstat.vcproj │ │ ├── zlibvc.def │ │ ├── zlibvc.sln │ │ └── zlibvc.vcproj │ ├── crc32.c │ ├── crc32.h │ ├── deflate.c │ ├── deflate.h │ ├── doc │ ├── algorithm.txt │ ├── crc-doc.1.0.pdf │ ├── rfc1950.txt │ ├── rfc1951.txt │ ├── rfc1952.txt │ └── txtvsbin.txt │ ├── examples │ ├── README.examples │ ├── enough.c │ ├── fitblk.c │ ├── gun.c │ ├── gzappend.c │ ├── gzjoin.c │ ├── gzlog.c │ ├── gzlog.h │ ├── gznorm.c │ ├── zlib_how.html │ ├── zpipe.c │ ├── zran.c │ └── zran.h │ ├── gzclose.c │ ├── gzguts.h │ ├── gzlib.c │ ├── gzread.c │ ├── gzwrite.c │ ├── infback.c │ ├── inffast.c │ ├── inffast.h │ ├── inffixed.h │ ├── inflate.c │ ├── inflate.h │ ├── inftrees.c │ ├── inftrees.h │ ├── make_vms.com │ ├── msdos │ ├── Makefile.bor │ ├── Makefile.dj2 │ ├── Makefile.emx │ ├── Makefile.msc │ └── Makefile.tc │ ├── nintendods │ ├── Makefile │ └── README │ ├── old │ ├── Makefile.emx │ ├── Makefile.riscos │ ├── README │ ├── descrip.mms │ ├── os2 │ │ ├── Makefile.os2 │ │ └── zlib.def │ └── visual-basic.txt │ ├── os400 │ ├── README400 │ ├── bndsrc │ ├── make.sh │ └── zlib.inc │ ├── qnx │ └── package.qpg │ ├── test │ ├── example.c │ ├── infcover.c │ └── minigzip.c │ ├── treebuild.xml │ ├── trees.c │ ├── trees.h │ ├── uncompr.c │ ├── watcom │ ├── watcom_f.mak │ └── watcom_l.mak │ ├── win32 │ ├── DLL_FAQ.txt │ ├── Makefile.bor │ ├── Makefile.gcc │ ├── Makefile.msc │ ├── README-WIN32.txt │ ├── VisualC.txt │ ├── zlib.def │ └── zlib1.rc │ ├── zconf.h │ ├── zconf.h.cmakein │ ├── zconf.h.in │ ├── zlib.3 │ ├── zlib.3.pdf │ ├── zlib.h │ ├── zlib.map │ ├── zlib.pc.cmakein │ ├── zlib.pc.in │ ├── zutil.c │ └── zutil.h ├── 05 ├── build.zig ├── test.asm └── test.c ├── 06 ├── build.zig ├── build.zig.zon └── nasm-2.16.03 │ ├── .gitattributes │ ├── .travis.yml │ ├── AUTHORS │ ├── CHANGES │ ├── ChangeLog │ ├── INSTALL │ ├── LICENSE │ ├── Makefile.in │ ├── Mkfiles │ ├── README │ ├── msvc.mak │ └── openwcom.mak │ ├── README.md │ ├── SubmittingPatches │ ├── asm │ ├── assemble.c │ ├── assemble.h │ ├── directbl.c │ ├── directiv.c │ ├── directiv.dat │ ├── directiv.h │ ├── error.c │ ├── eval.c │ ├── eval.h │ ├── exprdump.c │ ├── exprlib.c │ ├── floats.c │ ├── floats.h │ ├── labels.c │ ├── listing.c │ ├── listing.h │ ├── nasm.c │ ├── parser.c │ ├── parser.h │ ├── pptok.c │ ├── pptok.dat │ ├── pptok.h │ ├── pptok.ph │ ├── pptok.pl │ ├── pragma.c │ ├── preproc.c │ ├── preproc.h │ ├── quote.c │ ├── quote.h │ ├── rdstrnum.c │ ├── segalloc.c │ ├── srcfile.c │ ├── srcfile.h │ ├── stdscan.c │ ├── stdscan.h │ ├── strfunc.c │ ├── tokens.dat │ ├── tokens.h │ ├── tokhash.c │ ├── tokhash.pl │ ├── warnings.c │ ├── warnings.pl │ ├── warnings.time │ ├── warnings_c.h │ └── warnings_c.h.time │ ├── autoconf │ ├── aclocal.m4 │ ├── attribute.h │ ├── clean.sh │ ├── helpers │ │ ├── compile │ │ ├── config.guess │ │ ├── config.sub │ │ └── install-sh │ ├── m4 │ │ ├── pa_add_cflags.m4 │ │ ├── pa_add_cppflags.m4 │ │ ├── pa_add_flags.m4 │ │ ├── pa_add_headers.m4 │ │ ├── pa_add_langflags.m4 │ │ ├── pa_add_ldflags.m4 │ │ ├── pa_arg_bool.m4 │ │ ├── pa_arg_disabled.m4 │ │ ├── pa_arg_enabled.m4 │ │ ├── pa_attribute_syntax.m4 │ │ ├── pa_build_ifelse.m4 │ │ ├── pa_c_typeof.m4 │ │ ├── pa_check_bad_stdc_inline.m4 │ │ ├── pa_common_attributes.m4 │ │ ├── pa_cross_compile.m4 │ │ ├── pa_endian.m4 │ │ ├── pa_flags_langlist.m4 │ │ ├── pa_func_attribute.m4 │ │ ├── pa_func_attribute_error.m4 │ │ ├── pa_func_snprintf.m4 │ │ ├── pa_func_vsnprintf.m4 │ │ ├── pa_have_func.m4 │ │ ├── pa_lang_foreach.m4 │ │ ├── pa_lang_seen_list.m4 │ │ ├── pa_libext.m4 │ │ ├── pa_option_debug.m4 │ │ ├── pa_option_gc.m4 │ │ ├── pa_option_lto.m4 │ │ ├── pa_option_profiling.m4 │ │ ├── pa_option_sanitizer.m4 │ │ ├── pa_prog_cc.m4 │ │ ├── pa_sym.m4 │ │ └── pa_variadic_macros.m4 │ └── unconfig.pl │ ├── autogen.sh │ ├── common │ └── common.c │ ├── config │ ├── config.h.in │ ├── msvc.h │ ├── unconfig.h │ ├── unknown.h │ └── watcom.h │ ├── configure │ ├── configure.ac │ ├── contrib │ ├── MSVC6.txt │ └── VSrules │ │ ├── nasm.README │ │ └── nasm.rules │ ├── disasm │ ├── disasm.c │ ├── disasm.h │ ├── ndisasm.c │ ├── sync.c │ └── sync.h │ ├── doc │ ├── Makefile.in │ ├── README │ ├── afmmetrics.ph │ ├── changes.src │ ├── findfont.ph │ ├── genps.pl │ ├── head.ps │ ├── inslist.pl │ ├── internal.doc │ ├── local.css │ ├── nasmdoc.css │ ├── nasmdoc.src │ ├── nasmlogo.eps │ ├── nasmlogw.png │ ├── opt_var.txt │ ├── psfonts.ph │ ├── pspdf.pl │ ├── pswidth.ph │ ├── rdsrc.pl │ ├── ttfmetrics.ph │ ├── warnings.src │ └── warnings.src.time │ ├── headers │ ├── c │ ├── doc │ ├── mac │ └── perl │ ├── include │ ├── bytesex.h │ ├── compiler.h │ ├── dbginfo.h │ ├── disp8.h │ ├── error.h │ ├── hashtbl.h │ ├── iflag.h │ ├── ilog2.h │ ├── insns.h │ ├── labels.h │ ├── md5.h │ ├── nasm.h │ ├── nasmint.h │ ├── nasmlib.h │ ├── nctype.h │ ├── opflags.h │ ├── perfhash.h │ ├── raa.h │ ├── rbtree.h │ ├── rdoff.h │ ├── saa.h │ ├── strlist.h │ ├── tables.h │ ├── ver.h │ ├── warnings.h │ └── warnings.h.time │ ├── macros │ ├── altreg.mac │ ├── fp.mac │ ├── ifunc.mac │ ├── macros.c │ ├── macros.pl │ ├── masm.mac │ ├── smartalign.mac │ └── standard.mac │ ├── misc │ ├── Doxyfile │ ├── README │ ├── c16.mac │ ├── c32.mac │ ├── crcgen.c │ ├── emacstbl.pl │ ├── exebin.mac │ ├── exebin2.mac │ ├── fmtinsns.pl │ ├── genfma.pl │ ├── hints.txt │ ├── magic │ ├── myC32.mac │ ├── nasm.sl │ ├── nasmstab │ ├── nasmtok.el │ ├── omfdump.c │ ├── pmw.bat │ ├── proc32.ash │ ├── scitech.mac │ └── xcrcgen.c │ ├── nasm.1 │ ├── nasm.spec │ ├── nasm.spec.in │ ├── nasm.spec.sed │ ├── nasm.txt │ ├── nasm.xml │ ├── nasmlib │ ├── alloc.c │ ├── alloc.h │ ├── asprintf.c │ ├── badenum.c │ ├── bsi.c │ ├── crc32.c │ ├── crc64.c │ ├── errfile.c │ ├── file.c │ ├── file.h │ ├── filename.c │ ├── hashtbl.c │ ├── ilog2.c │ ├── md5c.c │ ├── mmap.c │ ├── nctype.c │ ├── numstr.c │ ├── path.c │ ├── perfhash.c │ ├── perfhash.pl │ ├── raa.c │ ├── rbtree.c │ ├── readnum.c │ ├── realpath.c │ ├── rlimit.c │ ├── saa.c │ ├── string.c │ ├── strlist.c │ ├── ver.c │ └── zerobuf.c │ ├── ndisasm.1 │ ├── ndisasm.txt │ ├── ndisasm.xml │ ├── nsis │ ├── NASMMultiUser.nsh │ ├── getpearch.pl │ ├── nasm-un.ico │ ├── nasm.ico │ ├── nasm.nsi │ └── version.nsh │ ├── output │ ├── codeview.c │ ├── dwarf.h │ ├── elf.h │ ├── legacy.c │ ├── macho.h │ ├── nulldbg.c │ ├── nullout.c │ ├── outaout.c │ ├── outaout.mac │ ├── outas86.c │ ├── outas86.mac │ ├── outbin.c │ ├── outbin.mac │ ├── outcoff.c │ ├── outcoff.mac │ ├── outdbg.c │ ├── outdbg.mac │ ├── outelf.c │ ├── outelf.h │ ├── outelf.mac │ ├── outform.c │ ├── outform.h │ ├── outieee.c │ ├── outlib.c │ ├── outlib.h │ ├── outmacho.c │ ├── outmacho.mac │ ├── outobj.c │ ├── outobj.mac │ ├── pecoff.h │ └── stabs.h │ ├── perllib │ ├── crc64.ph │ ├── gensv.pl │ ├── phash.ph │ └── random_sv_vectors.ph │ ├── stdlib │ ├── snprintf.c │ ├── strlcpy.c │ ├── strnlen.c │ ├── strrchrnul.c │ └── vsnprintf.c │ ├── test │ ├── Makefile │ ├── _file_.asm │ ├── _version.asm │ ├── a32offs.asm │ ├── a64.asm │ ├── absolute.asm │ ├── addr64x.asm │ ├── align13.asm │ ├── align13s.asm │ ├── alonesym-obj.asm │ ├── amx.asm │ ├── andbyte.asm │ ├── aoutso.asm │ ├── aouttest.asm │ ├── aouttest.c │ ├── avx.asm │ ├── avx005.asm │ ├── avx2.asm │ ├── avx512cd.asm │ ├── avx512er.asm │ ├── avx512f.asm │ ├── avx512pf.asm │ ├── baddb.asm │ ├── baddq.asm │ ├── badrep.asm │ ├── bcd.asm │ ├── binexe.asm │ ├── binoverflow.asm │ ├── bintest.asm │ ├── bisect.sh │ ├── br1879590.asm │ ├── br2003451.asm │ ├── br2030823.asm │ ├── br2148476.asm │ ├── br2222615.asm │ ├── br2496848.asm │ ├── br3005117.asm │ ├── br3026808.asm │ ├── br3028880.asm │ ├── br3041451.asm │ ├── br3058845.asm │ ├── br3066383.asm │ ├── br3074517.asm │ ├── br3092924.asm │ ├── br3104312.asm │ ├── br3109604.asm │ ├── br3174983.asm │ ├── br3187743.asm │ ├── br3189064.asm │ ├── br3200749.asm │ ├── br3385573.asm │ ├── br3392252.asm │ ├── br3392259.asm │ ├── br3392363.asm │ ├── br3392392.asm │ ├── br3392396.asm │ ├── br3392411.asm │ ├── br3392418.asm │ ├── br3392439.asm │ ├── br3392442.asm │ ├── br3392472.asm │ ├── br3392538.asm │ ├── br3392586.asm │ ├── br3392607.asm │ ├── br3392626.asm │ ├── br3392640.asm │ ├── br3392660.asm │ ├── br3392661.asm │ ├── br3392667.asm │ ├── br3392668-3.asm │ ├── br3392669-57.asm │ ├── br3392707.asm │ ├── br3392708.asm │ ├── br3392711.asm │ ├── br560575.asm │ ├── br890790.asm │ ├── br890790_i.asm │ ├── br978756.asm │ ├── changed.asm │ ├── clzero.asm │ ├── coffalign.asm │ ├── cofftest.asm │ ├── cofftest.c │ ├── crc32.asm │ ├── ctxlocal.asm │ ├── cv8struc.asm │ ├── defalias.asm │ ├── dtbcd.asm │ ├── dup.asm │ ├── elf64so.asm │ ├── elf_visibility.asm │ ├── elfso.asm │ ├── elftest.asm │ ├── elftest.c │ ├── elftest64.c │ ├── elif.asm │ ├── emptyarg.asm │ ├── evalerr.asm │ ├── evalmacro.asm │ ├── exitrep.asm │ ├── expimp.asm │ ├── far64.asm │ ├── fewsecs.asm │ ├── float.asm │ ├── float8.asm │ ├── floatb.asm │ ├── floatexp.asm │ ├── floatize.asm │ ├── floattest.asm │ ├── floatx.asm │ ├── fpu.asm │ ├── fred.asm │ ├── fwdopt.asm │ ├── fwdoptpp.asm │ ├── gas2nasm.py │ ├── gather.asm │ ├── gotoff64.asm │ ├── gsmacro.asm │ ├── hexfp.asm │ ├── hle.asm │ ├── ifdef.asm │ ├── ifelse.asm │ ├── ifenv.asm │ ├── ifmacro.asm │ ├── iftoken.asm │ ├── iftoken.pl │ ├── ilog2.asm │ ├── imacro.asm │ ├── imm.asm │ ├── imm64.asm │ ├── immsize.asm │ ├── immwarn.asm │ ├── imul.asm │ ├── inc1.asm │ ├── inc2.asm │ ├── incbin.asm │ ├── incbin.data │ ├── include-self.asm │ ├── inctest.asm │ ├── insertps.asm │ ├── insnlbl.asm │ ├── invlpga.asm │ ├── istruc_local.asm │ ├── jmp64.asm │ ├── join.asm │ ├── k_test.asm │ ├── lar_lsl.asm │ ├── larlsl.asm │ ├── latevex.asm │ ├── lnxhello.asm │ ├── local.asm │ ├── loopoffs.asm │ ├── lwp.asm │ ├── macro-defaults.asm │ ├── macroerr.asm │ ├── macroerr.inc │ ├── manysecs.asm │ ├── map.asm │ ├── mapi.asm │ ├── masmdisp.asm │ ├── memleak.asm │ ├── mmxsize.asm │ ├── moresecs.asm │ ├── mostsecs.asm │ ├── movd.asm │ ├── movd64.asm │ ├── movhpd.asm │ ├── movimm.asm │ ├── movnti.asm │ ├── mpx-64.asm │ ├── mpx.asm │ ├── multisection.asm │ ├── nasmformat.asm │ ├── new │ ├── newrdwr.asm │ ├── nop.asm │ ├── nullfile.asm │ ├── numtest.asm │ ├── objexe.asm │ ├── objlink.c │ ├── objtest.asm │ ├── obsolete.asm │ ├── omferr.asm │ ├── optimization.asm │ ├── org.asm │ ├── paste.asm │ ├── pcrel.asm │ ├── perf │ │ ├── label.pl │ │ ├── macro.pl │ │ └── token.pl │ ├── performtest.pl │ ├── pextrw.asm │ ├── pinsr16.asm │ ├── pinsr32.asm │ ├── pinsr64.asm │ ├── popcnt.asm │ ├── ppindirect.asm │ ├── pragma.asm │ ├── prefix66.asm │ ├── prefixsym.asm │ ├── ptr.asm │ ├── pushseg.asm │ ├── r13.asm │ ├── radix.asm │ ├── rdpid.asm │ ├── reldef.asm │ ├── relocs.asm │ ├── require.asm │ ├── ret.asm │ ├── riprel.asm │ ├── riprel.pl │ ├── riprel2.asm │ ├── selfref.asm │ ├── sha-64.asm │ ├── sha.asm │ ├── sm3-64.asm │ ├── sm3.asm │ ├── sm4-64.asm │ ├── sm4.asm │ ├── smartalign16.asm │ ├── smartalign32.asm │ ├── smartalign64.asm │ ├── splitea.asm │ ├── sreg.asm │ ├── ssesize.asm │ ├── strlen.asm │ ├── struc.asm │ ├── subsection.asm │ ├── test67.asm │ ├── testdos.asm │ ├── testnos3.asm │ ├── time.asm │ ├── times.asm │ ├── timesneg.asm │ ├── tmap.nas │ ├── uscore.asm │ ├── utf.asm │ ├── v4.asm │ ├── vaesenc.asm │ ├── vex.asm │ ├── vgather.asm │ ├── vmread.asm │ ├── vpcmp.asm │ ├── warnstack.asm │ ├── weirdpaste.asm │ ├── winalign.asm │ ├── xchg.asm │ ├── xcrypt.asm │ ├── xdefine.asm │ ├── xmm0.asm │ ├── xpaste.asm │ └── zerobyte.asm │ ├── tools │ ├── Nindent │ ├── cleanfile │ ├── cleanpatch │ ├── mkdep.pl │ ├── release │ ├── syncfiles.pl │ └── tag-release │ ├── travis │ ├── README.md │ ├── nasm-t.py │ ├── t.json │ └── test │ │ ├── _file_.asm │ │ ├── _file_.bin.t │ │ ├── _file_.json │ │ ├── _version.json │ │ ├── _version.stdout │ │ ├── a32offs.asm │ │ ├── a32offs.bin.t │ │ ├── a32offs.json │ │ ├── a64.asm │ │ ├── a64.bin.t │ │ ├── a64.json │ │ ├── absolute.asm │ │ ├── absolute.bin.t │ │ ├── absolute.json │ │ ├── addr64x.asm │ │ ├── addr64x.bin.t │ │ ├── addr64x.json │ │ ├── addr64x.stderr │ │ ├── align13.asm │ │ ├── align13.json │ │ ├── align13.stderr │ │ ├── align13s.asm │ │ ├── align13s.json │ │ ├── align13s.stderr │ │ ├── alonesym-obj.asm │ │ ├── alonesym-obj.json │ │ ├── alonesym-obj.obj.t │ │ ├── amx.asm │ │ ├── amx.bin.t │ │ ├── amx.json │ │ ├── andbyte.asm │ │ ├── andbyte.bin.t │ │ ├── andbyte.json │ │ ├── aoutso-o0.o.t │ │ ├── aoutso-ox.o.t │ │ ├── aoutso.asm │ │ ├── aoutso.json │ │ ├── aoutso.stderr │ │ ├── aouttest-o0.o.t │ │ ├── aouttest-ox.o.t │ │ ├── aouttest.asm │ │ ├── aouttest.json │ │ ├── avx.asm │ │ ├── avx.bin.t │ │ ├── avx.json │ │ ├── avx005.asm │ │ ├── avx005.bin.t │ │ ├── avx005.json │ │ ├── avx2.asm │ │ ├── avx2.bin.t │ │ ├── avx2.json │ │ ├── avx512cd.asm │ │ ├── avx512cd.bin.t │ │ ├── avx512cd.json │ │ ├── avx512er.asm │ │ ├── avx512er.bin.t │ │ ├── avx512er.json │ │ ├── avx512f.asm │ │ ├── avx512f.bin.t │ │ ├── avx512f.json │ │ ├── avx512pf.asm │ │ ├── avx512pf.bin.t │ │ ├── avx512pf.json │ │ ├── bcd.asm │ │ ├── bcd.bin.t │ │ ├── bcd.json │ │ ├── bcd.stderr │ │ ├── binexe.asm │ │ ├── binexe.exe.t │ │ ├── binexe.json │ │ ├── bintest-o0.bin.t │ │ ├── bintest-ox.bin.t │ │ ├── bintest.asm │ │ ├── bintest.json │ │ ├── br1879590.asm │ │ ├── br1879590.bin.t │ │ ├── br1879590.json │ │ ├── br2003451.asm │ │ ├── br2003451.bin.t │ │ ├── br2003451.json │ │ ├── br2030823.asm │ │ ├── br2030823.bin.t │ │ ├── br2030823.json │ │ ├── br2148476.asm │ │ ├── br2148476.bin.t │ │ ├── br2148476.json │ │ ├── br2222615.asm │ │ ├── br2222615.bin.t │ │ ├── br2222615.json │ │ ├── br2222615.stderr │ │ ├── br2496848.asm │ │ ├── br2496848.bin.t │ │ ├── br2496848.json │ │ ├── br2496848.stderr │ │ ├── br3005117.asm │ │ ├── br3005117.json │ │ ├── br3005117.o.t │ │ ├── br3026808.asm │ │ ├── br3026808.bin.t │ │ ├── br3026808.json │ │ ├── br3028880.asm │ │ ├── br3028880.bin.t │ │ ├── br3028880.json │ │ ├── br3041451.asm │ │ ├── br3041451.bin.t │ │ ├── br3041451.json │ │ ├── br3041451.stderr │ │ ├── br3058845-o0.bin.t │ │ ├── br3058845-ox.bin.t │ │ ├── br3058845.asm │ │ ├── br3058845.json │ │ ├── br3066383.asm │ │ ├── br3066383.bin.t │ │ ├── br3066383.json │ │ ├── br3104312.asm │ │ ├── br3104312.json │ │ ├── br3104312.stderr │ │ ├── br3109604.asm │ │ ├── br3109604.bin.t │ │ ├── br3109604.json │ │ ├── br3174983.asm │ │ ├── br3174983.bin.t │ │ ├── br3174983.json │ │ ├── br3187743.asm │ │ ├── br3187743.bin.t │ │ ├── br3187743.json │ │ ├── br3189064.asm │ │ ├── br3189064.bin.t │ │ ├── br3189064.json │ │ ├── br3200749.asm │ │ ├── br3200749.json │ │ ├── br3200749.stderr │ │ ├── br3385573.asm │ │ ├── br3385573.bin.t │ │ ├── br3385573.json │ │ ├── br3392252.asm │ │ ├── br3392252.bin.t │ │ ├── br3392252.json │ │ ├── br3392259.asm │ │ ├── br3392259.json │ │ ├── br3392259.o.t │ │ ├── br3392275.asm │ │ ├── br3392275.bin.t │ │ ├── br3392275.json │ │ ├── br3392278.asm │ │ ├── br3392278.json │ │ ├── br3392278.o.t │ │ ├── br3392363.asm │ │ ├── br3392363.bin.t │ │ ├── br3392363.json │ │ ├── br3392392.asm │ │ ├── br3392392.bin.t │ │ ├── br3392392.json │ │ ├── br3392392.stderr │ │ ├── br3392396.asm │ │ ├── br3392396.bin.t │ │ ├── br3392396.json │ │ ├── br3392411.asm │ │ ├── br3392411.json │ │ ├── br3392411.out.t │ │ ├── br3392442.asm │ │ ├── br3392442.bin.t │ │ ├── br3392442.json │ │ ├── br3392442.stderr │ │ ├── br3392528.asm │ │ ├── br3392528.json │ │ ├── br3392528.stderr │ │ ├── br3392531.asm │ │ ├── br3392531.json │ │ ├── br3392531.stderr │ │ ├── br3392637.asm │ │ ├── br3392637.json │ │ ├── br3392637.o.t │ │ ├── br3392637.stderr │ │ ├── br3392643.asm │ │ ├── br3392643.json │ │ ├── br3392643.obj.t │ │ ├── br3392643.stderr │ │ ├── br3392707-error.stderr │ │ ├── br3392707.asm │ │ ├── br3392707.bin.t │ │ ├── br3392707.json │ │ ├── br3392707.stderr │ │ ├── br3392711.asm │ │ ├── br3392711.json │ │ ├── br3392711.o.t │ │ ├── br3392716.asm │ │ ├── br3392716.json │ │ ├── br3392716.stderr │ │ ├── br3392739.asm │ │ ├── br3392739.json │ │ ├── br3392739.stderr │ │ ├── br3392751.asm │ │ ├── br3392751.json │ │ ├── br3392751.stderr │ │ ├── br560575.asm │ │ ├── br560575.json │ │ ├── br560575.stderr │ │ ├── br890790.asm │ │ ├── br890790.bin.t │ │ ├── br890790.json │ │ ├── br890790_i.asm │ │ ├── br978756.asm │ │ ├── br978756.json │ │ ├── br978756.o.t │ │ ├── clzero.asm │ │ ├── clzero.bin.t │ │ ├── clzero.json │ │ ├── clzero.stderr │ │ ├── coffalign.asm │ │ ├── coffalign.json │ │ ├── coffalign.obj.t │ │ ├── cofftest.asm │ │ ├── cofftest.json │ │ ├── cofftest.obj.t │ │ ├── crc32.asm │ │ ├── crc32.bin.t │ │ ├── crc32.json │ │ ├── ctxlocal.asm │ │ ├── ctxlocal.json │ │ ├── ctxlocal.o.t │ │ ├── dbxsize.asm │ │ ├── dbxsize.json │ │ ├── dbxsize.o.t │ │ ├── elfso-o0.o.t │ │ ├── elfso-o0.stderr │ │ ├── elfso-ox.o.t │ │ ├── elfso-ox.stderr │ │ ├── elfso.asm │ │ ├── elfso.json │ │ ├── elif.asm │ │ ├── elif.json │ │ ├── elif.o.t │ │ ├── expimp-o0-error.stderr │ │ ├── expimp-o0.bin.t │ │ ├── expimp-o0.stderr │ │ ├── expimp-o1.bin.t │ │ ├── expimp-o1.stderr │ │ ├── expimp-ox-error.stderr │ │ ├── expimp-ox.bin.t │ │ ├── expimp.asm │ │ ├── expimp.json │ │ ├── far64.asm │ │ ├── far64.bin.t │ │ ├── far64.json │ │ ├── float.asm │ │ ├── float.bin.t │ │ ├── float.json │ │ ├── float8.asm │ │ ├── float8.bin.t │ │ ├── float8.json │ │ ├── floatb.asm │ │ ├── floatb.bin.t │ │ ├── floatb.json │ │ ├── floatb.stderr │ │ ├── floatexp-o0.bin.t │ │ ├── floatexp-ox.bin.t │ │ ├── floatexp.asm │ │ ├── floatexp.json │ │ ├── floatize.asm │ │ ├── floatize.bin.t │ │ ├── floatize.json │ │ ├── floattest.asm │ │ ├── floattest.json │ │ ├── floattest.o.t │ │ ├── floatx.asm │ │ ├── floatx.bin.t │ │ ├── floatx.json │ │ ├── floatx.stderr │ │ ├── fpu.asm │ │ ├── fpu.bin.t │ │ ├── fpu.json │ │ ├── fwdopt.asm │ │ ├── fwdopt.bin.t │ │ ├── fwdopt.json │ │ ├── fwdoptpp.asm │ │ ├── fwdoptpp.bin.t │ │ ├── fwdoptpp.error.stderr │ │ ├── fwdoptpp.fatal.stderr │ │ ├── fwdoptpp.json │ │ ├── fwdoptpp.warning.bin.t │ │ ├── fwdoptpp.warning.stderr │ │ ├── gather.asm │ │ ├── gather.bin.t │ │ ├── gather.json │ │ ├── gotoff64.asm │ │ ├── gotoff64.json │ │ ├── gotoff64.o.t │ │ ├── gotoff64.stderr │ │ ├── hexfp.asm │ │ ├── hexfp.bin.t │ │ ├── hexfp.json │ │ ├── hle.asm │ │ ├── hle.bin.t │ │ ├── hle.json │ │ ├── hle.stderr │ │ ├── ifelse.asm │ │ ├── ifelse.bin.t │ │ ├── ifelse.json │ │ ├── ifelse.stderr │ │ ├── ifid.asm │ │ ├── ifid.bin.t │ │ ├── ifid.json │ │ ├── ifmacro.asm │ │ ├── ifmacro.bin.t │ │ ├── ifmacro.json │ │ ├── iftoken.asm │ │ ├── iftoken.bin.t │ │ ├── iftoken.json │ │ ├── ilog-error.stderr │ │ ├── ilog.asm │ │ ├── ilog.bin.t │ │ ├── ilog.json │ │ ├── ilog.stderr │ │ ├── imacro.asm │ │ ├── imacro.bin.t │ │ ├── imacro.json │ │ ├── imm.asm │ │ ├── imm.json │ │ ├── imm.o.t │ │ ├── imm64-o0.bin.t │ │ ├── imm64-o0.stderr │ │ ├── imm64-o1.bin.t │ │ ├── imm64-o1.stderr │ │ ├── imm64-ox.bin.t │ │ ├── imm64-ox.stderr │ │ ├── imm64.asm │ │ ├── imm64.json │ │ ├── immwarn-no.bin.t │ │ ├── immwarn-o.bin.t │ │ ├── immwarn-o.stderr │ │ ├── immwarn-ono.bin.t │ │ ├── immwarn.asm │ │ ├── immwarn.bin.t │ │ ├── immwarn.json │ │ ├── immwarn.stderr │ │ ├── imul-nowarn.bin.t │ │ ├── imul-warn.bin.t │ │ ├── imul-warn.stderr │ │ ├── imul.asm │ │ ├── imul.json │ │ ├── inc1.asm │ │ ├── inc2.asm │ │ ├── inc3.asm │ │ ├── inctest.asm │ │ ├── inctest.com.t │ │ ├── inctest.json │ │ ├── insertps.asm │ │ ├── insertps.bin.t │ │ ├── insertps.json │ │ ├── insnlbl.asm │ │ ├── insnlbl.bin.t │ │ ├── insnlbl.json │ │ ├── invlpga.asm │ │ ├── invlpga.bin.t │ │ ├── invlpga.json │ │ ├── jmp64.asm │ │ ├── jmp64.bin.t │ │ ├── jmp64.json │ │ ├── lar_lsl.asm │ │ ├── lar_lsl.bin.t │ │ ├── lar_lsl.json │ │ ├── larlsl.asm │ │ ├── larlsl.bin.t │ │ ├── larlsl.json │ │ ├── lnxhello.asm │ │ ├── lnxhello.json │ │ ├── lnxhello.o.t │ │ ├── local.asm │ │ ├── local.bin.t │ │ ├── local.json │ │ ├── loopoffs.asm │ │ ├── loopoffs.bin.t │ │ ├── loopoffs.json │ │ ├── lwp.asm │ │ ├── lwp.bin.t │ │ ├── lwp.json │ │ ├── macro-defaults-nowarn.stderr │ │ ├── macro-defaults-warn.stderr │ │ ├── macro-defaults.asm │ │ ├── macro-defaults.json │ │ ├── masmdisp.asm │ │ ├── masmdisp.json │ │ ├── masmdisp.stderr │ │ ├── mmxsize.asm │ │ ├── mmxsize.bin.t │ │ ├── mmxsize.json │ │ ├── mout.json │ │ ├── mout.stderr │ │ ├── movd.asm │ │ ├── movd.bin.t │ │ ├── movd.json │ │ ├── movd64.asm │ │ ├── movd64.bin.t │ │ ├── movd64.json │ │ ├── movd64.stderr │ │ ├── movhpd.asm │ │ ├── movhpd.bin.t │ │ ├── movhpd.json │ │ ├── movimm-o0.bin.t │ │ ├── movimm-o0.stderr │ │ ├── movimm-ox.bin.t │ │ ├── movimm-ox.stderr │ │ ├── movimm.asm │ │ ├── movimm.json │ │ ├── movnti.asm │ │ ├── movnti.bin.t │ │ ├── movnti.json │ │ ├── mpx-64.asm │ │ ├── mpx-64.json │ │ ├── mpx-64.o.t │ │ ├── mpx.asm │ │ ├── mpx.json │ │ ├── mpx.o.t │ │ ├── multisection-elf32.o.t │ │ ├── multisection-elf32.stderr │ │ ├── multisection-elf64.o.t │ │ ├── multisection-elf64.stderr │ │ ├── multisection.asm │ │ ├── multisection.bin.t │ │ ├── multisection.json │ │ ├── multisection.stderr │ │ ├── nasmformat-aout.stdout │ │ ├── nasmformat-bin.stdout │ │ ├── nasmformat-elf32.stdout │ │ ├── nasmformat-elf64.stdout │ │ ├── nasmformat-hex.stdout │ │ ├── nasmformat-ieee.stdout │ │ ├── nasmformat-macho32.stdout │ │ ├── nasmformat-macho64.stdout │ │ ├── nasmformat-obj.stdout │ │ ├── nasmformat-win32.stdout │ │ ├── nasmformat-win64.stdout │ │ ├── nasmformat.asm │ │ ├── nasmformat.json │ │ ├── newrdwr.asm │ │ ├── newrdwr.bin.t │ │ ├── newrdwr.json │ │ ├── nop.asm │ │ ├── nop.bin.t │ │ ├── nop.json │ │ ├── null.asm │ │ ├── null.bin.t │ │ ├── null.json │ │ ├── nullfile.asm │ │ ├── nullfile.bin.t │ │ ├── nullfile.json │ │ ├── obj.asm │ │ ├── obj.json │ │ ├── obj.o.t │ │ ├── obj.stderr │ │ ├── objexe.asm │ │ ├── objexe.json │ │ ├── objexe.obj.t │ │ ├── optimization-o0.bin.t │ │ ├── optimization-o1.bin.t │ │ ├── optimization-ox.bin.t │ │ ├── optimization.asm │ │ ├── optimization.json │ │ ├── org.asm │ │ ├── org.json │ │ ├── org.stderr │ │ ├── pinsr.json │ │ ├── pinsr16.asm │ │ ├── pinsr16.bin.t │ │ ├── pinsr32.asm │ │ ├── pinsr32.bin.t │ │ ├── pinsr64.asm │ │ ├── pinsr64.bin.t │ │ ├── popcnt.asm │ │ ├── popcnt.bin.t │ │ ├── popcnt.json │ │ ├── ppindirect.asm │ │ ├── ppindirect.json │ │ ├── ppindirect.stdout │ │ ├── pragma.asm │ │ ├── pragma.json │ │ ├── pragma.stdout │ │ ├── prefix66.asm │ │ ├── prefix66.bin.t │ │ ├── prefix66.json │ │ ├── prefix66.stderr │ │ ├── pushseg.asm │ │ ├── pushseg.bin.t │ │ ├── pushseg.json │ │ ├── pushseg.stderr │ │ ├── r13.asm │ │ ├── r13.bin.t │ │ ├── r13.json │ │ ├── radix.asm │ │ ├── radix.bin.t │ │ ├── radix.json │ │ ├── rdpid.asm │ │ ├── rdpid.bin.t │ │ ├── rdpid.json │ │ ├── rdpid.stderr │ │ ├── ret-16.stderr │ │ ├── ret-32.stderr │ │ ├── ret-64.stderr │ │ ├── ret.asm │ │ ├── ret.bin.t │ │ ├── ret.json │ │ ├── riprel.asm │ │ ├── riprel.bin.t │ │ ├── riprel.json │ │ ├── riprel.stderr │ │ ├── riprel2.asm │ │ ├── riprel2.bin.t │ │ ├── riprel2.json │ │ ├── selfref.asm │ │ ├── selfref.json │ │ ├── selfref.stderr │ │ ├── sha-64.asm │ │ ├── sha-64.json │ │ ├── sha-64.o.t │ │ ├── sha.asm │ │ ├── sha.json │ │ ├── sha.o.t │ │ ├── smartalign.json │ │ ├── smartalign16.asm │ │ ├── smartalign16.bin.t │ │ ├── smartalign32.asm │ │ ├── smartalign32.bin.t │ │ ├── smartalign64.asm │ │ ├── smartalign64.bin.t │ │ ├── splitea.asm │ │ ├── splitea.bin.t │ │ ├── splitea.json │ │ ├── sreg.asm │ │ ├── sreg.bin.t │ │ ├── sreg.json │ │ ├── ssesize.asm │ │ ├── ssesize.json │ │ ├── ssesize.o.t │ │ ├── strlen.asm │ │ ├── strlen.json │ │ ├── strlen.stderr │ │ ├── struc.asm │ │ ├── struc.bin.t │ │ ├── struc.json │ │ ├── test67.asm │ │ ├── test67.bin.t │ │ ├── test67.json │ │ ├── testdos.asm │ │ ├── testdos.bin.t │ │ ├── testdos.json │ │ ├── testnos3.asm │ │ ├── testnos3.bin.t │ │ ├── testnos3.json │ │ ├── testnos3.stderr │ │ ├── time.asm │ │ ├── time.json │ │ ├── timesneg.asm │ │ ├── timesneg.json │ │ ├── timesneg.stderr │ │ ├── tmap.asm │ │ ├── tmap.json │ │ ├── tmap.o.t │ │ ├── tmap.stderr │ │ ├── uscore.asm │ │ ├── uscore.bin.t │ │ ├── uscore.json │ │ ├── utf-error.stderr │ │ ├── utf.asm │ │ ├── utf.bin.t │ │ ├── utf.json │ │ ├── v4.asm │ │ ├── v4.bin.t │ │ ├── v4.json │ │ ├── v4.stderr │ │ ├── vaesenc.asm │ │ ├── vaesenc.bin.t │ │ ├── vaesenc.json │ │ ├── vex.asm │ │ ├── vex.bin.t │ │ ├── vex.json │ │ ├── vex1.stderr │ │ ├── vex2.stderr │ │ ├── vgather.asm │ │ ├── vgather.bin.t │ │ ├── vgather.json │ │ ├── vmread.asm │ │ ├── vmread.bin.t │ │ ├── vmread.json │ │ ├── vmread.stderr │ │ ├── vmx.asm │ │ ├── vmx.json │ │ ├── vmx.o.t │ │ ├── vpcmp.asm │ │ ├── vpcmp.bin.t │ │ ├── vpcmp.json │ │ ├── warnstack.asm │ │ ├── warnstack.bin.t │ │ ├── warnstack.json │ │ ├── warnstack.stderr │ │ ├── weirdpaste.asm │ │ ├── weirdpaste.bin.t │ │ ├── weirdpaste.i.t │ │ ├── weirdpaste.json │ │ ├── winalign.asm │ │ ├── winalign.json │ │ ├── winalign.obj.t │ │ ├── xchg.asm │ │ ├── xchg.bin.t │ │ ├── xchg.json │ │ ├── xcrypt.asm │ │ ├── xcrypt.bin.t │ │ ├── xcrypt.json │ │ ├── xdefine.asm │ │ ├── xdefine.bin.t │ │ ├── xdefine.json │ │ ├── xpaste.asm │ │ ├── xpaste.bin.t │ │ ├── xpaste.json │ │ ├── zerobyte.asm │ │ ├── zerobyte.bin.t │ │ └── zerobyte.json │ ├── version │ ├── version.h │ ├── version.mac │ ├── version.mak │ ├── version.pl │ ├── version.sed │ ├── win │ ├── .gitignore │ ├── manifest.rc │ └── manifest.xml │ └── x86 │ ├── disp8.c │ ├── iflag.c │ ├── iflaggen.h │ ├── iflags.ph │ ├── insns-iflags.ph │ ├── insns.dat │ ├── insns.pl │ ├── insnsa.c │ ├── insnsb.c │ ├── insnsd.c │ ├── insnsi.h │ ├── insnsn.c │ ├── regdis.c │ ├── regdis.h │ ├── regflags.c │ ├── regs.c │ ├── regs.dat │ ├── regs.h │ ├── regs.pl │ └── regvals.c └── 07 ├── build.zig ├── build.zig.zon ├── test.asm └── test.c /02_multi/foo.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void try_add(int a, int b) { 4 | int result = a + b; 5 | printf("%d + %d = %d\n", a, b, result); 6 | } 7 | -------------------------------------------------------------------------------- /02_multi/main.c: -------------------------------------------------------------------------------- 1 | extern void try_add(int, int); 2 | 3 | int main(void) { 4 | try_add(50, -25); 5 | try_add(1 << 30, 1 << 30); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /03_lib/lib.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void print_int(int x) { 4 | printf("%d\n", x); 5 | } 6 | -------------------------------------------------------------------------------- /03_lib/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void print_int(int); 4 | 5 | int main(void) { 6 | puts("First print..."); 7 | print_int(1); 8 | puts("Second print..."); 9 | print_int(2); 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /04_zlib/test.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/04_zlib/test.z -------------------------------------------------------------------------------- /05_assemble/test.asm: -------------------------------------------------------------------------------- 1 | section .data 2 | 3 | global str 4 | global _str 5 | str: 6 | _str: 7 | db "Hello, World!", 0 8 | -------------------------------------------------------------------------------- /05_assemble/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern const char str[]; 4 | 5 | int main(void) { 6 | puts(str); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /07_package_management/test.asm: -------------------------------------------------------------------------------- 1 | section .data 2 | 3 | global str 4 | str: db "Hello, World!", 0 5 | -------------------------------------------------------------------------------- /07_package_management/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern const char str[]; 4 | 5 | int main(void) { 6 | puts(str); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /slides.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/slides.pdf -------------------------------------------------------------------------------- /solutions/01/hello.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) { 4 | puts("Hello, World!"); 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /solutions/02/foo.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void try_add(int a, int b) { 4 | int result = a + b; 5 | printf("%d + %d = %d\n", a, b, result); 6 | } 7 | -------------------------------------------------------------------------------- /solutions/02/main.c: -------------------------------------------------------------------------------- 1 | extern void try_add(int, int); 2 | 3 | int main(void) { 4 | try_add(50, -25); 5 | try_add(1 << 30, 1 << 30); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /solutions/03/lib.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void print_int(int x) { 4 | printf("%d\n", x); 5 | } 6 | -------------------------------------------------------------------------------- /solutions/03/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void print_int(int); 4 | 5 | int main(void) { 6 | puts("First print..."); 7 | print_int(1); 8 | puts("Second print..."); 9 | print_int(2); 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /solutions/04/test.z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/04/test.z -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | -@echo "Please use ./configure first. Thank you." 3 | 4 | distclean: 5 | make -f Makefile.in distclean 6 | -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/contrib/blast/Makefile: -------------------------------------------------------------------------------- 1 | blast: blast.c blast.h 2 | cc -DTEST -o blast blast.c 3 | 4 | test: blast 5 | blast < test.pk | cmp - test.txt 6 | 7 | clean: 8 | rm -f blast blast.o 9 | -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/contrib/blast/README: -------------------------------------------------------------------------------- 1 | Read blast.h for purpose and usage. 2 | 3 | Mark Adler 4 | madler@alumni.caltech.edu 5 | -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/contrib/blast/test.pk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/04/zlib-1.3.1/contrib/blast/test.pk -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/contrib/blast/test.txt: -------------------------------------------------------------------------------- 1 | AIAIAIAIAIAIA -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/contrib/delphi/ZLibConst.pas: -------------------------------------------------------------------------------- 1 | unit ZLibConst; 2 | 3 | interface 4 | 5 | resourcestring 6 | sTargetBufferTooSmall = 'ZLib error: target buffer may be too small'; 7 | sInvalidStreamOp = 'Invalid stream operation'; 8 | 9 | implementation 10 | 11 | end. 12 | -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/contrib/dotzlib/DotZLib.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/04/zlib-1.3.1/contrib/dotzlib/DotZLib.chm -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/contrib/dotzlib/DotZLib/ChecksumImpl.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/04/zlib-1.3.1/contrib/dotzlib/DotZLib/ChecksumImpl.cs -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/contrib/dotzlib/DotZLib/CircularBuffer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/04/zlib-1.3.1/contrib/dotzlib/DotZLib/CircularBuffer.cs -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/contrib/dotzlib/DotZLib/CodecBase.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/04/zlib-1.3.1/contrib/dotzlib/DotZLib/CodecBase.cs -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/contrib/dotzlib/DotZLib/Deflater.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/04/zlib-1.3.1/contrib/dotzlib/DotZLib/Deflater.cs -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/contrib/dotzlib/DotZLib/DotZLib.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/04/zlib-1.3.1/contrib/dotzlib/DotZLib/DotZLib.cs -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/contrib/dotzlib/DotZLib/GZipStream.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/04/zlib-1.3.1/contrib/dotzlib/DotZLib/GZipStream.cs -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/contrib/dotzlib/DotZLib/Inflater.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/04/zlib-1.3.1/contrib/dotzlib/DotZLib/Inflater.cs -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/contrib/infback9/README: -------------------------------------------------------------------------------- 1 | See infback9.h for what this is and how to use it. 2 | -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/contrib/minizip/MiniZip64_Changes.txt: -------------------------------------------------------------------------------- 1 | 2 | MiniZip 1.1 was derived from MiniZip at version 1.01f 3 | 4 | Change in 1.0 (Okt 2009) 5 | - **TODO - Add history** 6 | 7 | -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/contrib/minizip/minizip.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@/minizip 5 | 6 | Name: minizip 7 | Description: Minizip zip file manipulation library 8 | Requires: 9 | Version: @PACKAGE_VERSION@ 10 | Libs: -L${libdir} -lminizip 11 | Libs.private: -lz 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/contrib/puff/zeros.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/04/zlib-1.3.1/contrib/puff/zeros.raw -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/contrib/testzlib/testzlib.txt: -------------------------------------------------------------------------------- 1 | To build testzLib with Visual Studio 2005: 2 | 3 | copy to a directory file from : 4 | - root of zLib tree 5 | - contrib/testzlib 6 | - contrib/masmx86 7 | - contrib/masmx64 8 | - contrib/vstudio/vc7 9 | 10 | and open testzlib8.sln -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/contrib/untgz/Makefile: -------------------------------------------------------------------------------- 1 | CC=cc 2 | CFLAGS=-g 3 | 4 | untgz: untgz.o ../../libz.a 5 | $(CC) $(CFLAGS) -o untgz untgz.o -L../.. -lz 6 | 7 | untgz.o: untgz.c ../../zlib.h 8 | $(CC) $(CFLAGS) -c -I../.. untgz.c 9 | 10 | ../../libz.a: 11 | cd ../..; ./configure; make 12 | 13 | clean: 14 | rm -f untgz untgz.o *~ 15 | -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/contrib/untgz/Makefile.msc: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS=-MD 3 | 4 | untgz.exe: untgz.obj ..\..\zlib.lib 5 | $(CC) $(CFLAGS) untgz.obj ..\..\zlib.lib 6 | 7 | untgz.obj: untgz.c ..\..\zlib.h 8 | $(CC) $(CFLAGS) -c -I..\.. untgz.c 9 | 10 | ..\..\zlib.lib: 11 | cd ..\.. 12 | $(MAKE) -f win32\makefile.msc 13 | cd contrib\untgz 14 | 15 | clean: 16 | -del untgz.obj 17 | -del untgz.exe 18 | -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/doc/crc-doc.1.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/04/zlib-1.3.1/doc/crc-doc.1.0.pdf -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/nintendods/README: -------------------------------------------------------------------------------- 1 | This Makefile requires devkitARM (http://www.devkitpro.org/category/devkitarm/) and works inside "contrib/nds". It is based on a devkitARM template. 2 | 3 | Eduardo Costa 4 | January 3, 2009 5 | 6 | -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/old/README: -------------------------------------------------------------------------------- 1 | This directory contains files that have not been updated for zlib 1.2.x 2 | 3 | (Volunteers are encouraged to help clean this up. Thanks.) 4 | -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/win32/VisualC.txt: -------------------------------------------------------------------------------- 1 | 2 | To build zlib using the Microsoft Visual C++ environment, 3 | use the appropriate project from the contrib/vstudio/ directory. 4 | -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/zlib.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/04/zlib-1.3.1/zlib.3.pdf -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/zlib.pc.cmakein: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=@CMAKE_INSTALL_PREFIX@ 3 | libdir=@INSTALL_LIB_DIR@ 4 | sharedlibdir=@INSTALL_LIB_DIR@ 5 | includedir=@INSTALL_INC_DIR@ 6 | 7 | Name: zlib 8 | Description: zlib compression library 9 | Version: @VERSION@ 10 | 11 | Requires: 12 | Libs: -L${libdir} -L${sharedlibdir} -lz 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /solutions/04/zlib-1.3.1/zlib.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | sharedlibdir=@sharedlibdir@ 5 | includedir=@includedir@ 6 | 7 | Name: zlib 8 | Description: zlib compression library 9 | Version: @VERSION@ 10 | 11 | Requires: 12 | Libs: -L${libdir} -L${sharedlibdir} -lz 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /solutions/05/test.asm: -------------------------------------------------------------------------------- 1 | section .data 2 | 3 | global str 4 | str: db "Hello, World!", 0 5 | -------------------------------------------------------------------------------- /solutions/05/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern const char str[]; 4 | 5 | int main(void) { 6 | puts(str); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /solutions/06/build.zig.zon: -------------------------------------------------------------------------------- 1 | .{ 2 | .name = "nasm", 3 | .version = "2.16.3", 4 | .paths = .{ 5 | "build.zig", 6 | "build.zig.zon", 7 | "nasm-2.16.03", 8 | }, 9 | } 10 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/.gitattributes: -------------------------------------------------------------------------------- 1 | /version -merge 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | os: 3 | - linux 4 | env: 5 | - TR_ARCH=local 6 | script: 7 | - ./autogen.sh 8 | - ./configure 9 | - make all 10 | - python3 ./travis/nasm-t.py run 11 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/CHANGES: -------------------------------------------------------------------------------- 1 | The revision history has moved to the file doc/changes.src, and 2 | is now included in the documentation as Appendix C. 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/asm/tokens.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is generated from insns.dat, regs.dat and token.dat 3 | * by tokhash.pl; do not edit. 4 | */ 5 | 6 | #ifndef NASM_TOKENS_H 7 | #define NASM_TOKENS_H 8 | 9 | #define MAX_KEYWORD 17 /* length of longest keyword */ 10 | 11 | #endif /* NASM_TOKENS_H */ 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/asm/warnings.c: -------------------------------------------------------------------------------- 1 | #include "warnings_c.h" 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/asm/warnings.time: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/asm/warnings.time -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/asm/warnings_c.h.time: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/asm/warnings_c.h.time -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/autoconf/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | rm -f config/config.h 3 | rm -f Makefile doc/Makefile 4 | rm -f config.log config.status 5 | rm -rf autom4te.cache 6 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/autoconf/m4/pa_arg_disabled.m4: -------------------------------------------------------------------------------- 1 | dnl -------------------------------------------------------------------------- 2 | dnl PA_ARG_DISABLED(option,helptext,disabled_action,enabled_action) 3 | dnl -------------------------------------------------------------------------- 4 | AC_DEFUN([PA_ARG_DISABLED],[PA_ARG_BOOL([$1],[$2],yes,[$4],[$3])]) 5 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/autoconf/m4/pa_arg_enabled.m4: -------------------------------------------------------------------------------- 1 | dnl -------------------------------------------------------------------------- 2 | dnl PA_ARG_ENABLED(option,helptext,enabled_action,disabled_action) 3 | dnl -------------------------------------------------------------------------- 4 | AC_DEFUN([PA_ARG_ENABLED],[PA_ARG_BOOL([$1],[$2],no,[$3],[$4])]) 5 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/doc/local.css: -------------------------------------------------------------------------------- 1 | /* Add site-local nasmdoc style configuration to this file */ 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/doc/nasmlogw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/doc/nasmlogw.png -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/doc/warnings.src.time: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/doc/warnings.src.time -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/include/warnings.h.time: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/include/warnings.h.time -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/misc/README: -------------------------------------------------------------------------------- 1 | There are various helpful bits and pieces for NASM, 2 | including but not limited to Simon photograph =) 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/misc/magic: -------------------------------------------------------------------------------- 1 | # Put the following lines in your /etc/magic file to get 'file' to recognise 2 | # RDOFF Object Files 3 | 4 | 0 string RDOFF RDOFF Object File 5 | >5 byte >32 version %c (little endian) 6 | >5 byte <32 version %d (big endian) 7 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/misc/pmw.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem some batch file to bind nasm and ndisasm with pmode/w 3 | rem a mega cool dos extender for watcom done by tran 4 | rem 5 | rem max 8 megs, dpmi stack 256*16=4096, no banner 6 | pmwlite.exe nasm.exe 7 | pmwsetup.exe /X8388608 /P256 /B0 nasm.exe 8 | pmwlite.exe ndisasm.exe 9 | pmwsetup.exe /X8388608 /P256 /B0 ndisasm.exe 10 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/nasm.spec.sed: -------------------------------------------------------------------------------- 1 | # Replace @@PERLBUILDREQS@@ with the file perlbreq.si 2 | /@@PERLBUILDREQS@@/{r perlbreq.si 3 | d} 4 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/nasmlib/errfile.c: -------------------------------------------------------------------------------- 1 | #include "compiler.h" 2 | 3 | FILE *error_file; 4 | 5 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/nasmlib/ilog2.c: -------------------------------------------------------------------------------- 1 | #define ILOG2_C 2 | #include "ilog2.h" 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/nsis/nasm-un.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/nsis/nasm-un.ico -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/nsis/nasm.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/nsis/nasm.ico -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/nsis/version.nsh: -------------------------------------------------------------------------------- 1 | !define VERSION "2.16.03" 2 | !define MAJOR_VER 16 3 | !define MINOR_VER 16 4 | !define SUBMINOR_VER 3 5 | !define PATCHLEVEL_VER 0 6 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/_file_.asm: -------------------------------------------------------------------------------- 1 | ;Testname=bin; Arguments=-fbin -o_file_.bin; Files=stdout stderr _file_.bin 2 | db __FILE__, `\r\n` 3 | db __FILE__, `\r\n` 4 | dw __LINE__ 5 | dw __LINE__ 6 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/_version.asm: -------------------------------------------------------------------------------- 1 | ;Testname=version; Arguments=-v; Files=stdout 2 | ;Dummy test to record version numbers 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/a32offs.asm: -------------------------------------------------------------------------------- 1 | ;Testname=unoptimized; Arguments=-O0 -fbin -oa32offs.bin; Files=a32offs.bin stdout stderr 2 | ;Testname=optimized; Arguments=-Ox -fbin -oa32offs.bin; Files=a32offs.bin stdout stderr 3 | bits 16 4 | foo: a32 loop foo 5 | bar: loop bar, ecx 6 | 7 | bits 32 8 | baz: a16 loop baz 9 | qux: loop qux, cx 10 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/baddb.asm: -------------------------------------------------------------------------------- 1 | ;; This should error 2 | db 1 2 3 | 4 | ;; This should work 5 | db 1, 2 6 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/baddq.asm: -------------------------------------------------------------------------------- 1 | %assign foo 'abcdefgh' 2 | dq foo 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br2003451.asm: -------------------------------------------------------------------------------- 1 | ;Testname=optimized; Arguments=-Ox -fbin -obr2003451.bin; Files=stdout stderr br2003451.bin 2 | 3 | cpu 8086 4 | org 0 5 | 6 | ; MOV r/m16,imm16 7 | ; (imm16 given as number) 8 | mov word [bx], 10h 9 | 10 | ; MOV r/m16,imm16 11 | ; (imm16 given as label) 12 | mov word [bx], label 13 | 14 | align 10h 15 | 16 | ; This label is at address 10h 17 | label: 18 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br2030823.asm: -------------------------------------------------------------------------------- 1 | ;Testname=optimized; Arguments=-Ox -fbin -obr2030823.bin; Files=stdout stderr br2030823.bin 2 | 3 | bits 64 4 | VFMADDPD xmm0, xmm1, [0], xmm3 5 | VFMADDPD xmm0, xmm1, xmm2, [0] 6 | VFMADDPD ymm0, ymm1, [0], ymm3 7 | VFMADDPD ymm0, ymm1, ymm2, [0] 8 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3026808.asm: -------------------------------------------------------------------------------- 1 | ;Testname=br3026808; Arguments=-Ox -fbin -obr3026808.o; Files=stdout stderr br3026808.o 2 | 3 | %imacro proc 1 4 | %push proc 5 | %assign %$arg 1 6 | %endmacro 7 | 8 | %imacro arg 0-1 1 9 | %assign %$arg %1+%$arg 10 | %endmacro 11 | 12 | %imacro endproc 0 13 | %pop 14 | %endmacro 15 | 16 | ;---------------------------- 17 | 18 | proc Test 19 | %$ARG arg 20 | endproc 21 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3028880.asm: -------------------------------------------------------------------------------- 1 | ;Testname=br3028880; Arguments=-Ox -fbin -obr3028880.o; Files=stdout stderr br3028880.o 2 | 3 | %macro import 1 4 | %define %%incfile %!PROJECTBASEDIR/%{1}.inc 5 | %endmacro 6 | 7 | import foo 8 | 9 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3058845.asm: -------------------------------------------------------------------------------- 1 | ;Testname=unoptimized; Arguments=-O0 -fbin -obr3058845.bin; Files=stdout stderr br3058845.bin 2 | ;Testname=optimized; Arguments=-Ox -fbin -obr3058845.bin; Files=stdout stderr br3058845.bin 3 | 4 | BITS 16 5 | cmp ax, 0xFFFF 6 | cmp eax, 0xFFFF_FFFF 7 | 8 | BITS 32 9 | cmp ax, 0xFFFF 10 | cmp eax, 0xFFFF_FFFF 11 | 12 | BITS 64 13 | cmp ax, 0xFFFF 14 | cmp eax, 0xFFFF_FFFF 15 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3074517.asm: -------------------------------------------------------------------------------- 1 | ;%define UNDEFINED 2 | %macro macro 0 3 | %ifndef UNDEFINED 4 | %rep 1 5 | %fatal This should display "fatal: (m:3)" 6 | %endrep 7 | %endif 8 | %fatal This should display "fatal: (m:6)" if 'UNDEFINED' defined 9 | %endmacro 10 | 11 | macro 12 | 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3104312.asm: -------------------------------------------------------------------------------- 1 | %if 1 < 8000_0002h 2 | %warning No bug with 8000_0002h 3 | %else 4 | %warning Bug with 8000_0002h 5 | %endif 6 | 7 | %if 1 < 8000_0001h 8 | %warning No bug with 8000_0001h 9 | %else 10 | %warning Bug with 8000_0001h 11 | %endif 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3109604.asm: -------------------------------------------------------------------------------- 1 | ;Testname=unoptimized; Arguments=-O0 -fbin -obr3109604.bin; Files=stdout stderr br3109604.bin 2 | ;Testname=optimized; Arguments=-Ox -fbin -obr3109604.bin; Files=stdout stderr br3109604.bin 3 | 4 | bits 64 5 | b0: vmovd xmm2, [rdx+r9] 6 | e0: 7 | 8 | section .data 9 | len: dd e0 - b0 ; Should be 6 10 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3174983.asm: -------------------------------------------------------------------------------- 1 | ;Testname=unoptimized; Arguments=-O0 -fbin -obr3174983.bin; Files=stdout stderr br3174983.bin 2 | ;Testname=optimized; Arguments=-Ox -fbin -obr3174983.bin; Files=stdout stderr br3174983.bin 3 | 4 | bits 32 5 | vpextrw ecx,xmm0,8 ; c5 f9 c5 c8 08 6 | vpextrw ecx,xmm2,3 ; c5 f9 c5 ca 03 7 | 8 | bits 64 9 | vpextrw rcx,xmm0,8 ; c5 f9 c5 c8 08 10 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3187743.asm: -------------------------------------------------------------------------------- 1 | ;Testname=unoptimized; Arguments=-O0 -fbin -obr3187743.bin; Files=stdout stderr br3187743.bin 2 | ;Testname=optimized; Arguments=-Ox -fbin -obr3187743.bin; Files=stdout stderr br3187743.bin 3 | 4 | bits 64 5 | 6 | vlddqu xmm0,[edi] 7 | vlddqu ymm0,[edi] 8 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3189064.asm: -------------------------------------------------------------------------------- 1 | ;Testname=unoptimized; Arguments=-O0 -fbin -obr3189064.bin; Files=stdout stderr br3189064.bin 2 | ;Testname=optimized; Arguments=-Ox -fbin -obr3189064.bin; Files=stdout stderr br3189064.bin 3 | 4 | [bits 64] 5 | VMASKMOVPS [edi],ymm0,ymm1 6 | VEXTRACTF128 xmm0,ymm1,1 7 | VEXTRACTF128 [edi],ymm1,1 8 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3200749.asm: -------------------------------------------------------------------------------- 1 | ;Testname=unoptimized; Arguments=-O0 -fbin -obr3200749.bin; Files=stdout stderr br3200749.bin 2 | ;Testname=optimized; Arguments=-Ox -fbin -obr3200749.bin; Files=stdout stderr br3200749.bin 3 | %define IFNDEF %ifndef 4 | %define ENDIF %endif 5 | 6 | IFNDEF foo 7 | ; bar 8 | ENDIF 9 | 10 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3392363.asm: -------------------------------------------------------------------------------- 1 | vaddps zmm0 {k1}, zmm0, zmm0 2 | rep 3 | vaddps zmm0 {k1}, zmm0, zmm0 4 | rep movsd 5 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3392396.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | vmovdqa32 [rdi],zmm16 3 | vmovdqa32 [rdi+64],zmm17 4 | vmovdqa32 [rdi+128],zmm18 5 | vmovdqa32 [rdi+192],zmm19 6 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3392411.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | default rel 3 | 4 | %use smartalign 5 | 6 | section .text code align=32 7 | 8 | align 32 9 | 10 | nop 11 | jz LDone 12 | 13 | %rep 10 14 | nop 15 | %endrep 16 | 17 | align 16 18 | %rep 115 19 | nop 20 | %endrep 21 | 22 | LDone: 23 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3392418.asm: -------------------------------------------------------------------------------- 1 | section __LD,__compact_unwind data debug 2 | 3 | dd 0 4 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3392442.asm: -------------------------------------------------------------------------------- 1 | ;; Bug report 3392442: invalid warning 2 | 3 | and byte [0], ~80h 4 | and byte [0], 0xfff 5 | and byte [0], -256 6 | and byte [0], -257 7 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3392472.asm: -------------------------------------------------------------------------------- 1 | org 0 2 | %ifndef SEEK 3 | %define SEEK 0 4 | %endif 5 | times SEEK - ($ - $$) nop 6 | jmp near init 7 | 8 | %ifndef NUM 9 | %define NUM 9956h 10 | %endif 11 | times NUM - ($ - $$) db 0 12 | init: 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3392586.asm: -------------------------------------------------------------------------------- 1 | bits 32 2 | %define CACHE_SIZE 32 3 | %define MAXHEIGHT 1024 4 | %define DPS_MAXSPANS MAXHEIGHT+1 5 | %define spanpackage_t_size 32 6 | %define SPAN_SIZE (((DPS_MAXSPANS + 1 + ((CACHE_SIZE - 1) / spanpackage_t_size)) + 1) * spanpackage_t_size) 7 | D_PolysetDraw: 8 | sub esp,SPAN_SIZE 9 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3392607.asm: -------------------------------------------------------------------------------- 1 | BITS 64 2 | vpshldvw xmm0{k1}{z}, xmm1, xmm2 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3392626.asm: -------------------------------------------------------------------------------- 1 | ; line 1 2 | %rep 3 ; line 2 3 | ; line 3 4 | db 26h ; line 4 5 | %endrep ; line 5 6 | ; line 6 7 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3392640.asm: -------------------------------------------------------------------------------- 1 | %imacro mac 1-2 2 | j%+1 3 | %endmacro 4 | mac c, label 5 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3392660.asm: -------------------------------------------------------------------------------- 1 | %macro coreloop 1 2 | .count_%+1: 3 | .no_run_before_%+1: 4 | .broken_run_before_%-1: 5 | %endmacro 6 | 7 | label: 8 | coreloop z 9 | coreloop nz 10 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3392661.asm: -------------------------------------------------------------------------------- 1 | section .text 2 | 3 | global _start 4 | 5 | _start: 6 | mov rdi, 0 ; Exit status 7 | mov rax, 60 ; Exit syscall number 8 | syscall 9 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3392667.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/test/br3392667.asm -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3392668-3.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/test/br3392668-3.asm -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3392669-57.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/test/br3392669-57.asm -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br3392708.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/test/br3392708.asm -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br890790.asm: -------------------------------------------------------------------------------- 1 | ;Testname=test; Arguments=-fbin -obr890790.bin; Files=stdout stderr br890790.bin 2 | %rep 5 3 | db 0 4 | %include "br890790_i.asm" 5 | %endrep 6 | 7 | db 1 8 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br890790_i.asm: -------------------------------------------------------------------------------- 1 | db 2 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/br978756.asm: -------------------------------------------------------------------------------- 1 | ;Testname=br978756; Arguments=-Ox -felf64 -obr978756.o; Files=stdout stderr br978756.o 2 | [bits 64] 3 | MOVNTDQA xmm1, oword [rsi] 4 | MOVLPD xmm2, qword [rdi] 5 | MOVLPD xmm2, [rdi] 6 | MOVLPD qword [rdi], xmm2 7 | MOVLPD [rdi], xmm2 8 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/clzero.asm: -------------------------------------------------------------------------------- 1 | bits 16 2 | 3 | clzero 4 | clzero ax 5 | clzero eax 6 | %ifdef ERROR 7 | clzero rax 8 | %endif 9 | 10 | bits 32 11 | 12 | clzero 13 | clzero ax 14 | clzero eax 15 | %ifdef ERROR 16 | clzero rax 17 | %endif 18 | 19 | bits 64 20 | 21 | clzero 22 | %ifdef ERROR 23 | clzero ax 24 | %endif 25 | clzero eax 26 | clzero rax 27 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/coffalign.asm: -------------------------------------------------------------------------------- 1 | section .text align=64 2 | foo: 3 | nop 4 | nop 5 | nop 6 | ret 7 | 8 | section .data align=64 9 | bar: 10 | db 0, 1, 2 11 | 12 | section .text align=32 13 | baz: 14 | nop 15 | nop 16 | nop 17 | ret 18 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/ctxlocal.asm: -------------------------------------------------------------------------------- 1 | ;; 2 | ;; Test of context-local labels 3 | ;; 4 | 5 | bits 64 6 | extern everywhere ; Test of extern -> global promotion, too 7 | extern tjosan 8 | here: 9 | jz .there 10 | %push foo 11 | jo %$mordor 12 | hlt 13 | %$mordor: 14 | nop 15 | %pop 16 | .there: 17 | ret 18 | 19 | everywhere: 20 | ret 21 | 22 | global everywhere 23 | 24 | tjosan: 25 | ret 26 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/cv8struc.asm: -------------------------------------------------------------------------------- 1 | struc A_STRUC 2 | ._a: resw 1 3 | endstruc 4 | 5 | a_struc: 6 | istruc A_STRUC 7 | at A_STRUC._a, dw 1 8 | iend 9 | 10 | section .data 11 | foo: 12 | dd 0x11111111 13 | .bar: 14 | dd 0x22222222 15 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/evalerr.asm: -------------------------------------------------------------------------------- 1 | bits 32 2 | start: 3 | nop 4 | %warning We are at %hex($-$$) 5 | ;%warning We are at %hex($) 6 | %warning We are at %hex($-$$) 7 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/evalmacro.asm: -------------------------------------------------------------------------------- 1 | %define tonum(=x) x 2 | 3 | dd tonum(1+3) 4 | dd tonum(5*7) 5 | 6 | %define mixed(a,=b,c) (a + b) 7 | %define mixed2(a,=b,) (a + b) 8 | %define mixed3(=a/u,=b/x,=c/ux) (a + b + c) 9 | %define ALPHA (1 + 2) 10 | %define BETA (3 + 4) 11 | %define GAMMA (5 + 6) 12 | 13 | dd mixed(ALPHA, BETA, GAMMA) 14 | dd mixed2(ALPHA, BETA, GAMMA) 15 | dd mixed3(-ALPHA, -BETA, -GAMMA) 16 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/far64.asm: -------------------------------------------------------------------------------- 1 | ;Testname=test; Arguments=-fbin -ofar64.bin; Files=stdout stderr far64.bin 2 | ; BR 2039212 3 | bits 64 4 | 5 | call qword far [rax] 6 | jmp qword far [rax] 7 | call dword far [rax] 8 | jmp dword far [rax] 9 | call far [rax] 10 | jmp far [rax] 11 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/fewsecs.asm: -------------------------------------------------------------------------------- 1 | %assign NSECS 64 2 | %include "manysecs.asm" 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/gsmacro.asm: -------------------------------------------------------------------------------- 1 | %define greedy(a,b,c+) a + 66 %, b * 3 %, c 2 | 3 | db greedy(1,2) 4 | db greedy(1,2,3) 5 | db greedy(1,2,3,4) 6 | db greedy(1,2,3,4,5) 7 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/hexfp.asm: -------------------------------------------------------------------------------- 1 | ;; BR 3392399 2 | 3 | ; All of these should be the same value... 4 | %macro fp 1 5 | %1 0.5 6 | %1 5e-1 7 | %1 0x1.0p-1 8 | %1 0x0.8p0 9 | %1 0x0.8 10 | %1 0x8p-4 11 | %1 0x.8 12 | %1 0x1p-1 13 | %1 0x0.1p3 14 | %1 0x0.01p7 15 | %1 0x0.01p7 16 | %1 0x0.001p11 17 | 18 | %endmacro 19 | 20 | fp do 21 | fp dt 22 | fp dq 23 | fp dd 24 | fp dw 25 | fp dd 26 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/ifdef.asm: -------------------------------------------------------------------------------- 1 | %define FOO(x) x 2 | %ifndef FOO 3 | %define FOO(x) _ %+ x 4 | %endif 5 | 6 | FOO(this): 7 | jmp this 8 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/imacro.asm: -------------------------------------------------------------------------------- 1 | ;Testname=test; Arguments=-fbin -oimacro.bin; Files=stdout stderr imacro.bin 2 | 3 | %imacro Zero 1 4 | xor %1,%1 5 | %endmacro 6 | 7 | Zero eax 8 | zero eax 9 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/inc1.asm: -------------------------------------------------------------------------------- 1 | ; This file is part of the include test. 2 | ; See inctest.asm for build instructions. 3 | 4 | message: db 'hello, world',13,10,'$' 5 | 6 | %include "inc2.asm" 7 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/inc2.asm: -------------------------------------------------------------------------------- 1 | ; This file is part of the include test. 2 | ; See inctest.asm for build instructions. 3 | 4 | _main: mov dx,message 5 | mov ah,9 6 | int 21h 7 | mov ax,4c00h 8 | int 21h 9 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/incbin.asm: -------------------------------------------------------------------------------- 1 | db '*** ONCE ***', 0Ah 2 | incbin "incbin.data",32 3 | 4 | section more start=0x1000000 5 | db '*** TWELVE ***', 0Ah 6 | times 12 incbin "incbin.data",32 7 | db '', 0Ah 8 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/incbin.data: -------------------------------------------------------------------------------- 1 | This is the wrong line of text. 2 | This is the right line of text. 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/include-self.asm: -------------------------------------------------------------------------------- 1 | ; Test an infinite %include loop 2 | %include "include-self.asm" 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/insertps.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | insertps xmm0,xmm1,16 3 | insertps xmm0,dword xmm1,16 4 | insertps xmm0,xmm1,byte 16 5 | insertps xmm0,dword xmm1,byte 16 6 | 7 | insertps xmm0,[rax],16 8 | insertps xmm0,dword [rax],16 9 | insertps xmm0,[rax],byte 16 10 | insertps xmm0,dword [rax],byte 16 11 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/insnlbl.asm: -------------------------------------------------------------------------------- 1 | ;Testname=test; Arguments=-fbin -oinsnlbl.bin; Files=stdout stderr insnlbl.bin 2 | 3 | ; 4 | ; Test "instruction as label" -- make opcodes legal as labels if 5 | ; they are followed by a colon. 6 | ; 7 | 8 | do: jmp dq+2 9 | dw do, add, sub, dq 10 | add: jmp add-2 11 | sub: jmp do+2 12 | dq: dw $-sub 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/invlpga.asm: -------------------------------------------------------------------------------- 1 | ;Testname=unoptimized; Arguments=-fbin -oinvlpga.bin; Files=stdout stderr invlpga.bin 2 | ;Testname=optimized; Arguments=-fbin -oinvlpga.bin -Ox; Files=stdout stderr invlpga.bin 3 | 4 | bits 32 5 | invlpga 6 | invlpga ax,ecx 7 | invlpga eax,ecx 8 | bits 64 9 | invlpga 10 | invlpga eax,ecx 11 | invlpga rax,ecx 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/join.asm: -------------------------------------------------------------------------------- 1 | %define join(sep) '' 2 | %define _join(sep,str) sep,str 3 | %define join(sep,s1,sn+) %strcat(s1, %map(_join:(sep) %, sn)) 4 | 5 | db join(':') 6 | db join(':','a') 7 | db join(':','a','b') 8 | db join(':','a','b','c') 9 | db join(':','a','b','c','d') 10 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/loopoffs.asm: -------------------------------------------------------------------------------- 1 | ;Testname=unoptimized; Arguments=-fbin -oloopoffs.bin -O0; Files=stdout stderr loopoffs.bin 2 | ;Testname=optimized; Arguments=-fbin -oloopoffs.bin -Ox; Files=stdout stderr loopoffs.bin 3 | bits 16 4 | delay: loop delay 5 | loop $ 6 | delay2: a32 loop delay2 7 | a32 loop $ 8 | delay3: loop delay3,ecx 9 | loop $,ecx 10 | delay4: a32 loop delay4,ecx 11 | a32 loop $,ecx 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/macroerr.asm: -------------------------------------------------------------------------------- 1 | %include "macroerr.inc" 2 | 3 | %macro bluttan 1 4 | mov eax,%1 5 | blej %1 6 | %endmacro 7 | 8 | bluttan ptr 9 | blej ptr 10 | dd ptr, ptr 11 | 12 | ptr: 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/macroerr.inc: -------------------------------------------------------------------------------- 1 | %macro blej 1 2 | mov eax,%1 3 | %endmacro 4 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/manysecs.asm: -------------------------------------------------------------------------------- 1 | %ifndef NSECS 2 | %assign NSECS 16384 3 | %endif 4 | 5 | %assign NSECS ((NSECS+3) & ~3) 6 | 7 | %assign n 0 8 | %rep NSECS 9 | %assign gcom (n & ~3) + 2 10 | section .text %+ n progbits exec 11 | start_ %+ n: 12 | nop 13 | jmp start_ %+ gcom 14 | %assign n n+1 15 | %endrep 16 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/mapi.asm: -------------------------------------------------------------------------------- 1 | %define what(&x,i,n) %str(i+1),"/",%str(n),"=", x, `\n` 2 | db %map(what:(%mapi,%mapn),foo,bar,baz) 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/moresecs.asm: -------------------------------------------------------------------------------- 1 | ; Less than 65,279 data sections, but more total sections 2 | %assign NSECS 37600 3 | %include "manysecs.asm" 4 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/mostsecs.asm: -------------------------------------------------------------------------------- 1 | ; More than 65,279 data sections 2 | %assign NSECS 131072 3 | %include "manysecs.asm" 4 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/movd.asm: -------------------------------------------------------------------------------- 1 | ;Testname=optimized; Arguments=-Ox -fbin -omovd.bin; Files=stdout stderr movd.bin 2 | [BITS 32] 3 | movd mm0,eax 4 | movd mm0,[eax] 5 | movd [eax],mm0 6 | movd eax,mm0 7 | 8 | movd xmm0,eax 9 | movd xmm0,[eax] 10 | 11 | movd [eax],xmm0 12 | movd eax,xmm0 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/movd64.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | 3 | movd r8d, mm1 4 | movd r8, mm1 5 | movq r8, mm1 6 | 7 | movd [rax], mm1 8 | movq [rax], mm1 9 | movd dword [rax], mm1 10 | ; movq dword [rax], mm1 11 | movd qword [rax], mm1 12 | movq qword [rax], mm1 13 | 14 | ; movd mm2, mm1 15 | movq mm2, mm1 16 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/movhpd.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | movhpd xmm0,[rdi+2] 3 | movhpd xmm0,qword [rdi+2] 4 | 5 | movhpd [rsi+3],xmm1 6 | movhpd qword [rsi+3],xmm1 7 | 8 | vmovhpd xmm2,xmm1,[rax+4] 9 | vmovhpd xmm2,xmm1,qword [rax+4] 10 | 11 | vmovhpd xmm3,[rax+4] 12 | vmovhpd xmm3,qword [rax+4] 13 | 14 | vmovhpd [rcx+5],xmm4 15 | vmovhpd qword [rcx+5],xmm4 16 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/movnti.asm: -------------------------------------------------------------------------------- 1 | ;Testname=test; Arguments=-fbin -omovnti.bin; Files=stdout stderr movnti.bin 2 | ; BR 2028995 3 | 4 | bits 16 5 | movnti [si],eax 6 | bits 32 7 | movnti [esi],eax 8 | bits 64 9 | movnti [rsi],eax 10 | movnti [rsi],rax 11 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/new: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | for f; do 3 | if [ -e "$f".asm ]; then 4 | # For safety... 5 | echo "$0: $f already exists" 1>&2 6 | exit 1 7 | fi 8 | echo ";Testname=test; Arguments=-fbin -o$f.bin; Files=stdout stderr $f.bin" > "$f".asm 9 | done 10 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/nop.asm: -------------------------------------------------------------------------------- 1 | ;Testname=unoptimized; Arguments=-fbin -onop.bin; Files=stdout stderr nop.bin 2 | ;Testname=optimized; Arguments=-fbin -onop.bin -Ox; Files=stdout stderr nop.bin 3 | 4 | bits 64 5 | 6 | nop 7 | o64 nop 8 | pause 9 | o64 pause 10 | 11 | xchg ax,ax 12 | xchg eax,eax 13 | xchg rax,rax 14 | 15 | rep xchg ax,ax 16 | rep xchg eax,eax 17 | rep xchg rax,rax 18 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/nullfile.asm: -------------------------------------------------------------------------------- 1 | ;Testname=test; Arguments=-fbin -onull.bin; Files=stdout stderr null.bin 2 | ; 3 | ; A file that produces no output has been known to occasionally crash NASM. 4 | ; 5 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/obsolete.asm: -------------------------------------------------------------------------------- 1 | bits 16 2 | 3 | cpu 8086 4 | pop cs 5 | mov cs,ax 6 | 7 | cpu 386 8 | pop cs 9 | mov cs,ax 10 | 11 | cpu any 12 | pcommit 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/omferr.asm: -------------------------------------------------------------------------------- 1 | section _TEXT class=CODE 2 | nop 3 | nop 4 | nop 5 | jmp far $ 6 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/paste.asm: -------------------------------------------------------------------------------- 1 | %macro bug 1-* 2 | %push foo 3 | %define %$v %1 4 | %define vv %$v_ %+ %1 5 | %%top_{%$v}%1: 6 | mov eax, eax 7 | mov eax, %%top_{%$v}%1 8 | mov eax, vv 9 | %pop 10 | %endmacro 11 | 12 | bug a 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/pextrw.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | 3 | pextrw rax,xmm0,0 4 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/pragma.asm: -------------------------------------------------------------------------------- 1 | %pragma 2 | %pragma bluttan 3 | %pragma bluttan blej 4 | %pragma "Hej tomtegubbar" 5 | %define PR asm foobar 6 | %pragma PR 7 | %pragma preproc 8 | %pragma preproc tjo fidelittan preproc 9 | %pragma dbg tjo fidelittan output 10 | %pragma dbgdbg tjo fidelittan debug format 11 | %pragma Dbg Tjo Fidelittan Output 12 | %pragma Dbgdbg Tjo Fidelittan Debug Format 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/ptr.asm: -------------------------------------------------------------------------------- 1 | ;; This should warn but still assemble, as the code is correct 2 | 3 | mov eax,dword ptr 4 | ptr: 5 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/pushseg.asm: -------------------------------------------------------------------------------- 1 | ;Testname=test; Arguments=-fbin -opushseg.bin; Files=stdout stderr pushseg.bin 2 | 3 | bits 16 4 | 5 | push cs 6 | push ds 7 | push es 8 | push ss 9 | push fs 10 | push gs 11 | 12 | pop gs 13 | pop fs 14 | pop ss 15 | pop es 16 | pop ds 17 | pop cs ; 8086 only, does not disassemble 18 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/r13.asm: -------------------------------------------------------------------------------- 1 | ;Testname=test; Arguments=-fbin -or13.bin; Files=stdout stderr r13.bin 2 | 3 | bits 64 4 | mov rax,[rbx] 5 | mov rax,[rbx*4] 6 | mov rax,[rbx+rbx*2] 7 | mov rax,[r13+rbx*2] 8 | mov rax,[rbp] 9 | mov rax,[rbp*4] 10 | mov rax,[rbp+rbp*2] 11 | mov rax,[rbp+r13*2] 12 | mov rax,[r13] 13 | mov rax,[r13*4] 14 | mov rax,[r13+rbp*2] 15 | mov rax,[r13+r13*2] 16 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/rdpid.asm: -------------------------------------------------------------------------------- 1 | %ifdef ERROR 2 | %define ERR(x) x 3 | %else 4 | %define ERR(x) 5 | %endif 6 | 7 | bits 16 8 | 9 | rdpid eax 10 | ERR(rdpid ax) 11 | 12 | bits 32 13 | 14 | rdpid ebx 15 | ERR(rdpid bx) 16 | 17 | bits 64 18 | 19 | rdpid rcx 20 | rdpid ecx 21 | ERR(rdpid cx) 22 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/relocs.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | extern foo 3 | 4 | mov eax,[foo] 5 | mov rax,[foo] 6 | mov rax,[qword foo] 7 | 8 | mov eax,[a32 foo] 9 | mov rax,[a32 foo] 10 | mov rax,[a32 qword foo] 11 | 12 | mov eax,foo 13 | mov rax,dword foo 14 | mov rax,qword foo 15 | mov eax,foo 16 | mov rax,dword foo 17 | mov rax,qword foo 18 | 19 | dd foo 20 | dq foo 21 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/require.asm: -------------------------------------------------------------------------------- 1 | %require 'require.asm' 2 | db 1 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/riprel2.asm: -------------------------------------------------------------------------------- 1 | ;Testname=unoptimized; Arguments=-fbin -oriprel2.bin -O0; Files=stdout stderr riprel.bin 2 | ;Testname=optimized; Arguments=-fbin -oriprel2.bin -Ox; Files=stdout stderr riprel.bin 3 | 4 | bits 64 5 | 6 | default rel 7 | mov dword [foo],12345678h 8 | mov qword [foo],12345678h 9 | mov [foo],rax 10 | mov dword [foo],12345678h 11 | foo: 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/selfref.asm: -------------------------------------------------------------------------------- 1 | bits 32 2 | 3 | %idefine zoom $%? 4 | mov ebx,Zoom 5 | %idefine boom $%? 6 | mov ecx,Boom 7 | 8 | %imacro Foo1 0 9 | %idefine Bar1 _%? 10 | %idefine baz1 $%? 11 | mov BAR1,baz1 12 | %endmacro 13 | 14 | foo1 15 | mov eax,bar1 16 | 17 | %imacro Foo2 0 18 | %idefine Bar2 _%*? 19 | %idefine baz2 $%*? 20 | mov BAR2,baz2 21 | %endmacro 22 | 23 | foo2 24 | mov eax,bar2 25 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/sm3-64.asm: -------------------------------------------------------------------------------- 1 | ;Testname=sm3-64; Arguments=-felf64 -osm3-64.o -O0; Files=stdout stderr sm3-64.o 2 | BITS 64 3 | vsm3rnds2 xmm1, xmm2, xmm0, 0 4 | vsm3msg1 xmm1, xmm2, xmm3 5 | vsm3msg2 xmm1, xmm2, xmm3 6 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/sm3.asm: -------------------------------------------------------------------------------- 1 | ;Testname=sm3; Arguments=-felf -osm3.o -O0; Files=stdout stderr sm3.o 2 | BITS 32 3 | vsm3rnds2 xmm1, xmm2, xmm0, 0 4 | vsm3msg1 xmm1, xmm2, xmm3 5 | vsm3msg2 xmm1, xmm2, xmm3 6 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/splitea.asm: -------------------------------------------------------------------------------- 1 | bits 32 2 | 3 | mov eax,[eax] 4 | mov eax,[eax+ecx] 5 | mov eax,[eax+ecx*4] 6 | mov eax,[eax+ecx*4+8] 7 | 8 | mov eax,[eax] 9 | mov eax,[eax,ecx] 10 | mov eax,[eax,ecx*4] 11 | mov eax,[eax+8,ecx*4] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/ssesize.asm: -------------------------------------------------------------------------------- 1 | _start: 2 | movd ecx,xmm0 3 | movd [foo],xmm0 4 | movd dword [foo],xmm0 5 | 6 | movdqa xmm1,xmm0 7 | movdqa [foo],xmm0 8 | movdqa oword [foo],xmm0 9 | 10 | cmppd xmm2,xmm3,8 11 | cmppd xmm2,xmm3,byte 8 12 | 13 | section .bss 14 | foo: reso 1 15 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/strlen.asm: -------------------------------------------------------------------------------- 1 | %macro strlen_test 1 2 | %strlen len %2 ; not existing argument 3 | %endmacro 4 | 5 | strlen_test 'a' 6 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/testdos.asm: -------------------------------------------------------------------------------- 1 | ;Testname=test; Arguments=-fbin -otestdos.bin; Files=stdout stderr testdos.bin 2 | ; 3 | ; This file was known to miscompile with the 16-bit NASM built 4 | ; under Borland C++ 3.1, so keep it around for testing... 5 | ; 6 | ; The proper output looks like: 7 | ; 8 | ; 00000000 A10300 9 | ; 00000003 EA0000FFFF 10 | ; 11 | org 0100h 12 | mov ax,[3] 13 | jmp 0FFFFh:0000 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/time.asm: -------------------------------------------------------------------------------- 1 | ;Not automatically testable because it is not constant 2 | db __DATE__, 13, 10 3 | db __TIME__, 13, 10 4 | db __UTC_DATE__, 13, 10 5 | db __UTC_TIME__, 13, 10 6 | align 4 7 | dd __DATE_NUM__ 8 | dd __TIME_NUM__ 9 | dd __UTC_DATE_NUM__ 10 | dd __UTC_TIME_NUM__ 11 | dd __POSIX_TIME__ 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/times.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | 3 | ; Broken per BR 3392278 4 | times 4 paddd xmm8, xmm11 5 | 6 | ; Broken per BR 3392279 7 | bswap r12d 8 | times 4 bswap r12d 9 | 10 | ; Forward jump 11 | times 128 jmp there 12 | 13 | there: 14 | nop 15 | 16 | ; Backwards jump 17 | times 128 jmp there 18 | 19 | section .bss 20 | times 0x10 resb 0x20 21 | resb 1 22 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/timesneg.asm: -------------------------------------------------------------------------------- 1 | bits 32 2 | times -1 db 0 3 | times -1 incbin "timesneg.asm" 4 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/tmap.nas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/test/tmap.nas -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/v4.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | v4fmaddps zmm0,zmm1+3,[rax] 3 | v4fnmaddps zmm2,zmm3,[rax] 4 | v4fmaddss zmm4,zmm5+3,[rax] 5 | v4fnmaddss zmm6,zmm7+3,[rax] 6 | 7 | v4dpwssds zmm8,zmm9,[rax] 8 | v4dpwssd zmm10,zmm11+3,[rax] 9 | v4dpwssd zmm10+0,zmm11+3,[rax] 10 | ; v4dpwssd zmm10+1,zmm11+3,[rax] 11 | ; v4dpwssd zmm10,zmm11+4,[rax] 12 | ; v4dpwssd zmm10,zmm11+7,[rax] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/warnstack.asm: -------------------------------------------------------------------------------- 1 | %warning "Good warning" 2 | [warning push] 3 | [warning -user] 4 | %warning "Bad warning" 5 | [warning pop] 6 | %warning "Good warning" 7 | [warning -user] 8 | %warning "Bad warning" 9 | [warning pop] ; should warn but reset all 10 | %warning "Good warning" 11 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/xmm0.asm: -------------------------------------------------------------------------------- 1 | ; BR 3392275: don't require xmm0 to be explicitly declared when implicit 2 | 3 | bits 32 4 | 5 | blendvpd xmm2,xmm1,xmm0 6 | blendvpd xmm2,xmm1 7 | blendvps xmm2,xmm1,xmm0 8 | blendvps xmm2,xmm1 9 | pblendvb xmm2,xmm1,xmm0 10 | pblendvb xmm2,xmm1 11 | sha256rnds2 xmm2,xmm1,xmm0 12 | sha256rnds2 xmm2,xmm1 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/xpaste.asm: -------------------------------------------------------------------------------- 1 | %iassign OWORD_size 16 ; octo-word 2 | %idefine sizeof(_x_) _x_%+_size 3 | 4 | %define ptr eax+sizeof(oword) 5 | 6 | movdqa [ptr], xmm1 7 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/test/zerobyte.asm: -------------------------------------------------------------------------------- 1 | ;Testname=test; Arguments=-fbin -ozerobyte.bin; Files=stdout stderr zerobyte.bin 2 | bits 64 3 | 4 | mov eax,bar-foo 5 | 6 | foo: 7 | add al,r10b 8 | bar: 9 | 10 | lldt ax 11 | lldt r8w 12 | ltr [rax] 13 | sldt eax 14 | sldt r8d 15 | str eax 16 | str rax 17 | str r8d 18 | str r8 19 | verr ax 20 | verr r8w 21 | verw ax 22 | verw r8w 23 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/tools/Nindent: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec indent -npro -linux -i4 -nut "$@" 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/t.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "", 4 | "id": "", 5 | "format": "", 6 | "source": "", 7 | "option": "", 8 | "target": [ 9 | { "output": "" } 10 | ] 11 | }, 12 | { 13 | "description": "", 14 | "ref": "", 15 | "option": "" 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/_file_.asm: -------------------------------------------------------------------------------- 1 | db __FILE__, `\r\n` 2 | db __FILE__, `\r\n` 3 | dw __LINE__ 4 | dw __LINE__ 5 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/_file_.bin.t: -------------------------------------------------------------------------------- 1 | ./travis/test/_file_.asm 2 | ./travis/test/_file_.asm 3 |  -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/_file_.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Check the __FILE__ preprocessor directive", 3 | "format": "bin", 4 | "source": "_file_.asm", 5 | "target": [ 6 | { "output": "_file_.bin" } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/_version.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Check the NASM version", 3 | "target": [ 4 | { "option": "-v", "stdout": "_version.stdout" } 5 | ], 6 | "error": "over" 7 | } 8 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/_version.stdout: -------------------------------------------------------------------------------- 1 | NASM version 2.16rc0 compiled on Jul 3 2020 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/a32offs.asm: -------------------------------------------------------------------------------- 1 | bits 16 2 | foo: a32 loop foo 3 | bar: loop bar, ecx 4 | 5 | bits 32 6 | baz: a16 loop baz 7 | qux: loop qux, cx 8 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/a32offs.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/a32offs.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/a64.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/a64.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/a64.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test 64 bit address (-Ox)", 4 | "id": "a64", 5 | "format": "bin", 6 | "source": "a64.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "a64.bin" } 10 | ] 11 | }, 12 | { 13 | "description": "Test 64 bit address (-O0)", 14 | "ref": "a64", 15 | "option": "-O0", 16 | "update": "false" 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/absolute.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/absolute.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/absolute.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Check absolute addressing", 3 | "format": "bin", 4 | "source": "absolute.asm", 5 | "target": [ 6 | { "output": "absolute.bin" } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/addr64x.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | mov rdx,[rax] 3 | mov eax,[byte rsp+0x01] 4 | mov eax,[byte rsp-0x01] 5 | mov eax,[byte rsp+0xFF] 6 | mov eax,[byte rsp-0xFF] 7 | mov eax,[rsp+0x08] 8 | mov eax,[rsp-0x01] 9 | mov eax,[rsp+0xFF] 10 | mov eax,[rsp-0xFF] 11 | mov rax,[rsp+56] 12 | mov [rsi],dl 13 | mov byte [rsi],'-' 14 | mov [rsi],al 15 | mov byte [rsi],' ' 16 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/addr64x.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/addr64x.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/addr64x.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/addr64x.asm:5: warning: byte data exceeds bounds [-w+number-overflow] 2 | ./travis/test/addr64x.asm:5: warning: byte data exceeds bounds [-w+number-overflow] 3 | ./travis/test/addr64x.asm:6: warning: byte data exceeds bounds [-w+number-overflow] 4 | ./travis/test/addr64x.asm:6: warning: byte data exceeds bounds [-w+number-overflow] 5 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/align13.asm: -------------------------------------------------------------------------------- 1 | ; Test of non-power-of-2 alignment 2 | 3 | bits 32 4 | 5 | inc eax 6 | inc eax 7 | align 13 8 | inc eax 9 | inc eax 10 | align 13 11 | inc eax 12 | inc eax 13 | align 13 14 | align 13 ;should do nothing 15 | inc eax 16 | inc eax 17 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/align13.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/align13.asm:7: error: segment alignment `13' is not power of two 2 | ./travis/test/align13.asm:10: error: segment alignment `13' is not power of two 3 | ./travis/test/align13.asm:13: error: segment alignment `13' is not power of two 4 | ./travis/test/align13.asm:14: error: segment alignment `13' is not power of two 5 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/align13s.asm: -------------------------------------------------------------------------------- 1 | ; Test of non-power-of-2 alignment 2 | 3 | %use smartalign 4 | 5 | bits 32 6 | 7 | inc eax 8 | inc eax 9 | align 13 10 | inc eax 11 | inc eax 12 | align 13 13 | inc eax 14 | inc eax 15 | align 13 16 | inc eax 17 | inc eax 18 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/align13s.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/align13s.asm:9: error: segment alignment `13' is not power of two 2 | ./travis/test/align13s.asm:12: error: segment alignment `13' is not power of two 3 | ./travis/test/align13s.asm:15: error: segment alignment `13' is not power of two 4 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/alonesym-obj.obj.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/alonesym-obj.obj.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/amx.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/amx.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/amx.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test AMX instructions", 4 | "id": "amx", 5 | "format": "bin", 6 | "source": "amx.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "amx.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/andbyte.asm: -------------------------------------------------------------------------------- 1 | bits 16 2 | 3 | add sp, byte -0x10 4 | add sp, -0x10 5 | adc sp, byte -0x10 6 | adc sp, -0x10 7 | and sp, byte -0x10 8 | and sp, -0x10 9 | sbb sp, byte -0x10 10 | sbb sp, -0x10 11 | sub sp, byte -0x10 12 | sub sp, -0x10 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/andbyte.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/andbyte.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/andbyte.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Check byte operations (-Ox)", 4 | "id": "andbyte", 5 | "format": "bin", 6 | "source": "andbyte.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "andbyte.bin" } 10 | ] 11 | }, 12 | { 13 | "description": "Check byte operations", 14 | "ref": "andbyte", 15 | "update": false 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/aoutso-o0.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/aoutso-o0.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/aoutso-ox.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/aoutso-ox.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/aoutso.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/aoutso.asm:79: warning: label alone on a line without a colon might be in error [-w+label-orphan] 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/aouttest-o0.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/aouttest-o0.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/aouttest-ox.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/aouttest-ox.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/avx.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/avx.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/avx.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test AVX instructions (-Ox)", 4 | "id": "avx", 5 | "format": "bin", 6 | "source": "avx.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "avx.bin" } 10 | ] 11 | }, 12 | { 13 | "description": "Test AVX instructions (-O0)", 14 | "ref": "avx", 15 | "option": "-O0", 16 | "update": false 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/avx005.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/avx005.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/avx005.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test relaxed AVX instructions", 4 | "id": "avx005", 5 | "format": "bin", 6 | "source": "avx005.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "avx005.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/avx2.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/avx2.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/avx2.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test AVX2 instructions (from gas testsuite)", 4 | "id": "avx2", 5 | "source": "avx2.asm", 6 | "option": "-DSRC -Ox", 7 | "target": [ 8 | { "output": "avx2.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/avx512cd.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/avx512cd.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/avx512cd.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test AVX512CD instructions", 4 | "id": "avx512cd", 5 | "format": "bin", 6 | "source": "avx512cd.asm", 7 | "option": "-O0 -DSRC", 8 | "target": [ 9 | { "output": "avx512cd.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/avx512er.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/avx512er.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/avx512er.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test AVX512ER instructions", 4 | "id": "avx512er", 5 | "format": "bin", 6 | "source": "avx512er.asm", 7 | "option": "-O0 -DSRC", 8 | "target": [ 9 | { "output": "avx512er.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/avx512f.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/avx512f.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/avx512f.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test AVX512F errors", 4 | "id": "avx512f", 5 | "format": "bin", 6 | "source": "avx512f.asm", 7 | "option": "-O0 -DSRC", 8 | "target": [ 9 | { "output": "avx512f.bin" } 10 | ], 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/avx512pf.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/avx512pf.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/avx512pf.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test AVX512PF instructions", 4 | "id": "avx512pf", 5 | "format": "bin", 6 | "source": "avx512pf.asm", 7 | "option": "-O0 -DSRC", 8 | "target": [ 9 | { "output": "avx512pf.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/bcd.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/bcd.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/bcd.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test BCD numbers", 4 | "id": "bcd", 5 | "format": "bin", 6 | "source": "bcd.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "bcd.bin" }, 10 | { "stderr": "bcd.stderr" } 11 | ] 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/bcd.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/bcd.asm:9: warning: packed BCD truncated to 18 digits [-w+other] 2 | ./travis/test/bcd.asm:20: warning: packed BCD truncated to 18 digits [-w+other] 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/binexe.exe.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/binexe.exe.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/bintest-o0.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/bintest-o0.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/bintest-ox.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/bintest-ox.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br1879590.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br1879590.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br2003451.asm: -------------------------------------------------------------------------------- 1 | cpu 8086 2 | org 0 3 | 4 | ; MOV r/m16,imm16 5 | ; (imm16 given as number) 6 | mov word [bx], 10h 7 | 8 | ; MOV r/m16,imm16 9 | ; (imm16 given as label) 10 | mov word [bx], label 11 | 12 | align 10h 13 | 14 | ; This label is at address 10h 15 | label: 16 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br2003451.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br2003451.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br2003451.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test br2003451", 4 | "id": "br2003451", 5 | "format": "bin", 6 | "source": "br2003451.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "br2003451.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br2030823.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | VFMADDPD xmm0, xmm1, [0], xmm3 3 | VFMADDPD xmm0, xmm1, xmm2, [0] 4 | VFMADDPD ymm0, ymm1, [0], ymm3 5 | VFMADDPD ymm0, ymm1, ymm2, [0] 6 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br2030823.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br2030823.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br2030823.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test br2030823", 4 | "id": "br2030823", 5 | "format": "bin", 6 | "source": "br2030823.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "br2030823.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br2148476.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br2148476.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br2148476.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test br2148476", 4 | "id": "br2148476", 5 | "format": "bin", 6 | "source": "br2148476.asm", 7 | "target": [ 8 | { "output": "br2148476.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br2222615.asm: -------------------------------------------------------------------------------- 1 | %macro bluttan 0 2 | nop 3 | %endmacro 4 | 5 | %ifnmacro bluttan 6 | %error "bluttan is a macro" 7 | %endif 8 | 9 | %ifmacro blej 10 | %error "blej is not a macro" 11 | %endif 12 | 13 | %ifdef ERROR 14 | %ifnmacro 15 | %endif 16 | %endif 17 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br2222615.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br2222615.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br2222615.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/br2222615.asm:14: error: `%ifnmacro' expects a macro name 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br2496848.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br2496848.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3005117.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test br3005117", 4 | "id": "br3005117", 5 | "format": "elf32", 6 | "source": "br3005117.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "br3005117.o" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3005117.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3005117.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3026808.asm: -------------------------------------------------------------------------------- 1 | %imacro proc 1 2 | %push proc 3 | %assign %$arg 1 4 | %endmacro 5 | 6 | %imacro arg 0-1 1 7 | %assign %$arg %1+%$arg 8 | %endmacro 9 | 10 | %imacro endproc 0 11 | %pop 12 | %endmacro 13 | 14 | ;---------------------------- 15 | 16 | proc Test 17 | %$ARG arg 18 | endproc 19 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3026808.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3026808.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3026808.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test push and pop directives", 4 | "id": "br3026808", 5 | "format": "bin", 6 | "source": "br3026808.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "br3026808.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3028880.bin.t: -------------------------------------------------------------------------------- 1 | ./travis/test/foo.inc 2 | ./travis/test/foo.dec 3 | ./travis/test/foo.inc 4 | ./travis/test/foo.dec 5 | ./travis/test/foo.inc 6 | ./travis/test/foo.dec 7 | ./travis/test/foo.inc 8 | ./travis/test/foo.dec 9 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3028880.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test environment variables", 4 | "id": "br3028880", 5 | "format": "bin", 6 | "source": "br3028880.asm", 7 | "option": "-Ox", 8 | "environ": ["PROJECTBASEDIR=./travis/test"], 9 | "target": [ 10 | { "output": "br3028880.bin" } 11 | ] 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3041451.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3041451.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3041451.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test rep directive", 4 | "id": "br3041451", 5 | "format": "bin", 6 | "source": "br3041451.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "br3041451.bin" }, 10 | { "stderr": "br3041451.stderr" } 11 | ] 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3041451.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/br3041451.asm:17: warning: negative `%rep' count: -2 [-w+pp-rep-negative] 2 | ./travis/test/br3041451.asm:28: warning: negative `%rep' count: -1 [-w+pp-rep-negative] 3 | ./travis/test/br3041451.asm:39: warning: negative `%rep' count: -2 [-w+pp-rep-negative] 4 | ./travis/test/br3041451.asm:50: warning: negative `%rep' count: -1 [-w+pp-rep-negative] 5 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3058845-o0.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3058845-o0.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3058845-ox.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3058845-ox.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3058845.asm: -------------------------------------------------------------------------------- 1 | BITS 16 2 | cmp ax, 0xFFFF 3 | cmp eax, 0xFFFF_FFFF 4 | 5 | BITS 32 6 | cmp ax, 0xFFFF 7 | cmp eax, 0xFFFF_FFFF 8 | 9 | BITS 64 10 | cmp ax, 0xFFFF 11 | cmp eax, 0xFFFF_FFFF 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3066383.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3066383.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3066383.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test macro expansion", 4 | "id": "br3066383", 5 | "format": "bin", 6 | "source": "br3066383.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "br3066383.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3104312.asm: -------------------------------------------------------------------------------- 1 | %if 1 < 8000_0002h 2 | %warning No bug with 8000_0002h 3 | %else 4 | %warning Bug with 8000_0002h 5 | %endif 6 | 7 | %if 1 < 8000_0001h 8 | %warning No bug with 8000_0001h 9 | %else 10 | %warning Bug with 8000_0001h 11 | %endif 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3104312.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test 8000_0001h and 8000_0002h bugs", 4 | "id": "br3104312", 5 | "source": "br3104312.asm", 6 | "option": "-E", 7 | "target": [ 8 | { "stderr": "br3104312.stderr" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3104312.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/br3104312.asm:2: warning: No bug with 8000_0002h [-w+user] 2 | ./travis/test/br3104312.asm:8: warning: No bug with 8000_0001h [-w+user] 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3109604.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | b0: vmovd xmm2, [rdx+r9] 3 | e0: 4 | 5 | section .data 6 | len: dd e0 - b0 ; Should be 6 7 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3109604.bin.t: -------------------------------------------------------------------------------- 1 | ġyn 2 |  -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3109604.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test vmovd (-Ox)", 4 | "id": "br3109604", 5 | "format": "bin", 6 | "source": "br3109604.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "br3109604.bin" } 10 | ] 11 | }, 12 | { 13 | "description": "Test vmovd (-O0)", 14 | "ref": "br3109604", 15 | "option": "-O0", 16 | "update": "false" 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3174983.asm: -------------------------------------------------------------------------------- 1 | bits 32 2 | vpextrw ecx,xmm0,8 ; c5 f9 c5 c8 08 3 | vpextrw ecx,xmm2,3 ; c5 f9 c5 ca 03 4 | 5 | bits 64 6 | vpextrw rcx,xmm0,8 ; c5 f9 c5 c8 08 7 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3174983.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3174983.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3187743.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | 3 | vlddqu xmm0,[edi] 4 | vlddqu ymm0,[edi] 5 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3187743.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3187743.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3189064.asm: -------------------------------------------------------------------------------- 1 | [bits 64] 2 | vmaskmovps [edi],ymm0,ymm1 3 | vextractf128 xmm0,ymm1,1 4 | vextractf128 [edi],ymm1,1 5 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3189064.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3189064.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3200749.asm: -------------------------------------------------------------------------------- 1 | %define IFNDEF %ifndef 2 | %define ENDIF %endif 3 | 4 | IFNDEF foo 5 | ; bar 6 | ENDIF 7 | 8 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3200749.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test macro expansion", 4 | "id": "br3200749", 5 | "format": "bin", 6 | "source": "br3200749.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "stderr": "br3200749.stderr" } 10 | ], 11 | "error": "expected" 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3200749.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/br3200749.asm:4: error: label or instruction expected at start of line 2 | ./travis/test/br3200749.asm:6: error: label or instruction expected at start of line 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3385573.asm: -------------------------------------------------------------------------------- 1 | [bits 64] 2 | 3 | vpmovsxbw ymm1, xmm2 4 | vpsllw ymm1, ymm2, 3 5 | vpslld ymm1, ymm2, 3 6 | vpsllq ymm1, ymm2, 3 7 | vpsrld ymm1, ymm2, 3 8 | vpsrad ymm1, ymm2, 3 9 | vpermq ymm1, [rsi], 9 10 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3385573.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3385573.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392252.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3392252.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392252.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test bls, blc instructions", 4 | "id": "br3392252", 5 | "format": "bin", 6 | "source": "br3392252.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "br3392252.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392259.asm: -------------------------------------------------------------------------------- 1 | [BITS 64] 2 | 3 | vmovntdqa ymm1, yword [rsi] ; fails: "error: invalid combination of opcode and operands" 4 | vmovntdqa ymm1, [rsi] ; works 5 | vmovntdqa xmm1, oword [rsi] ; works 6 | movntdqa xmm1, oword [rsi] ; fails, see bug 978756: "error: mismatch in operand sizes" 7 | movntdqa xmm1, [rsi] ; works 8 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392259.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test vmovnt, movnt instructions", 4 | "id": "br3392259", 5 | "format": "elf64", 6 | "source": "br3392259.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "br3392259.o" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392259.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3392259.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392275.asm: -------------------------------------------------------------------------------- 1 | bits 32 2 | 3 | blendvpd xmm2,xmm1,xmm0 4 | blendvpd xmm2,xmm1 5 | blendvps xmm2,xmm1,xmm0 6 | blendvps xmm2,xmm1 7 | pblendvb xmm2,xmm1,xmm0 8 | pblendvb xmm2,xmm1 9 | sha256rnds2 xmm2,xmm1,xmm0 10 | sha256rnds2 xmm2,xmm1 11 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392275.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3392275.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392275.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "br3392275", 4 | "description": "Do not require xmm0 to be explicitly declared when implicit", 5 | "format": "bin", 6 | "source": "br3392275.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "br3392275.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392278.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | 3 | ; Broken per BR 3392278 4 | times 4 paddd xmm8, xmm11 5 | 6 | ; Broken per BR 3392279 7 | bswap r12d 8 | times 4 bswap r12d 9 | 10 | ; Forward jump 11 | times 128 jmp there 12 | 13 | there: 14 | nop 15 | 16 | ; Backwards jump 17 | times 128 jmp there 18 | 19 | section .bss 20 | times 0x10 resb 0x20 21 | resb 1 22 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392278.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test br3392278 and br3392279", 4 | "id": "br3392278", 5 | "format": "elf64", 6 | "source": "br3392278.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "br3392278.o" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392278.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3392278.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392363.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | vaddps zmm0 {k1}, zmm0, zmm0 3 | rep 4 | vaddps zmm0 {k1}, zmm0, zmm0 5 | rep movsd 6 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392363.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3392363.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392363.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test br3392363", 4 | "id": "br3392363", 5 | "format": "bin", 6 | "source": "br3392363.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "br3392363.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392392.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3392392.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392392.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/br3392392.asm:14: error: broadcast not allowed with register operand 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392396.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | vmovdqa32 [rdi],zmm16 3 | vmovdqa32 [rdi+64],zmm17 4 | vmovdqa32 [rdi+128],zmm18 5 | vmovdqa32 [rdi+192],zmm19 6 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392396.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3392396.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392396.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test br3392396", 4 | "id": "br3392396", 5 | "format": "bin", 6 | "source": "br3392396.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "br3392396.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392411.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | default rel 3 | 4 | %use smartalign 5 | 6 | section .text code align=32 7 | 8 | align 32 9 | 10 | nop 11 | jz LDone 12 | 13 | %rep 10 14 | nop 15 | %endrep 16 | 17 | align 16 18 | %rep 115 19 | nop 20 | %endrep 21 | 22 | LDone: 23 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392411.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Description of a test", 4 | "id": "br3392411", 5 | "format": "win64", 6 | "source": "br3392411.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "br3392411.out" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392411.out.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3392411.out.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392442.asm: -------------------------------------------------------------------------------- 1 | and byte [0], ~80h 2 | and byte [0], 0xfff 3 | and byte [0], -256 4 | and byte [0], -257 5 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392442.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3392442.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392442.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test br3392442", 4 | "id": "br3392442", 5 | "format": "bin", 6 | "source": "br3392442.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "br3392442.bin" }, 10 | { "stderr": "br3392442.stderr" } 11 | ] 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392442.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/br3392442.asm:2: warning: byte data exceeds bounds [-w+number-overflow] 2 | ./travis/test/br3392442.asm:4: warning: byte data exceeds bounds [-w+number-overflow] 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392528.asm: -------------------------------------------------------------------------------- 1 | %macro huge_params 2222222222-222222222211 2 | mov eax, eax 3 | %endm 4 | 5 | huge_params 6 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392528.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test the macro params count being integer", 4 | "id": "br3392528", 5 | "format": "bin", 6 | "source": "br3392528.asm", 7 | "option": "-Ox -o br3392528.bin", 8 | "target": [ 9 | { "stderr": "br3392528.stderr" } 10 | ], 11 | "error": "expected" 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392528.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/br3392528.asm:1: error: parameter count `2222222222' is out of bounds [0; 2147483647] 2 | ./travis/test/br3392528.asm:1: error: parameter count `222222222211' is out of bounds [0; 2147483647] 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392531.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3392531.asm -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392531.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "%unmacro is forbidden for macro being expanded", 4 | "id": "br3392531", 5 | "format": "bin", 6 | "source": "br3392531.asm", 7 | "error": "expected", 8 | "target": [ 9 | { "stderr": "br3392531.stderr" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392637.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3392637.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392643.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test br3392643 (name limit in OBJ files)", 4 | "id": "br3392643", 5 | "format": "obj", 6 | "source": "br3392643.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "br3392643.obj" }, 10 | { "stderr": "br3392643.stderr" } 11 | ] 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392643.obj.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3392643.obj.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392643.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/br3392643.asm: warning: truncating object name `name012345678901234567890123456789012345678901234567890123456789...' to 255 bytes [-w+other] 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392707-error.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/br3392707.asm:6: error: expecting `)' 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392707.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3392707.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392711.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test br3392711 (%?? and %? expansion)", 4 | "id": "br3392711", 5 | "format": "elf64", 6 | "source": "br3392711.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "br3392711.o" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392711.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3392711.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392716.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br3392716.asm -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392716.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "%unmacro is forbidden for macro being expanded", 4 | "id": "br3392716", 5 | "format": "macho64", 6 | "source": "br3392716.asm", 7 | "option": "-g", 8 | "error": "expected", 9 | "target": [ 10 | { "stderr": "br3392716.stderr" } 11 | ] 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392739.asm: -------------------------------------------------------------------------------- 1 | [section .text follows=.text] 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392739.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test error trigger for self following section", 4 | "id": "br3392739", 5 | "format": "bin", 6 | "source": "br3392739.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "stderr": "br3392739.stderr" } 10 | ], 11 | "error": "expected" 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392739.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/br3392739.asm: fatal: section .text is self following 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392751.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | mov ax, xmm0[dword 0x1] 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392751.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test ea error message set properly", 4 | "id": "br3392751", 5 | "format": "bin", 6 | "source": "br3392751.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "stderr": "br3392751.stderr" } 10 | ], 11 | "error": "expected" 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br3392751.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/br3392751.asm:2: error: invalid 64-bit effective address 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br560575.asm: -------------------------------------------------------------------------------- 1 | ;Test for bug report 560575 - Using SEG with non-relocatable values doesn't work 2 | ; 3 | dw seg ~1 4 | dw seg "a" 5 | dw seg 'a' 6 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br560575.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/br560575.asm:3: error: cannot apply SEG to a non-relocatable value 2 | ./travis/test/br560575.asm:4: error: cannot apply SEG to a non-relocatable value 3 | ./travis/test/br560575.asm:5: error: cannot apply SEG to a non-relocatable value 4 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br890790.asm: -------------------------------------------------------------------------------- 1 | %rep 5 2 | db 0 3 | %include "br890790_i.asm" 4 | %endrep 5 | 6 | db 1 7 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br890790.bin.t: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br890790.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test inclusion inside rep directive", 4 | "id": "br890790", 5 | "format": "bin", 6 | "source": "br890790.asm", 7 | "option": "-Ox -I./travis/test/", 8 | "target": [ 9 | { "output": "br890790.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br890790_i.asm: -------------------------------------------------------------------------------- 1 | db 2 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br978756.asm: -------------------------------------------------------------------------------- 1 | [bits 64] 2 | movntdqa xmm1, oword [rsi] 3 | movlpd xmm2, qword [rdi] 4 | movlpd xmm2, [rdi] 5 | movlpd qword [rdi], xmm2 6 | movlpd [rdi], xmm2 7 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br978756.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test for movlpd instruction", 4 | "id": "br978756", 5 | "format": "elf64", 6 | "source": "br978756.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "br978756.o" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/br978756.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/br978756.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/clzero.asm: -------------------------------------------------------------------------------- 1 | bits 16 2 | 3 | clzero 4 | clzero ax 5 | clzero eax 6 | %ifdef ERROR 7 | clzero rax 8 | %endif 9 | 10 | bits 32 11 | 12 | clzero 13 | clzero ax 14 | clzero eax 15 | %ifdef ERROR 16 | clzero rax 17 | %endif 18 | 19 | bits 64 20 | 21 | clzero 22 | %ifdef ERROR 23 | clzero ax 24 | %endif 25 | clzero eax 26 | clzero rax 27 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/clzero.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/clzero.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/clzero.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/clzero.asm:7: error: instruction not supported in 16-bit mode 2 | ./travis/test/clzero.asm:16: error: instruction not supported in 32-bit mode 3 | ./travis/test/clzero.asm:23: error: instruction not supported in 64-bit mode 4 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/coffalign.asm: -------------------------------------------------------------------------------- 1 | section .text align=64 2 | foo: 3 | nop 4 | nop 5 | nop 6 | ret 7 | 8 | section .data align=64 9 | bar: 10 | db 0, 1, 2 11 | 12 | section .text align=32 13 | baz: 14 | nop 15 | nop 16 | nop 17 | ret 18 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/coffalign.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test coff alignment", 4 | "id": "coffalign", 5 | "format": "win64", 6 | "source": "coffalign.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "coffalign.obj" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/coffalign.obj.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/coffalign.obj.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/cofftest.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test coff format", 4 | "id": "cofftest", 5 | "format": "win32", 6 | "source": "cofftest.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "cofftest.obj" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/cofftest.obj.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/cofftest.obj.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/crc32.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/crc32.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/crc32.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test crc32 instruction", 4 | "id": "crc32", 5 | "format": "bin", 6 | "source": "crc32.asm", 7 | "target": [ 8 | { "output": "crc32.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/ctxlocal.asm: -------------------------------------------------------------------------------- 1 | ;; 2 | ;; Test of context-local labels 3 | ;; 4 | 5 | bits 64 6 | extern everywhere ; Test of extern -> global promotion, too 7 | extern tjosan 8 | here: 9 | jz .there 10 | %push foo 11 | jo %$mordor 12 | hlt 13 | %$mordor: 14 | nop 15 | %pop 16 | .there: 17 | ret 18 | 19 | everywhere: 20 | ret 21 | 22 | global everywhere 23 | 24 | tjosan: 25 | ret 26 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/ctxlocal.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test of context-local labels", 4 | "id": "ctxlocal", 5 | "format": "elf64", 6 | "source": "ctxlocal.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "ctxlocal.o" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/ctxlocal.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/ctxlocal.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/dbxsize.asm: -------------------------------------------------------------------------------- 1 | [section .bss] 2 | 3 | label_db: DB ? 4 | label_dw: DW ? 5 | label_dq: DQ ? 6 | label_next: 7 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/dbxsize.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test for Dx reserve with various sizes", 4 | "id": "dbxsize", 5 | "format": "elf64", 6 | "source": "dbxsize.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "dbxsize.o" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/dbxsize.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/dbxsize.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/elfso-o0.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/elfso-o0.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/elfso-o0.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/elfso.asm:83: warning: label alone on a line without a colon might be in error [-w+label-orphan] 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/elfso-ox.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/elfso-ox.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/elfso-ox.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/elfso.asm:83: warning: label alone on a line without a colon might be in error [-w+label-orphan] 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/elif.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test elif directive", 4 | "id": "elif", 5 | "format": "obj", 6 | "source": "elif.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "elif.o" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/elif.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/elif.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/expimp-o0.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/expimp-o0.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/expimp-o0.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/expimp.asm:17: warning: signed byte value exceeds bounds [-w+number-overflow] 2 | ./travis/test/expimp.asm:24: warning: signed byte value exceeds bounds [-w+number-overflow] 3 | ./travis/test/expimp.asm:31: warning: signed byte value exceeds bounds [-w+number-overflow] 4 | ./travis/test/expimp.asm:38: warning: signed byte value exceeds bounds [-w+number-overflow] 5 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/expimp-o1.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/expimp-o1.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/expimp-o1.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/expimp.asm:17: warning: signed byte value exceeds bounds [-w+number-overflow] 2 | ./travis/test/expimp.asm:24: warning: signed byte value exceeds bounds [-w+number-overflow] 3 | ./travis/test/expimp.asm:31: warning: signed byte value exceeds bounds [-w+number-overflow] 4 | ./travis/test/expimp.asm:38: warning: signed byte value exceeds bounds [-w+number-overflow] 5 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/expimp-ox.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/expimp-ox.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/far64.asm: -------------------------------------------------------------------------------- 1 | ; BR 2039212 2 | bits 64 3 | 4 | call qword far [rax] 5 | jmp qword far [rax] 6 | call dword far [rax] 7 | jmp dword far [rax] 8 | call far [rax] 9 | jmp far [rax] 10 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/far64.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/far64.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/far64.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test 64 bit far call", 4 | "id": "far64", 5 | "format": "bin", 6 | "source": "far64.asm", 7 | "target": [ 8 | { "output": "far64.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/float.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/float.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/float.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test of floating-point formats", 4 | "id": "float", 5 | "format": "bin", 6 | "source": "float.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "float.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/float8.bin.t: -------------------------------------------------------------------------------- 1 |  2 |  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy| -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/float8.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test of 8-bit floating-point constants", 4 | "id": "float8", 5 | "format": "bin", 6 | "source": "float8.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "float8.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/floatb.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/floatb.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/floatb.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test of known floating-point bugs", 4 | "id": "floatb", 5 | "format": "bin", 6 | "source": "floatb.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "floatb.bin" }, 10 | { "stderr": "floatb.stderr" } 11 | ] 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/floatexp-o0.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/floatexp-o0.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/floatexp-ox.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/floatexp-ox.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/floatize.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/floatize.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/floattest.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test float in elf32", 4 | "id": "floattest", 5 | "format": "elf32", 6 | "source": "floattest.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "floattest.o" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/floattest.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/floattest.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/floatx.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/floatx.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/floatx.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test hexadecimal floating-point numbers", 4 | "id": "floatx", 5 | "format": "bin", 6 | "source": "floatx.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "floatx.bin" }, 10 | { "stderr": "floatx.stderr" } 11 | ] 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/fpu.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/fpu.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/fpu.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test relaxed encodings for FPU instructions", 4 | "id": "fpu", 5 | "format": "bin", 6 | "source": "fpu.asm", 7 | "target": [ 8 | { "output": "fpu.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/fwdopt.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/fwdopt.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/fwdopt.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test jmp optimization", 4 | "id": "fwdopt", 5 | "format": "bin", 6 | "source": "fwdopt.asm", 7 | "target": [ 8 | { "output": "fwdopt.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/fwdoptpp.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/fwdoptpp.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/fwdoptpp.error.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/fwdoptpp.asm:142: error: Out of space! 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/fwdoptpp.fatal.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/fwdoptpp.asm:140: fatal: Out of space! 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/fwdoptpp.warning.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/fwdoptpp.warning.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/fwdoptpp.warning.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/fwdoptpp.asm:144: warning: Out of space! [-w+user] 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/gather.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/gather.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/gather.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test VGATHER", 4 | "id": "gather", 5 | "format": "bin", 6 | "source": "gather.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "gather.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/gotoff64.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/gotoff64.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/gotoff64.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/gotoff64.asm:9: error: ELF64 requires ..gotoff references to be qword absolute 2 | ./travis/test/gotoff64.asm:10: error: ELF64 requires ..gotoff references to be qword absolute 3 | ./travis/test/gotoff64.asm:19: error: ELF64 requires ..gotoff references to be qword 4 | ./travis/test/gotoff64.asm:20: error: ELF64 requires ..gotoff references to be qword 5 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/hexfp.asm: -------------------------------------------------------------------------------- 1 | ;; BR 3392399 2 | 3 | ; All of these should be the same value... 4 | %macro fp 1 5 | %1 0.5 6 | %1 5e-1 7 | %1 0x1.0p-1 8 | %1 0x0.8p0 9 | %1 0x0.8 10 | %1 0x8p-4 11 | %1 0x.8 12 | %1 0x1p-1 13 | %1 0x0.1p3 14 | %1 0x0.01p7 15 | %1 0x0.01p7 16 | %1 0x0.001p11 17 | 18 | %endmacro 19 | 20 | fp do 21 | fp dt 22 | fp dq 23 | fp dd 24 | fp dw 25 | fp dd 26 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/hexfp.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/hexfp.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/hexfp.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test br3392399", 4 | "id": "hexfp", 5 | "format": "bin", 6 | "source": "hexfp.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "hexfp.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/hle.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/hle.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/hle.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test hle instructions", 4 | "id": "hle", 5 | "format": "bin", 6 | "source": "hle.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "hle.bin" }, 10 | { "stderr": "hle.stderr" } 11 | ] 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/hle.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/hle.asm:5: warning: instruction is not lockable [-w+prefix-lock-error] 2 | ./travis/test/hle.asm:7: warning: xacquire invalid with this instruction [-w+prefix-hle] 3 | ./travis/test/hle.asm:13: warning: xacquire invalid with this instruction [-w+prefix-hle] 4 | ./travis/test/hle.asm:17: warning: xacquire invalid with this instruction [-w+prefix-hle] 5 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/ifelse.bin.t: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/ifelse.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test if,elif,else directives", 4 | "id": "ifelse", 5 | "format": "bin", 6 | "source": "ifelse.asm", 7 | "target": [ 8 | { "output": "ifelse.bin" }, 9 | { "stderr": "ifelse.stderr" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/ifid.bin.t: -------------------------------------------------------------------------------- 1 | %ifid hello = true (expect true) 2 | %ifid $ = false (expect false) 3 | %ifid $$ = false (expect false) 4 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/ifid.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "BR 3392715: Test proper operation of %ifid with $ and $$", 4 | "id": "ifid", 5 | "format": "bin", 6 | "source": "ifid.asm", 7 | "target": [ 8 | { "output": "ifid.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/ifmacro.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Generate human readable text with bin", 4 | "id": "ifmacro", 5 | "format": "bin", 6 | "source": "ifmacro.asm", 7 | "target": [ 8 | { "output": "ifmacro.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/iftoken.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test iftoken directive", 4 | "id": "iftoken", 5 | "format": "bin", 6 | "source": "iftoken.asm", 7 | "target": [ 8 | { "output": "iftoken.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/ilog.bin.t: -------------------------------------------------------------------------------- 1 |  2 |  3 |  4 |  5 |  6 |  7 |  8 |  -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/imacro.asm: -------------------------------------------------------------------------------- 1 | %imacro Zero 1 2 | xor %1,%1 3 | %endmacro 4 | 5 | Zero eax 6 | zero eax 7 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/imacro.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/imacro.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/imacro.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test imacro directive", 4 | "id": "imacro", 5 | "format": "bin", 6 | "source": "imacro.asm", 7 | "target": [ 8 | { "output": "imacro.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/imm.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test immediates", 4 | "id": "imm", 5 | "format": "elf64", 6 | "source": "imm.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "imm.o" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/imm.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/imm.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/imm64-o0.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/imm64-o0.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/imm64-o1.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/imm64-o1.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/imm64-ox.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/imm64-ox.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/immwarn-no.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/immwarn-no.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/immwarn-o.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/immwarn-o.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/immwarn-ono.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/immwarn-ono.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/immwarn.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/immwarn.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/imul-nowarn.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/imul-nowarn.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/imul-warn.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/imul-warn.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/inc1.asm: -------------------------------------------------------------------------------- 1 | ; This file is part of the include test. 2 | ; See inctest.asm for build instructions. 3 | 4 | message: db 'hello, world',13,10,'$' 5 | 6 | %include "inc2.asm" 7 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/inc2.asm: -------------------------------------------------------------------------------- 1 | ; This file is part of the include test. 2 | ; See inctest.asm for build instructions. 3 | 4 | _main: mov dx,message 5 | mov ah,9 6 | int 21h 7 | mov ax,4c00h 8 | int 21h 9 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/inc3.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; To address https://bugzilla.nasm.us/show_bug.cgi?id=3392527 3 | ; 4 | %ifndef __OUTPUT_FORMAT__ 5 | %fatal '__OUTPUT_FORMAT__ defined as ', __OUTPUT_FORMAT__ 6 | %endif 7 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/inctest.asm: -------------------------------------------------------------------------------- 1 | ; This file, plus inc1.asm and inc2.asm, test NASM's file inclusion 2 | ; mechanism. 3 | ; 4 | ; This produces a DOS .COM file: to assemble, use 5 | ; nasm -f bin inctest.asm -o inctest.com 6 | ; and when run, it should print `hello, world'. 7 | 8 | BITS 16 9 | ORG 0x100 10 | 11 | jmp _main 12 | 13 | %include "inc1.asm" 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/inctest.com.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/inctest.com.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/inctest.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test include directive", 4 | "id": "inctest", 5 | "format": "bin", 6 | "source": "inctest.asm", 7 | "option": "-i./travis/test/ -p inc3.asm", 8 | "target": [ 9 | { "output": "inctest.com" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/insertps.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | insertps xmm0,xmm1,16 3 | insertps xmm0,dword xmm2,16 4 | insertps xmm0,xmm2,byte 16 5 | insertps xmm0,dword xmm2,byte 16 6 | 7 | insertps xmm0,[rax],16 8 | insertps xmm0,dword [rbx],16 9 | insertps xmm0,[rcx],byte 16 10 | insertps xmm0,dword [rdx],byte 16 11 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/insertps.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/insertps.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/insertps.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test insertps", 4 | "id": "insertps", 5 | "format": "bin", 6 | "source": "insertps.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "insertps.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/insnlbl.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; Test "instruction as label" -- make opcodes legal as labels if 3 | ; they are followed by a colon. 4 | ; 5 | 6 | do: jmp dq+2 7 | dw do, add, sub, dq 8 | add: jmp add-2 9 | sub: jmp do+2 10 | dq: dw $-sub 11 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/insnlbl.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/insnlbl.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/insnlbl.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test instruction as label", 4 | "id": "insnlbl", 5 | "format": "bin", 6 | "source": "insnlbl.asm", 7 | "target": [ 8 | { "output": "insnlbl.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/invlpga.asm: -------------------------------------------------------------------------------- 1 | bits 32 2 | invlpga 3 | invlpga ax,ecx 4 | invlpga eax,ecx 5 | bits 64 6 | invlpga 7 | invlpga eax,ecx 8 | invlpga rax,ecx 9 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/invlpga.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/invlpga.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/invlpga.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test invlpga instruction", 4 | "id": "invlpga", 5 | "format": "bin", 6 | "source": "invlpga.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "invlpga.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/jmp64.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | jmp rcx 3 | jmp [rax] 4 | jmp qword [rax] 5 | jmp near [rax] 6 | jmp near qword [rax] 7 | jmp far [rax] 8 | jmp far dword [rax] 9 | jmp far qword [rax] 10 | call rcx 11 | call [rax] 12 | call qword [rax] 13 | call near [rax] 14 | call near qword [rax] 15 | call far [rax] 16 | call far dword [rax] 17 | call far qword [rax] 18 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/jmp64.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/jmp64.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/jmp64.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test jmp in 64 bit mode", 4 | "id": "jmp64", 5 | "format": "bin", 6 | "source": "jmp64.asm", 7 | "target": [ 8 | { "output": "jmp64.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/lar_lsl.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/lar_lsl.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/lar_lsl.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test lar lsr with macros", 4 | "id": "lar_lsl", 5 | "format": "bin", 6 | "source": "lar_lsl.asm", 7 | "target": [ 8 | { "output": "lar_lsl.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/larlsl.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/larlsl.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/larlsl.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test lar and lsl instructions", 4 | "id": "larlsl", 5 | "format": "bin", 6 | "source": "larlsl.asm", 7 | "target": [ 8 | { "output": "larlsl.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/lnxhello.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Assembly 'Hello, World! for Linux", 4 | "id": "lnxhello", 5 | "format": "elf32", 6 | "source": "lnxhello.asm", 7 | "target": [ 8 | { "output": "lnxhello.o" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/lnxhello.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/lnxhello.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/local.asm: -------------------------------------------------------------------------------- 1 | bits 32 2 | 3 | %push bluttan 4 | 5 | %define %$localsize 0 6 | 7 | %stacksize flat 8 | %local l1:qword, l2:dword, l3:dword, l4:qword 9 | %arg a1:qword, a2:dword, a3:dword, a4:qword 10 | 11 | mov eax,[a1] 12 | mov ebx,[a2] 13 | mov ecx,[a3] 14 | mov edx,[a4] 15 | mov [l1],eax 16 | mov [l2],ebx 17 | mov [l3],ecx 18 | mov [l4],edx 19 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/local.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/local.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/local.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test local directive", 4 | "id": "local", 5 | "format": "bin", 6 | "source": "local.asm", 7 | "target": [ 8 | { "output": "local.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/loopoffs.asm: -------------------------------------------------------------------------------- 1 | bits 16 2 | delay: loop delay 3 | loop $ 4 | delay2: a32 loop delay2 5 | a32 loop $ 6 | delay3: loop delay3,ecx 7 | loop $,ecx 8 | delay4: a32 loop delay4,ecx 9 | a32 loop $,ecx 10 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/loopoffs.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/loopoffs.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/lwp.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/lwp.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/lwp.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test LWP instructions", 4 | "id": "lwp", 5 | "format": "bin", 6 | "source": "lwp.asm", 7 | "option": "-Ox -DSRC", 8 | "target": [ 9 | { "output": "lwp.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/masmdisp.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test masm", 4 | "id": "masmdisp", 5 | "format": "win32", 6 | "source": "masmdisp.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "stderr": "masmdisp.stderr" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/mmxsize.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/mmxsize.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/mout.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test sigsegv fix if multiple outputs passed", 4 | "id": "mout", 5 | "format": "bin", 6 | "source": "mout.asm", 7 | "option": "-o mout.bin -o mout.bin", 8 | "target": [ 9 | { "stderr": "mout.stderr" } 10 | ], 11 | "error": "expected" 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/mout.stderr: -------------------------------------------------------------------------------- 1 | mout.bin: fatal: more than one output file specified: mout.bin 2 | 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/movd.asm: -------------------------------------------------------------------------------- 1 | [BITS 32] 2 | movd mm0,eax 3 | movd mm0,[eax] 4 | movd [eax],mm0 5 | movd eax,mm0 6 | 7 | movd xmm0,eax 8 | movd xmm0,[eax] 9 | 10 | movd [eax],xmm0 11 | movd eax,xmm0 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/movd.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/movd.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/movd.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test movd instruction", 4 | "id": "movd", 5 | "format": "bin", 6 | "source": "movd.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "movd.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/movd64.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | 3 | movd r8d, mm1 4 | movd r8, mm1 5 | movq r8, mm1 6 | 7 | movd [rax], mm1 8 | movq [rax], mm1 9 | movd dword [rax], mm1 10 | %ifdef ERROR 11 | movq dword [rax], mm1 12 | %endif 13 | movd qword [rax], mm1 14 | movq qword [rax], mm1 15 | 16 | %ifdef ERROR 17 | movd mm2, mm1 18 | %endif 19 | movq mm2, mm1 20 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/movd64.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/movd64.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/movd64.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/movd64.asm:11: error: mismatch in operand sizes 2 | ./travis/test/movd64.asm:17: error: invalid combination of opcode and operands 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/movhpd.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | movhpd xmm0,[rdi+2] 3 | movhpd xmm0,qword [rdi+2] 4 | 5 | movhpd [rsi+3],xmm1 6 | movhpd qword [rsi+3],xmm1 7 | 8 | vmovhpd xmm2,xmm1,[rax+4] 9 | vmovhpd xmm2,xmm1,qword [rax+4] 10 | 11 | vmovhpd xmm3,[rax+4] 12 | vmovhpd xmm3,qword [rax+4] 13 | 14 | vmovhpd [rcx+5],xmm4 15 | vmovhpd qword [rcx+5],xmm4 16 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/movhpd.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/movhpd.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/movhpd.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test movhpd instruction", 4 | "id": "movhpd", 5 | "format": "bin", 6 | "source": "movhpd.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "movhpd.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/movimm-o0.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/movimm-o0.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/movimm-ox.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/movimm-ox.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/movnti.asm: -------------------------------------------------------------------------------- 1 | bits 16 2 | movnti [si],eax 3 | bits 32 4 | movnti [esi],eax 5 | bits 64 6 | movnti [rsi],eax 7 | movnti [rsi],rax 8 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/movnti.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/movnti.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/movnti.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test movnti instruction", 4 | "id": "movnti", 5 | "format": "bin", 6 | "source": "movnti.asm", 7 | "target": [ 8 | { "output": "movnti.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/mpx-64.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test MPX instruction in 64 bit mode", 4 | "id": "mpx-64", 5 | "format": "elf64", 6 | "source": "mpx-64.asm", 7 | "option": "-O0", 8 | "target": [ 9 | { "output": "mpx-64.o" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/mpx-64.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/mpx-64.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/mpx.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test MPX instruction in 32 bit mode", 4 | "id": "mpx", 5 | "format": "elf", 6 | "source": "mpx.asm", 7 | "option": "-O0", 8 | "target": [ 9 | { "output": "mpx.o" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/mpx.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/mpx.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/multisection-elf32.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/multisection-elf32.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/multisection-elf32.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/multisection.asm:84: warning: uninitialized space declared in non-BSS section `.hmm': zeroing [-w+zeroing] 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/multisection-elf64.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/multisection-elf64.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/multisection-elf64.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/multisection.asm:84: warning: uninitialized space declared in non-BSS section `.hmm': zeroing [-w+zeroing] 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/multisection.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/multisection.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/multisection.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/multisection.asm:84: warning: uninitialized space declared in .hmm section: zeroing [-w+zeroing] 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/nasmformat-aout.stdout: -------------------------------------------------------------------------------- 1 | %line 12+1 ./travis/test/nasmformat.asm 2 | msg_format: db 'This is aout format file' 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/nasmformat-bin.stdout: -------------------------------------------------------------------------------- 1 | %line 2+1 ./travis/test/nasmformat.asm 2 | msg_format: db 'This is binary format file' 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/nasmformat-elf32.stdout: -------------------------------------------------------------------------------- 1 | %line 4+1 ./travis/test/nasmformat.asm 2 | msg_format: db 'This is elf32 format file' 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/nasmformat-elf64.stdout: -------------------------------------------------------------------------------- 1 | %line 6+1 ./travis/test/nasmformat.asm 2 | msg_format: db 'This is elf64 format file' 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/nasmformat-hex.stdout: -------------------------------------------------------------------------------- 1 | %line 16+1 ./travis/test/nasmformat.asm 2 | msg_format: db 'This is ieee format file' 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/nasmformat-ieee.stdout: -------------------------------------------------------------------------------- 1 | %line 16+1 ./travis/test/nasmformat.asm 2 | msg_format: db 'This is ieee format file' 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/nasmformat-macho32.stdout: -------------------------------------------------------------------------------- 1 | %line 8+1 ./travis/test/nasmformat.asm 2 | msg_format: db 'This is macho32 format file' 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/nasmformat-macho64.stdout: -------------------------------------------------------------------------------- 1 | %line 10+1 ./travis/test/nasmformat.asm 2 | msg_format: db 'This is macho64 format file' 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/nasmformat-obj.stdout: -------------------------------------------------------------------------------- 1 | %line 18+1 ./travis/test/nasmformat.asm 2 | msg_format: db 'This is some other format file' 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/nasmformat-win32.stdout: -------------------------------------------------------------------------------- 1 | %line 14+1 ./travis/test/nasmformat.asm 2 | msg_format: db 'This is win32 format file' 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/nasmformat-win64.stdout: -------------------------------------------------------------------------------- 1 | %line 18+1 ./travis/test/nasmformat.asm 2 | msg_format: db 'This is some other format file' 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/newrdwr.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/newrdwr.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/newrdwr.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test rdfsbase, wrfsbase", 4 | "id": "newrdwr", 5 | "format": "bin", 6 | "source": "newrdwr.asm", 7 | "target": [ 8 | { "output": "newrdwr.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/nop.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | 3 | nop 4 | o64 nop 5 | pause 6 | o64 pause 7 | 8 | xchg ax,ax 9 | xchg eax,eax 10 | xchg rax,rax 11 | 12 | rep xchg ax,ax 13 | rep xchg eax,eax 14 | rep xchg rax,rax 15 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/nop.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/nop.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/nop.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test nop instruction", 4 | "id": "nop", 5 | "format": "bin", 6 | "source": "nop.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "nop.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/null.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; A file that produces no output has been known to occasionally crash NASM. 3 | ; 4 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/null.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/null.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/null.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test null file", 4 | "id": "null", 5 | "format": "bin", 6 | "source": "null.asm", 7 | "target": [ 8 | { "output": "null.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/nullfile.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; A file that produces no output has been known to occasionally crash NASM. 3 | ; 4 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/nullfile.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/nullfile.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/nullfile.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test for nil output", 4 | "id": "nullfile", 5 | "format": "bin", 6 | "source": "nullfile.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "nullfile.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/obj.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/obj.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/obj.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/obj.asm:70: warning: 32-bit segment relocation zero-extended from 16 bits [-w+zext-reloc] 2 | ./travis/test/obj.asm:71: warning: 64-bit unsigned relocation zero-extended from 32 bits [-w+zext-reloc] 3 | ./travis/test/obj.asm:71: warning: 64-bit segment relocation zero-extended from 16 bits [-w+zext-reloc] 4 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/objexe.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test obj executable builtin", 4 | "id": "objexe", 5 | "format": "obj", 6 | "source": "objexe.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "objexe.obj" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/objexe.obj.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/objexe.obj.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/optimization-o0.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/optimization-o0.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/optimization-o1.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/optimization-o1.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/optimization-ox.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/optimization-ox.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/org.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; Simple test of a 64-bit org directive 3 | ; 4 | bits 64 5 | org 0xffffffffffff0000 6 | 7 | hello: jmp there 8 | nop 9 | nop 10 | there: 11 | add rax,[rsp+rbx] 12 | inc eax 13 | 14 | section .data 15 | there_ptr dq there 16 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/org.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/org.asm:5: error: parser: instruction expected 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/pinsr16.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/pinsr16.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/pinsr32.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/pinsr32.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/pinsr64.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/pinsr64.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/popcnt.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/popcnt.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/popcnt.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test popcnt instruction", 4 | "id": "popcnt", 5 | "format": "bin", 6 | "source": "popcnt.asm", 7 | "target": [ 8 | { "output": "popcnt.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/ppindirect.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test preprocessor indirection mode", 4 | "id": "ppindirect", 5 | "format": "bin", 6 | "source": "ppindirect.asm", 7 | "option": "-E -Ox", 8 | "target": [ 9 | { "stdout": "ppindirect.stdout" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/pragma.asm: -------------------------------------------------------------------------------- 1 | %pragma 2 | %pragma bluttan 3 | %pragma bluttan blej 4 | %pragma "Hej tomtegubbar" 5 | %define PR asm foobar 6 | %pragma PR 7 | %pragma preproc 8 | %pragma preproc tjo fidelittan preproc 9 | %pragma dbg tjo fidelittan output 10 | %pragma dbgdbg tjo fidelittan debug format 11 | %pragma Dbg Tjo Fidelittan Output 12 | %pragma Dbgdbg Tjo Fidelittan Debug Format 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/pragma.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test various pragmas", 4 | "id": "pragma", 5 | "format": "bin", 6 | "source": "pragma.asm", 7 | "option": "-Ox -E", 8 | "target": [ 9 | { "stdout": "pragma.stdout" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/pragma.stdout: -------------------------------------------------------------------------------- 1 | %line 2+1 ./travis/test/pragma.asm 2 | [pragma bluttan] 3 | [pragma bluttan blej] 4 | %line 6+1 ./travis/test/pragma.asm 5 | [pragma asm foobar] 6 | %line 9+1 ./travis/test/pragma.asm 7 | [pragma dbg tjo fidelittan output] 8 | [pragma dbgdbg tjo fidelittan debug format] 9 | [pragma Dbg Tjo Fidelittan Output] 10 | [pragma Dbgdbg Tjo Fidelittan Debug Format] 11 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/prefix66.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/prefix66.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/prefix66.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test for 0x66 prefixes", 4 | "id": "prefix66", 5 | "format": "bin", 6 | "source": "prefix66.asm", 7 | "target": [ 8 | { "output": "prefix66.bin" }, 9 | { "stderr": "prefix66.stderr" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/pushseg.asm: -------------------------------------------------------------------------------- 1 | ;Testname=test; Arguments=-fbin -opushseg.bin; Files=stdout stderr pushseg.bin 2 | 3 | bits 16 4 | 5 | push cs 6 | push ds 7 | push es 8 | push ss 9 | push fs 10 | push gs 11 | 12 | pop gs 13 | pop fs 14 | pop ss 15 | pop es 16 | pop ds 17 | pop cs ; 8086 only, does not disassemble 18 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/pushseg.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/pushseg.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/pushseg.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test push segment", 4 | "id": "pushseg", 5 | "format": "bin", 6 | "source": "pushseg.asm", 7 | "target": [ 8 | { "output": "pushseg.bin" }, 9 | { "stderr": "pushseg.stderr" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/pushseg.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/pushseg.asm:17: warning: instruction obsolete and removed from the target CPU [-w+obsolete-removed] 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/r13.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | mov rax,[rbx] 3 | mov rax,[rbx*4] 4 | mov rax,[rbx+rbx*2] 5 | mov rax,[r13+rbx*2] 6 | mov rax,[rbp] 7 | mov rax,[rbp*4] 8 | mov rax,[rbp+rbp*2] 9 | mov rax,[rbp+r13*2] 10 | mov rax,[r13] 11 | mov rax,[r13*4] 12 | mov rax,[r13+rbp*2] 13 | mov rax,[r13+r13*2] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/r13.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/r13.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/r13.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test r13 register", 4 | "id": "r13", 5 | "format": "bin", 6 | "source": "r13.asm", 7 | "target": [ 8 | { "output": "r13.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/radix.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/radix.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/radix.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test radixes", 4 | "id": "radix", 5 | "format": "bin", 6 | "source": "radix.asm", 7 | "target": [ 8 | { "output": "radix.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/rdpid.asm: -------------------------------------------------------------------------------- 1 | %ifdef ERROR 2 | %define ERR(x) x 3 | %else 4 | %define ERR(x) 5 | %endif 6 | 7 | bits 16 8 | 9 | rdpid eax 10 | ERR(rdpid ax) 11 | 12 | bits 32 13 | 14 | rdpid ebx 15 | ERR(rdpid bx) 16 | 17 | bits 64 18 | 19 | rdpid rcx 20 | rdpid ecx 21 | ERR(rdpid cx) 22 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/rdpid.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/rdpid.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/rdpid.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/rdpid.asm:10: error: invalid combination of opcode and operands 2 | ./travis/test/rdpid.asm:15: error: invalid combination of opcode and operands 3 | ./travis/test/rdpid.asm:21: error: invalid combination of opcode and operands 4 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/ret-16.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/ret.asm:18: error: expression syntax error 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/ret-32.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/ret.asm:37: error: expression syntax error 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/ret-64.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/ret.asm:53: error: expression syntax error 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/ret.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/ret.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/riprel.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/riprel.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/riprel2.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | 3 | default rel 4 | mov dword [foo],12345678h 5 | mov qword [foo],12345678h 6 | mov [foo],rax 7 | mov dword [foo],12345678h 8 | foo: 9 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/riprel2.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/riprel2.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/selfref.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test self reference macro", 4 | "id": "selfref", 5 | "format": "bin", 6 | "source": "selfref.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "stderr": "selfref.stderr" } 10 | ], 11 | "error": "expected" 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/selfref.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/selfref.asm:23: error: comma, colon, decorator or end of line expected after operand 2 | ./travis/test/selfref.asm:20: ... from macro `Foo2' defined here 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/sha-64.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Check sha instructions in 64 bit mode", 4 | "id": "sha-64", 5 | "format": "elf64", 6 | "source": "sha-64.asm", 7 | "option": "-O0", 8 | "target": [ 9 | { "output": "sha-64.o" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/sha-64.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/sha-64.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/sha.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Check sha instructions in 32 bit mode", 4 | "id": "sha", 5 | "format": "elf", 6 | "source": "sha.asm", 7 | "option": "-O0", 8 | "target": [ 9 | { "output": "sha.o" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/sha.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/sha.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/smartalign16.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/smartalign16.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/smartalign32.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/smartalign32.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/smartalign64.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/smartalign64.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/splitea.asm: -------------------------------------------------------------------------------- 1 | bits 32 2 | 3 | mov eax,[eax] 4 | mov eax,[eax+ecx] 5 | mov eax,[eax+ecx*4] 6 | mov eax,[eax+ecx*4+8] 7 | 8 | mov eax,[eax] 9 | mov eax,[eax,ecx] 10 | mov eax,[eax,ecx*4] 11 | mov eax,[eax+8,ecx*4] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/splitea.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/splitea.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/splitea.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Split EA test", 4 | "id": "splitea", 5 | "format": "bin", 6 | "source": "splitea.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "splitea.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/sreg.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/sreg.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/sreg.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test segment registers in 64 bit mode", 4 | "id": "sreg", 5 | "format": "bin", 6 | "source": "sreg.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "sreg.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/ssesize.asm: -------------------------------------------------------------------------------- 1 | _start: 2 | movd ecx,xmm0 3 | movd [foo],xmm0 4 | movd dword [foo],xmm0 5 | 6 | movdqa xmm1,xmm0 7 | movdqa [foo],xmm0 8 | movdqa oword [foo],xmm0 9 | 10 | cmppd xmm2,xmm3,8 11 | cmppd xmm2,xmm3,byte 8 12 | 13 | section .bss 14 | foo: reso 1 15 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/ssesize.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test SSE sizes", 4 | "id": "ssesize", 5 | "format": "elf64", 6 | "source": "ssesize.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "ssesize.o" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/ssesize.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/ssesize.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/strlen.asm: -------------------------------------------------------------------------------- 1 | %macro strlen_test 1 2 | %strlen len %2 ; not existing argument 3 | %endmacro 4 | 5 | strlen_test 'a' 6 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/strlen.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test strlen error over nonexisting argument", 4 | "id": "strlen", 5 | "format": "bin", 6 | "source": "strlen.asm", 7 | "option": "-E -Ox", 8 | "target": [ 9 | { "stderr": "strlen.stderr" } 10 | ], 11 | "error": "expected" 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/strlen.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/strlen.asm:5: error: `%strlen' requires string as second parameter 2 | ./travis/test/strlen.asm:2: ... from macro `strlen_test' defined here 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/struc.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/struc.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/struc.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Check structure compilation", 4 | "id": "struc", 5 | "format": "bin", 6 | "source": "struc.asm", 7 | "option": "", 8 | "target": [ 9 | { "output": "struc.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/test67.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/test67.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/testdos.asm: -------------------------------------------------------------------------------- 1 | ; This file was known to miscompile with the 16-bit NASM built 2 | ; under Borland C++ 3.1, so keep it around for testing... 3 | ; 4 | ; The proper output looks like: 5 | ; 6 | ; 00000000 A10300 7 | ; 00000003 EA0000FFFF 8 | ; 9 | org 0100h 10 | mov ax,[3] 11 | jmp 0FFFFh:0000 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/testdos.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/testdos.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/testdos.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test miscompile with 16-bit built", 4 | "id": "testdos", 5 | "format": "bin", 6 | "source": "testdos.asm", 7 | "target": [ 8 | { "output": "testdos.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/testnos3.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/testnos3.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/testnos3.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Double-precision floating point tests", 4 | "id": "testnos3", 5 | "format": "bin", 6 | "source": "testnos3.asm", 7 | "target": [ 8 | { "output": "testnos3.bin" }, 9 | { "stderr": "testnos3.stderr" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/testnos3.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/testnos3.asm:967: warning: floating-point constant significand contains more than 52 digits [-w+float-toolong] 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/time.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test time macros", 4 | "id": "time", 5 | "format": "bin", 6 | "source": "time.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "time.bin" } 10 | ], 11 | "disable": "true" 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/timesneg.asm: -------------------------------------------------------------------------------- 1 | bits 32 2 | times -1 db 0 3 | times -1 incbin "./travis/test/timesneg.asm" 4 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/timesneg.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test negative TIMES value", 4 | "id": "timesneg", 5 | "format": "bin", 6 | "source": "timesneg.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "stderr": "timesneg.stderr" } 10 | ], 11 | "error": "expected" 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/timesneg.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/timesneg.asm:2: error: TIMES value -1 is negative 2 | ./travis/test/timesneg.asm:3: error: TIMES value -1 is negative 3 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/tmap.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/tmap.asm -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/tmap.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test abuse the section flags which breaks NASM 0.98.37", 4 | "format": "elf", 5 | "source": "tmap.asm", 6 | "option": "-Ox -DLINUX", 7 | "target": [ 8 | { "output": "tmap.o" }, 9 | { "stderr": "tmap.stderr" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/tmap.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/tmap.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/tmap.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/tmap.asm:938: warning: label alone on a line without a colon might be in error [-w+label-orphan] 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/uscore.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/uscore.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/uscore.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test numbers conversion", 4 | "id": "uscore", 5 | "format": "bin", 6 | "source": "uscore.asm", 7 | "target": [ 8 | { "output": "uscore.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/utf.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/utf.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/v4.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/v4.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/v4.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/v4.asm:13: error: register set not valid for operand 2 | ./travis/test/v4.asm:14: error: invalid register set size 3 | ./travis/test/v4.asm:15: error: invalid register set size 4 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/vaesenc.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/vaesenc.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/vaesenc.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test AES inctructions (BR 3392454, 3392460)", 4 | "id": "vaesenc", 5 | "format": "bin", 6 | "source": "vaesenc.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "vaesenc.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/vex.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/vex.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/vex1.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/vex.asm:29: error: instruction not encodable with {vex2} prefix 2 | ./travis/test/vex.asm:30: error: cannot use high byte register in rex instruction 3 | ./travis/test/vex.asm:32: error: invalid operands in non-64-bit mode 4 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/vex2.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/vex.asm:35: error: instruction not encodable with {rex} prefix 2 | ./travis/test/vex.asm:36: error: instruction not encodable with {vex} prefix 3 | ./travis/test/vex.asm:37: error: instruction not encodable with {vex3} prefix 4 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/vgather.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/vgather.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/vgather.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test vgather instruction", 4 | "id": "vgather", 5 | "format": "bin", 6 | "source": "vgather.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "vgather.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/vmread.bin.t: -------------------------------------------------------------------------------- 1 | xyxyx%y%x%y% -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/vmx.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test VMX instructions", 4 | "id": "vmx", 5 | "format": "elf64", 6 | "source": "vmx.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "vmx.o" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/vmx.o.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/vmx.o.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/vpcmp.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/vpcmp.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/vpcmp.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test vpcmp instruction", 4 | "id": "vpcmp", 5 | "format": "bin", 6 | "source": "vpcmp.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "vpcmp.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/warnstack.asm: -------------------------------------------------------------------------------- 1 | %warning "Good warning" 2 | [warning push] 3 | [warning -user] 4 | %warning "Bad warning" 5 | [warning pop] 6 | %warning "Good warning" 7 | [warning -user] 8 | %warning "Bad warning" 9 | [warning pop] ; should warn but reset all 10 | %warning "Good warning" 11 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/warnstack.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/warnstack.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/warnstack.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test warning stack", 4 | "id": "warnstack", 5 | "format": "bin", 6 | "source": "warnstack.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "warnstack.bin" }, 10 | { "stderr": "warnstack.stderr" } 11 | ] 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/warnstack.stderr: -------------------------------------------------------------------------------- 1 | ./travis/test/warnstack.asm:1: warning: Good warning [-w+user] 2 | ./travis/test/warnstack.asm:6: warning: Good warning [-w+user] 3 | ./travis/test/warnstack.asm:9: warning: warning stack empty [-w+warn-stack-empty] 4 | ./travis/test/warnstack.asm:10: warning: Good warning [-w+user] 5 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/weirdpaste.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/weirdpaste.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/winalign.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "COFF alignment based on BR3392692", 4 | "id": "winalign", 5 | "format": "win64", 6 | "source": "winalign.asm", 7 | "error": "over", 8 | "option": "-Ox", 9 | "target": [ 10 | { "output": "winalign.obj" } 11 | ] 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/winalign.obj.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/winalign.obj.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/xchg.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/xchg.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/xchg.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Check xchg instruction (-Ox)", 4 | "id": "xchg", 5 | "format": "bin", 6 | "source": "xchg.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "xchg.bin" } 10 | ] 11 | }, 12 | { 13 | "description": "Check xchg instruction (-O0)", 14 | "ref": "xchg", 15 | "option": "-O0", 16 | "update": false 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/xcrypt.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/xcrypt.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/xcrypt.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test XCRYPT instructions", 4 | "id": "xcrypt", 5 | "format": "bin", 6 | "source": "xcrypt.asm", 7 | "target": [ 8 | { "output": "xcrypt.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/xdefine.bin.t: -------------------------------------------------------------------------------- 1 | 8!" -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/xdefine.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test weird defines", 4 | "id": "xdefine", 5 | "format": "bin", 6 | "source": "xdefine.asm", 7 | "option": "-Ox", 8 | "target": [ 9 | { "output": "xdefine.bin" } 10 | ] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/xpaste.asm: -------------------------------------------------------------------------------- 1 | %iassign OWORD_size 16 ; octo-word 2 | %idefine sizeof(_x_) _x_%+_size 3 | 4 | %define ptr eax+sizeof(oword) 5 | 6 | movdqa [ptr], xmm1 7 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/xpaste.bin.t: -------------------------------------------------------------------------------- 1 | gfH -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/xpaste.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test preproc xdefine", 4 | "id": "xpaste", 5 | "source": "xpaste.asm", 6 | "option": "-f bin -Ox", 7 | "target": [ 8 | { "output": "xpaste.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/zerobyte.asm: -------------------------------------------------------------------------------- 1 | bits 64 2 | 3 | mov eax,bar-foo 4 | 5 | foo: 6 | add al,r10b 7 | bar: 8 | 9 | lldt ax 10 | lldt r8w 11 | ltr [rax] 12 | sldt eax 13 | sldt r8d 14 | str eax 15 | str rax 16 | str r8d 17 | str r8 18 | verr ax 19 | verr r8w 20 | verw ax 21 | verw r8w 22 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/zerobyte.bin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlugg/zig-build-workshop/ec7652389049153bca3353db60a994dca1ce757c/solutions/06/nasm-2.16.03/travis/test/zerobyte.bin.t -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/travis/test/zerobyte.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "description": "Test for accidental duplication of REX prefixes", 4 | "id": "zerobyte", 5 | "format": "bin", 6 | "source": "zerobyte.asm", 7 | "target": [ 8 | { "output": "zerobyte.bin" } 9 | ] 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/version: -------------------------------------------------------------------------------- 1 | 2.16.03 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/version.h: -------------------------------------------------------------------------------- 1 | #ifndef NASM_VERSION_H 2 | #define NASM_VERSION_H 3 | #define NASM_MAJOR_VER 2 4 | #define NASM_MINOR_VER 16 5 | #define NASM_SUBMINOR_VER 3 6 | #define NASM_PATCHLEVEL_VER 0 7 | #define NASM_VERSION_ID 0x02100300 8 | #define NASM_VER "2.16.03" 9 | #endif /* NASM_VERSION_H */ 10 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/version.mac: -------------------------------------------------------------------------------- 1 | STD: version 2 | %define __?NASM_MAJOR?__ 2 3 | %define __?NASM_MINOR?__ 16 4 | %define __?NASM_SUBMINOR?__ 3 5 | %define __?NASM_PATCHLEVEL?__ 0 6 | %define __?NASM_VERSION_ID?__ 002100300h 7 | %define __?NASM_VER?__ "2.16.03" 8 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/version.mak: -------------------------------------------------------------------------------- 1 | NASM_VER=2.16.03 2 | NASM_MAJOR_VER=2 3 | NASM_MINOR_VER=16 4 | NASM_SUBMINOR_VER=3 5 | NASM_PATCHLEVEL_VER=0 6 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/version.sed: -------------------------------------------------------------------------------- 1 | s/@@NASM_MAJOR@@/2/g 2 | s/@@NASM_MINOR@@/16/g 3 | s/@@NASM_SUBMINOR@@/3/g 4 | s/@@NASM_PATCHLEVEL@@/0/g 5 | s/@@NASM_SNAPSHOT@@/0/g 6 | s/@@NASM_VERSION_ID@@/34603776/g 7 | s/@@NASM_VERSION_XID@@/0x02100300/g 8 | s/@@NASM_VER@@/2.16.03/g 9 | s/@@NASM_MANGLED_VER@@/2.16.03/g 10 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/win/.gitignore: -------------------------------------------------------------------------------- 1 | !*.xml 2 | -------------------------------------------------------------------------------- /solutions/06/nasm-2.16.03/win/manifest.rc: -------------------------------------------------------------------------------- 1 | LANGUAGE 0,0 2 | 1 24 MANIFEST_FILE 3 | -------------------------------------------------------------------------------- /solutions/07/build.zig.zon: -------------------------------------------------------------------------------- 1 | .{ 2 | .name = "nasm-test", 3 | .version = "0.0.1", 4 | .paths = .{ 5 | "build.zig", 6 | "build.zig.zon", 7 | "test.c", 8 | "test.asm", 9 | }, 10 | .dependencies = .{ 11 | .nasm = .{ 12 | .path = "../06", 13 | }, 14 | }, 15 | } 16 | -------------------------------------------------------------------------------- /solutions/07/test.asm: -------------------------------------------------------------------------------- 1 | section .data 2 | 3 | global str 4 | str: db "Hello, World!", 0 5 | -------------------------------------------------------------------------------- /solutions/07/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern const char str[]; 4 | 5 | int main(void) { 6 | puts(str); 7 | return 0; 8 | } 9 | --------------------------------------------------------------------------------