| small asm (compo?)||Kerr-Mudd,John|
small asm (compo?)From: Kerr-Mudd,JohnNewsgroups:
Sat, 22 Aug 2020 13:55 UTC
View all headers
Posted to clax, but repeated hererocksolid light 0.7.2
Subject: small asm code (compo?)
X-Clacks-Overhead: GNU Terry Pratchett
Spec is to show the day of week as a literal string;
given these DOS functions (maybe others?)
get daynum: DOS has int 0x21, fn 0x2A which returns al as 0-6 (Sun-Sat)
print: int 21, fn 2 with dl=char
or int 21, fn 9 with dx pointing to a string terminated with a $ (x24)
terminate with return code: int 0x21 fn 0x4C, code in al
Write shortest programs to show day string of the current day;
1) full string e.g. "Monday", "Saturday"
2) 3 letter e.g. "Mon", "Sat"
3) 2 letter e.g. "Mo", "Sa"
My current shortests are:
Bah, and indeed, Humbug.