2 ; nasm -f bin -o bootcard.img bootcard.asm
3 ; cat bootcard.img >/dev/<usbstick>
17 barstart equ 200 - (nbars+1) * barh
41 mov dx, %1 | (%2 << 8)
57 mov al, (%1 << 6) | 36h
81 ; for DOS save the previous interrupt handler to restore at the end
85 mov [saved_tintr_offs], ax
87 mov [saved_tintr_seg], ax
91 mov word [es:32], tintr
98 mov ax, 0c0h ; change program on chan 0
100 mov ax, 19 ; church organ
110 mov di, barstart * 320
140 mov cx, 2400 ; 15 lines
149 .mnt: mov [bp - 2], cx
190 mov ax, [saved_tintr_offs]
192 mov ax, [saved_tintr_seg]
215 mov ax, 90h ; note-on command for channel 0
224 mov ax, 80h ; note-off command for channel 0
233 mov ax, 0b0h ; channel mode message for channel 0...
235 mov ax, 7bh ; all notes off
243 .wait: in al, dx ; read status port
244 test al, 40h ; test output-ready bit (0: ready)
260 mov ax, 0ffh ; reset command
263 mov ax, 3fh ; enter UART mode
293 mov al, [music + 1 + bx]
297 mov ax, [music + 1 + bx]
312 mov byte [cmap + bx], 3fh
313 mov word [cmap + bx + 1], 2f2fh
331 .end: test word [nticks], 1
350 str1: db 'Michael ',3,' Athena',0
409 times 446-($-$$) db 0
416 times 510-($-$$) db 0
419 ; vi:ft=nasm ts=8 sts=8 sw=8: