English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 25 December 2019, 20:28   #1
sparhawk
Registered User
 
sparhawk's Avatar
 
Join Date: Sep 2019
Location: Essen/Germany
Age: 55
Posts: 463
Is move.l atomic

When I execute something like this:


Code:
lea NewFunction, a0
move.l a0, VBIService

The VBI looks like this (not complete):
Code:
...

move.l VBIService, a0
jsr(a0)
...
rte

So can it happen, that the VBI is happening while one half of the ptr is written, so that the jsr will be corrupted? Or is the instruction atomic, so that it is either written, or the old value is still valid? I would expect that it is safe, since we are dealing only with single core here, right? Or are there any other pitfalls involved which might cause a crash with such code?
sparhawk is offline  
Old 25 December 2019, 20:43   #2
deimos
It's coming back!
 
deimos's Avatar
 
Join Date: Jul 2018
Location: comp.sys.amiga
Posts: 762
Instructions are atomic, yes. Interrupts only happen between instructions.

Plenty of other things can go wrong though.
deimos is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
non-atomic Copper waits for MrgCop? Samurai_Crow Coders. System 0 01 April 2014 20:07
Full versions of Atomic and Evasive Aksion brolly request.Old Rare Games 4 05 September 2012 02:50
Move it Move it... (68000) Gilloo Coders. Asm / Hardware 19 04 December 2011 17:36
Atomic Cabbage Amiga Page Enverex Amiga websites reviews 10 16 May 2003 02:28

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:53.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.06486 seconds with 13 queries