| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 914 人关注过本帖
标题:大家谁会这两道汇编题目啊?!帮帮忙啦~~
只看楼主 加入收藏
liyuying1987
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-6-16
收藏
 问题点数:0 回复次数:0 
大家谁会这两道汇编题目啊?!帮帮忙啦~~
1、阅读下列程序回答问题
stack    segment     stack
dw  100dup (0)  
stack    ends
data segment
bin dw   7462
buf db   6   dup(0), 0dh, 0ah,’$’
ten dw   10
data ends
code segment
assume     cs: code , ds : data, ss: stack
start:        mov  ax, data
            mov  ds, ax
            mov  ax, bin
            or    ax, ax
            jns   plus
            neg   ax
            mov  buf, ‘—‘
            jmp   next
plus:        mov   buf, ‘+’
next:        mov   cx, 5
l1:          mov   dx, 0
            div   ten
            push     dx
            loop l1
            mov   cx, 5
            lea    bx, buf+1
l2:          pop   ax
            add   al, 30h
            mov  [bx], al
            inc    bx
loop l2
lea    dx, buf
mov   ah, 9
int     21h
mov    ah, 4ch
int      21h
codeends
            end    start
给程序添加必要注释。
画出程序框图。
指出程序的功能。
调试程序并写出程序的执行结果。
2、下列程序完成将键盘输入的两个字符串连接并分散对齐显示输出功能,补充并完成下列程序段,要求给程序添加必要注释,给出程序框图及程序的执行结果
       data segment
       dum    equ 60
       p1 db 0ah, 0dh, ‘string:’,’$’
       p2 db 0ah, 0dh,’right-adjusting of string:’,0ah, 0dh,’$’
       string1 db  num,0,num dup(‘’),0ah,0dh,’$’
       string2 db  num,0,num dup(‘’),0ah,0dh,’$’
       data ends
       stack1 segment para stack
            dw 20h dup(0)
       stack1ends
       code segment
            assume cs:code,ds:data,ss:stack1,es:data
       start:
      
      











code ends
        end    start
搜索更多相关主题的帖子: mov stack 汇编 next 
2008-06-16 19:41
快速回复:大家谁会这两道汇编题目啊?!帮帮忙啦~~
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019956 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved