Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; ---------------------------[bryoboot2.asm]--------------------
- ; 1. constants
- ; 2. directives
- ; 3. main
- ; 4. functions
- ; 5. messages
- ; 6. footer
- ; ---------------------------[CONSTANTS]------------------------
- BL2_ADDR equ 0x7fee ; origin address of loader2
- CR equ 0x0d ; Carriage Return
- LF equ 0x0a ; Line feed/ Newline
- ;----------------------------[DIRECTIVES]------------------------
- org BL2_ADDR ; origin
- bits 16 ; real mode 16 bit
- ;----------------------------[MAIN]------------------------------
- main:
- ; Segmentation registers setup
- xor ax,ax
- mov ds,ax
- mov es,ax
- mov ss,ax
- ; Printing Initial Boot message
- mov si,initial_boot_msg
- call print
- jmp $
- ;----------------------------[FUNCTIONS]--------------------------
- print:
- .loop:
- lodsb
- or al,al
- jz .break
- mov ah,0x0e
- int 0x10
- jmp .loop
- .break:
- ret
- ;-----------------------------[MESSAGES]--------------------------
- initial_boot_msg:
- db '[BL2] BRYOBOOT2 loaded sucessfully',CR,LF,0
- ;-----------------------------[FOOTER]----------------------------
- times 512-($-$$) db 0 ; Padding to 512 bytes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement