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]
216 mov ax, 90h ; note-on command for channel 0
227 mov ax, 80h ; note-off command for channel 0
235 mov ax, 0b0h ; channel mode message for channel 0...
237 mov ax, 7bh ; all notes off
245 .wait: in al, dx ; read status port
246 test al, 40h ; test output-ready bit (0: ready)
262 mov ax, 0ffh ; reset command
265 mov ax, 3fh ; enter UART mode
294 mov al, [music + 1 + bx]
298 mov ax, [music + 1 + bx]
313 mov byte [cmap + bx], 3fh
314 mov word [cmap + bx + 1], 2f2fh
336 .end: test word [nticks], 1
355 str1: db 'Michael ',3,' Athena',0
414 times 446-($-$$) db 0
421 times 510-($-$$) db 0
424 ; vi:ft=nasm ts=8 sts=8 sw=8: