2 ; nasm -f bin -o bootcard.img bootcard.asm
3 ; cat bootcard.img >/dev/<usbstick>
12 spkstat equ muscur + 4
20 PIT_CMD_SQWAVE equ 06h
23 %define DIV_ROUND(a, b) ((a) / (b) + ((a) % (b)) / ((b) / 2))
43 mov al, (PIT_CMD_CHAN0 + (%1 << 6)) | PIT_CMD_HILO | PIT_CMD_SQWAVE
46 out PIT_DATA0 + %1, al
48 out PIT_DATA0 + %1, al
60 mov word [32], timer_intr
63 settimer 0, DIV_ROUND(OSC_FREQ, 100)
105 .pmus: mov bx, [muscur]
107 mov cx, [music + bx] ; event time
114 mov ax, [music + 2 + bx] ; event counter reload
120 mov word [spkstat], 1
124 mov word [spkstat], 0
127 ; PWM for volume control
152 str1: db 'message message blah',0
153 str2: db 'Michael & Athina',0
180 times 446-($-$$) db 0
185 times 510-($-$$) db 0
188 ; vi:ft=nasm ts=8 sts=8 sw=8: