The panoply of software titles needing LOAD "" CODE to be loaded, is mainly centred around the early ZX Spectrum years, 1982-1984.
While LOAD "" also exists in the ZX81, the technique seems to be a remnant of a wide practice of writing games in assembly together with system variables, for that machine.
That allied with the platform being relatively new, BASIC offering no intrinsic strong anti-tampering protections, and more advanced BASIC obfuscation techniques not being yet widely known, it might explain placing BASIC loaders in CODE blocks (together with LOAD"" not being yet a de facto standard after being used by default by the 128K models loader menu).
In addition, by loading tape CODE blocks, you can obfuscate somewhat where the execution point takes off. Once the code is loaded, you can continue BASIC execution:
- in the line buffer;
- in a BASIC line and position of your choice.
Furthermore, using a CODE block, you can play with variables, like (PROG) and change BASIC location or like ERR_SP, and the BASIC listing (if any), won't have a hint of where the machine code is being entered. Or you can even smash the machine code/CPU stack, and not even return to the BASIC interpreter, using the variable and BASIC area for storing machine code (eg using the address from 16384 as contiguous RAM, if the programmer knows what he is doing).
Also, saving as SAVE "" CODE seems to be used by some software titles to hide the fact they are in fact, BASIC programs.
By the time the 128K models start to be widespread used, they make it mandatory using a BASIC loader; they do not load automatically a starting LOAD "" CODE block.
Taking the aforementioned METEOR STORM as an example, that has one block of CODE from 23500 with a length of 8700 bytes.
Once the LOAD "" CODE block is loaded from tape, and doing a breakpoint in ROM immediately after, you have got the following BASIC program:
From (PROG)
10 CLEAR 24900
11 PRINT "LOADING MACHINE FILE"
12 LOAD ""CODE
13 CLS
15 PRINT "METEOR STORM MASTER"
20 PRINT
25 PRINT " QUICKSILVA 1982"
30 PRINT :PRINT :PRINT
35 PRINT "INSERT BLANK CASSETTE"
40 SAVE "METEOR"CODE 23500,8700:LET L=USR 28000
100 SAVE "MET.MASTER"LINE 1
110 SAVE "MET.MFILE"CODE 25000,7200
and in the line buffer (E_LINE) memory area:
LOAD ""
Analysing the rest of the ZX Spectrum system variables, relevant for this discussion:
40 - (5C45) PPC - Line number of statement being executed
01 - (5C47) SUBPPC - Number within line of statement being executed
24900 - (5CB2) RAMTOP - Address of last byte of BASIC system area
There are no integer numbers obscuration, as in later titles, so we can take the ASCII BASIC listing at face value.
For building the METEOR CODE block in tape, that we have today, the programmers:
- ran the BASIC code from LINE 100, saving to tape both the BASIC+the MC block;
- restarted the machine
- loaded the saved BASIC block from tape
- that in turn loaded the M/C block at line 12
- and then saved system variables+BASIC+machine code at the beginning of line 40
We can then see, confirmed by the values of the system variables, that the machine will return upon completion of LOAD "" CODE, to the instruction calling machine code at LET L=USR 28000 at line 40.
10 LOAD "" CODE
and save that as the first item on the tape so you're never going to save memory, but you might save loading time?CODE
on the Spectrum keyboard would have been fairly confusing - hence my suspicion there might have been a more technical reason for it.