What address does it save in EEPROM ?

Thread Starter

Heroz

Joined May 29, 2022
31
I watched Ben eater's video it's about building computer based on 6502 microprocessor and I'm stuck at part3 ( Assembly language VS Machine code). He was programing 32k at28c256 EEPROM and he programmed by assembly to blink LED.

Here his code:

Screenshot_2022-12-30-19-15-03-14_f9ee0578fe1cc94de7482bd41accb329.jpg

And he uploaded code to EEPROM by Minipro TL866.

And here my question come up:
32k EEPROM is only 0000-7fff address but he programed

>.org $8000

It tell assembler that code start at address 8000 right? and I think code will save starting at 8000 but this EEPROM can't save more than 7fff address so what address it will save? In his video I understand that there are decode address when 6502 chip send address 8000 up above it will be decoded and it enable EEPROM and send address 0000 to eeprom it means that code start saving at address 0000 but when eeprom is programmed with Minipro there are not any decode address so what address it will be?

Thank you ( sorry my English is not good)
 

Thread Starter

Heroz

Joined May 29, 2022
31
He used the top bit for read/write control instead of actuall addresses
Thank you . But I wonder when he loaded program to eeprom by Minipro he define staring program at address 8000 right ? But EEPROM is only 0000-7ffff so it can't save at 8000 so how Minipro would load program?
 

Ian0

Joined Aug 7, 2020
9,674
The 6502 has a 16-bit address bus, which can address 65536 locations. At the lower end is the RAM (because the 6502 expects to see RAM between 0 and 0x100 where it can address it using only an 8 bit address. The ROM therefore can't start at 0, so it has been placed between 0x8000 and 0xFFFF by decoding the address lines, so that when A15 is high it enables the ROM
 

Thread Starter

Heroz

Joined May 29, 2022
31
Thank you . But I wonder when eeprom is loaded it only connected to Minipro ( eeprom programmer ) so how mini would load program when it can't load at 8000
 

Ian0

Joined Aug 7, 2020
9,674
The software has to be assembled as if it will be located at 0x8000, then the programmer instructed that the EEPROM should start at an offset of 0x8000. It's a common feature of programmers.
 

BobaMosfet

Joined Jul 1, 2009
2,110
The software has to be assembled as if it will be located at 0x8000, then the programmer instructed that the EEPROM should start at an offset of 0x8000. It's a common feature of programmers.
Ahhh... it's so nice to know someone else is so familiar with this little gem of a processor.

I loved the 6502. I actually contacted Motorola at the time and they sent me their processor handbooks (all of them for the 6502 and adjuncts), for free because they were hoping I'd build a computer around it. To this day, their manuals are still the BEST MANUALs I've ever seen on assembly language reference for a processor. I still have my 68K family reference books from them, as well.
 

Ian0

Joined Aug 7, 2020
9,674
Ahhh... it's so nice to know someone else is so familiar with this little gem of a processor.

I loved the 6502. I actually contacted Motorola at the time and they sent me their processor handbooks (all of them for the 6502 and adjuncts), for free because they were hoping I'd build a computer around it. To this day, their manuals are still the BEST MANUALs I've ever seen on assembly language reference for a processor. I still have my 68K family reference books from them, as well.
Did Motorola ever make a 6502? I thought it was MOS Technology and Rockwell. I learned 6502 Assembly language on the BBC Micro. "6502 Software Design" by Leo Scanlon was my 5th Form school prize.

Without the 6502 there would be no ARM.
 
Top