从键盘输入一个二位十进制的月份数(01-12),然后显示出相应英文缩写名。用汇编语言实现,最好有流程图

作者&投稿:表荔 (若有异议请与网页底部的电邮联系)
请用子程序结构编写如下程序:从键盘输入一个二位十进制的月份数(01-12),然后显示出相应英文缩写名。~

任务

Public Class Form1
Dim mon() As String =
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
On Error GoTo Handerr
TextBox2.Text = mon(Val(TextBox1.Text))
Exit Sub
Handerr:
MsgBox(mon(0))
End Sub
End Class
..........................黑龙江省巴彦县兴隆镇 张志晨 ..........................................

自己做了一个C程序,从C转汇编,希望对你有用:
#include <stdio.h>
#include <stdlib.h>

void main()
{
char mon[12][4];

sprintf(mon[0],"%s", "Jan\0");
sprintf(mon[1],"%s", "Feb\0");
sprintf(mon[2],"%s", "Mar\0");
sprintf(mon[3],"%s", "Apr\0");
sprintf(mon[4],"%s", "May\0");
sprintf(mon[5],"%s", "Jun\0");
sprintf(mon[6],"%s", "Jul\0");
sprintf(mon[7],"%s", "Aug\0");
sprintf(mon[8],"%s", "Sep\0");
sprintf(mon[9],"%s", "Oct\0");
sprintf(mon[10],"%s", "Nov\0");
sprintf(mon[11],"%s", "Dec\0");

int a = getchar()-48;
int b = getchar()-48;
a = a*10 + b;
if(a<=12)
{
printf(mon[a-1]);
}
}

汇编:
push ebp
mov ebp,esp
sub esp,114h
push ebx
push esi
push edi
lea edi,[ebp-114h]
mov ecx,45h
mov eax,0CCCCCCCCh
rep stos dword ptr es:[edi]
mov eax,dword ptr [___security_cookie (417000h)]
xor eax,ebp
mov dword ptr [ebp-4],eax

mov esi,esp
push offset string "Jan\0" (415A20h)
push offset string "%s" (415820h)
lea eax,[ebp-38h]
push eax
call dword ptr [__imp__sprintf (4182C8h)]
add esp,0Ch
cmp esi,esp
call @ILT+310(__RTC_CheckEsp) (41113Bh)

mov esi,esp
push offset string "Feb\0" (415810h)
push offset string "%s" (415820h)
lea eax,[ebp-34h]
push eax
call dword ptr [__imp__sprintf (4182C8h)]
add esp,0Ch
cmp esi,esp
call @ILT+310(__RTC_CheckEsp) (41113Bh)

mov esi,esp
push offset string "Mar\0" (415A18h)
push offset string "%s" (415820h)
lea eax,[ebp-30h]
push eax
call dword ptr [__imp__sprintf (4182C8h)]
add esp,0Ch
cmp esi,esp
call @ILT+310(__RTC_CheckEsp) (41113Bh)

mov esi,esp
push offset string "May" (415808h)
push offset string "%s" (415820h)
lea eax,[ebp-2Ch]
push eax
call dword ptr [__imp__sprintf (4182C8h)]
add esp,0Ch
cmp esi,esp
call @ILT+310(__RTC_CheckEsp) (41113Bh)

mov esi,esp
push offset string "May\0" (415A10h)
push offset string "%s" (415820h)
lea eax,[ebp-28h]
push eax
call dword ptr [__imp__sprintf (4182C8h)]
add esp,0Ch
cmp esi,esp
call @ILT+310(__RTC_CheckEsp) (41113Bh)

mov esi,esp
push offset string "Jul" (4157B0h)
push offset string "%s" (415820h)
lea eax,[ebp-24h]
push eax
call dword ptr [__imp__sprintf (4182C8h)]
add esp,0Ch
cmp esi,esp
call @ILT+310(__RTC_CheckEsp) (41113Bh)

mov esi,esp
push offset string "Jul\0" (415A08h)
push offset string "%s" (415820h)
lea eax,[ebp-20h]
push eax
call dword ptr [__imp__sprintf (4182C8h)]
add esp,0Ch
cmp esi,esp
call @ILT+310(__RTC_CheckEsp) (41113Bh)

mov esi,esp
push offset string "Aug\0" (4157A8h)
push offset string "%s" (415820h)
lea eax,[ebp-1Ch]
push eax
call dword ptr [__imp__sprintf (4182C8h)]
add esp,0Ch
cmp esi,esp
call @ILT+310(__RTC_CheckEsp) (41113Bh)

mov esi,esp
push offset string "Sep\0" (415A00h)
push offset string "%s" (415820h)
lea eax,[ebp-18h]
push eax
call dword ptr [__imp__sprintf (4182C8h)]
add esp,0Ch
cmp esi,esp
call @ILT+310(__RTC_CheckEsp) (41113Bh)

mov esi,esp
push offset string "Nov" (4157A0h)
push offset string "%s" (415820h)
lea eax,[ebp-14h]
push eax
call dword ptr [__imp__sprintf (4182C8h)]
add esp,0Ch
cmp esi,esp
call @ILT+310(__RTC_CheckEsp) (41113Bh)

mov esi,esp
push offset string "Nov\0" (4158B4h)
push offset string "%s" (415820h)
lea eax,[ebp-10h]
push eax
call dword ptr [__imp__sprintf (4182C8h)]
add esp,0Ch
cmp esi,esp
call @ILT+310(__RTC_CheckEsp) (41113Bh)

mov esi,esp
push offset string "Dec\0" (415874h)
push offset string "%s" (415820h)
lea eax,[ebp-0Ch]
push eax
call dword ptr [__imp__sprintf (4182C8h)]
add esp,0Ch
cmp esi,esp
call @ILT+310(__RTC_CheckEsp) (41113Bh)

mov esi,esp
call dword ptr [__imp__getchar (4182BCh)]
cmp esi,esp
call @ILT+310(__RTC_CheckEsp) (41113Bh)
sub eax,30h
mov dword ptr [ebp-44h],eax

mov esi,esp
call dword ptr [__imp__getchar (4182BCh)]
cmp esi,esp
call @ILT+310(__RTC_CheckEsp) (41113Bh)
sub eax,30h
mov dword ptr [ebp-50h],eax

mov eax,dword ptr [ebp-44h]
imul eax,eax,0Ah
add eax,dword ptr [ebp-50h]
mov dword ptr [ebp-44h],eax

cmp dword ptr [ebp-44h],0Ch
jg main+1FEh (4137BEh)

mov eax,dword ptr [ebp-44h]
lea ecx,[ebp+eax*4-3Ch]
mov esi,esp
push ecx
call dword ptr [__imp__printf (4182C4h)]
add esp,4
cmp esi,esp
call @ILT+310(__RTC_CheckEsp) (41113Bh)

xor eax,eax
push edx
mov ecx,ebp
push eax
lea edx,[ (4137F0h)]
call @ILT+130(@_RTC_CheckStackVars@8) (411087h)
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx,dword ptr [ebp-4]
xor ecx,ebp
call @ILT+25(@__security_check_cookie@4) (41101Eh)
add esp,114h
cmp ebp,esp
call @ILT+310(__RTC_CheckEsp) (41113Bh)
mov esp,ebp
pop ebp
ret
nop

你是哪个学校啊


从键盘输入一个二位十进制的月份数(01-12),然后显示出相应英文缩写名...
void main(){ char mon[12][4];sprintf(mon[0],"%s", "Jan\\0");sprintf(mon[1],"%s", "Feb\\0");sprintf(mon[2],"%s", "Mar\\0");sprintf(mon[3],"%s", "Apr\\0");sprintf(mon[4],"%s", "May\\0");sprintf(mon[5],"%s", "Jun\\0");sprintf(mon[6],"%s", "Jul\\...

用子程序结构编写如下程序:从键盘输入一个二位十进制的月份数(01~12...
Public Class Form1 Dim mon() As String = Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click On Error GoTo Handerr TextBox2.Text = mon(Val(TextBox1.Text))Exit Sub Handerr:MsgBox(mon(0))End Sub End Class ...黑龙江...

键盘输入任意一个2位以上的数,输出这个数的第m位到第n位的数。用...
1、输入M和N;2、遍历从M到N的所有整数;3、每个累加;4、输出结果。参考代码:include <stdio.h>int main(){ int M,N,n,s=0; scanf("%d%d",&M,&N);\/\/输入 for(n = M; n <= N; n ++)\/\/遍历 s+=n;\/\/累加每个整数。 printf("%d\\n",s);\/\/输出结果。

求汇编人才 编写一个简单的程序
;请用子程序的结构编写如下程序:从键盘上输入一个二位十进制的月份数(01~12),然后显示出该月份相应的英文缩写名。并要求在屏幕上显示英文缩写名的同时响铃一次(响铃用INT 10H,入口参数AX=0e07H)。这一过程可以重复任意次。直到按“Q”或“q”键退出程序。;用MASM5.0编译通过,以下是运行结...

请问怎么打数字序号①②③④后面的数字呢?
打带有圈的数字的方法:一、常用于输入10以内的带圈数字。只需利用各种输入法,如搜狗拼音、微软拼音等均可输入。1、调出输入法右击,选择“软键盘——数字序号”。2、按住 “shift”键,然后单击需要的带圈数字,即可输入1-10的带圈数字。3、或者直接用搜狗输入法,即可直接打出1——10的打圈数据...

...接受从键盘上输入的一个两位十进制数字,这个数经过BCD码处理,以...
MSG3 DB 13, 10, 'The HEX is : $' x DW ? ;存放新输入数据.DATA ENDS;---CODE SEGMENT ;代码段. ASSUME CS: CODE, DS: DATASTART: MOV AX, DATA MOV DS, AX;---IN_LOOP: DISP_STR MSG1 ;宏调用,提示 Please Input :;--- MOV x, 0 ;数据清零._INX: MOV AH, 1 ;输入字符. INT ...

键盘输入一个两位数XY,X是十位,Y是个位,请编程计算X+Y的值和X*Y的值...
include<stdio.h> void main(){ int a;printf("Input three numbers:\\n");scanf("%d",&a);printf("%d\\n",a\/10+a%10);printf("%d\\n",(a\/10)*(a%10));}

VB编程:键盘输入一个两位数XY,X是十位,Y是个位,编程计算X+Y的值和X*...
)Dim n As Integer, x As Integer, y As Integern = Val(InputBox("请输入一个两位数"))If n > 9 And n < 100 Then x = n \\ 10 y = n Mod 10 MsgBox "X+Y=" & (x + y) & vbCrLf & "X*Y=" & (x * y)Else MsgBox "输入错误!"End IfEnd Sub ...

从键盘输入一个两位的正整数,输出它的十位数和个位数。
cout << "请输入一个两位的整数:" << endl ; \/\/endl表示换行符 cin >> x ; \/\/输入数 y = x\/10; \/\/ y 代表的是十位上的数 z = x%10 ; \/\/ z 代表是个位上的数 ,%号运算是求余数 cout << " 十位上的数为:" << endl;cout << y << endl;cout << " 个...

键盘摁一个键出现两个字母怎么办?
二、在台式机电脑上的解决:在台式机电脑上出现着问题的解决方法,一般来说,台式机电脑是没有笔记本电脑键盘上的那两个键,那怎么办呢?出现这种问题的原因一般是由于我们的输入法切换出现了问题,因此在键盘上面会有一个shift,这个键是切换字母和数字的键,大家只需要按下这个键,可以在输入法上任意...

五莲县15385776521: 用子程序结构编写一程序:从键盘输入一个两位十进制的月份数(01~12),然后显示出相应的英文缩写名 -
胡龚茵莲: #include <iostream> using namespace std; int main() { int month; string strmon; cout<<"输入一个月份数(1~12):"<<endl; cin>>month; switch(month) { case 1:strmon="January";break; case 2:strmon="February";break; case 3:strmon="...

五莲县15385776521: 用子程序结构编写如下程序:从键盘输入一个二位十进制的月份数(01~12),然后显示出相应的英文缩写名. -
胡龚茵莲: Public Class Form1Dim mon() As String =Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ClickOn Error GoTo HanderrTextBox2.Text = mon(Val(TextBox1.Text))Exit Sub Handerr:...

五莲县15385776521: 试用子程序结构编写一程序:从键盘输入一个两位十进制的月份数,然后显示出相应的英文缩写名.汇编语言要 -
胡龚茵莲: DATAS SEGMENT MONTH DB 'JanFebMarAprMayJunJulAugSepOctNovDec' MESS DB ' INPUT THE MONTH:',0DH,0AH,'$' NUM DB 3 ;按照标准应该是2 ,但是我写2 就是不行,可能是我软件的问题DB ? DB 2 DUP(0,?) DATAS ENDS ...

五莲县15385776521: 从键盘输入一个二位十进制的月份数(01 - 12),然后显示出相应英文缩写名.用汇编语言实现,最好有流程图
胡龚茵莲: 自己做了一个C程序,从C转汇编,希望对你有用:#include <stdio.h>#include <stdlib.h> void main() { char mon[12][4]; sprintf(mon[0],"%s", "Jan\0"); sprintf(mon[1],"%s", "Feb\0"); sprintf(mon[2],"%s", "Mar\0"); sprintf(mon[3],"%s...

五莲县15385776521: 求汇编人才 编写一个简单的程序 -
胡龚茵莲: ;请用子程序的结构编写如下程序:从键盘上输入一个二位十进制的月份数(01~12),然后显示出该月份相应的英文缩写名.并要求在屏幕上显示英文缩写名的同时响铃一次(响铃用INT 10H,入口参数AX=0e07H).这一过程可以重复任意次...

五莲县15385776521: 用子程序编写程序:从键盘输入一个二位十进制月份数显示出相应英文缩写
胡龚茵莲: <p>Public Class Form1</p> <p> Dim mon() As String = {"您的输入存在问题", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}</p> <p> Private Sub Button1_Click(ByVal ...

五莲县15385776521: 请用子程序结构编写如下程序:从键盘输入一个二位十进制的月份数(01 - 12),然后显示出相应英文缩写名. -
胡龚茵莲: 任务

五莲县15385776521: 在数据存储区中存放有20个字符,统计出其中大写字母、小写字母和数字的个数.急用,汇编语言做 -
胡龚茵莲: 1.数据段X中存放一个16位的原2113码,现将其变为补码放入Y中.2.设从存储器的A1、A2单元开始各有4个字节的有符号数(低位字节在前),现计算它们5261的差,并将结果存入A3单元开始的存储区中,如有溢出,则置A4为FF.3.在数据存...

五莲县15385776521: C语言编写一个程序,是其完成如下功能:从键盘上输入一个十进制的数,用除2法将其转换成二进制数并输出. -
胡龚茵莲: #include "stdio.h" #include "stdlib.h" main() { int n,x=0,a[100]; printf("请输入转换的数和进制:\n"); scanf("%d",&n);while(n){ a[x++]=n%2; n/=2; } --x; while(x>=0) printf("%d",a[x--]); printf("\n"); system("pause"); } 再送你一个...

五莲县15385776521: 求高手写C语言程序代码:"从键盘输入一个十进制数,将其转换为二进制、八进制和十六进制数." -
胡龚茵莲: #includevoid ex10to2(); void ex10to8(); void ex10to16(); void main() { int select; do { printf("\n 0、退出 1、十进制~二进制 2、十进制~八进制 3、十进制~十六进制\n"); printf("请选择功能:"); scanf("%d",&select); if(select == 0) break; ...

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 星空见康网