Download GCTR - grifo¨ COM
Transcript
grifo® ITALIAN TECHNOLOGY DESCRIPTION OF GCTR Here follow some general information about GCTR that the user must use during the development of the application program to take the best advantage of the control card features. Of course the different features of different hardware are shown separately. START-UP CODE By start-up code we mean that piece of code always executed by the control card immediatly after a reset or a power on that is charged to set up all the conditions needed for the next phases. The main operations performed by start-up code are listed below: 123- Sets the control card for selected memory size Sets the I/O configuration Disables the circuiteries that can influence the program execution like internal watch dog, interrupts, DMA, etc. 4 - Retrigger ther external watch dog circuit 5 - Initializes an opportune stack for working 6 - Resets the global variables area 7 - Initializes the floating point emulator 8 - Copies the initialized data area from EPROM or FLASH EPROM to SRAM 9 - Installs an handler for interrupt 21H to intercept and refer eventual unexpected system callls 10 - Jumps to the firsr instruction of main in C application program GCTR start-up code is essential for any Capplication program and can't be replaced with Borland standard start-up code because this latter is based on an execution under MS-DOS or WINDOWS operating system. Such code must be used also during the development phase of the application program infact TURBO DEBUGGER can execute it even if the control card hasn't been reset or turned off and on. The start-up code specific for the selected memory configuration is provided already compiled in the files STDEB.OBJ, STBIN.OBJ and are automatically linked to the application program through CTODEB and CTOBIN. ADDRESSING OF HARDWARE STRUCTURES IN I/O The start-up code which is always executed before the main function of C application program is also charged to set and initialize the microprocessor register used to manage I/O (RELOC, PACS). A setting common for all the control cards is to set the I/O internal microprocessor addresses starting from FF00H and to set the I/O addresses of on-board peripherals starting from the values reported in APPENDIX C of this manual. These addresses, especially the peripherals addresses, must be used directly by the user in the C application program and are also used by the ROMed libraries provided with GCTR; so they can't be changed for any reason. Page 20 GCTR Rel. 5.40