Compilation Language Based on Keyboard Design (1)

zhaozj2021-02-16  49

[Debug environment: TASM 5.0 WinXP]

First, basic requirements:

Design a keyboard with the PC keyboard and the CRT display, first simulate the picture of the piano key on the CRT display, and then required any number keys in "1 ~ 7" on the keyboard in different cases, which can play corresponding Tone, and mark the corresponding button on the analog keyboard.

The design should be completed:

(1) Press any of "1 ~ 7" to issue a corresponding medium sound.

(2) If you press any of the "Tao Key" and "1 ~ 7" at the same time, the corresponding treble is issued.

(3) If you press any number of "低 低 键" and "1 ~ 7" at the same time, the corresponding bass is issued.

(4) The tap of the sound is determined according to the length of the button.

(5) Change the corresponding keys according to the key pressed by the keyboard.

(6) The choice of two tones can be achieved.

(7) 5 songs can be stored in advance, and the different buttons can be stored different songs.

(8) Press the "End Key", the program runs, returns to the DOS state

Second, flow chart:

According to the design requirements, the flow chart of the main program is analyzed as follows:

Third, function module diagram

Decomposition as required as follows:

Fourth, screenshot of the screen

V. Use instructions:

1, automatic play:

a) Select the track 1 ~ 5 with a keyboard 1 ~ 5;

b) Press the ENTER key to end the track being played;

c) Big keyboard ' ' key, speed up performance, '-' button, slow down performance;

2, manual play:

a) Press the left SHIFT button and the keypad key 1 ~ 7

b) Press the right shift key and the keypad key 1 ~ 7

c) C button to C-adjust, D key to D-D

3. Press the ESC key program to exit

转载请注明原文地址:https://www.9cbs.com/read-22907.html

New Post(0)