|

楼主 |
发表于 2017-2-9 19:33:27
|
显示全部楼层
给代码:
1.asm
- assume cs:code
- code segment
- start:
- mov ax,cs
- mov ds,ax
- mov si,offset example
- mov ax,0
- mov es,ax
- mov di,200h
- mov cx,offset s-offset example
- cld
- rep movsb
- mov ax,0
- mov ds,ax
- mov ds:[7ch],200h
- mov ds:[7ch+2],ax
- mov ax,4c00h
- int 21h
- example:
- ;jmp short s2
- ;s1:
- ;db 'welcome to http://ljw.pe.hu!',0
- ;s2:
- ;mov ax,cs
- ;mov ds,ax
- ;mov si,offset s1-offset example
- ;mov ax,0b800h
- ;mov es,ax
- ;mov di,0
- ;
- ;mov ax,10
- ;dec ax
- ;mov bx,160
- ;mul bx
- ;mov bx,20
- ;dec bx
- ;add bx,ax
- ;mov cx,2
- ;s3:
- ;mov ah,2
- ;mov al,ds:[si]
- ;mov cx,ax
- ;mov ch,0
- ;jcxz s4
- ;mov es:[bx+di],ax
- ;inc si
- ;add di,2
- ;mov cx,2
- ;loop s3
- ;s4:
- mov ax,1234h
- add ax,ax
- iret
- s:
- nop
- code ends
- end start
复制代码
2.asm
- assume cs:code
- code segment
- start:
- int 7ch
- mov ax,4c00h
- int 21h
- code ends
- end start
复制代码
|
|