A
A
Artem2021-05-07 16:20:11
assembler
Artem, 2021-05-07 16:20:11

What could be the problem of the inoperability of the program (fasm)?

There is a code:
boot.asm:

use16
org 7c00h
start:
        cli
        cld
        mov ax, 0
        mov ds, ax
        mov ss, ax
        mov es, ax

        mov sp, start

        mov [disk_load], dl
        sti

        mov si,message
        call writemess
func_load:
        mov dl, [disk_load]
        mov bx,8000h
        mov dh,0
        mov ch, 0
        mov cl,2
        mov al,1
        int 13h

        jmp 0000:8000h
writemess:
        mov ah,0eh
puts_loop:
        lodsb
        test al,al
        jz puts_loop_exit
        int 10h
        jmp puts_loop
puts_loop_exit:
        ret

        disk_load db 0
        message db 'Boot loaded.'

core.asm:
use16
org 8000h
start:
        mov al,00h
        mov ah,05h
        int 10h

        mov ah,00h
        mov al,03h
        int 10h

        mov si,ready
        call writemess
main:
        jmp $
writemess:
        mov ah,0eh
puts_loop:
        lodsb
        test al,al
        jz puts_loop_exit
        int 10h
        jmp puts_loop
puts_loop_exit:
        ret

        ready db 'Core ready'

In fact, the code is simple, but perhaps due to my inexperience, I could make a mistake that was invisible to me. Both files were compiled and put into the correct sectors of the bootable media by the dmde program. After launch, the inscription displayed by the primary loader is displayed, but the matter does not go further to clearing the screen.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question