A quine is "a computer program which takes no input and produces a copy of its own source code as its only output". Traditionally, a BASIC quine may not incorporate a command like LIST because that makes it too easy.
It's possible to write a true quine in BBC BASIC, but because it depends on the format in which the program is stored in memory there are slightly different versions for my BASICs and for Sophie's BASICs. Here is a version for my BASICs:
Code: Select all
PRINT $(PAGE+22)$(PAGE+21):REM PRINT $(PAGE+22)$(PAGE+21):REM
Here is a version for Sophie's BASICs (it doesn't print the line number, but that's not strictly 'part of the program'):
Code: Select all
10 PRINT $(PAGE+23)$(PAGE+23):REM PRINT $(PAGE+23)$(PAGE+23):REM
Note that you can't run the version for my BASICs from SDLIDE, because that adds some 'hidden' code. Instead run it from BBCEdit, or save it to a file 'quine.bbc' and run it from the command prompt or by double-clicking.