Processors
Intel® Processors, Tools, and Utilities
15725 Discussions

Intel 8086 instruction fetching

iWizz
Novice
2,571 Views

Recently, I've started working on a small computer project which uses i8086 as its main CPU. Everything seems to be working fine, except instruction fetching from EEPROM. It is confusing, and I may be missing something, but I've tried tonnes of combinations using my two EEPROM chips (Lower and upper byte per chip, even and odd address chips etc.). IP increments by 2, apparently due to the fact that i8086 reads instruction words (16-bit)... But, as I've said, it's pretty unpredictable. The program I wrote is located at the address FFFF0h (initial boot sequence). The instruction (which I've translated to hex using iAPX devellopment enviroment for MS DOS) looks like this:

EA 2D F0

Program execution should jump to address F02D0h. 

If there is someone old enough who knows where the problem lies or has worked with the 8086 CPU and can offer an optimal solution, I'd be very thankful!

0 Kudos
1 Solution
iWizz
Novice
2,508 Views
Ok, thanks for the help! I’ve done some testing of my own and figured out that the CPU fetches the correct instructions from EEPROMs only when one instruction stream in one EEPROM is shifted by one address compared to the other one.

Here’s an example:

EEPROM1 | EA | 00 | 00 | 2D | F0
EEPROM2 | 00 | 00 | 2D | F0 | X

EEPROM1 -> lower 8 bits of data
EEPROM2 -> higher 8 bits of data

It’s a bit weird but it works.

View solution in original post

0 Kudos
9 Replies
Alberto_Sykes
Employee
2,558 Views

iWizz, Thank you for posting in the Intel® Communities Support.


In order for us to be able to provide the most accurate assistance on this matter, we just wanted to confirm a few details:

Could you please confirm the model of the Intel® Processor that you are using? I cannot find it on our web site:

https://ark.intel.com/content/www/us/en/ark.html

Are you a developer?

What is the "small computer project" about?

Is it about hardware or software?

Please provide the SSU report so we can verify further details about the components in your platform, please check all the options in the report including the one that says "3rd party software logs"

https://downloadcenter.intel.com/download/25293/Intel-System-Support-Utility-for-Windows-?product=91600


Any questions, please let me know.


Regards,

Albert R.


Intel Customer Support Technician

A Contingent Worker at Intel


0 Kudos
iWizz
Novice
2,554 Views
Hi Albert,

I’m using an Intel 8086 microprocessor which was designed in the late 1970s and is discontinued unfortunately. I’ve contacted Intel support a couple of weeks ago regarding a similar matter and they’ve told me the best course of action is to ask the community here. I’m working on a personal project of mine (you could call it a hobby). What I’m doing is assembling a computer from microchips (it’s currently on breadboards but soon enough I’ll create an appropriate printed board).

Best regards,

Vito Tomas
0 Kudos
n_scott_pearson
Super User
2,543 Views

Hhmmm, from what I remember, the EA opcode is for an absolute far jump. That is, to jump to F02D0h, you need to code EA 00 00 2D F0.

...S

0 Kudos
iWizz
Novice
2,531 Views
Hi Scott,

Thanks for the answer. There’s only one more detail that needs to be addressed. I have two EEPROMs, both with 8-bit data lengths. Should my memory table look like this?

Address|EEPROM1|EEPROM2
——————————————
FFFF0h| EA | x
——————————————
FFFF1h| X | 00
——————————————
FFFF2h| 00 | X
——————————————
FFFF3h| X | 2D
——————————————
FFFF4h| F0 | X


X meaning that it doesn’t matter what data is on the specific address.

From what I’ve gathered even addressed locations are read form one EEPROM and odd addressed locations are read from the other one.

0 Kudos
Alberto_Sykes
Employee
2,540 Views

Hi iWizz, Thank you very much for providing that information.


We really hope the information provided by n_scott_pearson was useful and helpful for you.


Otherwise, since we are talking about an Intel® Microprocessor, the best thing to do will be to get in contact directly with Rochester Electronics for further assistance on this matter since they are the ones that support this kind of product:

https://www.rocelec.com/solutions?ads_cmpid=825195577&ads_adid=41106835423&ads_matchtype=e&ads_network=g&ads_creative=477928989106&utm_term=rochester%20electronics&ads_targetid=kwd-311993579716&utm_campaign=&utm_source=adwords&utm_medium=ppc&ttv=2&gclid=EAIaIQobChMIu86m1vDQ7QIVaiitBh0K2Q7_EAAYASAAEgJGb_D_BwE


Regards,

Albert R.


Intel Customer Support Technician

A Contingent Worker at Intel


0 Kudos
iWizz
Novice
2,529 Views
Hi Albert,

I think I’ll be able to get my questions answered here this time. Thank you very much for the support (and recommending Rochester Electronics, I’ll keep that in mind) !

VT

0 Kudos
Alberto_Sykes
Employee
2,519 Views

Hi iWizz, Thank you very much for your response.


Perfect, no problem at all, hopefully, @n_scott_pearson will be able to provide further details about this matter.


Any other inquires, do not hesitate to contact us again.


Regards,

Albert R.


Intel Customer Support Technician

A Contingent Worker at Intel


0 Kudos
n_scott_pearson
Super User
2,515 Views

Sorry, I cannot help any further. All I can say is I do not remember the code being interleaved on the EEPROMs. It might be possible to set it up this way, but that's not what I remember. Of course, we are talking almost 40 years ago...

...S

0 Kudos
iWizz
Novice
2,509 Views
Ok, thanks for the help! I’ve done some testing of my own and figured out that the CPU fetches the correct instructions from EEPROMs only when one instruction stream in one EEPROM is shifted by one address compared to the other one.

Here’s an example:

EEPROM1 | EA | 00 | 00 | 2D | F0
EEPROM2 | 00 | 00 | 2D | F0 | X

EEPROM1 -> lower 8 bits of data
EEPROM2 -> higher 8 bits of data

It’s a bit weird but it works.
0 Kudos
Reply