Access BIOS-ROM in Assembly language (NASM)

2.2k views Asked by At

I am developing an experimental OS in Assembly language for educational purposes. Is it possible to read from the BIOS read-only memory and store it in any way, are there any interrupts for this? Is it protected?

1

There are 1 answers

2
SergeyLebedev On BEST ANSWER

Yes, it is possible to read ROM BIOS content - when your code is not under some protected mode OS like Linux or Windows - for example, when you are in the boot mode. At that time ROM BIOS content is in the memory at 0x000F0000 address - take a look at IBM PC system architecture memory map. So you can copy everything you need right from memory.

The next question is - how to save the data. You can save data to disk using BIOS int 13h low-level disk access functions. However, it is not very convenient as those functions are VERY low-level and work at disk data access level, not at file access level. So in order to write data to file you should write your own file working routines.

If you need ROM BIOS content only for study, you can use BIOS dump utilities - there are a lot of them.