80x86汇编屏保程序

编程入门 行业动态 更新时间:2024-10-22 15:29:28

80x86汇编<a href=https://www.elefans.com/category/jswz/34/1728268.html style=屏保程序"/>

80x86汇编屏保程序

;;旋转的文字[汇编]
   code Segment
   .386P
   org 100h
   assume cs:code,ds:code,es:code
   start:
   push cs
   pop ds
   push ds
   pop es
   call csh
   mov ax,13h
   int 10h
   mov ax,1300h
   mov bx,000eh ;BH=页码 BL=属性(若AL=00H或01H)
   mov cx,cnt ;0014h ;CX=显示字符串长度
   mov dx,100h ;010ah ;DH,DL=起始行,列
   mov bp,offset hello ;ES:BP=显示字符串的地址
   int 10h
mov ax,0a000h
mov es,ax
push es
push ds
pop es
pop ds
mov si,320*6
mov di,2000h
mov cx,320*12
rep movsb

push ds
push es
pop ds
pop es

call clear

mov bx,1000h
again:
mov si,2000h
mov di,[bx]
mov cx,320*12
next: lodsb
test al,al
jz kk1
mov al,color
kk1: stosb
loop next
call delay
inc bx
inc bx
cmp bx,1000h+360*2
jb ok
mov bx,1000h
inc color
ok:
mov ah,1
int 16h
jz again
mov ah,0
int 16h
cmp ah,1
jnz again

   mov ax,3
   int 10h
   mov ah,4ch
   int 21h

 csh:
    cld
    MOV       DI,1000H
    MOV       CX,360
 @csh:
    INC       ROT
    FLDPI
    FIDIV     RRR
    FIMUL     ROT
    FSINCOS
    FIMUL     RX
    FISTP     XX
    FIMUL     RY
    FISTP     YY
    ADD       XX, 100 ;120
    ADD       YY, 90 ;100
    MOV       AX, YY
 imul ax,320
 add  ax,XX
    stosw
    LOOP      @csh
    ret 
;=========== 
   color  DB        2
     RRR  DW        180
      YY  DW        100
      XX  DW        160
      RX  DW        80 ;120
      RY  DW        60 ;90
     ROT  DW        ?
;------------
Delay:
   push dx
   push ax
   t_a: mov dx,3dah
   in al, dx
   test al, 8
   Jnz t_a
   t_b: in al, dx
   test al, 8
   Jz t_b
   pop ax
   pop dx
   ret 

clear:
   xor di,di
   mov ax,di
   mov cx,320*200
   rep stosb
   ret

   hello db ' Hello World! '
   cnt equ $- hello
   code ends 
   end start

更多推荐

80x86汇编屏保程序

本文发布于:2024-02-11 20:25:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1683258.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:屏保   程序

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!