Christmas Diamonds
xeleh_pc_asm_vc3-2023 Author: Xeleh Category: Christmas Challenge System: IBM PC or compatible Language: x86 assembler, NASM Len source code: Len exe file: 41 bytes Len code only: Instructions: Tested on DOSBox-X, it should work also on DOSBox. Description: A determinant is calculated for each character position of the 19x19 object area. The determinant of the positions belonging to any of the lines we need to draw satisfies one of the following formulas: - (column position + row position + 3 ) % 6 = 0 for the 45 degrees lines - (column position - row position + 21) % 6 = 0 for the 135 degrees lines Where both row and column positions are zero-based and % stands for the modulo operation. Comments: Thanks for organizing this challenge, Logiker. It was quite fun! :)
[ back to the prod ]