汇编语言实验16

assume cs:code
 code segment
    start:mov ax,0
          mov es,ax
           mov ax,200h
          mov bx,7*4
          mov es:[bx],ax
          add bx,2
          mov word ptr es:[bx],0
 
          mov di,200h
          mov ax,cs
          mov ds,ax
          mov ax,offset x
          mov si,ax
          mov di,200h
          mov cx,offset xx- offset x
          cld
          rep movsb
          mov ah,0
          
          int 7ch
          mov ax,4c00h
          int 21h
org 200h
        x:jmp short startt
            table dw gongneng1,gongneng2,gongneng4
          startt:push bx
                 mov bl,ah
                 mov bh,0
                 add bx,bx
                 call word ptr table[bx]
                 eend:pop bx
                     iret
                 
           gongneng1:push ax
                     push bx
                     push ds
                    
                     push cx
                     
                     mov ax,0b800h
                     mov ds,ax
                     mov bx,0
                     mov cx,2000
                    s:mov byte ptr ds:[bx],' '
                      add bx,2
                      loop s
                    pop ax
                    pop bx
                    pop ds
                    pop cx
                     ret
             gongneng2:push ax
                       push bx
                       push cx
                       push ds
                       mov ax,0b800h
                       mov ds,ax
                       mov bx,1
                      mov cx,2000
                      s0:and byte ptr ds:[bx],11111000b
                         or es:[bx],al
                         add bx,2
                        loop s0
                      pop ax
                      pop bx
                      pop cx
                      pop ds
                       ret
           gongneng4:push ax
                       push bx
                       push cx
                       push ds 
                      push si
                      push es
                      push di
                     mov ax,0b800h
                     mov ds,ax
                     mov es,ax
                     mov si,160h
                     mov di,0
                     cld 
                     mov cx,24
                     s2:push cx
                        mov cx,160
                        rep movsb
                       pop cx
                     loop s2
                 
                       ret
                     xx:nop
            code ends 
                 end
                     
          

 

转载于:https://www.cnblogs.com/xuehongyang/p/5444868.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值