汇编语言(王爽 第三版)实验十三
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了汇编语言(王爽 第三版)实验十三相关的知识,希望对你有一定的参考价值。
2)显示八十个‘!’
assume cs:code code segment start: mov ax,cs mov ds,ax mov si,offset show mov ax,0 mov es,ax mov di,200h mov cx,offset showend-offset show cld rep movsb mov ax,0 mov es,ax mov word ptr es:[7ch*4],200h mov word ptr es:[7ch*4+2],0 mov ax,0b800h mov es,ax mov di,160*12 mov bx,offset s-offset se mov cx,80 s: mov byte ptr es:[di],‘!‘ mov byte ptr es:[di+1],2 add di,2 int 7ch se: nop mov ax,4c00h int 21h show: push bp mov bp,sp dec cx jcxz return add [bp+2],bx return: pop bp iret showend:nop code ends end start
3)显示英文诗
assume cs:code code segment s1: db ‘Good,better,best,‘,‘$‘ s2: db ‘Never let it rest,‘,‘$‘ s3: db ‘Till good is better,‘,‘$‘ s4: db ‘And better,best,‘,‘$‘ s: dw offset s1,offset s2,offset s3,offset s4 row: db 2,4,6,8 start: mov ax,cs mov ds,ax mov bx,offset s mov si,offset row mov cx,4 ok: mov bh,0 mov dh,[si]*160 mov dl,0 mov ah,2 int 10h mov dx,[bx] mov ah,9 int 21h inc si add bx,2 loop ok mov ax,4c00h int 21h code ends end start
以上是关于汇编语言(王爽 第三版)实验十三的主要内容,如果未能解决你的问题,请参考以下文章