Re: maybe a bit OT: EEPROMs and PCs




Jure Sah wrote:

| What exactly does "bare-metal ASM" mean? Plain any ASM or some special
| ASM considered "bare-metal"?

I use the term 'bare metal' for a programming style:
no libraries, no macros and all 'automated' compiler functions disabled.

| > There may be some old EPROM-burners available on Ebay (spell: Ipay).

| I see... but what exactly am I looking for? "EPROM burner" as quoted or
| is there any other particular way this industry calls the simplest
| devices capable of recording binaries to EEPROMs? I came across "EPROM
| eraser" that was evidently capable of burning binaries while looking.

The 'eraser' is just an egg-clock controlled UV-light source :)
used to send hard UV into the little glass-window on top of the EPROM.

EPROM's are already out from the field and are hard to find in shops now,
Flash-ROMs replaced it and they don't need 'power' to program.

But if you really need to 'burn' ye olde EPROMS, be aware of the many
different brands with individual programming needs.
Even members of the same family may use different program-pins.

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.

| > after power-up/reset the CPU is fed with the BIOS-code :)
| > start point is a 16-bit far jump at FFFF:0000 (=F000:FFF0)

| Ahh, so would it be wise to set the starting address for the entire
| program at that offset (org), or just convince my assembler to put a
| jump back to the usual COM starting offset (100h) at that exact position?

No, after reset: at 0100h will not be what you expect.


| > | Can I use a normal assembler to make the binaries I can burn directly?
| >
| > What would you consider as normal ?
| > Every assembler which can create mixed binary code (16/32 bit)
| > and allow ORG up to FFFF:0000/0fffffff0 can be used.
| > So even I got my own tools (HEX_WORK85/KESYS/PAL-PROM-burner)
| > I see FASM, NASM, and for 16 bit only ye olde TASM and the original
| > MASM as opportunities.
|
| Well I use NewBasic Assembler (the diffirences between them aren't That
| Big, I easily could use another, but I chose that one). Will that one be
| suitable?

I don't know NewBasic Assembler,
I'm afraid you talk about Inline-ASM here, which is absolutely not
recommendable for BIOS,BOOT or SYSTEM code, as you never can be sure
about the final code output.


| Well I heard before that if you missprogram an EEPROM it may become
| unerasable or generally useless. EEPROMs aren't that expensive, but then
| again, I don't want to break every single one I get. What is the thing I
| must not do? What's the trick?

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.

| Also, I was meaning to ask: In usual PC ASM programming I used that IRQ
| refference provided by Ralf Brown. How do I know which of those calls
| are actually provided by the non-BIOS PC components? Is everything
| sensible like: if an IRQ belongs to VIDEO aka VGA, then I can freely
| call that IRQ in the BIOS code itself? etc?

IRQ, EXC and INT .. these are all separate stories.
IRQs come from hardware only.
EXC are produced by CPU/FPU (also just hardware) only.
INTs are the one you probably mean here, this are just short-cut
(but delayed) calls to BIOS- or system-services.

ie: INT10h is part of the VBIOS on the graphic card,
while INT13h is found in the MAIN BIOS on the mother-board.
And IRQ0 becomes active on hardware-timer ticks only.
But don't expect any 'standard' for APIC or APCI functions in the BIOS.

| > You wont find any documented BIOS standard, ..

| Yes dissasembly should do. Nontheless even if there aren't any
| particular standards, some of the hardware is simmilar anyhow. For
| example very many modern network cards use the same chip and I expect
| something simmilar with RS232 ports. Anyhow I do have two identical old
| computers I intend to work with.

Yes there are only a few variants of RS232 chips, but all seem to act on
standard features in the same way.
Same for KEYBD,LPT,PIT/speaker,RTCL and particular VGA-cards (mode 03).
Worst case are for sure DMA-chips, there are many different around.

| RBIL = Ralph Brown's Interrupt List?

YES.

| > Not that complex if you think about small changes only.
| > I just modified my existing BIOS-ROMs with a few add-ons and kept the
| > rest as it is. There is usually plenty of unused space at E000:0000 ...

| I was intending to remove all the bits that I will not need to make room
| for any programming I wish to add (I will only be using NICs / RS232
| ports / graphics card / Beeper / maybe keyboard, other things such as
| any disk access or PnP might as well not be there).

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).

| By the way, what dissasembler do you recomend? Will it be safe to
| dissasemble / update / reassemble the BIOS without breaking it (provided
| that none of the modifications were harmfull)?

| I have tried multiple dissasemblers and it appears many of them
| produce output that can't really be assembled again,
| but serves more an educational purpose.
| I may just have had bad luck at picking.

This depends on the freedom left to you by your assembler only.
Most disassemblers are able to decode all instructions, but:

There seems to be no full featured disassembler available yet,
so you will have to manually figure out what's data and what's code.
A tricky story, especially in the initial BIOS-parts before a valid
stack is available.
Here many never executed, but referenced code bytes are the norm.

I hope for you, you don't think to run your PC without any RAM ?
I've seen someone abused the video-RAM as stack and storage,
without having any RAM-chips inserted,
but this became a very restricted variant of a PC then.

As I said already, I'd keep the BIOS-setup functions in the ROM,
and if you need more ROM-space for your code then you can look
if the VBIOS on the graphic card (often just 32 KB in use) can be
replaced with a larger ROM.
Some NET-cards also got free ROM-sockets, where you can put your
own BOOTable code into and don't need to touch the BIOS-ROM's at all.

__
wolfgang


.



Relevant Pages

  • Re: HLA Stdlib v2.2 is now available.
    ... Its a generalization of the whole asm community based on the results of a single man. ... You dont get it. ... Because it is an assembler, and a very good one, showing the way for other spesific assemblers. ... As they both are needed for doing programming, I see no reason to seperate them. ...
    (alt.lang.asm)
  • Re: Learning ARM assembler...
    ... low-level language. ... would probably start off with using the assembler built into BASIC ... I started out with ARM assembly language programming using Nick ... I eventually abandoned ASM in favour of Acorn's ObjAsm ...
    (comp.sys.acorn.programmer)
  • Re: Programming: Not stressful? Yeah, right...
    ... > Whoever said programming is a low stress hobby/career has obviously ... > never attempted to programm in ASM. ... I have learned Assembler for x86 systems. ... learning individual assembler instructions and their background. ...
    (comp.programming)
  • Re: ASM vs HLL : absurd war
    ... >some Inline Asm, in an HLL. ... An HLL Programmer knowing the ... >an actual Assembler, like RosAsm, this is utterly false. ... >> programming, and all that comes with it. ...
    (alt.lang.asm)
  • Re: Evolution
    ... >> it different from HLL programming? ... inline assembler and larger parts by linking to an assembler ... the macro is from a macro library which you have written a long ... or two instructions if you ...
    (alt.lang.asm)