Cousera MIPS 汇编程序设计
第一题:用系统功能调用实现简单输入输出
利用系统功能调用从键盘输入,转换后在屏幕上显示,具体要求如下:
(1) 如果输入的是字母(AZ,区分大小写)或数字(09),则将其转换成对应的英文单词后在屏幕上显示,对应关系见下表
(2) 若输入的不是字母或数字,则在屏幕上输出字符“*”,
(3) 每输入一个字符,即时转换并在屏幕上显示,
(4) 支持反复输入,直到按“?”键结束程序。
.data
Upperalphabet:
.asciiz " Alpha\n"," Bravo\n"," China\n"," Delta\n"," Echo\n"," Foxtrot\n"," Golf\n"," Hotel\n",
" India\n"," Juliet\n"," Kilo\n"," Lima\n"," Mary\n"," November\n"," Oscar\n"," Paper\n"," Quebec\n",
" Research\n"," Sierra\n"," Tango\n"," Uniform\n"," Victor\n"," Whisky\n"," X-ray\n"," Yankee\n"," Zulu\n"
Lowera