# test_vmw.s -- by Vince Weaver -- 19 February 2000 # -- division code by Asher Lazarus # # Use numerical methods to approximate Laplace's Equation by Averaging # see page 54 Ramo's "Fields and Waves in Electromagnetics" # # # -----5000V----- One can find approximations for the voltages # | . . . | at the internal points of a infinite-square # | | enclosure, assuming no enclosed charges, # 3000V . . . 6000V by iteraviely averaging all neighboring # | | points throughout the grid. # | . . . | # | | It takes many hundreds of iterations for the # ----10000V----- approximation to be good, unfortunately # # #/* Here is a c-program that is more or less what the assembly here does */ # #include # # #define GRIDX 16 # #define GRIDY 16 # #define ITERATIONS 100 # # #define GRID_TOP 5000 # #define GRID_LEFT 3000 # #define GRID_RIGHT 6000 # #define GRID_BOTTOM 10000 # # short int GRID[GRIDX][GRIDY]; # # void fill_grid() { # int x,y; # # for(x=0;x