メイン処理

 最上位をメイン処理とします。

 メイン処理は、次のシーケンスで実行すればよいでしょう。
  1. 割込み禁止
  2. I/O初期化
  3. 割込み許可
  4. SRAM内容クリア
  5. コマンドインタプリタ機動
  6. 5にもどる
 Cのコードは、以下とします。 DI ;/* disable interrupt */ user_initialize();/* initialize */ EI ;/* enable interrupt */ /* clear sram */ for ( sram_address = 0 ; sram_address &t; LAST ; sram_address++ ) { put_sram( sram_address , 0 ); } /* loop */ while ( ON ) { sci1_handling(); }
目次

inserted by FC2 system