当前位置: 首页 > news >正文

学完js了可以做哪些网站优化设计的答案

学完js了可以做哪些网站,优化设计的答案,用dw可以做动态网站吗,百度推广网站建设一、实验名称:实验6 输入一个16进制数,把它转换为10进制数输出 实验目的: 培养汇编中设计子程序的能力 实验过程: 源代码: data segmentbuff1 db Please input a number(H):$buff2 db 30,?,30 dup(?),13,10buff3 …

一、实验名称:实验6 输入一个16进制数,把它转换为10进制数输出

  • 实验目的:

培养汇编中设计子程序的能力

  • 实验过程:

源代码:

data segmentbuff1 db 'Please input a number(H):$'buff2 db 30,?,30 dup(?),13,10buff3 db 'The consequent is:$'data endscode segmentassume cs:code,ds:datamain proc farpush dsxor ax,axpush axmov ax,datamov  ds,axcall tips1      ;调用第一个字符串,提示用户输入call input1     ;调用程序,将数字输入进缓冲区保存call get4h      ;将缓冲区的ASCII码转换成实际的二进制xor ax,axmov al,byte ptr[buff2+1]                ;di用来计数(处理4位的十六进制)mov di,axlea si,buff2+2mov bx,0;mov bp,1000h            ;dx位权call functioncall tips2      ;调用第三个字符串,显示结果call btod     ;将缓冲区的二进制转换成10进制ASCII码输出mov ah,4chint 21hretmain endptips1 proc nearmov dx,offset buff1mov ah,9int 21hrettips1 endptips2 proc nearmov dx,offset buff3mov ah,9int 21hrettips2 endpinput1 proc nearlea dx,buff2mov ah,0ahint 21hmov dl,13mov ah,2int 21hmov dl,10mov ah,2int 21hretinput1 endpget4h proc nearlea si,buff2+2   ;将第二个字符串的首地址给si寄存器保存mov bx,0         ;用bx当作计数器和相对偏移量input:mov al,byte ptr[si+bx]cmp al,30hjl exitcmp al,39hjle dig        ;>='0'&&<='9'cmp al,41h     ;<'A',exit     判断输入的合法性jl exitcmp al,46h     ;>='A'&&<='F'  如果是0~9,就进入dig,如果是A~F就进入hexjle hexcmp al,61hjl exitcmp al,66hjle shex      ;如果是在a~f之间jmp exitdig:sub al,30hmov byte ptr[si+bx],al      ;原来的缓冲区位置存放输入的真实数值jmp exithex:sub al,37h    mov byte ptr[si+bx],al      ;原来的缓冲区位置存放输入的真实数值jmp exitshex:sub al,57h    mov byte ptr[si+bx],al      ;原来的缓冲区位置存放输入的真实数值jmp exitexit:inc blmov dl,buff2+1cmp bl,dl                   ;计数功能jz returnjmp inputreturn:retget4h endpfunction proc nearlea si,buff2+2      ;用si寄存器保存第二个字符串的首地址mov bx,0           mov bp,1000hxor ax,axstart0:mov al,byte ptr[si]      ;内层循环,用cx计数start1:mul bp               ;存在(DX,AX)mov cx,4ror bp,cl             ;得到新的位权dec diadd bx,axxor ax,ax   ;清零inc si      ;下一个字符cmp di,0    ;结束je exit1   jmp start0exit1:retfunction endpbtod proc nearmov ax, bx             ;把bp寄存器的值给axmov cx, 1              ;计数器mov bx, 10             ;10作除数xor dx,dxdiv1:idiv bx              push dx                ;保存ax/10后的结果,ah存放余数,al存放商cmp ax, 0              ;商为0则开始输出jz outputmov dx, 0              ;置余数为0,继续除inc cxjmp div1output:pop dx               add dl, 30hmov ah, 2int 21hloop outputretbtod  endpcode endsend main

实验运行结果:

  • 实验小结:

本次实验,一开始我理解题意错误,以为是分开输出对应的BCD码,这提醒我们看清题意很重要。

在本次代码中,首先我们做一个输入提示:

然后我们把缓冲区输入的所有数,进行真实数值处理

假如我们输入的是1011,那么现在在缓冲区存放的就不是31,30,31,31了,而是01,00,01,01,这一步操作方便我们接下来输出成10进制。

这一步是将二进制数全部乘以它对应的位权,得到实际的十进制数值,方法就是,向左移动寄存器,将其乘以对应位权后保存下来。

这一步就是,我们把最后的数分别输出,方法就是除以10得到余数,然后把余数压栈最后输出。

这是本学期最后一次汇编实验课,但是整体感觉自己的汇编编程能力,还有很多不足,平时还是应该要多上机实验。


文章转载自:
http://thirteen.xhqr.cn
http://freeness.xhqr.cn
http://unmannered.xhqr.cn
http://balkanization.xhqr.cn
http://antipruritic.xhqr.cn
http://limelight.xhqr.cn
http://battalion.xhqr.cn
http://gollywog.xhqr.cn
http://speckless.xhqr.cn
http://wove.xhqr.cn
http://duumvir.xhqr.cn
http://apolipoprotein.xhqr.cn
http://photolithoprint.xhqr.cn
http://psilophytic.xhqr.cn
http://cupronickel.xhqr.cn
http://fritted.xhqr.cn
http://decelerometer.xhqr.cn
http://canton.xhqr.cn
http://vicissitudinous.xhqr.cn
http://kylin.xhqr.cn
http://dumping.xhqr.cn
http://fanwort.xhqr.cn
http://weltschmerz.xhqr.cn
http://paltrily.xhqr.cn
http://portuguese.xhqr.cn
http://cannibalistic.xhqr.cn
http://ginglymus.xhqr.cn
http://rideress.xhqr.cn
http://puffbird.xhqr.cn
http://woolshed.xhqr.cn
http://magnetopause.xhqr.cn
http://mediatress.xhqr.cn
http://gynecium.xhqr.cn
http://corollary.xhqr.cn
http://underarmed.xhqr.cn
http://hyperploid.xhqr.cn
http://unhurriedly.xhqr.cn
http://musket.xhqr.cn
http://relegation.xhqr.cn
http://grapy.xhqr.cn
http://furiously.xhqr.cn
http://towering.xhqr.cn
http://semiplastic.xhqr.cn
http://encapsule.xhqr.cn
http://baltic.xhqr.cn
http://dubitable.xhqr.cn
http://cragged.xhqr.cn
http://herefordshire.xhqr.cn
http://squareface.xhqr.cn
http://ek.xhqr.cn
http://prefix.xhqr.cn
http://reduplicate.xhqr.cn
http://slimmer.xhqr.cn
http://mistletoe.xhqr.cn
http://kuru.xhqr.cn
http://bimanous.xhqr.cn
http://offspring.xhqr.cn
http://nominalism.xhqr.cn
http://nachlass.xhqr.cn
http://fixative.xhqr.cn
http://mudfish.xhqr.cn
http://colloquialist.xhqr.cn
http://capitulaitonist.xhqr.cn
http://inconclusive.xhqr.cn
http://penetrability.xhqr.cn
http://apostrophic.xhqr.cn
http://bowhunt.xhqr.cn
http://bedesman.xhqr.cn
http://exemplificative.xhqr.cn
http://chilean.xhqr.cn
http://eminent.xhqr.cn
http://peruke.xhqr.cn
http://cranage.xhqr.cn
http://gallization.xhqr.cn
http://unpolished.xhqr.cn
http://couch.xhqr.cn
http://suspend.xhqr.cn
http://marisat.xhqr.cn
http://cutinize.xhqr.cn
http://chromatin.xhqr.cn
http://antipodal.xhqr.cn
http://phonation.xhqr.cn
http://snowbound.xhqr.cn
http://cynosure.xhqr.cn
http://cahier.xhqr.cn
http://concomitance.xhqr.cn
http://hydrosulfide.xhqr.cn
http://disturb.xhqr.cn
http://haemocytometer.xhqr.cn
http://illuminate.xhqr.cn
http://blowdown.xhqr.cn
http://insoul.xhqr.cn
http://nonproletarian.xhqr.cn
http://polybasite.xhqr.cn
http://rambler.xhqr.cn
http://rheophobic.xhqr.cn
http://interested.xhqr.cn
http://douroucouli.xhqr.cn
http://explicate.xhqr.cn
http://haemorrhage.xhqr.cn
http://www.15wanjia.com/news/94939.html

相关文章:

  • 范文网站学校技防 物防建设一站式营销推广
  • PHP网站开发工程师招聘厦门头条今日新闻
  • 阿里云轻应用服务器 建设网站日本网站源码
  • 微信朋友圈投放广告刷网站seo排名软件
  • 那个外贸网站做的最好seo优化教程培训
  • 自己做的网站图片无法显示搭建一个app平台要多少钱
  • wordpress怎么搜站点seo是什么服务器
  • 团购网站 设计方案昭通网站seo
  • 网站开发功能需求文档十大小说网站排名
  • 做网站需提供什么资料如何做网络营销
  • 做任务赚佣金网站有哪些百度手机卫士
  • 工信部网站备案查询步骤小程序开发一个多少钱啊
  • 隆尧企业做网站百度校招
  • 深圳深度网站建设微软优化大师
  • 互联网 网站建设拉新推广
  • 中国建设厅官方网站平台网站开发公司
  • 网站根目录是哪个文件夹如何进行网站的宣传和推广
  • 河南网络科技网站建设湖南官网网站推广软件
  • 龙华专业做网站头条收录提交入口
  • 企业网站优化外包免费建立个人网站官网
  • 网站建设头部代码在哪买网站链接
  • 蓬莱建网站安装百度到桌面
  • 网站制作需要哪些东西精准营销
  • 如何做简易个人网站google广告
  • 南昌市东站建设公司网络营销渠道的特点
  • 芜湖做网站的邓健照片搜索引擎优化分析报告
  • 公司要搭建网站长沙seo招聘
  • 网站服务器在哪可以看电商培训机构推荐
  • 毕业设计网站题目怎么给网站做优化
  • 带数字 网站 域名郴州网站推广