论文部分内容阅读
在微计算机应用过程中,对检测、控制、信号处理及结果显示等方面编制的汇编语言程序,通常都需要了解程序运行的时间。一般情况下,可以把每条指令执行的时间查出来进行计算,但实际应用的程序往往比较庞大,又有很多循环、调用或跳转的指令,此时用查指令表计算程序运行时间的办法既要花费不少时间,又不能作到十分准确。本文是根据笔者在微机应用研究中,总结出的一种行之有效的测试方法。此法比较简便,测试结果可靠。使用时只要在单板机上编制一段测试程序,并将其固化在EPROM中,然后把子程序的入口地址用键盘送入HL中,便可运行测试程序,同时LED显示器自动显示出被测子程序的运行时间。
In the microcomputer application process, the assembly language program that compiles to the detection, the control, the signal processing and the result display and so on, usually needs to know the program running time. Under normal circumstances, you can find out the timing of the execution of each instruction to calculate, but the actual application of the program is often relatively large, there are many cycles, call or jump instructions, then check the instruction list to calculate the program run time approach It takes a lot of time and can not be very accurate. This article is based on the author in the computer application research, summed up an effective test method. This method is relatively simple, reliable test results. Use as long as the preparation of a test program on the single board machine, and cured in the EPROM, and then enter the subroutine address using the keyboard into the HL, you can run the test program, while the LED display automatically shows the subroutine under test Run time.