scene.org File Archive

File download

<root>­/­parties­/­2023­/­vccc23­/­christmas-diamonds/dmsc_msdos_asm_vc3-2023.zip

File size:
69 808 bytes (68.17K)
File date:
2024-01-03 14:15:17
Download count:
all-time: 15

Screenshot (by pouët.net)

Screenshot

Preview

  • msdos-asm/ dir
  • msdos-asm/diamond.asm 626B
  • msdos-asm/diamond.com 32B
  • msdos-asm/disk.img 360.00K
  • msdos-asm/file_id.diz 1.19K
  • msdos-asm/minimal.asm 144B
  • msdos-asm/msdos-dir.png 1.54K
  • msdos-asm/msdos-result.png 625B
  • msdos-asm/msdos-source.png 13.78K

file_id.diz

Diamond for MS-DOS in 8086 assembly

Author: dmsc
Category: Christmas Challenge
System:   IBM PC and Compatibles
Language: Assembler
Len source code: 144
Len exe file:    32
Len code only:   32
Instructions:
  You can run the DIAMOND.COM executable in a DOS windows, remember to type CLS
  first to clear the screen.

  The included floppy disk image boots to MS-DOS 3.3, type DIAMOND at the DOS
  prompt to run the program.

  Note that this program does not terminate, and can take a few seconds to draw
  the complete pattern.

Description:
  This program calculates the position of the stars to draw using two different
  formulas:
            X = (N - 1) % 18
            Y = (N + 1) % 24

  And:
            X = 18 - (N - 1) % 18
            Y = (N + 1) % 24

  The first formula produces the descending diagonal lines, and the second
  formula produces the ascending diagonals.

  Only the points with Y >= 5 are plotted, this leaves 4 blank lines at the
  top of the screen.

  To assemble the program, use NASM, or AS86 or other similar assembler.

Comments:
  I included two source files, a commented one and a minimized source that is
  only 144 bytes of size.