Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report