RE: what is Hex?

I'm not sure that the leading zero is a requirement but I haven't used an
assembler on Intel x86 much since the DOS days.  I know that back in those
days, I could use the instruction, "int 16h or, to make a DOS call, int 21h"
without putting a leading zero ahead of the interrupt value.  Of course,
lots of the really useful interrupts 2 (single step), 3 (breakpoint) and 9
(keyboard) look the same in hex or decimal so they wouldn't matter if they
had leading zeroes or not.  If I remember correctly, Wordperfect prior to v5
for DOS had a hook for screen readers located at interrupt A0h but it has
been an eternity since I looked at that while working on "Right Writer" a
grammar checker for DOS.

Alas, I grow more nostalgic as this thread grows...

cdh 

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Ian D. Nichols
Sent: Wednesday, February 20, 2008 4:38 PM
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: what is Hex?

Hi,

To add a little more to this topic, for the general inlightenment of those 
who don't already know:

In Intel assembly language, a hexadecimal number must have an "h" at the 
end, an octal number must end with a "o", and a binary number with a "b". 
Without any of these, the assembler assumes the number is decinal.  Further,

a hexadecimal number that begins with any of the digits "a" to "F"  must 
begin with a zero as well as ending with an "h", otherwise the assembler 
tries to interpret it as a label or variable.


All the best,

Ian

Ian D. Nichols,
Toronto, Canada

----- Original Message ----- 
From: "Jamal Mazrui" <empower@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Wednesday, February 20, 2008 1:43 PM
Subject: Re: what is Hex?


> By the way, I think someone said that a hex number starts with 0.  I don't
> think that's quite right.  C derived languages typically distinguish a hex
> number with a preceding 0x, but the number is what follows the x.  Other
> languages or contexts use different conventions to distinguish hex from
> decimal, e.g., Visual Basic uses a preceding &h sequence and Unicode uses
> a preceding u.  In other contexts, the number is understood to be hex, so
> no additional prefix or suffix is needed.
>
> Here is a long Wikipedia article on hex
> http://en.wikipedia.org/wiki/Hexadecimal
>
> Cheers,
> Jamal
> __________
> View the list's information and change your settings at
> http://www.freelists.org/list/programmingblind
>
> 


__________
View the list's information and change your settings at 
http://www.freelists.org/list/programmingblind



__________ NOD32 2890 (20080220) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com


__________
View the list's information and change your settings at 
http://www.freelists.org/list/programmingblind

Other related posts: