Some time ago, I benchmarked some 8-bit computers to find out the fastest BASIC interpreter. I ended up using the classic SAXPY benchmark, as I didn't want any I/O overhead to fool the measurement: printing on screen is slower for machines that doesn't have a real text mode and always operate in bitmap mode and it doesn't have to do with the BASIC interpreter itself. On the other hand, aritmetic routines play an important part in any BASIC program, so the benchmark does precisely that.

I'd like to add some other machines to this list, so I need to know how to measure time in frames (or equivalent resolution). For other computers, as you can see, the TIME or TIMER function is usually present in most BASIC dialects. For the Spectrum and the SAM Coupé, I already knew about the FRAMES system variable to count frames, but for others, I have to dig into technical documentation, which is not always available or easy to find/read.

Here is the current listing. NOTE: ("Tiempo en segundos" is the spanish for "Time in seconds").

The title says "Results of SAXPY benchmark applied to 80's classic computers".

enter image description here

UPDATE: thanks to Stephen Kitt answer, I can finally place the Atari XL, and it happens to be between the SAM Coupé and the ZX Spectrum.

As Stephen suggests, I will ask separate questions for finding out how to measure time for other micros.

enter image description here

  • 3
    The timing of the C64 variant is incorrect. The variable TI (TIME) counts 1/60 seconds (jiffies) - no difference on between PAL/NTSC. Only the CPU is slower on PAL systems ... it has to be written 100 PRINT "TIME IN SECONDS: ";T/60 Running on my system gives me approx. 1.3 (sometimes 1.283333) seconds. Apr 26, 2016 at 11:58
  • Isn't this about different BASIC dialects on Atari, not about the Atari-BASIC dialect?
    – wizzwizz4
    May 18, 2016 at 20:22
  • @wizzwizz4 No, but I'll explain further in response to your meta question. May 18, 2016 at 20:49
  • Sinclair QL was 16-bit wasn't it?
    – Alan B
    Dec 14, 2018 at 13:21

3 Answers 3


On the Atari 8-bit machines, you'd use the real-time clock memory locations starting at offset 18; these are updated during every vertical blank:

TIME = INT((PEEK(18) * 65536 + PEEK(19) * 256 + PEEK(20))/60)

(on an NTSC system; divide by 50 for PAL).

To measure your own time interval, the safest approach is to POKE all three values to 0 at the start of whatever you wish to measure.

See Mapping the Atari for more details and "links" to example programs.

  • 1
    This method creates a race condition. To safely read the value, first disable interrupts, or else synchronize your reads to avoid spanning a vertical blank (the C64 has the handy WAIT command to do this; I'm not sure about the Atari). To safely set the value to 0, it should be sufficient to POKE the least significant byte first.
    – Hugh Allen
    Oct 6, 2016 at 4:59
  • Also, I would ignore the value in 18. The byte in 20 is only ~4 seconds, so you need to read 19 to be safe and then you have 1100 seconds to work in. It's unlikely you'll run over 18 minutes and need to use 18. Why do I mention this? Because in Action! you just declare 20 as a CARD and the conversion is done for you. May 13, 2018 at 17:19

Here, actual screen shot with source, and proper way to reset timer and measure time... all run on 1979 Atari 800 (with Incognito board on Personality slot, enabling all available OS and Basic loads in existence, all the way up to XE/XEGS).

In reality, it is much faster than most of the samples posted here, even with Interpreter-based Basic on 8K rom-space):

Atari 800 / XE OS

Above results with Antic DMA turned OFF. If turned ON, result is 0.66 secs

  • Not quite seeing how this could be so much faster than the Atari version already posted. But the only other comparable machine with a 2 MHz 6502 is the BBC Micro, and its 0.55 s result is with system interrupts enabled
    – scruss
    May 24, 2021 at 17:24
  • 1
    The performance difference can be explained by the use of the Altirra FP performance pack, which provides floating-point routines that are substantially faster than the originals. Jun 21, 2021 at 7:57

Here a screen shot with source on an Atari XL emulated by atari800 emulator with the good old german TurboBasic 1.5 by Frank Ostrowski from 1985.

This Basic dialect supports a variable time to get the 1/50 frames on PAL or 1/60 frames on NTSC systems. To reset this variable assign the String "000000" to time$.

Turbo-Basic runs only on Ataris with at least 64kb RAM. It uses the RAM under the OS and is ~18kb big. On a normal atari system it let you use 34021bytes. This Basic was a Listing of the month on Happy-Computer journal in 1985. Full compatible to the build in Basic on XL/XE but ~5 times faster. I love it.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .