I am writing my first OS boot sector in an assembly using NASM. It works for me, it just displays "Hello OS World!". in red letters. Simple enough. I converted boot.asm to boot.bin and this is to boot.img. I use a VMWare player, I installed boot.img as a floppy disk and booted from there, and it works great. However, there are a few lines of this assembly code whose purpose I do not understand.
org 07c00h mov ax, cs mov ds, ax mov es, ax call DispStr jmp $ DispStr: mov ax, BootMessage mov bp, ax mov cx, 16 mov ax, 01301h ; mov bx, 000ch ; mov dl, 0 ; int 10h ; ret BootMessage: db "Hello, OS world!" times 510-($-$$) db 0 dw 0xaa55 ;
Lines ending with a colon are those that I donβt understand. I did a lot of searches and was able to figure out other things. I am competent enough in writing a meeting. So, for example, I know that mov ax,01301h moves 01301h to the AX register. But I do not understand why, or how 01301h is significant. I would suggest that they are somewhat similar to string formatting options, but this is just an assumption. Any help would be greatly appreciated.
source share