home *** CD-ROM | disk | FTP | other *** search
/ Solo Programadores 22 / SOLO_22.iso / disk22 / modosx / ejemplo4.asm < prev    next >
Encoding:
Assembly Source File  |  1996-03-25  |  2.3 KB  |  53 lines

  1. ;;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  2. ;;▒▒                                                                       ▒▒
  3. ;;▒▒  Ejemplo de inicialización y uso del modo X.                          ▒▒
  4. ;;▒▒                                                                       ▒▒
  5. ;;▒▒  1996 Compiler SoftWare                                               ▒▒
  6. ;;▒▒                                                                       ▒▒
  7. ;;▒▒  Creado con Borland TASM 3.1 pero creo que funcionará con todos los de▒▒
  8. ;;▒▒  Borland a partir de la v2.0, y con otros Assemblers shareware median-▒▒
  9. ;;▒▒  te pequeñas modificaciones de adaptación a su sintaxis.              ▒▒
  10. ;;▒▒                                                                       ▒▒
  11. ;;▒▒  Ver COMPILER.NFO                                                     ▒▒
  12. ;;▒▒                                                                       ▒▒
  13. ;;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒;-)▒▒▒▒
  14.  
  15.         DOSSEG
  16.         .286                                     ; SHL BX, 6  ; etc...
  17.         .MODEL SMALL
  18.  
  19.         .STACK 200h
  20.  
  21.         .DATA                                 
  22.                                                   
  23.         .CODE
  24.  
  25. include modox.inc                                ; librería
  26.  
  27. Start:
  28.         call Set_320x240X               
  29.  
  30.         mov bx, 255                     ; Xinicial = 255
  31.         mov cx, 99                      ; Y = 99
  32. bucle:                                  
  33.         mov ah, bl                      ; COLOR = X           (255->0)
  34.         call PutPixelX                  ; ponemos 255 puntos en una línea 
  35.         dec bx                          ; horizontal.
  36.         jnz bucle
  37.  
  38.                                          ; prueba de GetPixelX ( = 0 )
  39.         xor bx, bx                       ; coord. X  (0)
  40.         xor cx, cx                       ; coord. Y  (0)
  41.         call GetPixelX                   ; AL = GetPixelX( 0, 0 );
  42.  
  43.         xor ah, ah
  44.         int 16h                          ; pausa
  45.         
  46.         mov ax, 3                        
  47.         int 10h                          ; modo texto 80x25 x 16c
  48.  
  49.         mov ah, 4ch
  50.         int 21h                          ; salir al dos.
  51.  
  52. END Start 
  53.