2 ; nasm -f bin -o bootcard.img bootcard.asm
3 ; cat bootcard.img >/dev/<usbstick>
13 data_end equ muscur + 4
22 PIT_CMD_SQWAVE equ 06h
25 %define DIV_ROUND(a, b) ((a) / (b) + ((a) % (b)) / ((b) / 2))
28 mov dx, %1 | (%2 << 8)
44 mov al, (PIT_CMD_CHAN0 + (%1 << 6)) | PIT_CMD_HILO | PIT_CMD_SQWAVE
47 out PIT_DATA0 + %1, al
49 out PIT_DATA0 + %1, al
59 mov cx, (data_end - data_start) / 2
62 mov word [32], timer_intr
65 settimer 0, DIV_ROUND(OSC_FREQ, 200)
114 mov cx, 2400 ; 15 lines
123 .mnt: mov [bp - 2], cx
168 .pmus: mov bx, [muscur]
170 mov cx, [music + bx] ; event time
177 mov ax, [music + 2 + bx] ; event counter reload
200 str1: db 'message message blah',0
201 str2: db 'Michael & Athena',0
210 %define TM(x) (40 + (x) * 4)
245 times 446-($-$$) db 0
253 times 510-($-$$) db 0
256 ; vi:ft=nasm ts=8 sts=8 sw=8: