divmul.c

来自「8051微控制器的ip 核的vhdl源代码,其中包含了相应的测试程序.」· C语言 代码 · 共 36 行

C
36
字号
/* * Copyright (c) 1999 Tony Givargis.  Permission to copy is granted * provided that this header remains intact.  This software is provided * with no warranties. * * Version : 2.1 *//*---------------------------------------------------------------------------*/#include <reg51.h>/*---------------------------------------------------------------------------*/void main() {        unsigned x = 134;    unsigned y = 1;    unsigned q, r, p, i;        for(i=0; i<12; i++) {                y++;    }        q = x / y;    r = x % y;    p = q * y + r;        P0 = q;    P0 = r;    P0 = p;        while(1);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?