The text of a manual · part 19 of 19
PDT 3200 Run-Time Library Reference Manual: Chapter 4 A Program Sample
Pages 161 to 168 of 168, from PDT 3200 Run-Time Library Reference Manual
The original document is the PDF (949 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 Symbol PDT-3200
Page 161
Chapter 4 A Program Sample
Chapter Contents Borland Compilation....... 0.6... e nents 4-3 Microsoft Compilation 6.0.0... 0 6... nen ete n eens 4-5
4-1
Page 162
PDT 3200 Run-Time Library Reference Manual
4-2
Page 163
Chapter 4: A Program Sample
This release of the run-time library supports small, medium, and large memory models for both Borland and Microsoft C compilers. The short example that follows uses the sample code from BIOS_GetKbdCtrl(). This code is in the Þle KEYSAMP.C and is installed to the \3200\3200\SAMPLE directory.
Borland Compilation The instructions in this section assume the following: ¥ The Borland C++ compiler is installed to C:\BC45 with the include Þles in C:\BC45\INCLUDE, the library Þles in C:\BC45\LIB, and C:\BC45\BIN in the path. ¥ The PDT 3200 run-time library is installed to C:\3200\3200 with the include Þles in C:\3200\3200\INCLUDE and the library Þles in C:\3200\3200\LIB. ¥ The PDT 3200 code sample is located in C:\3200\3200\SAMPLE. Substitute the appropriate subdirectory paths from your development machine if these assumptions are not correct. To compile this code sample, complete the following steps: 1.
Make the sample directory your current working directory:
2.
CD\3200\3200\SAMPLE Compile KEYSAMP.C: small model: bcc -c -ms -IC:\BC45\INCLUDE -IC:\3200\3200\INCLUDE KEYSAMP.C medium model: bcc -c -mm -IC:\BC45\INCLUDE -IC:\3200\3200\INCLUDE KEYSAMP.C large model: bcc -c -ml -IC:\BC45\INCLUDE -IC:\3200\3200\INCLUDE KEYSAMP.C Compiler Switches: -c : Compile only.
4-3
Page 164
PDT 3200 Run-Time Library Reference Manual
-m# : Specify the memory model. medium, -ml for large. -I : Include files directory. 3.
-ms for small, -mm for
Link KEYSAMP.OBJ: small model: tlink -LC:\BC45\LIB;C:\3200\3200\LIB C0S+KEYSAMP,KEYSAMP,,FALCS CS medium model: tlink -LC:\BC45\LIB;C:\3200\3200\LIB C0M+KEYSAMP,KEYSAMP,,FALCM CM large model: tlink -LC:\BC45\LIB;C:\3200\3200\LIB C0L+KEYSAMP,KEYSAMP,,FALCL CL
Linker Switches: -L : Library search path KEYSAMP.EXE should now exist in the C:\3200\3200\SAMPLE subdirectory. You may download it to the PDT 3200 unit to run.
4-4
Page 165
Chapter 4: A Program Sample
Microsoft Compilation The instructions in this section assume the following: ¥ The Microsoft C++ compiler is installed to C:\MSVC with the include Þles in C:\MSVC\INCLUDE, the library Þles in C:\MSVC\LIB, and C:\MSVC\BIN in the path. ¥ The PDT 3200 run-time library is installed to C:\3200\3200 with the include Þles in C:\3200\3200\INCLUDE and the library Þles in C:\3200\3200\LIB. ¥ The PDT 3200 code sample is located in C:\3200\3200\SAMPLE. Substitute the appropriate subdirectory paths from your development machine if these assumptions are not correct. To compile this code sample, complete the following steps: 1.
Make the sample directory your current working directory: CD\3200\3200\SAMPLE
2.
Compile KEYSAMP.C: small model: cl /c /AS /IC:\MSVC\INCLUDE /IC:\3200\3200\INCLUDE KEYSAMP.C medium model: cl /c /AM /IC:\MSVC\INCLUDE /IC:\3200\3200\INCLUDE KEYSAMP.C large model: cl /c /AL /IC:\MSVC\INCLUDE /IC:\3200\3200\INCLUDE KEYSAMP.C
3.
Compiler Switches: /c : Compile only. /A# : Specify the memory model. medium, /AL for large. /I : Include files directory. Link KEYSAMP.OBJ:
/AS for small, /AM for
4-5
Page 166
PDT 3200 Run-Time Library Reference Manual small model: link KEYSAMP,KEYSAMP,,C:\MSVC\LIB\OLDNAMES.LIB C:\MSVC\LIB\SLIBCE.LIB C:\3200\3200\LIB\FALCS.LIB; medium model: link KEYSAMP,KEYSAMP,,C:\MSVC\LIB\OLDNAMES.LIB C:\MSVC\LIB\MLIBCE.LIB C:\3200\3200\LIB\FALCM.LIB; large model: link KEYSAMP,KEYSAMP,,C:\MSVC\LIB\OLDNAMES.LIB C:\MSVC\LIB\LLIBCE.LIB C:\3200\3200\LIB\FALCL.LIB; KEYSAMP.EXE should now exist in the C:\3200\3200\SAMPLE subdirectory. You may download it to the PDT 3200 unit to run.
4-6
Page 167
Tell Us What You Think... WeÕd like to know what you think about this manual. Please take a moment to Þll out this questionnaire and fax this form to: (516) 738-3318, or mail to: Symbol Technologies, Inc. One Symbol Plaza M/S B-4 Holtsville, NY 11742-1300 Attn: Technical Publications Manager IMPORTANT: If you need product support, please call the appropriate customer support number provided. Unfortunately, we cannot provide customer support at the fax number above.
UserÕs Manual Title: __________________________________________________ __________________________________________ (please include revision level) How familiar were you with this product before using this manual? ®Very familiar
® Slightly familiar
® Not at all familiar
Did this manual meet your needs? If not, please explain. __________________ ____________________________________________________________________ ____________________________________________________________________ What topics need to be added to the index, if applicable?__________________ ____________________________________________________________________ What topics do you feel need to be better discussed? Please be speciÞc. _____ ____________________________________________________________________ ____________________________________________________________________ What can we do to further improve our manuals? ________________________ ____________________________________________________________________ ____________________________________________________________________ Thank you for your inputÑWe value your comments.