xiongwenxuan 发表于 2017-8-21 17:52:11

试验6.5

1
assume cs: codesg

a segment
db 1,2,3,4,5,6,7,8
a ends

b segment
db 1,2,3,4,5,6,7,8
b ends

c1 segment
db 0,0,0,0,0,0,0,0
c1 ends

codesg segment
start:
    mov ax, c1
    mov ds, ax
       
        mov ax, a
    mov es, ax
   
    mov bx, 0
    mov cx, 4
s:
    mov ax, es:
    mov , ax       
    add bx, 2
        loop s

    mov ax, b
    mov es, ax
    mov bx, 0
    mov cx, 4
   s1:
    mov ax, es:
    add ,ax
    add bx, 2h
        loop s1
   
mov ax,4c00h
int 21h
codesg ends

end start






2.
assume cs: code

a segment
dw 1,2,3,4,5,6,7,8,9,0ah,0bh,0ch,0dh,0eh,0fh,0ffh
a ends

b segment
dw 0,0,0,0,0,0,0,0
b ends

code segment
start:
    mov ax, b
        mov ss, ax
        mov sp, 16
       
        mov ax, a
        mov ds, ax
       
        mov bx, 0
        mov cx, 8
s:
    push
        add bx, 2
        loop s

    mov ax, 4c00h
        int 21h
   
code ends

end start
页: [1]
查看完整版本: 试验6.5