王爽汇编第二版实验4

转帖: https://blog.csdn.net/seanbill/article/details/52649786

(1)编程,向内存0:200~0:23F依次传送数据0~63.

  assume cs:code 

code segment 
start:
        mov ax,0020H
        mov ds,ax
        mov bx,0 
        mov cx,40h
        s:    mov [bx],bx
            inc bx                     //每次移动一位,覆盖高位,保留低位
            loop s 
            
            mov ax,4c00h
            int 21h
code ends
end start

(3)下面的程序的功能是将“mov  ax,4c00h”之前的指令复制到内存0:200处,补传程序。

assume cs:code 

code segment 
start:
        mov ax,cs
        mov ds,ax
        mov ax,0020h
        mov es,ax
        mov bx,0 
        mov cx,16h                //用 u命令查看汇编代码相应的地址,  如  u  076A:0            
        s:    mov al,[bx]
            mov es:[bx],al
            inc bx
            loop s 
            
            mov ax,4c00h
            int 21h
code ends
end start

猜你喜欢

转载自blog.csdn.net/bjzhaoxiao/article/details/80079305