Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - stc p
Search - stc p - List

 data segment    ;定义数据段

    infon db 0dh,0ah,'Please input a year: $'
    Y db 0dh,0ah,'This is a leap year! $'
    N db 0dh,0ah,'This is not a leap year! $'
    w dw 0
    buf db 8
        db ?
        db 8 dup(?)
data ends
 
stack segment stack
    db 200 dup(0)
stack ends
 
code segment
          assume ds:data,ss:stack,cs:code
    start:mov ax,data
          mov ds,ax
         
          lea dx,infon ;在屏幕上显示提示信息
          mov ah,9
          int 21h
 
          lea dx,buf    ;从键盘输入年份字符串
          mov ah,10
          int 21h
         
          mov cl, [buf+1]
          lea di,buf+2
          call datacate
          call ifyears
          jc a1
         
          lea dx,n
          mov ah,9
          int 21h
          jmp exit
    a1:   lea dx,y
          mov ah,9
          int 21h
    exit: mov ah,4ch
          int 21h
      
 
 
 datacate proc near;
          push cx;                                                      
          dec cx
          lea si,buf+2
     tt1: inc si
          loop tt1
          ;lea si,cx[di]
          pop cx
    
     
          mov dh,30h
          mov bl,10
          mov ax,1
      l1: push ax
          sub byte ptr [si],dh
          mul byte ptr [si]
          add w,ax
          pop ax
          mul bl
          dec si
          loop l1
          ret
 datacate endp
 
 
   ifyears proc near
           push bx
           push cx
           push dx
           mov ax,w
           mov   cx,ax
           mov dx,0
           mov bx,4
           div bx
           cmp dx,0
           jnz lab1
           mov   ax,cx
           mov bx,100
           div bx
           cmp dx,0
           jnz lab2
           mov ax,cx
           mov bx,400
           div bx
           cmp dx,0
           jz lab2
     lab1: clc
           jmp lab3
     lab2: stc
     lab3: pop dx
           pop cx
           pop bx
           ret
   ifyears endp
code ends
   end start
     




[广告] 2008年最受关注楼盘


Date : 2008-12-24 Size : 10.5kb User : jackdawson0@

DL : 0
STC 51系列单片机实现PWM,由P1口输出其波形9+-STC 51 Series MCU PWM, the output of its mouth by the P1 waveform 9+
Date : 2025-07-03 Size : 1kb User : chen

实用电路,89c52摸拟SPI输出.但速度不快.-Practical circuit, 89c52 simulation SPI output. But slow.
Date : 2025-07-03 Size : 27kb User : 陈耀明

关于STC12C2052系列的中文文档,相当有参考价值,是开发STC系列不可少的参考文档-STC12C2052 series on the Chinese document, there is considerable reference value, the development of STC series indispensable reference documentation
Date : 2025-07-03 Size : 1.39mb User : sfasdf

DL : 0
使用51单片机定时器T0产生PWM的,方法为交替使用连个定时常数,本软件包含源代码,为计算这两个常数而设计-The use of 51 single-chip PWM timer T0 generated, and methods for the alternate use of even regular constants, the software contains the source code for the calculation of these two constants designed
Date : 2025-07-03 Size : 6kb User : dellric

这是关于stc12c系列单片机PWM的事例程序,对学习单片机的东东很有用-This is a series of single-chip PWM on stc12c examples of procedures for learning useful Dongdong SCM
Date : 2025-07-03 Size : 25kb User : 李权

DL : 0
转速表采用的是测量编码盘的信号,用STC89C2052单片机进行处理,根据转速输出0-5V电压-Tachometer is used in measuring the signal encoded disk with STC89C2052 single-chip processing, in accordance with speed 0-5V output voltage
Date : 2025-07-03 Size : 1kb User : 林必中

DL : 0

Date : 2025-07-03 Size : 43kb User : 王志

DL : 0
STC12C5410/STC12C5410AD 系列 PWM输出。 采用汇编语言编写,详细注释说明。-PWM output STC12C5410/STC12C5410AD series. Using assembly language to prepare detailed notes.
Date : 2025-07-03 Size : 1kb User : twisdsdi

DL : 0
STC12c5410AD PWM
Date : 2025-07-03 Size : 1kb User :

DL : 0
STC12C5410AD的SPI程序 以及AD程序 已经经过硬件调试 可用以及F410的中文版本-STC12C5410AD the SPI procedures, as well as AD after hardware testing procedures have been available, as well as the Chinese version of F410
Date : 2025-07-03 Size : 2.28mb User : 司威

DL : 0
关键字:LCD液晶显示屏 串行 并行 ST7920 RT12864-Keywords: LCD LCD screen serial parallel ST7920 RT12864
Date : 2025-07-03 Size : 28.46mb User : 苗瑞瑞

DL : 0
STC的PWM应用请大家使用,希望可以帮到大家!-STC
Date : 2025-07-03 Size : 15kb User : 发财

DL : 0
STC的485发送应用请大家使用,希望可以帮到大家!-STC 485 Please send the application to use, I hope you can help!
Date : 2025-07-03 Size : 14kb User : 发财

DL : 0
大容量Flash存储器W25X16,W25X32,W25X64读写擦除程序,在SST单片机上测试通过,使用了SST单片机的硬件SPI功能;也可以使用虚拟SPI的方法,在SST和STC单片机上测试通过。-Large-capacity Flash memory W25X16, W25X32, W25X64 erasable read-write procedure, SST Singlechip test is passed, the use of SST Single-chip hardware SPI function SPI can also use the virtual method, in the SST and the STC Single-chip test通过.
Date : 2025-07-03 Size : 2.39mb User : hawd

STC12C5201技术资料,使用STC单片机必备-STC12C5201 technical information necessary to use single-chip STC
Date : 2025-07-03 Size : 2.25mb User : Richard

次程序为最新STC的12系列的单片的A/D转换的C程序,一般提供为汇编程序,这个C程序可以通过串口观察得到-Sub-program for the latest STC' s 12 series of single-chip A/D conversion of the C program, are generally provided for the assembler, the C program can be observed through the serial port
Date : 2025-07-03 Size : 28kb User : 黎明

本程序用STC-ISP Ver 3.0A.PCB的下载编程工具测试通过,相关的A/D转换结果在P1口上显示 -This procedure using STC-ISP Ver 3.0A.PCB download programming tools tested, the related A/D conversion results shown in the P1 port
Date : 2025-07-03 Size : 2kb User : cndy

This the 89C52RC datasheet, in chinese, for developping with the device.-This is the 89C52RC datasheet, in chinese, for developping with the device.
Date : 2025-07-03 Size : 1.04mb User : Whyp

stc全系列的单片机封装库,protel 99se格式,可以转成dxp等其他格式。我一直用这个,最近stc官网下不了,所以我共享出来-stc full range of single-chip package library, protel 99se format, can be converted into other formats dxp. I have been using this, the official website recently stc can not, so I shared out
Date : 2025-07-03 Size : 3kb User :
« 12 »
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.