Assume Cs:code,ds:data,ss:stack
Data segment
DB ' 1975 ', ' 1976 ', ' 1977 ', ' 1978 ', ' 1979 ', ' 1980 ', ' 1981 ', ' 1982 ', ' 1983 '
DB ' 1984 ', ' 1985 ', ' 1986 ', ' 1987 ', ' 1988 ', ' 1989 ', ' 1990 ', ' 1991 ', ' 1992 '
DB ' 1993 ', ' 1994 ', ' 1995 '
DD 16,22,382,1356,2390,8000,16000,24486,50065,97479,140417,197514
DD 345980,590827,803530,1183000,1843000,2759000,3753000,4649000,5937000
DW 3,7,9,13,28,38,130,220,476,778,1001,1442,2258,2793,4037,5635,8226
DW 11542,14430,15257,17800
Data ends
Table Segment
DB DUP (' Year Summ ne?? ‘)
Table Ends
Stack segment//stack stored variables
DW 0,0,0,0,0,0,0,0
Stack ends
Code segment
Start
MOV Ax,data
MOV Ds,ax
MOV ax,table
MOV Es,ax
MOV Ax,stack
MOV Ss,ax
MOV sp,16
MOV bx,0
MOV cx,21
MOV bp,0
MOV di,0
MOV si,0
S0:
Push CX
Push SI
MOV si,0
MOV cx,4
S
MOV AL,DS:[BP]
MOV Es:[bx].0h[si],al
Inc BP
Inc si
Loop s
MOV Ax,ds:84[di]
MOV Es:[bx].0h[5],ax
Push AX
Add di,2
MOV Ax,ds:84[di]
MOV Es:[bx].0h[7],ax
MOV Dx,ax
Pop ax
Add di,2
Pop si
Push AX
MOV Ax,ds:168[si]
MOV Es:[bx].0h[10],ax
Pop ax
div word ptr ds:168[si]
MOV Es:[bx].0h[13],ax
Add si,2
Add bx,10h
Pop CX
Loop S0
MOV ax,4c00h
int 21H
Code ends
End Start
Assembly language: The application of seven-way addressing method in structured data access