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