码迷,mamicode.com
首页 > 编程语言 > 详细

汇编语言(王爽 第三版)实验十二

时间:2016-05-30 18:33:25      阅读:342      评论:0      收藏:0      [点我收藏+]

标签:

    assume cs:code
    code segment
start:    mov ax,cs
    mov ds,ax
        mov si,offset do0
    mov ax,0
    mov es,ax
    mov di,200h

        mov cx,offset do0end-offset do0
    cld
    rep movsb

    mov ax,0
    mov es,ax
    mov word ptr es:[0*4],200h
    mov word ptr es:[0*4+2],0

    mov ax,4c00h
    int 21h

do0:    jmp short do0start
    db "overflow!"
    
do0start:    push cx       
    mov ax,cs
    mov ds,ax
    mov si,202h
    
    mov ax,0b800h
    mov es,ax
    mov di,12*160+36*2

    mov cx,9
s:    mov al,[si]
    mov es:[di],al
    mov al,2
    mov es:[di+1],al
    inc si
    add di,2
    loop s

    pop cx
    mov ax,4c00h
    int 21h

do0end:    nop
    code ends
    end start

 

汇编语言(王爽 第三版)实验十二

标签:

原文地址:http://www.cnblogs.com/monster-prince/p/5543499.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!