e but it's bare metal

This commit is contained in:
Mariell 2018-12-11 18:31:25 +01:00 committed by GitHub
parent c5f1dfb3e9
commit fe905b683b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

27
e_standalone.asm Normal file
View File

@ -0,0 +1,27 @@
; Linker file:
; ENTRY(start); SECTIONS { . = 1M; .boot : { KEEP(*(.multiboot_header)) } .text : { *(.text) } }
; compile: nasm -i. -felf64 e_standalone.asm -o e
section .multiboot_header
bits 32
header_start:
dd 0xe85250d6
dd 0
dd header_end - header_start
dd 0x100000000 - (0xe85250d6 + 0 + (header_end - header_start))
dw 0
dw 0
dd 8
header_end:
global start
section .text
bits 32
start:
mov ecx, 0
loop:
mov dword [0xb8000 + (ecx * 2)], (15 << 8) | (0x00000065)
inc ecx
cmp ecx, 2000
jne loop
hlt