Linux Poetry
{tags: x86, boot process, triolet }
prev

The Magic Number: 0xAA55
/* This poem is bootable, download an iso here */
poem:
db \
'A word gives life to bare metal', \
'Bytes inviting execution', \
'Guide to a sector to settle', \
'A word gives life, to bare metal', \
'The bootloader', 0x27, 's role is vital', \
'Denoted by its locution--', \
'A word gives life to bare metal', \
'Bytes inviting execution', \
0

[org 0x7c00]
mov bp, 0x8000
mov sp, bp
mov bx, poem
call print_str
jmp $

print_str:
mov al, [bx]
cmp al, 0
je the_end
mov ah, 0x0e
int 0x10
add bx, 0x1
jmp print_str
the_end:
ret

times 510-($-$$) db 0 ; write zeros to the first 510 bytes
dw 0xaa55 ; write the magic number

12-28-2014 , rss feed license