What is faster ? Clear or Load ?

Topics relating to the 68000 CPU in general, not a specific platform.
Post Reply
User avatar
madaxe
Posts: 16
Joined: Mon Apr 27, 2020 4:59 pm

What is faster ? Clear or Load ?

Post by madaxe » Wed Mar 26, 2025 2:43 pm

Hi there;

What is faster?

clr.l d0 or move.l #$00000000,d0

User avatar
madaxe
Posts: 16
Joined: Mon Apr 27, 2020 4:59 pm

Re: What is faster ? Clear or Load ?

Post by madaxe » Sat Mar 29, 2025 9:42 am

Well, after some digging I found out that:

move.l #$00000000,d0 takes 4 cycles
clr.l d0 takes 6 cycles

User avatar
akuyou
Posts: 570
Joined: Mon Apr 22, 2019 3:19 am
Contact:

Re: What is faster ? Clear or Load ?

Post by akuyou » Sat Apr 05, 2025 11:01 am

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
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter! // 「チビ悪魔」可笑しいゴシックSTG ! // Work in Progress: ChibiAliens

Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809

User avatar
madaxe
Posts: 16
Joined: Mon Apr 27, 2020 4:59 pm

Re: What is faster ? Clear or Load ?

Post by madaxe » Thu Apr 10, 2025 9:17 am

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)

Post Reply

Return to “General 68000 Assembly”