commit fa69adfc68cd70c2da1cfe064de18320210d378d Author: martin.cholewa Date: Fri Jan 30 08:59:23 2026 +0100 first example diff --git a/1/boot.asm b/1/boot.asm new file mode 100644 index 0000000..6bd094f --- /dev/null +++ b/1/boot.asm @@ -0,0 +1,41 @@ +[BITS 16] +[ORG 0x7c00] + +start: + xor ax,ax + mov ds,ax + mov es,ax + mov ss,ax + mov sp,0x7c00 + +PrintMessage: + mov ah,0x13 + mov al,1 + mov bx,0xa + xor dx,dx + mov bp,Message + mov cx,MessageLen + int 0x10 + +End: + hlt + jmp End + +Message: db "Hello" +MessageLen: equ $-Message + +times (0x1be-($-$$)) db 0 + + db 80h + db 0,2,0 + db 0f0h + db 0ffh,0ffh,0ffh + dd 1 + dd (20*16*63-1) + + times (16*3) db 0 + + db 0x55 + db 0xaa + + diff --git a/1/boot.img b/1/boot.img new file mode 100644 index 0000000..dafcae9 Binary files /dev/null and b/1/boot.img differ diff --git a/1/build.sh b/1/build.sh new file mode 100644 index 0000000..c48b333 --- /dev/null +++ b/1/build.sh @@ -0,0 +1,2 @@ +nasm -f bin -o boot.bin boot.asm +dd if=boot.bin of=boot.img bs=512 count=1 conv=notrunc \ No newline at end of file