Thursday, 9 August 2007

Short Commands (C language)

Short Commands ဆုိတာကေတာ့ C (ANSI* Standard) ေရးတဲ့အခါမွာ Microcontroller chip ေတြဆီကို ေပးတဲ့ Command ပံုစံပါ။ Microcontroller မွာ OS မရွိတဲ့အတြက္ Command ေတြကို တိုက္႐ိုက္ေပးလုိ႔မရႏိုင္ပါဘူး။ ဥပမာ - DIR command ကို Storage drive တစ္ခုဆီကို ေပးခ်င္တယ္ဆိုၾကပါစို႔။ MS-DOS မွာဆိုရင္ C:\>DIR (Enter) ဆိုရင္ရပါၿပီ။ ဒါကို Extended Command လို႔ေခၚပါတယ္။ ဒါေပမယ့္ Microcontroller မွာက်ေတာ့ $01, $0D ဆိုတဲ့ Short Command ကိုသံုးရပါတယ္။ $01 က DIR command ပါ။ $0D က (Enter) ပါ။ Hexadecimal system ကိုသံုးၿပီးတြက္ရပါတယ္။ 01=0000 0001, 0D=0000 1101 ေပါ့။ Monitor Port Commands လုိ႔လည္းေခၚပါတယ္။ သက္ဆုိင္တဲ့ Port ေတြကို သက္ဆိုင္တဲ့ bit ေတြပို႔ရပါတယ္။ ဘာလို႔လဲဆိုေတာ့ Port ေတြက Binary digit ေတြကိုပဲလက္ခံႏိုင္လုိ႔ပါ။ Internet မွာ Short Commands လုိ႔ရွာၿပီးဆက္လက္ေလ့လာႏုိင္ပါတယ္။ ကၽြန္ေတာ္သံုးတာ Vinculum VNC1L Disk Interface Firmware ကိုသံုးၿပီး ပို႔တာပါ။

*ANSI = American National Standard Institute

1 comment: