Use MILLISECOND, not TIME$. Subtract the current MILLISECOND from the previous MILLISECOND, divide it by a thousand, then put that all under 1 and you will get your FPS.
MILLISECOND gives you the amount of time in milliseconds that has passed since your program started. You just need to find a difference in milliseconds.
VAR FPS,PMILLI
@LOOP
FPS=1/((MILLISECOND-PMILLI)*1000)
PMILLI=MILLISECOND
[...]
GOTO @LOOP
You have nothing in your loop, so your loop is taking 0 milliseconds, and that calculation would give you an infinite amount of frames so it's giving you an error. You need to actually put something in your loop, like a "WAIT 1".