scene.org File Archive

File download

<root>­/­parties­/­2022­/­vccc22­/­christmas_star_challenge/jghpdp11-2022d.zip

File size:
304 678 bytes (297.54K)
File date:
2022-12-30 11:32:13
Download count:
all-time: 5

Preview

  • XMAS2022d/ dir
  • XMAS2022d/!RunPDP.bat 55B
  • XMAS2022d/fileid.txt 1.56K
  • XMAS2022d/make.bat 86B
  • XMAS2022d/xmas2022d 122B
  • XMAS2022d/xmas2022d.gif 274.28K
  • XMAS2022d/xmas2022d.lst 5.41K
  • XMAS2022d/xmas2022d.mac 1.90K
  • XMAS2022d/xmas2022dList.gif 17.88K

file_id.diz

Author:            Jonathan Harston
Category:          Christmas Challenge
System:            PDP11 running Bell Unix
Language:          PDP11 machine code
Source length:     1945 bytes
File length:       122 bytes
Executable length: 106 bytes
Instructions:
Copy the file 'xmas2022d' to a Bell Unix PDP11 system. Ensure it is executable
by setting the access with 'chmod 555 xmas2022d'. Run by typing 'xmas2022d'.
At mdfs.net/tty is an online demo on an emulated ASR33 teletype. Boot unix
by entering 'unix', then run the demo by typing 'xmas'.
Description:
The program encodes the star as a raster bitmap, as though it was an image to
be displayed on a bitmapped display. Each bit of the bitmap is translated to
a space for the background, and a star for the foreground.

The code fetches each 16-bit bitmap, then loops through each bit converting it
to a space or star by shifting each bit out and branching with the carry flag.
Now, the image is 17 by 17 characters, but each 16-bit word can only represent
16 bits. So, we encode an exception in that if the first bit is set - bit 15
tested with BranchMinus - then we double the first bit, resulting in two stars.
That allows use to squeeze a 17-bit bitmap into a 16-bit word.

The bitmap data simply uses a zero word as a terminator. Naturally, this means
we can't have a blank line in an image, but for this example this is fine.

In the interests of squeezing the code down, no attempt is made to centre the
star, either vertically or horizontally.

The code has some boiler-plate header and interface code to run on a Bell Unix
system.