EASy68K  
It is currently Fri Dec 13, 2019 5:00 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Wed Dec 07, 2005 7:35 am 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
When Sim 68K encounters a bus or address error it pushes the address of the instruction that caused that error. A real 68000 is a little different. From MC68000UM.pdf ..

"[b]The value saved for the program counter is advanced 2


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 12, 2005 2:02 am 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1109
Does it really matter? I don't think a bus or address error is the type of thing you should try to continue from. Better to restart from the beginning, yes/no. :error:

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 12, 2005 3:20 am 
Offline

Joined: Mon Apr 11, 2005 12:57 am
Posts: 28
Location: Australia
It does matter to some degree as the 68000 is designed with the address/bus error vectors so that it can recover from miner errors. I would like to see the simulator behave just like the real proccessors. That way we get validated software results.

P.S. I still think that Easy68K is the best software around for developing 68K software with. Keep up the great work. :D


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 12, 2005 4:38 am 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
Quote:
Does it really matter?

It does if you're trying to write exception code. 8^)=

Ok, if it's not a bug can you document it and put it on the wish list?

Lee.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 12, 2005 1:17 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1109
From "68000 Family Assembly Language" by: Alan Clements: "The information stored on the stacck by a bus error exception (or an address error) is to be regarded as diagnostic information only, and should not be used to institute a return from exception"

Bus Error is an external input to the 68000 processor. As such, it may result in different stack frames on different systems. If you write code to attempt to do an RTE from a bus error that code will only be valid for the hardware system it was designed for.

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 12, 2005 2:28 pm 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
Quote:
If you write code to attempt to do an RTE from a bus error that code will only be valid for the hardware system it was designed for.

Not 100% true. On top of the usual program counter and status word is four words of additional information, this is the same across the 680x0 family. Different is the data stacked before the program counter which, for the 68010 and up, is the format word, processor specific, and up to 29 additional words, this is cleared from the stack by the RTE and need not be handled by the exception code. The 68000 of course does not use a format word or stack any extra words before the program counter.

So you could write code to back up and retry, or skip the offending instruction, that would work on all the 680x0 family.

Lee.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 12, 2005 4:33 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1109
Because Bus Error is an external input to the 68000 it is totally up to the hardware design as to when it is asserted. It may also result in other changes to hardware, such as write protecting memory, etc. I would recommend always treating Bus Error as a catastrophic event. On the industrial inspection equipment I worked on for years, we incremented a count each time a bus error occurred then used a hardware watchdog circuit to do a hard reset on the entire computer system. Each time the watchdog reset the system it also turned on a flashing beacon on the unit. This was a signal to the maintenance people to visually inspect the system and make sure everything was still working correctly.

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 12, 2005 7:31 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1109
If I do change the bus error behavior of EASy68K it will be patterned after the 68000 Educational Computer Board.

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 21, 2008 5:18 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1109
Sim68K v4.1.2 creates an exception stack frame that more closely matches the stack frame created by the Motorola Educational Computer Board (MECB).

_________________
Prof. Kelly


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group