Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [BITS 16] ;viktigt
- [ORG 0x7C00] ;BIOS jmps here
- mov si, string ;Move string pointer into Source Index
- call print_string
- mov ax, 0x2401
- int 0x15
- print_character:
- mov ah, 0x0E
- mov bh, 0x00
- mov bl, 0x07
- int 0x10
- ret
- print_string:
- next_character:
- mov al, [si] ;get one byte from the value pointed by si
- inc si ;Move si pointer to next character
- or al, al ;If al = zero, end of string
- jz exit_function
- call print_character
- jmp next_character
- exit_function:
- ret
- string db 'Hello World', 0 ;Just a null terminated string
- TIMES 510 - ($ - $$) db 0
- DW 0XAA55 ; we need a boot signature of course.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement