scene.org File Archive

File download

<root>­/­parties­/­2023­/­vccc23­/­christmas-diamonds/jonno_bbc_basic_vc3-2023.zip

File size:
51 577 bytes (50.37K)
File date:
2024-01-03 14:15:18
Download count:
all-time: 2

Preview

  • Diamonds.png 51.08K
  • Diamonds.txt 99B
  • file_id.diz 1.22K
  • owletExport.ssd 200.00K

file_id.diz

<Jonno's Diamonds>

Author: <Jonno from StarDot>
Category: <Christmas Challenge>
System:   <BBC Micro or Acorn Electron>
Language: <BBC BASIC 1.2>
Len source code: <86 bytes>
Len exe file:    <86 bytes>
Len code only:   <N/A bytes> (valid for assembler only; length of executable without BASIC stub)
Instructions:
Using BeebEM
Choose Run Disc and select the Diamonds.ssd disc image file
Description:
The code uses FOR...NEXT loops to position the cursor a the leftmost point of each
diamond in the pattern [VDU31,X,Y] it then uses the VDU command to stream bytes to
the screen which display asterisks or move the cursor up or down to draw the diamond.
It then loops to the next starting point. One interesting point is the use of semi-colons
in the VDU stream. A variable or constant followed by semicolon in a VDU statement
sends that value to the Operating System Write Character routine (OSWRCH) as 
low-byte, high-byte, I.E. 2858; sends 42,10 and 2602 sends 42,11.
Example:
a=42+(11*256) i.e asterix (42) the cursor up (11)
b=42+(10*256) i.e asterix (42) the cursor downup (10)
7978 = 42,31
This saves a few bytes that would otherwise be take by commas separating two 8 bit values.
Comments: 
<anything left to say>