Содержание
- 2. Где загрузчик распологается в памяти: По адресу 7C00h Int 10h: Это прерывание BIOSа для управлением экраном.
- 3. Установка загрузчика 1. Сохранить загрузчик как boot.asm 2. Откомпилировать: nasm boot.asm 3. Убедиться что длина 512
- 4. Создание загрузчика. 1 попытка Hanging Bootloader Этот загрузчик ничего не делает просто распределяет память и виснет.
- 5. Вторая попытка:Print a character Bootloader INT 0x10 это BIOS прерывание экрана. AL = ASCII ;значение символа
- 6. [BITS 16] ;Tells the assembler that its a 16 bit code [ORG 0x7C00];Origin,tell the assembler that
- 7. [BITS 16] ; 16 bit code generation [ORG 0x7C00] ; ORGin location is 7C00 ;Main program
- 8. jmp $ ; Put it into a coninuous loop to stop it running off into ;
- 9. Hello World! -загрузчик [BITS 16] ; 16 bit code generation [ORG 0x7C00] ; Origin location ;
- 10. ; Procedures PutStr: ; Procedure label/start ; Set up the registers for the interrupt call mov
- 11. .nextchar ; Internal label (needed to loop round for the next character) lodsb ; I think
- 12. ; Data HelloWorld db 'Hello World',13,10,0 ; End Matter times 510-($-$$) db 0 ; Fill the
- 13. Компилируем загрузчик в простой bin формат: (для windows: nasmw boot.asm -f bin -o boot.bin ) Для
- 14. Создаём папку iso mkdir iso Копируем в неё образ: cp floppy.img iso/ Создаём iso образ: genisoimage
- 16. Скачать презентацию