上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页
摘要: include irvine32.inc.datai dword 1,2,34,5,6,7,8,9,0,11.codemain procmov ecx,0;mov esi,offset imov ecx,lengthof i;;mov eax,ecx;;call writeint;call crlfmov ebx,dword;call dumpmem;exitmain endpend main 阅读全文
posted @ 2013-02-25 19:16 叶城宇 阅读(164) 评论(0) 推荐(0) 编辑
摘要: include irvine32.incstandard=2000;.dataday word 15;month word 5;year word 2012;ymd word ?.codemain procmov eax,0;mov ebx,0;mov ax,year;sub ax,standard;shl ax,9;mov bx,month;shl bx,5;add ax ,bx;add ax,day;mov ymd,ax;call writebin;exitmain endpend main 阅读全文
posted @ 2013-02-25 19:15 叶城宇 阅读(107) 评论(0) 推荐(0) 编辑
摘要: include irvine32.inc.datatime word 0101011000111001bhh word ?mmm word ?sss word ?.codemain procmov eax,0;mov ax,time;shr ax,11;mov hh,ax;call writedec;mov al,':'call writechar;mov ax,time;shr ax,5;and ax,111111b;mov mmm,ax;call writedec;mov al,':'call writechar;mov ax,time;and ax,111 阅读全文
posted @ 2013-02-25 19:14 叶城宇 阅读(95) 评论(0) 推荐(0) 编辑
摘要: include irvine32.inc.datastr1 byte "赋值后的结果:",0;.codemain proccall swap;;mov ebx,offset str1;;call writestring;exitmain endpswap procpush ebp;mov ebp,esp;sub esp,32;mov ecx,29;mov eax,ebp;L1: mov byte ptr [eax-32],'@'; inc eax; loop L1; mov byte ptr[eax-32],0 mov edx,offset str1; ca 阅读全文
posted @ 2013-02-25 19:13 叶城宇 阅读(202) 评论(0) 推荐(0) 编辑
摘要: include irvine32.incchang proto ,v1:ptr dword,v2: ptr dword.datai dword ?j dword ?str1 byte "交换前的是:",0;str2 byte "交换后的结果:",0;.codemain proccall readintmov i,eax;call readintmov j,eax;mov edx,offset str1call writestring;mov eax,i;call writeint;mov al,','call writecharmov e 阅读全文
posted @ 2013-02-25 19:12 叶城宇 阅读(127) 评论(0) 推荐(0) 编辑
摘要: include irvine32.incsub2 proto a:ptr dword,l1:dword.datai dword 10 dup(?);str1 byte "开始初始化的值:",0;.codemain procmov edx,offset str1;call writestringinvoke sub2 ,offset i,lengthof i;call crlf;mov esi,offset i;mov ecx,lengthof i;mov ebx,dword;call dumpmem;exitmain endpsub2 proc, a:PTR dword, 阅读全文
posted @ 2013-02-25 19:11 叶城宇 阅读(254) 评论(0) 推荐(0) 编辑
摘要: include irvine32.inc.datai dword 8j dword 29x dword 0.codemain proc mov eax,0L: cmp i,10 jl L1 cmp j,15 jng next ;call writeint ;call crlfL1: inc i dec j inc x LOOP Lnext:mov eax,xcall writeintexitmain endpend main 阅读全文
posted @ 2013-02-25 19:09 叶城宇 阅读(150) 评论(0) 推荐(0) 编辑
摘要: ;功能:查找32位之间的赋值语句是否有语法错误,如果没有就输出,如果有就输出错误;;为了减少情况判断;特意规定mov后面的第一个参数必须为寄存器。;赋值语句中32位赋值和16位、8位等情况的赋值语法完全相同,;所以这里只判断32位赋值的情况,并且假设这里的内存操作数一定是写对的;用str1来存储要判断的语句,用str2来存储内存操作数的类型。include irvine32.inc.datai dword 1;c1 byte "改语法不正确:",0;c2 byte "相等",0;c3 byte "该语法正确",0;c4 byte &q 阅读全文
posted @ 2013-02-25 19:08 叶城宇 阅读(156) 评论(0) 推荐(0) 编辑
摘要: include irvine32.inc;.datai dword 0;sum qword 0;str1 byte "请输入16进制的(32位整数)乘数和被乘数",0str2 byte "乘积为:",0;j dword 0;.codemain procL1: mov edx,offset str1; call writestring; mov j,0; mov eax,0;eax为(低32位)乘积值; mov ebx,0;edx为(低32位)乘积值的中间值 mov edx,0; mov esi,0;dsi为(高32位)乘积值的中间值 mov edi,0; 阅读全文
posted @ 2013-02-25 19:07 叶城宇 阅读(513) 评论(0) 推荐(0) 编辑
摘要: include irvine32.inc.datastr1 byte "请输入所要的斐波那序列的位置:",0;str2 byte "斐波那序列的结果为:",0;str3 byte "斐波那序列的最大值为N=",0;i dword 2;var1 dword 3 dup(1,0,0);var2 dword 3 dup(1,0,0);.codemain proc mov ecx,0; mov eax,0;L1: mov var1,1; mov dword ptr var1+4,0; mov dword ptr var1+8,0; mov v 阅读全文
posted @ 2013-02-25 19:06 叶城宇 阅读(223) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页