;by:double; date:2009-09-19; ver:0.1 assume cs:codesg,ds:datasg datasg segment db 'welcome to masm!' datasg ends codesg segment start: mov ax,datasg mov ds,ax mov ax,0b800h mov es,ax mov si,0 mov di,64 mov cx,16 s1: mov al,ds:[si] mov es:6e0h[di],al mov al,10001010b inc di mov es:6e0h[di],al inc di inc si loop s1 mov si,0 mov di,64 mov cx,16 ;print line 1, with attribute BL,HL, green character. s2: mov al,ds:[si] mov es:780h[di],al mov al,10101100b inc di mov es:780h[di],al inc di inc si loop s2 mov si,0 mov di,64 mov cx,16 ;print line 2, with attribute BL,HL,green background and red character. s3: mov al,ds:[si] mov es:820h[di],al mov al,11111001b inc di mov es:820h[di],al inc di inc si loop s3 ;print line 1, with attribute BL,HL,white background and blue character. mov ax,4c00h int 21h codesg ends end start