home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / MISC / MAG09.ZIP / FLSCR.ASM < prev    next >
Encoding:
Assembly Source File  |  2010-11-17  |  1.5 KB  |  54 lines

  1.     DOSSEG
  2.     .MODEL SMALL
  3.     .286
  4.     .STACK 200h
  5.  
  6.     .DATA
  7.  
  8.     .CODE
  9.  
  10.     START:
  11.           ; Initialize Graphic Mode 13h
  12.  
  13.           Mov AX,0013h ; Shortcut to Mov AL,13h
  14.                        ;             Mov AH,0
  15.           Int 10h
  16.  
  17.           ; Do the program
  18.  
  19.           Mov AX,0A000h ; AX=VGA Segment
  20.           Mov ES,AX     ; I know it would be easier to do Mov ES,0A000h, but
  21.                         ; you can't load ES directly... You can load ES only
  22.                         ; with one of the registers
  23.           Push DI       ; Saves DI
  24.           Mov DI,0      ; DI=0
  25.           Mov CX,0FA00h ; CX=64000 (320x200)
  26.           Mov AL,0      ; AL=0
  27.           Cicle:        ; This is a label, where you can goto in any point
  28.                         ; of the program
  29.                 Stosb   ; ES:DI=AL
  30.                 Inc AL  ; AL=AL+1
  31.                 Loop Cicle ; This is equal to:
  32.                            ;   If CX<>0 Then CX=CX-1; Jump Cicle; Else Continue
  33.  
  34.           Pop DI        ; Restores DI
  35.  
  36.           ; Waits a keypress
  37.  
  38.           Mov AX,0800h  ; AX=0800h
  39.           Int 21h
  40.  
  41.           ; Closegraph
  42.  
  43.           Mov AX,0003h ; DosScreen = Mode 3h
  44.           Int 10h
  45.  
  46.           ; Exits to DOS
  47.  
  48.           Mov AX,4c00h           ; This is a comment... Anything after a semi-
  49.                                  ; -colon will be ignored... Just to tell you
  50.                                  ; that 4c00h is an hexadecimal number...
  51.           Int 21h
  52.  
  53.     END START
  54.