line = 160 ;the number of blocks on a line .model small .stack 100h .data place dw 0 ;keeps the current location of dropped letter (range: 0-79) delay db ? ;the amount of delay, used in Wait1 .code ;*********************MAIN initialize: mov ax,@data ;program initialization: set @data, set mode text screen mov ds,ax mov ax,0b800h mov es,ax mov ax,3 int 10h main: call ColorScreen ;fills 2 lines of junk ASCII mov ax,2 ;fixes an error caused with odd numbers mul place mov place,ax mov bx,place ;the place from which to start dropping mov al,80 chain: call DropLetter ;drops letters 80 times sub al,1 jnz chain finish: mov ah,4ch ;program termination - return control to OS int 21h ;********************** Wait1: mov ch,delay ;this function waits for the amount of time delay has been set to waitAgain: sub ch,1 jnz waitAgain ret DropLetter: mov cx,12 ;step 0 mov dx,es:[bx] mov ah,es:[bx+160] mov si,es:[bx+320] mov es:[bx],0 top: add bx,160 ;step 1 mov es:[bx],dx mov es:[bx],ah ;step 2 mov es:[bx+160],dx mov ah,es:[bx+320] mov es:[bx+160],si ;step 3 mov es:[bx+320],dx mov si,es:[bx+480] add bx,160 loop top add place,2 ;done dropping letter, move to next letter to drop mov bx,place ret ColorScreen:mov bx,0 ;fills ASCII for as many lines as requested mov cx,line mov ah,0 FSLoop: mov es:[bx],ah add ah,1 add bx,2 loop FSLoop ret end