EASy68K  
It is currently Wed Nov 22, 2017 11:02 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Dec 01, 2015 8:31 pm 
Offline

Joined: Tue Dec 01, 2015 7:49 pm
Posts: 2
Hi All,

I am trying to understand the code for an MC68336. I'm kind of new to this processor, and it's a little daunting in terms of modes and instructions, compared to the PIC's I have worked with in the past. I have a bin that I'm trying to disassemble/understand using IDApro. Here is what I understand so far:

- at reset, the first long word form the reset vector. In my case, in the BIN I see 10 00 00 80. Would this mean my reset vector, according to big endian notation, be 0x1000080?
- there is a long word after this, I think it's the stack pointer, but I'm not sure. In my case I have 00 00 EC 17.
- after these two long words, there are a bunch of interrupt vectors

Questions:
1) Are my reset vector assumptions correct? If not, based on what I wrote, where would be the first place I should go to get code that I can disassemble?

Thanks, Ivan


Top
 Profile  
 
PostPosted: Tue Dec 01, 2015 9:24 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1049
The first 32 bits is the supervisor stack pointer. The second 32 bits is the starting program counter.

_________________
Prof. Kelly


Top
 Profile  
 
PostPosted: Wed Dec 02, 2015 1:38 am 
Offline

Joined: Tue Dec 01, 2015 7:49 pm
Posts: 2
Ok, that helps a little, as I understand there are two "rights groups" for the 68k, supervisor and user, is that correct? and how would I know which mode main code boots into?

Also, is my understanding of the "endianness" of the code correct, or did I parse it incorrectly?

Thanks for any help, Ivan


Top
 Profile  
 
PostPosted: Wed Dec 02, 2015 6:24 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1049
The processor starts in Supervisor mode. The S bit in the Status Register will be 1 when in Supervisor mode.

The numbers you listed are correct.
$10000080 is the starting stack. The stack grows toward $0.
$0000EC17 is the first instruction. On a 68000 this must be an even address. I'm not sure about the MC68336.

_________________
Prof. Kelly


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

All times are UTC


Who is online

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