滑动平均滤波程序

上传人:子 文档编号:41996749 上传时间:2018-05-31 格式:DOC 页数:5 大小:94.50KB
返回 下载 相关 举报
滑动平均滤波程序_第1页
第1页 / 共5页
滑动平均滤波程序_第2页
第2页 / 共5页
滑动平均滤波程序_第3页
第3页 / 共5页
滑动平均滤波程序_第4页
第4页 / 共5页
滑动平均滤波程序_第5页
第5页 / 共5页
亲,该文档总共5页,全部预览完了,如果喜欢就下载吧!
资源描述

《滑动平均滤波程序》由会员分享,可在线阅读,更多相关《滑动平均滤波程序(5页珍藏版)》请在金锄头文库上搜索。

1、DATAS SEGMENTSEGMENTbuffer dbdb 20 dupdup(?)innum dbdb 20 dupdup(?)indata dbdb 20 dupdup(?)outdata dbdb 20 dupdup(?)outnum dbdb 20 dupdup(?)input_message dbdb Please input 20 numbers:,0dh,0ah,$screen_long dbdb please input screen_long:,0dh,0ah,$ DATAS ENDSENDSCODES SEGMENTSEGMENTASSUMEASSUME CS:CODE

2、S,DS:DATAS STARTSTART:MOV AX,DATASMOV DS,AXcall inputmov ah,2hmov dl,0dhint 21hmov dl,0ahint 21hjmp circlea0:mov ah,01hint 21hcmp al,qJZ OVERCMP AL,QJZ OVERcmp al,ajz STARTSTARTcall inout1 circle: call asc_to_decmov dx,offset screen_longmov ah,09hint 21hcall shift_averagecall dec_to_asccall outputjm

3、p a0 OVER: mov ah,4chint 21hinput procproc nearmov dx,offset input_messagemov ah,09hint 21hmov si,0mov cx,20 a1: mov ah,01hint 21h mov innum+si,al inc siloop a1retinput endpendpinout1 procproc nearmov cx,20mov si,0hmov di,0h a2:mov bl,innum+simov buffer+di,blinc siinc diloop a2mov cx,19mov si,00hmov

4、 di,01h a3:mov bl,buffer+simov innum+di,blinc siinc diloop a3mov innum,almov ah,02hmov dl,0dhint 21hmov dl,0ahint 21hmov si,0hmov cx,20 a4:mov dl,innum+simov ah,2h int 21hinc siloop a4mov dl,0dhint 21hmov dl,0ahint 21hret inout1 endpendpoutput procproc nearmov si,0hmov cx,20 a5:mov dl,outnum+simov a

5、h,2hint 21hinc siloop a5 mov dl,0dhint 21hmov dl,0ahint 21hret output endpendpasc_to_dec procproc nearmov si,0hmov di,0hxor ax,axmov cx,20 a6:mov al,innum+sisub al,30hmov indata+di,alinc siinc diloop a6ret asc_to_dec endpendpshift_average procproc nearmov ah,01hint 21hsub al,30hxor dx,dxmov dl,almov

6、 di,00hxor bx,bxmov cx,21sub cx,dxmov dh,dl a10: xor ax,axmov si,di a7: mov bl,indata+siadd ax,bxdec dlinc sicmp dl,0jnz a7div dhmov outdata+di,alinc dimov dl,dhloop a10sub dh,1xor cx,cxmov cl,dh a9:mov si,dimov bl,indata+simov outdata+di,blinc siinc diloop a9mov ah,02hmov dl,0dhint 21hmov dl,0ahint 21hret shift_average endpendpdec_to_asc procproc nearmov si,0hmov di,0hmov cx,20 a8:xor ax,axmov al,outdata+siadd al,30hmov outnum+di,alinc siinc diloop a8ret dec_to_asc endpendpCODES ENDSENDSENDEND STARTSTART

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 生活休闲 > 科普知识

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号