STAR

Author: regregex
Category: Christmas Challenge
System: BBC Micro A/B/Master, Acorn Electron
Language: 6502 assembler (MASM)
Len source code: 1235 bytes
Len exe file:      46 bytes
Len code only:     46 bytes
Instructions:
 Install and open BeebEm ( http://www.mkw.me.uk/beebem/ ).
 Click File -> Disc Options -> New Disc 0, enter star.ssd
 Click Edit -> Import Files to Disc -> Disc 0, select xstar.inf
 At the BASIC prompt, type */X.STAR and press RETURN.

 To reproduce the screenshots:
 Click Hardware -> BBC Model -> BBC Master 128
 Enter the following:
 *INSERT 9
 *CONFIGURE FILE 9
 *CONFIGURE MODE 4
 Press Ctrl+F12 (CTRL+BREAK), releasing Ctrl last.
 Then follow the instructions above.
 To show the editor screen, import star.inf as above, then enter:
 *EDIT STAR
 Shift+F10 (SHIFT+F0) hides newline markers.

Description: The object code loops through the 17 rows of the shape and
the 17 columns of each row.  At each position it adds two values from a
17-byte table, indexed by the row and column number, and prints a space
via OSWRCH (&FFEE) if the result carries out, an asterisk otherwise.  At
the end of each row OSNEWL (&FFE7) is called to effect a newline; after
the 17th row, the program returns to the caller.

Comments:
Trailing spaces are printed on each line.
The table values allow the carry flag to be undefined before the ADC.