;Program to find the area of 5 circles whose radii are
stored in array RAD. .MODEL SMALL .386 .387 .DATA RAD DD 2.34, 5.66, 9.33, 234.5, 23.4 AREA DD 5 DUP(?) .CODE .STARTUP MOV SI,0 ;source element 0 MOV DI,0 ;destination element 0 MOV CX,5 ;count of 5 MAIN1: FLD RAD [SI] ;radius to ST FMUL ST,ST(0) ;square radius FLDPI ;π to ST FMUL ;multiply ST= ST * ST(1) FSTP AREA [DI] ;save area INC SI INC DI LOOP MAIN1 .EXIT END ;Program to find the resonant frequency of a LC tank circuit. .MODEL SMALL .386 .387 .DATA RESO DD 1 DUP(?) ;resonant frequency L1 DD 0.000001 ;inductance C1 DD 0.000001 ;capacitance TWO DD 2.0 ;constant .CODE .STARTUP FLD L1 ;get L FMUL C1 ;find LC FSQRT ;find √LC FMUL TWO ;find 2√LC FLDPI ;get π FMUL ;get 2π√LC FLD1 ;get 1 FDIVR ;form 1/2π√LC FSTP RESO ;save frequency .EXIT END ;Program to find the roots of a quadratic equation. .MODEL SMALL .386 .387 .DATA TWO DD 2.0 FOUR DD 4.0 A1 DD 1.0 B1 DD 0.0 C1 DD -9.0 R1 DD ? R2 DD ? .CODE