Re: maybe a bit OT: EEPROMs and PCs
- From: "wolfgang kern" <nowhere@xxxxxxxxxxx>
- Date: Sat, 13 Aug 2005 00:44:50 +0200
Jure Sah wrote:
[bare metal]
| Ahh, okay. I supposed I will need to make sure I know where every opcode
| is in the binary (right offsets).
Exact.
[EPROM/FlashRam]
| Well the problem here is that I have these computers, that use EEPROM
| BIOS chips. Considering what you just told me about pins, I gather I
| can't just replace them with another chip type.
I don't know by heart yet, but I'm confident for there were a few offers
on pin-compatible FlashRam replacements for some of the 27hc.. ROM-family.
| > Good EPROM burners(>500U$) got the ability to read/detect the EPROM-type,
| > but cheap EPROM clones may/can not report a correct Vendor-ID.
| Well, what is the problem in this? I know what the chips are, there is a
| label on them and according to what you've told me there's just these I
| can use.
Be aware of not mixing up programming algorithm.
On request (by raising the one pin to 12V) an EPROM reports a Vendor-ID
(which implies the needed programming algo and capabilities,
ie: pgm-voltage, pulse duration, fast-verify).
| > No, after reset: at 0100h will not be what you expect.
| Ahh... hmm so if 0100h is rearanged, which of the jumps will work fine?
As Frank already said, all relative call/jump wont be affected, but your
compiler may assign code relative variables to a wrong address then.
For all ROM code I'd use
ORG: F0000
and have all data code-relative (DS=CS)
[NewBasicASM]
| NewBasic is an Assembler as is really, no high level components short of
| the EQU 'opcode' it's even far more primitive than FASM, which is why I
| liked it (produces tiny tiny files and is quite straightforward).
Seems I need to look at it ;)
| I'll use FASM now. I get most things, just what are the things in square
| brackets? Offsets?
FASM/NASM/MASM/TASM and also ZILOG,KESYS and more use square brackets
to indicate a memory operand.
The things inbetween these brackets are the memory address.
| > Yes it's easy to destroy an EPROM (fastest way is upside down inserting).
| > As above, check EPROM-type before you apply programming power to the
| > pins.
| Ahh... gosh. (I hate the tech world for these kinds of tricks, sometimes
| "you'll screw up for missplacing a byte" and "you'll screw up for
| sticking muffins in your CD drive" are considered to be quite simmilarly
| common in all comunities.)
:) yes.
[ IRQ, EXC and INT ]
| Ahh, yes sorry. I meant INTs. So if I call INT 10h as one of the first
| things of a BIOS I will be able to display things on the screen it will
| already point to VBIOS or are there catches?
Not by itself :)
The very first job of the BIOS is to detect and check existing RAM.
Then it need to setup and create one whole IDT (real-mode at 0:0),
it must have exception- and IRQ handlers (even just in a native form)
and then the BIOS can search/find the presence of a display-ROM and
put the here found INT10 entry-point into the IDT
(the VBIOS may do this on its own if initialised as bootable device).
[]
| Yes, I expect to be able to stick out of the excessively complicated
| stuff, just to be on the safe side.
Good, or even better ;)
| > Some of 'these bits' may be vital hardware initial sequences,
| > and even you may not use all hardware on your board, at least you should
| > disable the unused (I'd keep the BIOS-setup routine for all this).
| Well in this particular case, the BIOS-setup program is a text-based B&W
| user interface to putting 1s and 0s in the 24 CMOS bits (litterately)
| and an elaborate animated diagnostics program that can test keyboard,
| memory, cpu, fpu, LTP printer and graphics when instructed to. I've no
| idea if there even is any POST. It's an XT computer some five years
| older than myself.
I see, you work for a museum :)
Many years passed ...
IIRC there once were an IBM-XT hardware standard defined.
[Disassembling BIOS]
| Since I don't have enough schooly education of programming yet, I fail
| to understand why most people fear things such as pointers and stacks so
| greately. So a memory area is being used instead of pushes and pops,
| where is the problem?
Not a problem and no fear, just:
the BIOS cannot setup any stack until an existing and checked memory
range can be assigned for the stack.
So ROM-code which doesn't have any memory available cannot use
push/pop nor call/ret and need to be 'tricky' here, and this tricks
make most disassemblers big headache.
[RAM]
| The computer has RAM built-in onto the motherboard... not using it would
| be somewhat impractical. But, speaking of RAM one thing I need to ask:
| Without the presence of a technology such as ROM shadowing or caching,
| does the code actually execute from address space that actually means
| the EEPROM chip itself? How does all of this (shadowing, caching and
| neither) appear from the ASM programmer's perspective?
Regardless of enabled 'shadows', the BIOS ROMs got their physical
locations in memory and remain there.
main BIOS: f000:xxxx
BIOS extensions: e000:xxxx
VBIOS: c800:xxxx
ROM-shadowing just perform:
map a physical RAM-area to the same address as the ROM.
copy the ROM to the RAM (actually to itself)
then disable the ROM-cs (the Chip-Select pin)
finally make this memory range write protected (or not).
the reason for doing it is access speed only, ROM are awful slow.
Shadows and caching are just speed-up thingies and wont affect
the address of the parts.
Only paging can make the story somehow weird and confusing here.
[boot ROM]
| Yes that certiantly is a good idea, even tho I wanted to do some playing
| around with the system BIOS just to be 1337er than thou and cut the boot
| up time to the extreemes and take everything standard off of a PC to
| make it look like a purpose built device such as say a telephone or a
| radio.
May be good for learning purpose...
I can buy a top featured phone-set including a radio for less than U$10 :)
| But anyhow, with NIC boot-ROM... what is the starting address there?
I still owe a few old ISA-net cards with jumpers on it to select
the ROM-base address. Newer ones got software setup fot this.
| Every single NIC I have has a slot for a ROM chip but I never saw the
| documentation provided provide anything about how to have one of those
| burned.
This ROM-BOOT-options have to follow the same rules as all BOOT-devices
with the '55aa' sign and a header and some initialising code..
The VBIOS is a good example of a ROM-BOOT-device.
__
wolfgang
.
- References:
- maybe a bit OT: EEPROMs and PCs
- From: Jure Sah
- Re: maybe a bit OT: EEPROMs and PCs
- From: wolfgang kern
- Re: maybe a bit OT: EEPROMs and PCs
- From: Jure Sah
- Re: maybe a bit OT: EEPROMs and PCs
- From: wolfgang kern
- Re: maybe a bit OT: EEPROMs and PCs
- From: Jure Sah
- maybe a bit OT: EEPROMs and PCs
- Prev by Date: Re: Best Way to Create String Variables in Assembly
- Next by Date: Welcome to the New and Improved alt.lang.asm
- Previous by thread: Re: maybe a bit OT: EEPROMs and PCs
- Next by thread: Re: NBASM (was: maybe a bit OT: EEPROMs and PCs)
- Index(es):
Relevant Pages
|