BourakOS: My remarkable OS written in ASM ages ago!

I think it’s time to give the source code of my remarkable OS called BourakOS to the community. I developed it while I was a student in UK just for fun, ages ago. Enjoy it! :) You’ll notice that is the most stable and secure O/S in the world!!!

[BITS 16] ; Tells the compiler to make this into 16bit code generation.

[ORG 0x7C00] ; Tells the compiler where the code is going to be in memory
; after it has been loaded.

jmp start

;: Data used in the boot-loading process

welcomeMsg db 'BourakOS - Ver 0.0.1',13,13,10,0
pressKey db 'Press any key to Reboot... ',13,10,0

;: Macros and functions we are going to use

%macro print 1
mov si, %1 ; get the 1st parameter of print which is the
; address of the printing message
call printAgain
lodsb ; load byte at ds:si into al
or al,al ; test if character is 0 (which means END).
jz done ; jump if zero to 'done' address.
mov ah, 0Eh ; put character.
mov bx, 0007h ; attribute
int 10h ; Call BIOS.
jmp printAgain

; **********************************************************************

mov ah, 0 ; wait for a key
int 016h

; **********************************************************************

db 0EAh ; Machine language to jump to FFFF:0000 (reboot);
dw 0000h
dw 0FFFFh
; No ret required because we are rebooting now!!!
;: Main part

mov ax, 0x0000 ; setup the data segment register.
mov ds, ax ; This can not be loaded directly it has to be in two steps.
; mov ds, 0x0000 will not work due to limitations of CPU.

print welcomeMsg ; Call the print macro.
print pressKey
call getKey
call reboot

times 510-($-$) db 0 ; Fill the rest of the sector with zero's
dw 55AAh ; Add the boot loader signature.