0

From book: After power-on, the CPU load the BIOS, build the interrupt vector table, and start interrupt service routines in real address mode. By BIOS, the CPU receives INT 0x19. The ISR of INT 0x19 loads the first sector (512B) into the memory. This sector is the boot part of Linux which loads other parts of the OS into the memory.

The first sector is bootsect.s, which is written in assembly. It is the first system code that is loaded into the memory. I doubt whether assembly instructions are loaded or compiled machine instructions are loaded into memory. Does BIOS have a native assembler to convert assembly to machine instructions?

manav m-n
  • 11,136
  • 23
  • 74
  • 97

2 Answers2

1

Of course, the loaded sector contains compiled machine language instructions - not assembly source (.asm).

i486
  • 6,491
  • 4
  • 24
  • 41
  • Then I would not be able to load a binary compiled for `x86` on `arm`. Does BIOS provide any platform independent booting support? – manav m-n Dec 18 '14 at 09:49
  • 1
    No. Why you expect anything "platform independent" in BIOS? It is the most basic level, fully dependent to hardware, etc. – i486 Dec 18 '14 at 10:09
  • Manav: INT is a x86 instruction, and so is most of the BIOS. The BIOS concept is PC/x86 (16-bit with 32-bit and 64-bit iterations) only. – Marco van de Voort Dec 18 '14 at 11:38
  • @MarcovandeVoort: so `arm` based systems don't need `BIOS` to boot? – manav m-n Dec 18 '14 at 11:56
  • ARM based systems have their own BIOS. But you expect to have cross-platform boot sectors, etc. The most "universal" and crossplatform thing is a pack of versions for each platform... You cannot boot x86-specific version of Linux on ARM and for that reason there is no need from multiplatform boot sector. – i486 Dec 18 '14 at 11:59
  • They have their own startup firmware, but it is not a BIOS in the DOS sense. Usually it is some Open Firmware, Forth based customization. – Marco van de Voort Dec 19 '14 at 11:54
0

NO. It's binary instruction codes that are loaded to memory and then executed directly.

Martin James
  • 24,453
  • 3
  • 36
  • 60
  • Does Linux, Windows, Mac and other OSes also provide the binary instructions directly? I think since its boot code it should be platform independent and be converted to the CPU binary format on the fly. – manav m-n Dec 18 '14 at 09:47