scene.org File Archive

File download

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

File size:
2 507 698 bytes (2.39M)
File date:
2024-01-03 14:15:17
Download count:
all-time: 3

Preview

  • CMAS2023.CPP 142B
  • CMAS2023.EXE 130B
  • file_id.diz 1.28K
  • result.jpg 1.15M
  • source.jpg 1.25M

file_id.diz

Cap's Wrap

Author: Captain Cryptgram
Category: Christmas Challenge
System:   Compaq SLT/286 (or any MS-DOS or compatible machine)
Language: Turbo C++ 3.0
Len source code: 142
Len exe file:    130
Len code only:   
Instructions:
  Run this on any DOS machine or using DOSBox
  Clear the screen with CLS and then run the included executable
  To reproduce the executable, compile with Turbo C++ 3.0 using the commands "tcc -1 -mt CMAS2023.CPP" followed by "tlink CMAS2023.OBJ, CMAS2023.EXE /n /t /x"
Description:
  This entry approaches the callenge as two lines, one with a positive slope and one with a negative slope, 
  each confined in an 18x18 box and wrapping around the x and y axis as it is drawn. The boxes are overlapped but offset by 1,1 
  so that the final result is 19x19.
  Each time they wrap on the y axis, the x position is shifted by 6 characters.
  Because text mode video memory uses two bytes per character (the second for attributes such as color), the constants are all double what you'd expect.
  Drawing to the screen is accomplished with direct video memory access so no libraries, standard or otherwise, are required to be linked or #included
Comments:
  Indentation and newlines left in for readability. Without whitespace, code could be shortened to 130 bytes