home *** CD-ROM | disk | FTP | other *** search
File List | 1992-07-02 | 6.3 KB | 146 lines |
- iC-386 COMPILER CUTILS 09/05/90 12:11:31 PAGE 1
-
-
- iRMX III iC-386 COMPILER V4.3, COMPILATION OF MODULE CUTILS
- OBJECT MODULE PLACED IN cutils.obj
- COMPILER INVOKED BY: :lang:ic386 cutils.c compact object(cutils.obj) print(cutils.lst) ram optimize(0) dn(0) debug defin
- -e(rmx3) searchinclude(/lib/ic386/)
-
- line level incl
-
- 1 /**********************************************************************/
- 2 /* */
- 3 /* CSAMP Sample Program, Support Procedures */
- 4 /* */
- 5 /**********************************************************************/
- 6
- 7 #include <stdarg.h>
- 31 #include <stdlib.h>
- 158 #include <stdio.h>
- 417 #include <string.h>
- 521 #include <ctype.h>
- 586 #include <rmxc.h>
- 2636
- 2637 /* Forward declarations */
- 2638 extern void delay_fine();
- 2639 extern void delay();
- 2640
- 2641 /**********************************************************************/
- 2642 /* C_DATA */
- 2643 /**********************************************************************/
- 2644 void c_data()
- 2645 {
- 2646 1 char array1[12];
- 2647 1 int i;
- 2648 1
- 2649 1 struct struc1_type {
- 2650 1 char xchar;
- 2651 1 short int xshort;
- 2652 1 int xint;
- 2653 1 unsigned int xunint;
- 2654 1 } struc1;
- 2655 1
- 2656 1 struct customertype {
- 2657 1 char name[8];
- 2658 1 char phone[7];
- 2659 1 struct customertype *linkfor;
- 2660 1 } customerlist[3];
- 2661 1
- 2662 1 struct customertype *customer,*oldcust;
- 2663 1
- 2664 1 static char *name_init[3] = {
- 2665 1 "Beth ",
- 2666 1 "Steve ",
- 2667 1 "Becky "
- 2668 1 };
- 2669 1
- 2670 1 static char *phone_init[3] = {
- 2671 1 "5551234",
- 2672 1 "5555678",
- 2673 1 "5554321"
- iC-386 COMPILER CUTILS 09/05/90 12:11:31 PAGE 2
-
-
- 2674 1 };
- 2675 1 /* Format for a simple (unreal) Ethernet packet
- 2676 1
- 2677 1 +----------------------------------------------------+
- 2678 1 | P | Dest | Source | Type | Data | CRC |
- 2679 1 +----------------------------------------------------+
- 2680 1 31 28 24 20 17 1 0
- 2681 1 */
- 2682 1
- 2683 1 struct enet_pkt_type {
- 2684 1 unsigned int crc:2;
- 2685 1 unsigned int data:16;
- 2686 1 unsigned int pkt_type:3;
- 2687 1 unsigned int source_addr:4;
- 2688 1 unsigned int dest_addr:4;
- 2689 1 unsigned int preamble:3;
- 2690 1 } enet_pkt;
- 2691 1
- 2692 1 for( i = 0 ; i <= 11 ; i++ )
- 2693 1 array1[i]= (char)i + ' ';
- 2694 1
- 2695 1 struc1.xchar = '!';
- 2696 1 struc1.xshort = -10;
- 2697 1 struc1.xint = 1;
- 2698 1 struc1.xunint = 6;
- 2699 1
- 2700 1 enet_pkt.data = 4096;
- 2701 1 enet_pkt.crc = 1;
- 2702 1 enet_pkt.pkt_type = 3;
- 2703 1 enet_pkt.source_addr = 10;
- 2704 1 enet_pkt.dest_addr = 12;
- 2705 1 enet_pkt.preamble = 7;
- 2706 1
- 2707 1 customer = NULL;
- 2708 1 for(i=0;i<=2;i++){
- 2709 2 oldcust = customer;
- 2710 2 customer = &customerlist[i];
- 2711 2 strcpy(customerlist[i].name,name_init[i]);
- 2712 2 strcpy(customerlist[i].phone,phone_init[i]);
- 2713 2 customer->linkfor = NULL;
- 2714 2 if (oldcust != NULL)
- 2715 2 oldcust->linkfor = customer;
- 2716 2 }
- 2717 1 }
- 2718
- 2719
- 2720 void delay (msecs)
- 2721 int msecs;
- 2722 {
- 2723 1 int sleep100; /* Each unit of "sleep100" is 100 msecs. */
- 2724 1
- 2725 1 sleep100 = msecs / 100;
- 2726 1
- 2727 1 for (; sleep100 >= 0; sleep100--)
- 2728 1 delay_fine (10); /* delay_fine(10) delays for 100 msecs. */
- 2729 1 }
- 2730
- iC-386 COMPILER CUTILS 09/05/90 12:11:31 PAGE 3
-
-
- 2731
- 2732 static void delay_fine (count)
- 2733 int count;
- 2734 {
- 2735 1 WORD exception;
- 2736 1
- 2737 1 if (count != 0) {
- 2738 2 rqsleep (1, &exception); /* One rqsleep unit is 10 msecs. */
- 2739 2 delay_fine (--count ); /* Call self recursively. */
- 2740 2 }
- 2741 1 }
-
-
-
- MODULE INFORMATION:
-
- CODE AREA SIZE = 000001F3H 499D
- CONSTANT AREA SIZE = 00000033H 51D
- DATA AREA SIZE = 00000024H 36D
- MAXIMUM STACK SIZE = 0000008CH 140D
-
- iC-386 COMPILATION COMPLETE. 0 REMARKS, 0 WARNINGS, 0 ERRORS
-