检测点6.1

(1)下面的程序实现依次用内存0:0~0:15单元中的内容改写程序中的数据,完成程序 
assume cs:codesg 

codesg segment 

        dw 0123h,0456h,0789h,0abch,0defh,0fedh,0cbah,0987h 

start:        mov ax,0 
                mov ds,ax 
                mov bx,0 

                mov cx,8 
s:               mov ax,[bx] 
                mov cs:[bx],ax     ;补齐的代码 
                add bx,2 
                loop s 

                mov ax,4c00h 
                int 21h 

codesg ends 
end start 

(2)下面的程序实现依次用内存0:0~0:15单元中的内容改写程序中的数据,数据传送用栈进行。栈空间设置在程序内。完成程序: 
assume cs:codesg 

codesg segment 

        dw 0123h,0456h,0789h,0abch,0defh,0fedh,0cbah,0987h 

        dw 0,0,0,0,0,0,0,0,0,0 

start:        mov ax,cs     ;补齐的代码 
        mov ss,ax 
        mov sp,24h    ;补齐的代码 
         
        mov ax,0 
        mov ds,ax 
        mov bx,0 
        mov cx,8 

s:        push [bx] 
        pop cs:[bx]    ;补齐的代码 
        add bx,2 
        loop s 

        mov ax,4c00h 
        int 21h 

codesg ends 
end start
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值