2 ; nasm -f bin -o bootcard.img bootcard.asm
3 ; cat bootcard.img >/dev/<usbstick>
17 barstart equ 200 - (nbars+1) * barh
39 mov dx, %1 | (%2 << 8)
55 mov al, (%1 << 6) | 36h
75 ; for DOS save the previous interrupt handler to restore at the end
79 mov [saved_tintr_offs], ax
81 mov [saved_tintr_seg], ax
85 mov word [es:32], tintr
96 mov ax, 0c0h ; change program on chan 0
98 mov ax, 19 ; church organ
108 mov di, barstart * 320
138 mov cx, 2400 ; 15 lines
147 .mnt: mov [bp - 2], cx
188 mov ax, [saved_tintr_offs]
190 mov ax, [saved_tintr_seg]
214 mov ax, 90h ; note-on command for channel 0
222 mov ax, 0b0h ; channel mode message for channel 0...
224 mov ax, 7bh ; all notes off
231 .wait: in al, dx ; read status port
232 test al, 40h ; test output-ready bit (0: ready)
248 mov ax, 0ffh ; reset command
251 mov ax, 3fh ; enter UART mode
280 mov al, [music + 1 + bx]
284 mov ax, [music + 1 + bx]
299 mov byte [cmap + bx], 3fh
300 mov word [cmap + bx + 1], 2f2fh
321 .end: test word [nticks], 1
340 str1: db 'Michael ',3,' Athena',0
399 times 446-($-$$) db 0
406 times 510-($-$$) db 0
409 ; vi:ft=nasm ts=8 sts=8 sw=8: