Wang Shuang "assembly language" test seven

Source: Internet
Author: User

1AssumeCS:Codeds:Dataes:TableSS:Stack2 3 Data Segment4Db'1975','1976','1977','1978','1979','1980','1981','1982','1983'5Db'1984','1985','1986','1987','1988','1989','1990','1991','1992'6Db'1993','1994','1995'7     ;The above is the string representing the 21 4 * =8 9Dd -, A,382,1356,2390,8000,16000,24486,50065,97479,140417,197514TenDd345980,590827,803530,1183000,1843000,2759000,3753000,4649000,5937000 One     ;The above is the DWORD data representing the total revenue of the company in 21 4 * = A  -Dw3,7,9, -, -, -, the, -,476,778,1001,1442,2258,2793,4037,5635,8226 -Dw11542,14430,15257,17800 the     ;These are 21 Word data representing the number of employees in the company in 21.2 * - Data Ends -  - Table Segment +Db +DUP ('Year summ ne??');' year Summ ne?? ' is exact bytes - table Ends +  A Stack Segment atDw8DUP (0);To store the number of loops - Code Segment - Start: -      movBx0 ;the row pointer as a table -      movBp0 ;as a pointer to the year and total revenue -      movDi0 ;as a pointer to the number of people in  -      movAx,data to      movDs,ax;associated DS and data +      movax,table -      movEs,ax;Associating es with table the  *      movAx,stack $      movSs,axPanax Notoginseng      movSp +  ;Set Stack -  the      movCx +    ;set the number of cycles +    S:PushCX A      movCx4 the      movSi0 +  -       s0: $         movAl,[bx+si] $         mov es:[Bp+si],al -         Incsi - Loop S0 the         ;Enter Year - Wuyi      movax,[bx+ -] the      mov es:[bp+5],ax -      movax,[bx+ the] Wu      mov es:[bp+7],ax -      ;Input Gross production About  $      movax,[di+168] -      mov es:[bp+Ten],ax -      ;Enter number of employees -  A      movAxes:[bp+5] +      movDxes:[bp+7] the      DivWord ptres:[bp+Ten] -      mov es:[bp+ -],ax $      ;figure out the per capita gross domestic product the  the      PopCX the      AddBx4 the      AddBp - -      AddDi2 in Loop S the  the      movax,4c00h About      int21H the code ends theEnd Start

Wang Shuang "assembly language" test seven

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.