please dont rip this site

   .RADIX Sets the default Radix for integer constants
    ------------ ------------------------------------------------------------

   .RADIX selects the bas in which numbers without suffixes are assumed to be specified. For example,

  .RADIX 16

selects base 16, or hexadecimal, as the default notation. The following code illustrates the effect of the .RADIX directive:

.
.
.
.RADIX 16       ;select base 16, hexadecimal, as the default
mov    ax,100   ;=100h, or 256 decimal
.RADIX 10       ;select base 10, decimal, as the default
sub    ax,100   ;-100d decimal, result is 256 - 100 = 156 decimal
.RADIX 2        ;select base 2, binary, as the default
add    as,100   ;+100b, or 4 decimal, result is 156 + 6 = 160 decimal
.
.
.

.RADIX can select base 2, 8, 10, or 16 as the default. Incidentally, the operand to .RADIX is always decimal, no matter what default noation is selected; in other words, one .RADIX directive doesn't affect the notaion of the next .RADIX directive's operand.

   There is a potential problem to consider when you use the .RADIX directive. No matter what default notation is selected, values specified with DD, DQ, and
DT are assumed to be decimal values unless a suffix is used. This means that in

.
.
.
.RADIX 16
DD 1E7
.
.
.

1E7 is taken to be 1 times 10 to the seventh power, not 1E7h. In fact, you're best advised to place the h suffix on all hexadecimal values even after a .RADIX 16 directive. Why? Remember that b and d are valid suffixes, specifying binary and decimal notation, respectively. Unfortunately, b and d are also valid hexadecimal digits. If .RADIX 16 is in effect, what is Turbo Assembler to make of numbers like 129D and 101B?

   As it happens, Turbo Assembler always pays attention to valid suffixes, so 129D is 129 decimal and 101B is 101 binary, or 5 decimal. What this means is that even when .RADIX 16 is in effect, any hexadecimal number ending in D or B must have an h suffix. Given that, it's simplest just to put h suffixes on all hexadecimal numbers, and given that, if becomes clear that, in general, it's not particularly useful to use .RADIX 16.


file: /Techref/language/tasm/radix.htm, 2KB, , updated: 1999/4/21 08:22, local time: 2024/11/8 18:12,
TOP NEW HELP FIND: 
3.141.21.212:LOG IN
©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://ecomorder.com/techref/language/tasm/radix.htm"> *** Your Title Here ***</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to ecomorder.com!

 

Welcome to ecomorder.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .