The text of a manual · part 3 of 25
JANUS PSK for Ada Reference Manual, pages 21 to 30
Pages 21 to 30 of 250
The original document is the PDF (415 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Intermec J2020, Intermec J2010 and Intermec J2050
Page 21
Getting Started
1
Reader Services Reader services include several functions ranging in complexity from controlling the reader beeper to controlling the function of the power management software. With reader services, you can easily use bar code input from a wand or scanner by using the direct program interface to handle the functions of the reader keyboard, display, and beeper. There are two methods for incorporating the reader services into your programs: • Using function libraries • Using software interrupts You can use either one or a combination of both methods. Note: Do not run programs that use PSK library functions on your PC, unless you have the JANUS Application Simulator installed. If you attempt to run these programs without the Simulator, you will receive an error message and the program will not run.
CAUTION
Caution Do not run programs that use Intermec-specific interrupt extensions on your PC, unless you have the JANUS Application Simulator installed. If you attempt to run these programs without the Simulator, they will cause your PC to lock up and possibly corrupt your system BIOS. Conseil N’exécutez pas de programmes utilisant des extensions d’interruption spécifiques à Intermec sur votre PC, à moins que JANUS Application Simulator soit installé. Si vous tentez de les exécuter sans le Simulator, ces programmes risquent de verrouiller votre PC et d’altérer le BIOS de votre système.
1-5
Page 22
JANUS PSK for Ada Reference Manual
Function Libraries The Intermec library functions provide extensive access to reader services. The supported language functions are stored in libraries on the Programmer’s Software Kit Language Libraries disk. The list of supported languages includes: • Borland C/C++ • Microsoft C/C++ • Microsoft Visual C/C++ • Microsoft QuickBasic • Microsoft Visual Basic for MS-DOS • Janus/Ada When you write applications in Ada, link your program to the library by including the header files in your program, and then invoke the reader services using the Ada reader service command. See “Building an Executable File” in Chapter 2 for instructions on compiling, binding, linking, and running an Ada program. Refer to the PSK Reference Manual for more information about other language support.
Software Interrupts The reader supports special software interrupts in addition to those available on a normal PC. If your programming language supports software interrupts, you can write applications that use the reader services. However, it is much easier to use the PSK library functions. Interrupts are a very low-level method of controlling a computer. Programming with interrupts is more difficult than with a high-level language (such as Ada, C, or Basic). Some of the most popular languages have built-in commands for triggering software interrupts (Microsoft C, Borland C++, and QuickBasic, for example). Languages that do not have built-in interrupt commands sometime allow you to access interrupts by embedding fragments of assembly language inside your program. There are other methods for triggering software interrupts, and you can generate software interrupts from almost any language.
1-6
Page 23
Getting Started
1
For complete descriptions and examples of the software interrupts that govern reader services, see Chapter 3, “Software Interrupts,” and Appendix B, “Sample Interrupt Programs,” in the PSK for C/C++ Reference Manual.
CAUTION
Caution Do not run programs that use Intermec-specific interrupt extensions on your PC, unless you have the JANUS Application Simulator installed. If you attempt to run these programs without the Simulator, they will cause your PC to lock up and possibly corrupt your system BIOS. Conseil N’exécutez pas de programmes utilisant des extensions d’interruption spécifiques à Intermec sur votre PC, à moins que JANUS Application Simulator soit installé. Si vous tentez de les exécuter sans le Simulator, ces programmes risquent de verrouiller votre PC et d’altérer le BIOS de votre système.
1-7
Page 24
Page 25
nugget code39 helconital nugget code39 helconital
2 Working With Ada
Page 26
nugget code39 helconital nugget code39 helconital
Page 27
Working With Ada
2
This chapter explains how to install the Intermec Ada library and how to build a program using Ada.
Installing the JANUS PSK Ada Library The files on the Programmer’s Software Kit Language Libraries disk are distributed in several subdirectories, each corresponding to the supported language: Subdirectory Name
Language
INTERMEC\ADA
Janus/Ada
INTERMEC\BORLANDC
Borland C/C++
INTERMEC\MICROSFT
Microsoft C/C++ and Visual C/C++
INTERMEC\QUICKB
Microsoft QuickBasic
INTERMEC\VBDOS
Visual Basic for MS-DOS
The exact contents of the PSK Language Libraries disk are listed in the README.TXT file contained on the disk. To use the library functions, install the correct files on your computer. You can also use the DOS copy command to copy only the specific files you are sure you will need. Note: If you have an existing Intermec directory, the installation process will update any files in the existing Intermec directory with the new version files having the same name. To install the library files 1. Insert the PSK Language Libraries disk into the disk drive on your PC. 2. Change to the appropriate disk drive. For example, type A:. 3. Enter the following command: INSTALL ADA drive where drive is the location where you want to install the utilities library. If no drive is designated, the utilities library is installed on drive C.
2-3
Page 28
JANUS PSK for Ada Reference Manual
Programming With Ada The PSK disk contains the following files for building programs with the Ada functions library: • The IM20ADAD.LIB file contains the constant definitions. • The IM20ADAP.LIB file contains the function prototypes. • The IM20_ADA.LIB file contains the object modules. • The following six files are compiled Ada definition library files and symbol tables: INTRMECD.SRL INTRMECD.JRL INTRMECD.SYM
INTRMECP.SRL INTRMECP.JRL INTRMECP.SYM
While the PSK disk includes complete JANUS reader Ada functions, you will require additional products before you can use Intermec’s Ada functions and procedures. You will need the following: • Janus/Ada Compiler • Text editor for creating source code • Microsoft Linker Support for Intermec’s Ada is only available using the Janus/Ada “nonprofessional” compiler by R.R. Software, Inc. of Madison, Wisconsin. You can order the Janus/Ada compiler through Intermec. It is coincidental that the name of the Janus/Ada software compiler resembles the tradename of the Intermec JANUS reader. Your text editor must create standard ASCII text files. You can use the DOS Edit program or any other ASCII editor. Microsoft C/C++ linkers are the only linkers certified to work with Intermec Ada. The Microsoft QuickBasic, Visual Basic, Visual C, and MASM linkers have not been tested, but may link your object files successfully.
2-4
Page 29
2
Working With Ada
Building an Executable File The procedures in this section lead you through the process of compiling, binding, linking, and running a program that use the PSK Ada Library. The following figure outlines the build process and shows the types of files produced at each stage.
Customer Supplies: Source Code .ADA Files
Precompiled Includes
PSK Language Libraries Supplies: INTRMECD.SRL INTRMECP.SRL INTRMECD.JRL INTRMECP.JRL INTRMECD.SYM INTRMECP.SYM
*
Janus/Ada Compile .srl .jrl .sym Files
JBIND * .obj File
IM20_ADA.LIB Object Libraries
* ADA, Compiler, and JBIND are available from Intermec Corporation. ** Linker is supplied by the customer.
Link ** Objects .exe File AIT-23
2-5
Page 30
JANUS PSK for Ada Reference Manual
Build Requirements Use the following checklist to make sure you meet the requirements for building your program: • The following six files must be in your working directory or in your DOS path: INTRMECD.SRL INTRMECD.JRL INTRMECD.SYM
INTRMECP.SRL INTRMECP.JRL INTRMECP.SYM
• Your DOS path must include the following directories in this exact order: C:\JADOS\M1; C:\JADOS; C:\INTERMEC\ADA\WITH • The following lines must be at the start of your program: With Intrmecd_IO, Intrmecp_IO; Use Intrmecd_IO, Intrmecp_IO; • You must have a Microsoft linking program, LINK.EXE. • You must compile and bind your program with memory model 1 (M1). Your DOS path must include the M1 subdirectory, as in C:\JADOS\M1.
2-6