A Horrible 8086 Star Author: atsampson Category: Christmas Challenge System: IBM PC compatible Language: 8086 assembler Len source code: 761 Len exe file: 76 Len code only: 76 Instructions: dos1.com is a regular .COM file, which should in theory work on any PC DOS derivative (although it does make some assumptions about the initial values of registers that may not always hold). Run it with DOSBox using: dosbox dos1.com Description: This was a late attempt, because I hadn't done an assembler version this year. I don't like x86 much, but it does have better code density than my preferred platforms! I'm sure there will be cleverer solutions, but I was happy enough to get it under 80 bytes. This uses the same approach as my UNIX v4 implementation, rearranged a bit to take advantage of the shorter x86 instructions: store one quarter of the pattern as an array of bit patterns, and mirror it horizontally and vertically, with a special case in the middle to draw 9 stars for the central row/column. In both axes it reuses the same code to scan in both directions: vertically it uses lodsb and flips the DF flag, and horizontally it uses some self-modifying code that toggles between rol and ror on alternate calls. Handily the bit that needs to toggle is 8, so I was able to tweak the inner loop to count from 8 down to 0 and xor it with the initial value of the loop counter, saving a byte. The choice between space and star bugs me. There's got to be a way of doing that in less than six bytes. I did wonder whether you could use aad to adjust by 10 somehow... Assembled using "nasm -f bin" on Linux. Comments: Please can I have my RISC architectures back now, thanks.