QUOTE(angch @ Nov 21 2022, 04:22 PM)

Alright, Mr Assembly, take this!
150 bytes. DOS 16bit .EXE
It grabs the number of diamonds from the command line.
https://gist.github.com/angch/d82694d44c7af...787d944034ff719Very nice! I am aware that you know low-level stuff, but I didn't know you can code in Assembly (i8086)! Fantastic!
I didn't look up interrupt list, how did you get command line argument in DOS? Through "di" register? I know in Windows (through API) and Linux (through stack), but don't know about DOS.
150 bytes is not the smallest,

Because it wrap it with MZ header.
I think you already knew, you can produce .COM in FASM by changing the first line to:
CODE
org 100h
Now it is 118 bytes! Yeah.
I notice the largest size is 12 (turn to 25 rows), because you understand that the DOS terminal window is only 25 rows. It shows you pay attention to detail.
Again, nice one! (Mine is in C#, I am reluctant to do any algorithmic coding using Assembly)