Page 1 of 1
What is faster ? Clear or Load ?
Posted: Wed Mar 26, 2025 2:43 pm
by madaxe
Hi there;
What is faster?
clr.l d0 or move.l #$00000000,d0
Re: What is faster ? Clear or Load ?
Posted: Sat Mar 29, 2025 9:42 am
by madaxe
Well, after some digging I found out that:
move.l #$00000000,d0 takes 4 cycles
clr.l d0 takes 6 cycles
Re: What is faster ? Clear or Load ?
Posted: Sat Apr 05, 2025 11:01 am
by akuyou
Can I ask where you saw that, as it's counter intuitive to what I assumed, so I'd like to see what document you found to refer to for my own reference.
I thought the whole point of CLR commands is they don't take a parameter, which should reduce the amount of data 'Loaded' by the CPU, by definition loading a 32 bit long immediate to a register requires an Extra 4 bytes of program bytes, whereas CLR should need nothing more than the command itself. On a simple CPU like the Z80, command timing is generally calculated by the total bytes' a command takes.
The manuals I usually use for 68000 reference don't give timings (I'm sure it varies depending on 68000/20/30 etc) but I found these:
https://oldwww.nvg.ntnu.no/amiga/MC680x ... gleop.HTML
https://oldwww.nvg.ntnu.no/amiga/MC680x ... mmove.HTML
Re: What is faster ? Clear or Load ?
Posted: Thu Apr 10, 2025 9:17 am
by madaxe
Sure, beside of those two that you had indicated I also found these:
https://mrjester.hapisan.com/04_MC68/CycleTimes.htm (Mega Drive oriented)
https://nguillaumin.github.io/perihelio ... -times.txt (Atari ST oriented)