Search this site
Search the Web
Everything HP200LX: Knowledge, Products, Service

 Archives
9 years, 100's of pages of HP Palmtop Paper, jammed with tips, reviews and how-to's

Links
Most useful, up-to-date Web sites devoted to the HP 200LX

Downloads
Direct link into 1000's of pieces of Palmtop software

Tips from Our Techs

2008 Catalog
(PDF, 2.6 MB)

Contact Us/About Us

 
Weekly Palmtop Paper Newsletter
(Palmtop tips, latest happenings, and HP Palmtop Paper Store information)


 

 

Privacy Policy

PROGRAMMING TIP - RECOGNIZE THE 95LX

PROGRAMMING TIP - RECOGNIZE THE 95LX

Sometimes a program needs to identify that it is running on the 95LX and not a desktop PC. This is so it can adjust to the unique environment of the 95LX. There are programming routines to determine this. Below are two examples.

ASSEMBLER ROUTINE

is_hp proc

push ax bx cx dx

mov ax, 4DD4h

int 15h

cmp bx, 4850h

jnz @not_hp

cmp cx, 0101h

jnz @not_hp

mov rom_version, dl

jmp @end_is_hp

@not_hp

stc

@end_is_hp:

pop dx cx bx ax

ret

is_hp endp

The above routine sets the carry flag if an HP95 is not found. DOS v3.22 is a ROM version and ay have appeared in early laptops or portables.

C LANGUAGE ROUTINE

The C language version is directly usable for Borland C compilers. You might have to adapt for Microsoft C to make this work.

#include <dos.h>

/*

* Check if running on HP95, return 1 if so, else return 0

*

*/

int IsHP95(void)

{union REGS r;

r.x.ax = 0x4dd4;

int86(0x15, &r, &r);

return r.x.bx == 0x4850 &&

r.x.cx == 0x0101;}

Mark Scardina CompuServe ID: [76711,732]

Gilles Kohl CompuServe ID: [100114,3146]


Notice about Palmtop.net
The Palmtop Network with its S.U.P.E.R. (Simply Unbeatable Palmtop Essentials Repository) software is now available under the domain name of hp200lx.net.  

 
 

Copyright © 2005 Thaddeus Computing Inc

<