Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .8086
- .model small
- .stack 2048
- ;there's no data segment because it's not needed
- cseg segment para public 'code'
- assume cs:cseg
- Main proc
- mov ax,0b800h ;B800 is the video memory adress
- mov es,ax ;move that adress to es
- ;es stands for "extra segment"
- mov bx, ' ' ;space to bx. A space is what we will write in screen (to clean)
- xor di, di ;di -> 0
- mov cx, 24*80 ;24*80 is the size of window! 24 lines,80 columns
- mov bl, 00100000b ;[0][010][0000]b -> binary (*see below)
- ciclo:
- mov bh, es:[di] ;get screen data (text)
- mov es:[di], bh ;move the space to video adreess (in other words, write a space on screen)
- mov es:[di+1], bl
- add di, 2 ;every video adress have a size of word, so let's add 2
- loop ciclo ;repeat until cx = 0, In every loop, cx is decremented
- mov ah,4CH
- int 21H
- main endp
- cseg ends
- end main
- ;the first 0 means static, if 1, text will be blinking
- ;the next 3 digits is for brackground color [000-111]
- ;the next 4 digits is for text color [000-1111]
- ;colors
- ;black 0000
- ;blue 0001
- ;gren 0010
- ;cyan 0011
- ;red 0100
- ;magenta 0101
- ;brown 0110
- ;light grey 0111
- ;dark grey 1000
- ;light blue 1001
- ;light green 1010
- ;light cyan 1011
- ;light red 1100
- ;light magenta 1101
- ;yellow 1110
- ;white 1111
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement