From 3759ce86b59b6a140a0030959bbebcf8809b2589 Mon Sep 17 00:00:00 2001 From: Greg Bowne Date: Sat, 31 Aug 2024 17:21:12 -0700 Subject: [PATCH] removing unecessary boot assembly files --- boot4.asm => boot.asm | 0 boot1.asm | 19 ----------- boot2.asm | 63 ---------------------------------- boot3.asm | 78 ------------------------------------------- 4 files changed, 160 deletions(-) rename boot4.asm => boot.asm (100%) delete mode 100644 boot1.asm delete mode 100644 boot2.asm delete mode 100644 boot3.asm diff --git a/boot4.asm b/boot.asm similarity index 100% rename from boot4.asm rename to boot.asm diff --git a/boot1.asm b/boot1.asm deleted file mode 100644 index ac395f7..0000000 --- a/boot1.asm +++ /dev/null @@ -1,19 +0,0 @@ -bits 16 -org 0x7c00 - -boot: - mov si,hello - mov ah, 0x0e -.loop: - lodsb - or al,al - jz halt - int 0x10 - jmp .loop -halt: - cli - hlt -hello: db "Hello world!",0 - -times 510 - ($-$$) db 0 -dw 0xaa55 diff --git a/boot2.asm b/boot2.asm deleted file mode 100644 index 0581bb6..0000000 --- a/boot2.asm +++ /dev/null @@ -1,63 +0,0 @@ -bits 16 -org 0x7c00 - -boot: - mov ax, 0x2401 - int 0x15 - mov ax, 0x3 - int 0x10 - cli - lgdt [gdt_pointer] - mov eax, cr0 - or eax,0x1 - mov cr0, eax - jmp CODE_SEG:boot2 -gdt_start: - dq 0x0 -gdt_code: - dw 0xFFFF - dw 0x0 - db 0x0 - db 10011010b - db 11001111b - db 0x0 -gdt_data: - dw 0xFFFF - dw 0x0 - db 0x0 - db 10010010b - db 11001111b - db 0x0 -gdt_end: -gdt_pointer: - dw gdt_end - gdt_start - dd gdt_start - -CODE_SEG equ gdt_code - gdt_start -DATA_SEG equ gdt_data - gdt_start - -bits 32 -boot2: - mov ax, DATA_SEG - mov ds, ax - mov es, ax - mov fs, ax - mov gs, ax - mov ss, ax - mov esi,hello - mov ebx,0xb8000 -.loop: - lodsb - or al,al - jz halt - or eax,0x0100 - mov word [ebx], ax - add ebx,2 - jmp .loop -halt: - cli - hlt -hello: db "Hello world!",0 - -times 510 - ($-$$) db 0 -dw 0xaa55 diff --git a/boot3.asm b/boot3.asm deleted file mode 100644 index 13a7d89..0000000 --- a/boot3.asm +++ /dev/null @@ -1,78 +0,0 @@ -bits 16 -org 0x7c00 - -boot: - mov ax, 0x2401 - int 0x15 - - mov ax, 0x3 - int 0x10 - - mov [disk],dl - - mov ah, 0x2 ;read sectors - mov al, 1 ;sectors to read - mov ch, 0 ;cylinder idx - mov dh, 0 ;head idx - mov cl, 2 ;sector idx - mov dl, [disk] ;disk idx - mov bx, copy_target;target pointer - int 0x13 - cli - lgdt [gdt_pointer] - mov eax, cr0 - or eax,0x1 - mov cr0, eax - mov ax, DATA_SEG - mov ds, ax - mov es, ax - mov fs, ax - mov gs, ax - mov ss, ax - jmp CODE_SEG:boot2 -gdt_start: - dq 0x0 -gdt_code: - dw 0xFFFF - dw 0x0 - db 0x0 - db 10011010b - db 11001111b - db 0x0 -gdt_data: - dw 0xFFFF - dw 0x0 - db 0x0 - db 10010010b - db 11001111b - db 0x0 -gdt_end: -gdt_pointer: - dw gdt_end - gdt_start - dd gdt_start -disk: - db 0x0 -CODE_SEG equ gdt_code - gdt_start -DATA_SEG equ gdt_data - gdt_start - -times 510 - ($-$$) db 0 -dw 0xaa55 -copy_target: -bits 32 - hello: db "Hello more than 512 bytes world!!",0 -boot2: - mov esi,hello - mov ebx,0xb8000 -.loop: - lodsb - or al,al - jz halt - or eax,0x0F00 - mov word [ebx], ax - add ebx,2 - jmp .loop -halt: - cli - hlt - -times 1024 - ($-$$) db 0 \ No newline at end of file