C51 COMPILER V9.60.7.0   MAIN                                                              05/22/2024 13:57:29 PAGE 1   


C51 COMPILER V9.60.7.0, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN .\Objects\main.obj
COMPILER INVOKED BY: C:\Keil_v5\C51\BIN\C51.EXE main.c OPTIMIZE(8,SPEED) BROWSE DEBUG OBJECTEXTEND PRINT(.\Listings\main
                    -.lst) TABS(2) OBJECT(.\Objects\main.obj)

line level    source

   1          // Clear screen and set cursor home
   2          #include <stdio.h>
   3          #include <serIO.h>
   4          
   5          
   6          unsigned char taste;
   7          
   8          void indentWithSpace(int amount) {
   9   1        int g;
  10   1        for (g = 0; g < (amount); g++)
  11   1              serCharOut(' '); // indenting
  12   1        return;
  13   1      }
  14          void drawChristmastree(int width) {
  15   1          int i;
  16   1          int j;
  17   1          for (i = 0; i < width; i++) {
  18   2            indentWithSpace((width-i));
  19   2      
  20   2            for (j = 0; j < ((2 * i) + 1); j++) { // draws '='
  21   3              if (i > 0) serCharOut('=');
  22   3            }
  23   2          serCharOut('\n');
  24   2          indentWithSpace(width);
  25   2          serCharOut('='); // Stamm
  26   2          serCharOut('\n');
  27   2          }
  28   1      }
  29          
  30          void main() {
  31   1      
  32   1      
  33   1        int hasChar = 0;
  34   1        
  35   1        serInit();
  36   1        while(hasChar == 0) {
  37   2          taste = serIn();
  38   2          if (taste != '\0') {
  39   3            hasChar = 1;
  40   3            break;
  41   3          }
  42   2          drawChristmastree(40);
  43   2        }
  44   1        return;
  45   1      }
  46          
  47          /* Gedanken zur Funktionalen Aufteilung und Erweiterung
  48          - eigenst�ndige Funktion zum indenten ; Parameter: (int Anzahl ' ' (LEERZEICHEN))
  49          - recursivit�t hier besonders interessant zum Zeichnen der Charakterketten Parameter: (int Schleifendurc
             -hl�ufe)
  50          */


MODULE INFORMATION:   STATIC OVERLAYABLE
C51 COMPILER V9.60.7.0   MAIN                                                              05/22/2024 13:57:29 PAGE 2   

   CODE SIZE        =    218    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =      1      12
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)
