scene.org File Archive

File download

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

File size:
230 132 bytes (224.74K)
File date:
2022-12-30 11:32:13
Download count:
all-time: 4

Preview

  • file_id.diz 1.38K
  • scruss_bbc_basic_vc3-2022-result.png 90.90K
  • scruss_bbc_basic_vc3-2022-source.png 144.32K
  • scruss_bbc_basic_vc3-2022.bbc 155B
  • scruss_bbc_basic_vc3-2022.txt 168B

file_id.diz

Beeb*

Author: scruss
Category: Christmas Challenge
System:   BBC Microcomputer Model B
Language: BBC BASIC 2.0
Len source code: 168 bytes
Len exe file:    155 bytes
Len code only:   n/a

Instructions:

1) open this link in your browser to run the code in the Owlet emulator:

https://bbcmic.ro/#%7B%22v%22:1,%22program%22:%221B=&7C00:MO.7:F.Y=0TO8:P.SPC(-4*(Y%3C4)-(Y-4)*(Y%3E4))STRI.-(Y+1)*(Y%3C4)-(13-Y)*(Y%3E3),%5C%22*%5C%22):F.X=0TO8:S=40*Y+X:T=S-2*X:P=B?S:B?(16+T)=P:B?(640-T)=P:B?(656-S)=P:N.,:P.TAB(1,16)%22%7D

*OR*

2) paste the contents of scruss_bbc_basic_vc3-2022.txt into the Owlet
emulator (https://bbcmic.ro/) or b-em emulator, and click/type RUN

(Running the tokenized scruss_bbc_basic_vc3-2022.bbc requires copying it
onto a disc image and running that in an emulator. Not recommended.)

Description:

The program relies on the BBC Micro's character-mapped teletext mode
(MODE 7). It draws the upper left quadrant of the star with space and asterisk
counts controlled by row number logical comparisons. It then reads the
character value (`P=B?S` is equivalent to `P=PEEK(B+S)`) row by row, and pokes
the other four quadrants symmetrically (`B?(16+T)=P` is equivalent to
`POKE B+16+T,P`). Finally, it moves the cursor out of the way of the star.

Comments:

This started life as a C64 program, then I realized that the BBC Micro allowed
for much smaller code.