论文部分内容阅读
在用Quick BASIC与汇编语言编写数据采集与处理程序时,首先在Quick BASIC中分配数据空间(用DIM定义数组,静态数组可用近地址访问,动态数组需用远地址),然后将第一个数组元素的地址通过堆栈传给汇编语言子程序,根据访问数组元素的远近地址要求,适当调整ES内容,并将DI指向第一个数组元素的偏移地址,这样在AX中每得到一个采样数据后,即可用一个STOSW语句直接将此数据传送到高级语言已定义的数组中,直到全部数据采集完成,实现了混合语言间大量数据的高速传送。
When writing programs for data acquisition and processing in Quick BASIC and assembly language, you first allocate data space in Quick BASIC (arrays defined by DIM, static array accessible by near address, dynamic array by far address), and then the first array The address of the element is passed to the assembly language subroutine through the stack. According to the near and far address requirements of accessing the array element, the ES content is properly adjusted and the DI points to the offset address of the first array element. After each sampling data is obtained in the AX, , You can use an STOSW statement to pass this data directly to the high-level language has been defined in the array, until all the data acquisition is completed, to achieve a large number of mixed language high-speed data transfer.