home *** CD-ROM | disk | FTP | other *** search
- DOSSEG
- .MODEL SMALL
- .286
- .STACK 200h
-
- .DATA
-
- .CODE
-
- START:
- ; Initialize Graphic Mode 13h
-
- Mov AX,0013h ; Shortcut to Mov AL,13h
- ; Mov AH,0
- Int 10h
-
- ; Do the program
-
- Mov AX,0A000h ; AX=VGA Segment
- Mov ES,AX ; I know it would be easier to do Mov ES,0A000h, but
- ; you can't load ES directly... You can load ES only
- ; with one of the registers
- Push DI ; Saves DI
- Mov DI,0 ; DI=0
- Mov CX,0FA00h ; CX=64000 (320x200)
- Mov AL,0 ; AL=0
- Cicle: ; This is a label, where you can goto in any point
- ; of the program
- Stosb ; ES:DI=AL
- Inc AL ; AL=AL+1
- Loop Cicle ; This is equal to:
- ; If CX<>0 Then CX=CX-1; Jump Cicle; Else Continue
-
- Pop DI ; Restores DI
-
- ; Waits a keypress
-
- Mov AX,0800h ; AX=0800h
- Int 21h
-
- ; Closegraph
-
- Mov AX,0003h ; DosScreen = Mode 3h
- Int 10h
-
- ; Exits to DOS
-
- Mov AX,4c00h ; This is a comment... Anything after a semi-
- ; -colon will be ignored... Just to tell you
- ; that 4c00h is an hexadecimal number...
- Int 21h
-
- END START
-