Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - Tab c
Search - Tab c - List
/*这是我用C语言编的第一个程序,编译通过,下载到单片机里能够正常运行,我非常高兴,对我来说有纪念价值*/ -#include <reg51f.h> #include <intrins.h> #include <math.h> sbit P2_0=P2^0 bit FLAG=0 char m,ptr=0 static const char tab[16]={0x01,0x02,0x03,0x0c, 0x04,0x05,0x06,0x0d, 0x07,0x08,0x09,0x0e, 0x0a,0x00,0x0b,0x0f}
Date : 2025-12-17 Size : 1kb User : du316

参考《Orange’s》,在之前搭建的 nasm + bochs 实验平台上完成一个接受键盘输入,回显到屏幕上的程序,具体要求如下: • 从屏幕左上角开始,显示键盘输入的字符。可以输入并显示 a-z 和 0-9 字 符。 • 支持大小写,包括 Shift 组合键以及大写锁定两种方式。 • 支持回车键换行。 • 支持删除退格,退格如果退回上一行,必须退回该行编辑的最后一个字符 处。 • 支持空格键和 Tab 键,其中对于 Tab 键如果实现其作为制表符(即使用 了 Tab 的位置输入退格时会退四格),将会得到加分。 • 每隔 20 秒左右, 清空屏幕。输入的字符重新从屏幕左上角开始显示。 • 若按下 F1 到 F5, 分别切换到不同颜色进行输出。 • 要求有光标显示, 固定光标或者闪烁光标均可, 但一定要跟随输入字符的 位置变化。 • 要求支持一种特殊的组合键,规则为当同时按下 Shift 和 Tab 键的情况 下,输入键盘上的 Q, A, Z, W, S, X 键时,显示的内容是其右边一个键的 内容,即对应显示 W, S, X, E, D, C。对其他键不做要求。 -Reference Orange s , in the previous nasm+ bochs built a complete experimental platform to accept keyboard input echo to the program on the screen, the specific requirements are as follows: • From the upper left corner of the screen to display the character keyboard. You can enter and display a-z, and 0-9 characters. • support case, including the key combination Shift and Caps Lock in two ways. • Support the Enter key line feed. • supported the deletion backspace, backspace if the return on the line must be returned at the last character of the line editing. • Support Spacebar, and Tab key, wherein if the Tab key to achieve it as a tab character (ie, when using the Tab position input backspace backspace four-frame), you will get extra points. • Every 20 seconds, clear the screen. Character input display re-start the top left corner of the screen. • If you press F1 to F5, respectively, switching to a different color output. • req
Date : 2025-12-17 Size : 99kb User : mj
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.