NLM Development Environment
Articles and Tips: article
01 Feb 1996
This article outlines various NLM development environments. The NLM SDKs that ship on the Novell SDK CD are specifically designed for use with the "C" programming language. Novell Developer Support writes example code, and exchanges test cases with developers, in "C." Limited support is also offered for C++ and Assembly. ManageWare is a 4GL similar to Visual BASIC for the development of NLMs and network utilities. Novell has produced a number of linkers, including NLMLINK, NLMLINKR, NLMLINKX, NLMLINK2 and NLMLINKP. For some time, the Watcom compiler has offered a suitable environment for writing NLMs. Additionally, within the last year or so developers have begun using other NLM compiler environments, including Borland, Microsoft, and MetaWare compilers. This is possible due to the efforts of a company called Base Technology, Inc. who has produced a linker that can build NLMs from the .OBJ files produced by Borland, Microsoft, and MetaWare compilers. Novell has also developed several tools that help NLM developers.
I enjoy my occupation here in Novell Developer Support. Developers from all over the world contact us to exchange information and ask the most interesting questions. Most of these highly skilled developers are writing cutting-edge software that impacts the future of computing and networking. Every day is an adventure.
All developers seem to have their own quirks when it comes to a development environment. In my occupation, I have encountered many development environments. Obviously, new environments and methods are invented all the time. In this article, I will outline various NLM development environments. I do this, not as an endorsement of one environment over another, but to help in your selection of an NLM development environment. If I have missed any environments, please let me know and I will mention them in a follow-up article. [email@example.com; Subject: SUGGESTION.NLM.ENV
The NLM SDKs shipped on the Novell SDK CD are specifically designed for use with the "C" programming language. Novell Developer Support writes example code, and exchanges test cases with developers, in "C."
Some developers elect to write NLMs using C++. Novell Developer Support crrently offers limited support for C++ NLM development efforts. The bulk of support for C++ NLM development comes from Compiler and Linker manufacturers.
Disk and LAN driver developers may elect to write their applications in Assembly language. Novell Labs provides all support for Disk and LAN driver development. Historically, the Phar Lap assembler has been the most popular. Some developers claim to have success using other assemblers. Novell Developer Support offers very limited support for the Assembly language NLM environment.
ManageWare is a 4GL similar to Visual BASIC for the development of NLMs and network utilities. ManageWare includes an interpreter and a compiler for royalty free NetWare NLMs and DOS EXEs files. Using Visual ManageWare for Windows you can drag and drop to create your own NLMs. ManageWare provides access to NetWare, queues, Bindery, Directory Services (NDS), IPX, SPX, SAP, TCP IP, Novell style user interface, dBASE/Btrieve/other database files, hardware ports, directories, XMODEM protocol, Server statistics, INI configuration file, MHS, External C routines and more. ManageWare supports NetWare version 3.x through 4.x, and is NetWare Tested and Approved.
For more information about ManageWare, contact HiTecSoft at the following address:
HiTecSoft 3370 N. Hayden Rd. Suite 123-175 Scottsdale, AZ 85251-6632 Telephone: (602) 970-1025 Fax: (602) 970-6323
Support for writing NLMs in other languages is limited.
The Watcom compiler used to be the only compiler suitable for writing NLMs. Many "seasoned" NLM developers use the Watcom NLM environment, mostly because it is what they are used to. Watcom has had a lot of experience interacting with Novell.
Borland, Microsoft and MetaWare
Within the last year or so developers began using other NLM compiler environments, including Borland, Microsoft and MetaWare compilers. This is possible due to the efforts of a company called Base Technology, Inc. who has produced a linker that can build NLMs from the .OBJ files produced by Borland, Microsoft and MetaWare compilers. (See the linker section below for details.)
Developing NLMs using the GNU C/C++ compiler is also possible. Patches are available to create the tools needed for GNU tool set from ftp://ftp.american.com/pub/gcc nlm. To start, acquire the following:
gcc 2.6.3 binutils 2.5.2 gdb 4.14
Only limited aid is available (as time permits) for the GNU tools. You can E-mail the GNU/NLM mailing list at gcc firstname.lastname@example.org. More information can be found in the README.patches file located on ftp.american.com
The first linker that could produce NLMs was a linker produced by Novell. Initially, the linker was named NLMLINK. Later, Novell produced other versions of their NLM linker such as NLMLINKR, NLMLINKX, NLMLINK2 and NLMLINKP.
The original NLMLINK.EXE has been renamed and currently ships as NLMLINKR.EXE. It operates in DOS (real mode) and is limited to the conventional DOS 640K.
NLMLINKP.EXE was an early attempt to give Novell's linker access to extended memory (made available with the introduction of the 80286 and later processors). It implemented its own extended memory manager and was not compatible with other extended memory managers such as HIMEM.SYS. NLMLINKP.EXE has been discontinued for some time and is no longer supported by Novell.
NLMLINKX.EXE operates in DOS in Protected Mode. It requires the DOS extender DOS4GW (which has generally been shipped with the Watcom development environment).
NLMLINK2.EXE operates in IBM's OS/2 environment.
All versions of Novell's linker have supported object files created by the Phar Lap Assembler and the Watcom compiler. Some effort has been made to have Novell's linker(s) support object files from the Borland environment; however Novell does not currently claim that its linker will support all Borland object files.
Watcom's linker is called WLINK. It is suitable for building NLMs from Watcom's object files. WLINK comes with Watcom's C/C++ compiler environment.
Developers who are used to the Borland, Microsoft or MetaWare environments are usually not too exited about the expense of migrating to the Watcom environment to develop NLMs. Base Technology Inc. seems to have solved this problem by introducing their NLM linker product. The product is called NLINK PRO. Base Technology asserts that their linker will build NLMs from Borland, Microsoft, MetaWare or Watcom object files. For more information on NLINK PRO, contact Base Technology, Inc. At the following address:
Base Technology, Inc. 3211 Holiday Court, #203 La Jolla, CA 92037 Phone: 619-452-9500
Novell has developed several tools that help NLM developers debug and increase the performance of their applications. Novell will continue to provide NLM tools to developers.
The NetWare Internal Debugger (NID) is built into NetWare. NID requires that you have some understanding of 80386 Assembly language. NID allows you to set break points, single step through code, dump blocks of memory, etc. For more information about NID, see last month's DevNote by Kevin Burnett.
Many NLM developers have similar problems debugging code. For example, page faults caused by uninitialized pointers is a common bug and is very hard to fix. Novell engineers have methods of narrowing down this type of problem. When feasible, these methods are automated and incorporated into Novell's NLMDEBUG. Each new version of NLMDEBUG includes new debug and performance features. NLMDEBUG can be found on Compuserve, NDEVSUP forum, library #5, in the self-extracting file TDBG1C.EXE.
* Originally published in Novell AppNotes
The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.