1 ; ------------------------------------------------------------------
2 ; Music keyboard -- Use the keyboard to play notes via the PC speaker
3 ; Use Z key rightwards for an octave
4 ; ------------------------------------------------------------------
17 mov ax, mus_kbd_title_msg
; Set up screen
18 mov bx, mus_kbd_footer_msg
19 mov cx, WHITE_ON_LIGHT_RED
20 call os_draw_background
22 mov bl, BLACK_ON_WHITE
; White block to draw keyboard on
31 ; Now lots of loops to draw the keyboard
33 mov dl, 24 ; Top line of box
46 mov dl, 24 ; Bottom line of box
60 mov dl, 23 ; Top-left corner
68 mov dl, 55 ; Top-right corner
76 mov dl, 23 ; Bottom-left corner
84 mov dl, 55 ; Bottom-right corner
92 mov dl, 23 ; Left-hand box line
103 mov dl, 55 ; Right-hand box line
114 mov dl, 23 ; Key-separating lines
129 mov al, 194 ; Top of box line joiners
140 mov al, 193 ; Bottom of box line joiners
151 ; And now for the black keys...
153 mov bl, WHITE_ON_BLACK
187 ; And lastly, draw the labels on the keys indicating which
188 ; (computer!) keys to press to get notes
236 ; Phew! We've drawn all the keys now
241 .
nokey: ; Matching keys with notes
332 mus_kbd_title_msg
db 'MikeOS Music Keyboard', 0
333 mus_kbd_footer_msg
db 'Hit keys to play notes, space to silence a note, and Q to quit', 0
336 ; ------------------------------------------------------------------