Advertisement
SMicro

Desplazamiento del texto en diagonal suave a nivel de pixel

May 13th, 2015
596
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. *-----------------------------------------------------------
  2. * Title      :
  3. * Written by :Fulgencio
  4. * Date       :
  5. * Description:Desplaza una cadena de texto en modo gráfico
  6. *             suavemente a nivel de pixel
  7. *-----------------------------------------------------------
  8.     ORG    $1000
  9. START:                  ; first instruction of program
  10.  
  11.     MOVE.L #95,D0  ;Texto en X,Y modo gráfico
  12.     MOVE.L #30,D1  ;X=D1
  13.     MOVE.L #0,D2   ;Y=D2
  14.    
  15. BUCLE
  16.     MOVE.L #CADNUM,A1
  17.     TRAP #15       ;Pinta el texto en coordenada gráfica
  18.    
  19.     JSR RETARD
  20.     ADD.L #1,D1 *Lo movemos en diagonal x++ e y++
  21.     ADD.L #1,D2
  22.     CMP.L #460,D2 *Llegó abajo ?
  23.     BEQ SALIR
  24.  
  25.     JMP BUCLE
  26. SALIR
  27.    
  28.     SIMHALT             ; halt simulator
  29.    
  30. * Put program code here
  31.  
  32. RETARD  MOVEM.L D0-D1,-(A7)
  33.         MOVE.L #23,D0
  34.         MOVE.L #1,D1
  35.         TRAP #15
  36.         MOVEM.L (A7)+,D0-D1
  37.         RTS
  38.  
  39.  
  40. * Put variables and constants here
  41. CADNUM DC.B '123',0
  42.     END    START        ; last line of source
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement