; Blink.Asm will add 1 to the character attribute, for each of the ; 80 Characters on all 25 Lines of the Screen, after each ; character entered from the keyboard. ; will return you to DOS ; ; Character Attribute: |Char.|<--Background--->|<------Character------>| ; |Blink| Red |Green| Blue| Bold| Red |Green| Blue| ; --=-- --=-- --=-- --=-- --=-- --=-- --=-- --=-- ; 0 0 0 0 0 0 0 0 ; ; Black = 0 0 0 ; Blue = 0 0 1 ; Green = 0 1 0 ; Turquoise = 0 1 1 ; Red = 1 0 0 ; Purple = 1 0 1 ; Orange = 1 1 0 ; White = 1 1 1 ; Data Segment SA DB 00 ; Screen Character Attribute Data Ends Code Segment Assume DS:Data, CS:Code Prog_Start: Mov AX,Data ; Mov DS,AX ; A1: Mov AH, 1 ; Keyboard Input function Int 21H ; Now go get Character Cmp AL, 33O ; = 33 Octal JE Gonzo ; OK...they want to exit to DOS Mov AX,0B800H ; This is the memory address of the Screen Mov ES,AX ; (top left corner) ; CLD ; Set string move direction forward Mov DI,1 ; Make Destination Index 1... ES:DI = 0B8001H Mov AL, SA ; Screen Attribute to AL ; The Screen has 2000 Words (80 X 25 lines) Mov CX,2000D ; each Word = 1 Char.Byte & 1 Attribute Byte ChgAtrib: StoSB ; <--This does 2000D Word moves of AL Add DI, 1 ; Step over Character to next Attribute Loop ChgAtrib ; and go change it... Add SA, 1 ; All done..increase Attribute by 1 for next time Jmp A1 ; Again... Gonzo: Mov AX, 4C00H ; Return to DOS Int 21H Code Ends End Prog_Start