汇编语言第9章实验9代码

assume cs:codesg
stacksg segment
    dw 10 dup (0)
stacksg ends
datasg segment
    db 'welcome to nasm!'
datasg ends
codesg segment
    start:    mov ax,0b800h
            mov ds,ax
            mov ax,stacksg
            mov ss,ax
            mov sp,0ah
            mov bx,0
            mov cx,25    
        s:    push cx
            mov cx,80
            mov di,0
        s0:    mov byte ptr [bx+di],0h
            mov byte ptr [bx+1],07h
            add di,2
            loop s0
            add bx,0a0h
            pop cx
            loop s
            mov cx,7
            mov bx,64
            mov ax,datasg
            mov es,ax
            mov di,0
        s1:    mov al,es:[di]
            mov byte ptr [780h+bx],al
            mov byte ptr [780h+bx+1],02h
            add bx,2
            inc di
            loop s1
            add bx,2
            inc di
            mov cx,2
        s2:    mov al,es:[di]
            mov byte ptr [780h+bx],al
            mov byte ptr [780h+bx+1],24h
            add bx,2
            inc di
            loop s2
            add bx,2
            inc di
            mov cx,5
        s3:    mov al,es:[di]
            mov byte ptr [780h+bx],al
            mov byte ptr [780h+bx+1],71h
            add bx,2
            inc di
            loop s3
            mov ax,4c00h
            int 21h
codesg ends
end    start

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值