. : : Assembly Language : : .  |  首页  |  我提出的问题  |  我参与的问题  |  我的收藏  |  消息中心   |  游客  登录  | 
刷新 | 提问 | 未解决 | 已解决 | 精华区 | 搜索 |
  《汇编语言》论坛 ->转移指令的原理
  管理员: assembly   [回复本贴] [收藏本贴] [管理本贴] [关闭窗口]
主题 : :  实验九,大家帮忙评价下  [待解决] 回复[ 2次 ]   点击[ 395次 ]  
michael47
[帖 主]   [ 发表时间:2010-11-02 16:39 ]   [引用]   [回复]   [ top ] 
荣誉值:0
信誉值:0
注册日期:2010-10-13 21:26
assume cs:code,ss:stack

stack segment
        dw 8 dup (0)
stack ends

code segment

        db 02h,24h,71h
        db "welcome to masm!"

start:  mov ax,0b800h
        mov ds,ax

        mov ax,stack
        mov ss,ax
        mov sp,10h

        mov bp,11*160
        mov di,0
        mov cx,3
s:      push cx
        mov si,32*2
        mov bx,0
        mov cx,16
s0:     mov al,cs:[3+bx]
        mov ds:[bp+si],al

        mov al,cs:[di]
        mov ds:[bp+si+1],al
        inc bx
        add si,2
        loop s0

        add bp,160
        inc di
        pop cx
        loop s

        mov ax,4c00h
        int 21h

code ends
end start
masmaster
[第1楼]   [ 回复时间:2010-11-02 22:17 ]   [引用]   [回复]   [ top ] 
荣誉值:268
信誉值:12
注册日期:2010-06-18 22:19
这程序楼主汇编并调试了吗?
michael47
[第2楼]   [ 回复时间:2010-11-05 15:45 ]   [引用]   [回复]   [ top ] 
荣誉值:0
信誉值:0
注册日期:2010-10-13 21:26
C:\MASM>masm 188;
Microsoft (R) Macro Assembler Version 5.00
Copyright (C) Microsoft Corp 1981-1985, 1987.  All rights reserved.


  50032 + 409552 Bytes symbol space free
                                welcome to masm!
      0 Warning Errors          welcome to masm!
      0 Severe  Errors          welcome to masm!

C:\MASM>link 188;

Microsoft (R) 8086 Object Linker  Version 3.05
Copyright (C) Microsoft Corp 1983, 1984, 1985.  All rights reserved.
调试结果如下:
Warning: no stack segment

C:\MASM>debug 188.exe
-g

Program terminated normally
-
需要登录后才能回帖 -->> 请单击此处登录
    Copyright © 2006-2024   ASMEDU.NET  All Rights Reserved