You can detect ZX-80 memory by determining the current address of the stack pointer. This will obviously only work using machine code - Unfortunately, the ZX-80 has no such thing as RAMTOP, which is available in the ZX-81:
LD HL,0000 210000
ADD HL,SP 39
RET C9
You can get that to run by
10 REM 12345
20 POKE 16427,33
30 POKE 16428,0
40 POKE 16429,0
50 POKE 16430,57
60 POKE 16431,201
70 PRINT USR(16427)
(Note, the USR
is not a 1-key token, but has to be typed in character by character.)
From the other (lower) end of the memory, the display file and the program grow upwards - So the amount of free memory is the difference of what you get in this program and what you got in the other (accepted) answer.