Author: Chris Barrett (baz4096)
System: Acorn BBC Micro Model B
Language: BBC BASIC 2
Source Length: 142 bytes (detokenised)
104 bytes (tokenised)
Program can be run in a Javascript BBC emulator by visiting the URL in the attached file, or here:
https://bbcmic.ro/#%7B%22v%22%3A1%2C%22program%22%3A%22MODE7%5CnREADA%25%5CnC%25%3D0%5CnREPEAT%5CnREADB%25%5CnPRINTCHR%24%28130%29%3BTAB%2819%20-%20%28%28B%25-1%29%2F2%29%29%20STRING%24%28B%25%2C%5C%22*%5C%22%29%5CnC%25%3DC%25%2B1%5CnUNTILC%25%3DA%25%5CnDATA14%2C1%2C3%2C5%2C7%2C3%2C7%2C11%2C15%2C5%2C11%2C17%2C23%2C3%2C3%22%7D
Description: The length of each row of asterisks that comprise the tree are stored in a DATA line. The code reads the first line (number of tree rows) then loops by reading and printing the number of asterisks, centred on a 40 character width display. MODE 7 is Teletext mode, should always be 40 chars. Printing CHR$(130) turns the following characters green until the end of the line.