LUAÂÄN VAÊN TOÁT NGHIEÄP 56 ;KeyKRB : Chuong trinh con quet ban phim. Ma cua phim an duoc cat ;trong thanh ; ghi A. ;DELAY : Chuong trinh con tri hoan theo thoi hang ms. He so tri ;hoan duoc ; nap vao thanh ghi A. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++ ;##################################################################### ;Khai bao cac nhan duoc su dung. ;##################################################################### RegCNT equ 03h PortA equ 00h PortB equ 01h PortC equ 02h CntI79 equ 0A001h DataI79 equ 0A000h KEYBRD equ 0216h DELAY equ 0310h KeyGO equ 17h ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ End LUAÂÄN VAÊN TOÁT NGHIEÄP 57 #include #include #include #include #include #include #include #include #include #include #include #include. | LUẬN VAN TOT NGHIỆP 56 KeyKRB Chuong trinh con quet ban phim. Ma cua phim an duoc cat trong thanh ghi A. DELAY Chuong trinh con tri hoan theo thoi hang ms. He so tri hoan duoc nap vao thanh ghi A. Khai bao cac nhan duoc su dung. RegCNT equ 03h PortA equ 00h PortB equ 01h PortC equ 02h CntI79 equ 0A001h DataI79 equ 0A000h KEYBRD equ 0216h DELAY equ 0310h KeyGO equ 17h End LUẬN VAN TOT NGHIỆP 57 include include include include include include include include include include include include include include include include include include define NumBox 2 define NumBut 2 LPEVENT lpEvent bien chua cac bien co chuot char szMessage 128 BUTTON But NumBut NutKiem TEXTBOX Box NumBox Port char DiskName 27 DName char ftype 15 .prn char inter_Path 100 char RequF 100 unsigned int St_address End_address 0 char Sta_hex 5 End_hex 5 ----------------------------------------------------------- int TestPressedButton int x LPEVENT lpEvent int TestPressTexbox int x LPEVENT lpEvent char layra unsigned attribp void MainProgram int TestPressList LIST L LPEVENT lpEvent char s unsigned attrib char typ nhap bang liet ke int SendFile ----------------------------------------------------------- void main void InitGraphics InitValues Download Program. InitScreen if InitMouse OutMessage Mouse driver not found. Init mouse and return getch closegraph exit 1 ShowMouse MainProgram closegraph LUẬN VAN TOT NGHIỆP 5 8 ---------------------------------------------------------- void MainProgram char Name 20 buffer MAXPATH unsigned attrib Attribp SEND Send LIST L But 0 .InitButton 200 380 250 400 LIGHTGRAY Send But 1 .InitButton 400 380 450 400 LIGHTGRAY Exit Box 0 .InitTextBox 50 70 477 90 GREEN LIGHTGREEN Open File 50 270 250 290 GREEN LIGHTGREEN Out port LPT1 480 70