EASy68K  
It is currently Sat Jun 06, 2020 8:33 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject:
PostPosted: Thu Feb 03, 2005 5:59 pm 
Offline

Joined: Tue Feb 01, 2005 8:09 pm
Posts: 7
Location: LawrenceTech University, Southfield, Michigan (USA)
I'm not sure if the Line F emulator is supposed to create a stack any different from the other exceptions; if not, it's working fine in Sim68K v2.9.1 beta.

However, I'm wondering what extra information is placed on the stack after an Address Error & Bus Error exception. (Looking at the stack, I figured out that it's the offending opcode & the offending address. But there is one more word on top I couldn't decipher. )

Thanks! :wink:

_________________
Peter Csaszar


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 04, 2005 5:39 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1122
The line 1111 & line 1010 emulator create the same stack frame as any other exception.

The last word on the top of the stack during address or bus error contains the following information:

bit 4 = 0 on read, 1 on write
bit 3 = 0 on instruction, 1 not instruction
bits 2-0 match the hardware lines FC2 - FC0 on the 68000.

Code:
FC2  FC1  FC0
 0    0    0     Undefined
 0    0    1     User data
 0    1    0     User Program
 0    1    1     Undefined
 1    0    0     Undefined
 1    0    1     Supervisor data access
 1    1    0     Supervisor instruction access
 1    1    1     CPU space (such as RESET)


EASy68K always sets bit3 to 0 and bits2-0 to 110. This is not technically correct but since there is usually no way to recover from a bus error I didn't think it made much difference.

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 09, 2005 10:59 pm 
Offline

Joined: Tue Feb 01, 2005 8:09 pm
Posts: 7
Location: LawrenceTech University, Southfield, Michigan (USA)
Agreed; if there's a Bus Error, the easiest thing is to just lay down the sword & die. :)

_________________
Peter Csaszar


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 14, 2005 12:16 pm 
Offline

Joined: Wed Feb 02, 2005 6:55 pm
Posts: 1
Location: Poland - Krakow
Line F emulator create a different stack then other exeptions. PC placed on the stack contain address of coprocessor instruction (not incremented by 2), beacause we don't know how long is instruction. User's FPU-CPU protocol must change this PC to the right value.
Regards ;)


Last edited by lego on Mon Feb 14, 2005 3:09 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 14, 2005 6:20 pm 
Offline

Joined: Tue Feb 01, 2005 8:09 pm
Posts: 7
Location: LawrenceTech University, Southfield, Michigan (USA)
This makes sense. But does the Line A emulator still put PC+2 on the stack? According to the textbook I'm using (Antonakos) it does, and it also points out that Line F is used for coprocessor emulation, but it conveniently flies over the question of what PC-value is put on the stack. ("A technique similar to that used in [the A-line example] may be applied to the F-line exception.") :?

One learns something every day... :wink:

_________________
Peter Csaszar


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 14, 2005 6:28 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1122
Hmm, good question.

According to the Motorola 68000 user's manual:

"The current program counter and copy of the status register are saved on the supervisor stack, with the saved value of the program counter being the address of the illegal instruction."

This is apparently true for all illegal instruction exceptions.

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 07, 2005 10:23 pm 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
profkelly wrote:
This is apparently true for all illegal instruction exceptions.

Certainly is true for them on the 68008.

Lee.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 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