flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > OS Loader dont works |
Author |
|
revolution 26 Jan 2020, 17:21
The first thing I notice is that you don't have the AA55 signature at the end of the 512-byte boot sector.
|
|||
26 Jan 2020, 17:21 |
|
N-LG 26 Jan 2020, 22:31
this program seem to be write for an execution in Dos (the .com format) because of the org 0x100 directive
there are almost no comments, it does not make reading possible, I am lazy to find out what each call corresponds to so that I can say what is wrong |
|||
26 Jan 2020, 22:31 |
|
DimonSoft 27 Jan 2020, 13:53
Apart from other things already mentioned, you have no notion of filling CX and DH registers before reading from disk. int 13h/08h doesn’t return meaningful values for int 13h/02h and, for floppies, may not return meaningful values at all.
|
|||
27 Jan 2020, 13:53 |
|
sadosex 27 Jan 2020, 14:45
That is my full source:
Code: org 0x100 mov ax,201h mov bx,SETOR mov cx,1 mov dx,80H int 13h mov ah,8 mov dx,80H mov di,0 push es mov es,di INT 13H pop es mov ax,301h sub cl,6 mov dl,80H MOV WORD[SETOR+510],0AA55H mov bx,SETOR INT 13H LEA DI,[SETOR] MOV SI,OS_LOADER MOV CX,336 REP MOVSB mov bx,SETOR MOV WORD[SETOR+510],0AA55H mov ax,301h mov cx,1 mov dx,80H INT 13H ret OS_LOADER: cli xor ax,ax mov ds,ax mov es,ax mov ss,ax mov sp,07C00h sti Kernel: MOV AX,1300h MOV BX,30h MOV CX,10Ch MOV DX,0 PUSH CS POP ES MOV BP,7C68h INT 10h L1: IN AL,60H CMP AL,1 JNZ L1 JMP L2 Texto db "",0 ;message of 198 bytes L2: mov ah,8 mov dl,80H mov di,0 push es mov es,di INT 13H pop es sub cl,6 mov ax,0000h mov es,ax mov bx,500h mov dl,80h mov al,01h mov ah,02h int 13h jmp 0000:0500h codesize: SETOR db 512 dup (0) Now tell me why i couldn't install my boot loader in Linux and Windows? |
|||
27 Jan 2020, 14:45 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.