汇编实验5
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了汇编实验5相关的知识,希望对你有一定的参考价值。
1. 将下面的程序编译、连接、加载、跟踪,然后回答问题。
assume cs:code,ds:data,ss:stack
data segment
dw 0123h,0456h,0789h,0abch,0defh,0fedh,0cbah,0987h
data ends
stack segment
dw 0,0,0,0,0,0,0,0
stack ends
code segment
start:
mov ax,stack
mov ss,ax
mov sp,16
mov ax,data
mov ds,ax
push ds:[0]
push ds:[2]
pop ds:[2]
pop ds:[0]
mov ax,4c00h
int 21h
code ends
end start
2.
assume cs:code,ds:data,ss:stack
data segment
dw 0123h,0456h
data ends
stack segment
dw 0,0
stack ends
code segment
start:
mov ax,stack
mov ss,ax
mov sp,16
mov ax,data
mov ds,ax
push ds:[0]
push ds:[2]
pop ds:[2]
pop ds:[0]
mov ax,4c00h
int 21h
code ends
end start
3.
assume cs:code ,ds:data,ss:stack
code segment
start:
mov ax,stack
mov ss,ax
mov sp,16
mov ax,data
mov ds,ax
push ds:[0]
push ds:[2]
pop ds:[2]
pop ds:[0]
mov ax,4c00h
int 21h
code ends
data segment
dw 0123H,0456H
data ends
stack segment
dw 0,0
stack ends
end start
5.
code segment
start:
mov ax,a
mov ds,ax
mov bx,0
mov cx,8
s:mov al,ds:[bx]
add al,ds:[bx+16]
mov ds:[bx+32],al
inc bx
loop s
mov ax,4c00h
int 21h
code ends
6.
code segment
start:
mov ax,a
mov ds,ax
mov bx,0
mov ax,b
mov ss,ax
mov sp,16
mov cx,8
s:push [bx]
inc bx
inc bx
loop s
mov ax,4c00h
int 21h
code ends
以上是关于汇编实验5的主要内容,如果未能解决你的问题,请参考以下文章