[org 0x7000] start: mov [bootdev], dl mov ah, 06h ; Scroll up function xor al, al ; Clear entire screen xor cx, cx ; Upper left corner CH=row, CL=column mov dx, 184FH ; lower right corner DH=row, DL=column mov bh, 4Fh ; YellowOnBlue int 10H ; execute interrupt mov al, 182 ; meaning that we're about to load out 43h, al ; prepare speaker for output mov ax, 2153 ; frequency countdown value is stored in ax. It is calculated by out 42h, al ; Output low byte. mov al, ah ; Output high byte. out 42h, al in al, 61h or al, 00000011b out 61h, al ; Send the new value ; mov bx, 200 ; Pause for duration of note. mov ah, 06h ; Scroll up function xor al, al ; Clear entire screen xor cx, cx ; Upper left corner CH=row, CL=column mov dx, 184FH ; lower right corner DH=row, DL=column mov bh, 12h ; YellowOnBlue int 10H ; execute interrupt mov al, 0 mov ah, 86h mov cx, 1 mov dx, 200 int 15h mov ah, 06h ; Scroll up function xor al, al ; Clear entire screen xor cx, cx ; Upper left corner CH=row, CL=column mov dx, 184FH ; lower right corner DH=row, DL=column mov bh, 2Bh ; YellowOnBlue int 10H ; execute interrupt mov al, 0 mov ah, 86h mov cx, 1 mov dx, 200 int 15h mov ah, 06h ; Scroll up function xor al, al ; Clear entire screen xor cx, cx ; Upper left corner CH=row, CL=column mov dx, 184FH ; lower right corner DH=row, DL=column mov bh, 3Fh ; YellowOnBlue int 10H ; execute interrupt mov al, 0 mov ah, 86h mov cx, 1 mov dx, 200 int 15h ;.pause1: ; mov cx, 65535 ;.pause2: ; dec cx ; jne .pause2 ; dec bx ; jne .pause1 in al, 61h ; Turn off note (get value from ; port 61h). and al, 11111100b ; Reset bits 1 and 0. out 61h, al ; Send new value. mov al, 0 mov ah, 86h mov cx, 1 mov dx, 200 int 15h waitforkey: mov ah, 0x00 int 0x16 cmp ah, 01h je exit jmp waitforkey exit: in al, 61h ; Turn off note (get value from ; port 61h). and al, 11111100b ; Reset bits 1 and 0. out 61h, al ; Send new value. mov dl, [bootdev] jmp 0x0:0x1000 bootdev db 0x80 ; Boot device number