#!/bin/bash
mkdir build -p
cd build
uasm -coff ../PZ25_6.asm
download_if_needed() {
  local file=$(basename $1)
  if [[ ! -f msvcrt.lib || $(stat -c%s msvcrt.lib) -lt 100000 ]]; then
    curl -LO $1
  fi
}
download_if_needed https://github.com/therealdreg/dregs-masm32-wine/raw/refs/heads/main/libs/msvcrt.lib
link.exe /DEBUGTYPE:COFF /SUBSYSTEM:CONSOLE msvcrt.lib PZ25_6.o 2>/dev/null
