Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

eprom checksum

204 views
Skip to first unread message

Martijn Nykerk

unread,
Nov 2, 1992, 7:32:34 AM11/2/92
to
Hi there,

Does anybody out there now how to compute the checksum (assuming there is one)
for an EPROM. I am trying to add some hardware to a PC with its own EPROM,
but can't seem to tell DOS to install it.
I known there is a byte after the AA 55, but what does it say?

Hope someone can help me.

And if this is a FAQ, and it's in a list, could somebody point me to the list?

Thanx, Martijn.

Kawika Ohumukini

unread,
Nov 2, 1992, 6:44:27 PM11/2/92
to
In article <1992Nov02.1...@donau.et.tudelft.nl> mar...@zen.et.tudelft.nl (Martijn Nykerk) writes:
>Hi there,
>
>Does anybody out there now how to compute the checksum (assuming there is one)
>for an EPROM. I am trying to add some hardware to a PC with its own EPROM,
>but can't seem to tell DOS to install it.
>I known there is a byte after the AA 55, but what does it say?

The 3rd byte is the "Number of 512 byte blocks of the EPROM".
So if your EPROM is 16K (27128) then the 3rd byte should be "20H".

This is from memory I will check this when I get home tonight and
reply if it is different tomorrow. Good luck!

Kawika

Kawika Ohumukini

unread,
Nov 2, 1992, 6:34:05 PM11/2/92
to
In article <1992Nov02.1...@donau.et.tudelft.nl> mar...@zen.et.tudelft.nl (Martijn Nykerk) writes:
>Hi there,
>
>Does anybody out there now how to compute the checksum (assuming there is one)
>for an EPROM. I am trying to add some hardware to a PC with its own EPROM,
>but can't seem to tell DOS to install it.
>I known there is a byte after the AA 55, but what does it say?

The 3rd byte is the "Number of 512 byte blocks of the EPROM".
So if your EPROM is 16K (27128) then the 3rd byte should be "08H".

Harald Ljoen FBA

unread,
Nov 3, 1992, 4:42:18 AM11/3/92
to
In article <1992Nov02.1...@donau.et.tudelft.nl>, mar...@zen.et.tudelft.nl (Martijn Nykerk) writes:
>Hi there,
>
>Does anybody out there now how to compute the checksum (assuming there is one)
>for an EPROM. I am trying to add some hardware to a PC with its own EPROM,
>but can't seem to tell DOS to install it.
>I known there is a byte after the AA 55, but what does it say?

offset 0: 0x55
offset 1: 0xaa
offset 2: length (number of bytes in ROM) in mnbr of 512 byte blocks
offset 3: initialization code entered with a CALL FAR instruction

--
** Also sprach harald...@nta.no **

Harald Ljoen FBA

unread,
Nov 3, 1992, 4:59:46 AM11/3/92
to

Oh, the checksum...

The motherboard BIOS computes the sum of all the bytes in the ROM. The least
significant 8 bits in the sum must be all zeros (i e sum modulo 256 == 0).

Jeremy Laidman

unread,
Nov 4, 1992, 1:18:58 AM11/4/92
to
h...@hal.nta.no (Harald Ljoen FBA) writes:

The above is correct. The checksum is is actually zero. What you do is alter
some unused bytes (typically the last byte) so that the checksum calculation
gives you zero. The algorithm (from memory) is: get a word, add next word,
ignore carry, ... until no mor words.

I've written a program in TP6 that loads a memory dump file and calculates the
checksum for you. If the checksum is not zero, it gives you the option of
altering the last byte to make it zero. It works with standard 8k eproms, but
hasn't been tested on anything else.

If anyone wants a copy (source or exe) let me know.

---------------------------------------------------------------------
Jeremy Laidman, Computer Support Officer
Department of Computer Science Phone: (61 9) 370 6648
Edith Cowan University Fax: (61 9) 370 2910
Perth, Western Australia j.la...@cowan.edu.au
---------------------------------------------------------------------

Jeremy Laidman

unread,
Nov 4, 1992, 5:28:02 AM11/4/92
to
j.la...@cowan.edu.au (Jeremy Laidman) writes:

>h...@hal.nta.no (Harald Ljoen FBA) writes:

>>In article <1992Nov02.1...@donau.et.tudelft.nl>, mar...@zen.et.tudelft.nl (Martijn Nykerk) writes:
>>>Hi there,
>>>
>>>Does anybody out there now how to compute the checksum (assuming there is one)
>>>for an EPROM. I am trying to add some hardware to a PC with its own EPROM,
>>>but can't seem to tell DOS to install it.
>>>I known there is a byte after the AA 55, but what does it say?

>>offset 0: 0x55
>>offset 1: 0xaa
>>offset 2: length (number of bytes in ROM) in mnbr of 512 byte blocks
>>offset 3: initialization code entered with a CALL FAR instruction

>>--
>>** Also sprach harald...@nta.no **

>The above is correct. The checksum is is actually zero. What you do is alter
>some unused bytes (typically the last byte) so that the checksum calculation
>gives you zero. The algorithm (from memory) is: get a word, add next word,
>ignore carry, ... until no mor words.

Sorry, I was wrong. It isn't a word, it's a byte.

gordon hlavenka

unread,
Nov 3, 1992, 10:35:58 PM11/3/92
to

mar...@zen.et.tudelft.nl (Martijn Nykerk) writes:
>Does anybody out there now how to compute the checksum (assuming there is one)
>for an EPROM. I am trying to add some hardware to a PC with its own EPROM,
>but can't seem to tell DOS to install it.
>I known there is a byte after the AA 55, but what does it say?

The "BIOS Extension Signature" is 55 AA nn where nn is the length of
the extension. I think the unit used is 128-byte chunks, but I'm not
sure. Anyway, the arithmetic sum (mod 256) of all bytes in the
extension must be zero.

How it is adjusted doesn't matter; by convention the last byte in the
ROM is set to the appropriate value to adjust the checksum. You could
use any byte in the ROM -- provided that byte isn't say, code or something.

The contents of the ROM will be executed at boot time; the entry point
is at offset 3. Again by convention, this location holds a JMP
instruction to the initialization code. (The initialization code
could just as well start at offset 3, though.) The idea here is that
you get control to do any required initialization. The inialization
would, in addition to actually setting up the hardware, hook whatever
interrupt vectors were applicable so you could access your hardware
later. After initialization, return control to the BIOS with a RETF.

Your ROM _can't_ use any DOS calls during initialization, since DOS
hasn't loaded yet. And, you shouldn't use DOS calls in the ROM
elsewhere either, since that would really bug someone trying to write
a NextStep driver for your hardware. (or whatever :-)

There may be some errors / omissions in the above, but it's certainly
close enough to get you started.

--
----------------------------------------------------
Gordon S. Hlavenka cgo...@vpnet.chi.il.us
"A political plug formerly appeared here."

0 new messages