Snowflake
Author: BeebMaster
Category: Christmas Challenge
System: BBC Micro
Language: BASIC
Len source code: 143 bytes
Len exe file: 143 bytes
Len code only: 143 bytes (valid for assembler only; length of executable without BASIC stub)
Instructions:
Done on real hardware, but should be able to drag and drop the BASIC file into an emulator.
Description:
One-quarter of the pattern is encoded as a bit pattern where 0 represents a space or empty character, and 1 represents a star. The bit pattern is then grouped into bytes which are stored in the program as a string of ASCII characters. The main loop works through each byte of the string with the inner loop decoding each bit of each byte as a 0 or 1 and converts this result to the ASCII value to be printed on screen. This value is then printed in the 4 positions it appears in within the pattern.
Comments: