Re: maybe a bit OT: EEPROMs and PCs
- From: Jure Sah <jure.sah@xxxxxxxxxxxxxx>
- Date: Fri, 12 Aug 2005 15:31:31 +0200
wolfgang kern 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.
Ahh, okay. I supposed I will need to make sure I know where every opcode is in the binary (right offsets).
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.
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.
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.
| 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.
Ahh... hmm so if 0100h is rearanged, which of the jumps will work fine?
| > 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.
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).
I'll use FASM now. I get most things, just what are the things in square brackets? Offsets?
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.)
| 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.
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?
| 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.
Yes, I expect to be able to stick out of the excessively complicated stuff, just to be on the safe side.
| 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).
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.
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.
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?
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.
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?
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.
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.
But anyhow, with NIC boot-ROM... what is the starting address there? 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.
Thanks again for the info! ^.^
-- Model: INFJ Primary function: Coprocessor Secondary function: Cluster commander
Yes I'm a therian: http://www.wikitherian.org
Creationism & Darwin: "The bible says humans were supposed to use animals to do work for them and I like to work so I must be an animal!" .
- Follow-Ups:
- Re: NBASM (was: maybe a bit OT: EEPROMs and PCs)
- From: Benjamin David Lunt
- Re: maybe a bit OT: EEPROMs and PCs
- From: wolfgang kern
- Re: maybe a bit OT: EEPROMs and PCs
- From: Frank Kotler
- Re: NBASM (was: maybe a bit OT: EEPROMs and PCs)
- 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
- maybe a bit OT: EEPROMs and PCs
- Prev by Date: Re: Go to CLAX and enjoy the difference
- Next by Date: Re: general question on opcodes
- Previous by thread: Re: maybe a bit OT: EEPROMs and PCs
- Next by thread: Re: maybe a bit OT: EEPROMs and PCs
- Index(es):
Relevant Pages
|