Re: mov al,0f0h



rajdips@xxxxxxxxx wrote:
since al registyer is 8-bit why we need to give 2-digit.but in MOV
AL,OFOH in this why we giving 3-digit that is 0F0h.

An identifier may not start with a decimal digit. A number *must* start with a decimal digit. (true for all assemblers I'm aware of)

BAH db 42

mov eax, BAH
mov bl, 0BAH

It's just so the assembler can figure out what in hell you're talking about. It *looks* like too many digits to fit in a byte, but of course the leftmost zero doesn't add anything to the value of the number. Most(?) assemblers will also accept the "C-style" 0xBA - but a leading 0 *doesn't* (usually) indicate octal...

Best,
Frank

.



Relevant Pages

  • Re: Formatting in assembly
    ... effectively into other assemblers. ... scall _write,1,msg1,msg1_len ... mov dword,eax ... The formatting works, ...
    (alt.lang.asm)
  • Re: What causes this infinite loop?
    ... Usually, an "identifier" must not start with a decimal digit, a number ... I'm not at all sure that's true of most assemblers at all. ... signal an immediate value, there's nearly constant confusion in this ... it's annoying to use (IMO, ...
    (comp.lang.asm.x86)
  • Re: What causes this infinite loop?
    ... Usually, an "identifier" must not start with a decimal digit, a number must start with a decimal digit. ... Most of the assemblers I've used on non-Intel platforms have used what I'd consider more sensible rules. ... Since assemblers for Intel platforms generally don't require anything to signal an immediate value, ... Specifically, there are three distinct cases, but they provide only two notations to differentiate between them. ...
    (comp.lang.asm.x86)
  • Re: I think i finally got a definition of an Assembler!
    ... >> mov eax ebx ... >> for userdefined macros, that if not written properly will allow ... True High Level assemblers are included in Macro Assemblers. ... is a HLL, so its not merly a macro assembler/High Level Assembler. ...
    (alt.lang.asm)
  • Re: need to be able to know basic MASM ONLY
    ... I've seen many threads and posts on all the various assemblers ... Mov BX,Seg Data ... GetCursor Proc Near ... GetCursor Endp ...
    (comp.lang.asm.x86)