English Amiga Board


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

 
 
Thread Tools
Old 09 March 2016, 21:53   #1
Yulquen74
Registered User
 
Join Date: May 2013
Location: Kleppe / Norway
Posts: 253
proper reset code

What would be the proper reset code in assembler?

Would you need different code for different ROM flavours (3.1, 1.3..)?

Does interrupts need to be enabled when running reset code?
Yulquen74 is offline  
Old 09 March 2016, 22:12   #2
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,160
run in supervisor mode:

move.w #$2700,SR
lea 2.W,A0
RESET
jmp (a0)
jotd is offline  
Old 09 March 2016, 22:31   #3
Cylon
Registered User
 
Join Date: Oct 2014
Location: Europe
Posts: 470
For Kickstart 2.x and higher you can use ColdReboot_().
Cylon is offline  
Old 10 March 2016, 11:46   #4
NorthWay
Registered User
 
Join Date: May 2013
Location: Grimstad / Norway
Posts: 839
There is an official C= sanctioned routine for doing reset.
It looks pretty much what you saw above, but it has alignments to make sure the reset and jump share the same longword instruction prefetch.
NorthWay is offline  
Old 10 March 2016, 12:58   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Prefetch requiring long word alignment is not true. No 680x0 CPU needs it.
Toni Wilen is offline  
Old 10 March 2016, 14:08   #6
NorthWay
Registered User
 
Join Date: May 2013
Location: Grimstad / Norway
Posts: 839
Maybe, but that is what C= put in the comments.
I'm pretty sure you can find it printed in an old issue of Amiga Transactor in addition to probably manymany places on the net.
NorthWay is offline  
Old 10 March 2016, 14:20   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
I know, everyone thought it was required.

It is not, I don't support incorrect technical information or myths. Even if it was documented
Toni Wilen is offline  
Old 10 March 2016, 18:17   #8
Yulquen74
Registered User
 
Join Date: May 2013
Location: Kleppe / Norway
Posts: 253
thanks!

does the first line in the example code above enter supervisor mode?
Yulquen74 is offline  
Old 10 March 2016, 21:12   #9
Yulquen74
Registered User
 
Join Date: May 2013
Location: Kleppe / Norway
Posts: 253
Ok, the program above gives a guru 80000008 after the first line, and I've read its because I'm in user mode and trying to set the S bit gives an exeption that gurus.

I've read that the only way to go from user mode to supervisor mode is by the means of an exeption. So how can I get a working software reset?
Yulquen74 is offline  
Old 10 March 2016, 22:02   #10
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,333
To enter supervisor mode you can call Supervisor() or SuperState().
mark_k 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
Proper startupcode in asm? oRBIT Coders. General 9 19 May 2010 20:16
Proper HD and WinUAE Macca support.WinUAE 54 14 August 2007 07:43
cdtv proper configuration truestep New to Emulation or Amiga scene 5 19 July 2007 15:54
CardReset reset error code 10 Smiley support.Hardware 2 13 August 2006 01:28
KICK OFF 2 v1.4e - A proper crack manicx Games images which need to be WHDified 0 07 December 2002 15:52

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 09:23.

Top

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