Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What is the method of query counting in assembly and C language?

Shulou Source: shulou.com Published: 2022-06-01 22:03:47 10月06日 Update

This article mainly explains "what is the method of realizing query counting in assembler and C language". The content of the explanation in this article is simple and clear, and it is easy to learn and understand. let's study and learn "what is the method of assembling and C language to realize query counting?"

# C language version

/ * Counting Program * * / # include void init () {TMOD = 0x50; / / sets the timer to work in counting mode 1 TL1 = 0xfb; TH1 = 0xff; TR1 = 1; / / sets counter 1 to be ready} void main () {init () While (1) {while (TF1 = = 1) {P1 = 0; TF1 = 0; while (TL1 = = 0) {} P1 = 1; init ();}

# Assembly language version

ORG 0000HINIT:; initialize subroutines SETB P1.0 MOV TMOD, # 50H MOV TL1, # 0FBH MOV TH1, # 0FFH SETB TR1MAIN: JNB TF1, $ TF1 is 1, jump and clear CLR P1.0 CLR TF1CHECK_TL1: MOV A, TL1 CJNE A, # 01H, CHECK_TL1 LJMP INITEND Thank you for your reading. This is the content of "what is the method of query counting in assembler and C language". After the study of this article I believe that you have a deeper understanding of what is the method of query counting in assembly and C language, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Language method query learning content work assembly language subroutine that is ideas situations articles methods more patterns states knowledge knowledge points programs articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi NVidia MariaDB vpn MySQL