Wang Shuang compilation Experiment 9

Source: Internet
Author: User
1. Experiment 9 2 assume Cs: code, DS: Data 3 data segment 4 dB 'Welcome to MASM! '5 data ends 6 7 code segment 8 start: 9 mov ax, data10 mov ds, ax; define data segment 11 12 mov ax, 0b800h13 mov es, ax; define the display segment 14 15 mov CX, 1616 mov Si, 017 mov Di, 10*160 + 80; place the output display in the middle of 10th rows 18 19 s: 20 mov Al, [Si] 21 mov ah, 2; Green 22 mov ES: [di], ax23 24 Inc si25 add Di, 226 27 loop s28 29 mov CX, 1630 mov Si, 031 mov Di, 11*160 + 80; put the output in the middle of the 11th line 32 33 S1: 34 mov Al, [Si] 35 mov ah, 00100100b; 36 mov es in green background Red: [di], ax37 38 Inc si39 add Di, 240 41 loop s142 43 mov CX, 1644 mov Si, 045 mov Di, 12*160 + 80; place the output in the middle of row 12th 46 47 S2: 48 mov Al, [Si] 49 50 mov ah, 01110001b; white bottom blue 51 mov ES: [di], ax52 53 Inc si54 add Di, 255 56 loop s257 58 mov ax, 4c00h59 int 21h60 61 code ends62 end start; line N is N * 160, a row contains 80 characters, 160 bytes

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.