Re: AM186 instructions

From: flekso (taurus_at_email.hinet.hr)
Date: 04/29/04

  • Next message: Raymond Martin: "Re: write system call"
    Date: Thu, 29 Apr 2004 21:09:37 +0000 (UTC)
    
    

    "BONDOK" <osama.hussein@link.net> wrote in message
    news:93058fe5078d01ccc64ee307e63db08a@localhost.talkaboutprogramming.com...
    > I want to know the fifference between:
    > 1) - MOV DS:Offset, 00
    > - MOV Byte Ptr DS:Offset, 00

    'Size' ptr keywords explicitly state the size of the destination operand,
    which assembler can't extract from your 00 immediate operand (is it 00 word,
    00 byte, 00 double word).

    > 2) - Call Sub_routine
    > - Call near ptr Sub_routine

    If we talk about real mode, difference between 'near' and 'far' call is that
    near takes a word operand that allows you to offset the IP by
    +-32KB(intra-segment), while far takes two word operands thus allowing you
    to offset both IP and CS registers effectively covering entire 8086 address
    space (1MB). Near pushes only the IP register on the stack for the return
    path, while far pushes both IP and CS registers required for return from a
    different segment/anywhere in ram.

    > 3) - Cmp Ax, 00
    > - Cmp byte DS:Offset, 00
    >

    Read 1)


  • Next message: Raymond Martin: "Re: write system call"

    Relevant Pages

    • Re: High-byte registers in AMD64 (was: MOVZX has stall register)
      ... > range, or any of the low-byte registers ... However, the legacy high-byte registers ... > are not accessible when a REX prefix is used. ... Default Operand Size. ...
      (comp.lang.asm.x86)
    • Re: 64bit operations efficiency...
      ... In Long Mode, we have 64bit registers, as well as operations, available. ... REX prefix with the apropriate flags, ... My guess is that it has to do with instruction density. ... to the 32 bit operand; ...
      (comp.lang.asm.x86)
    • Re: NASM 0.98.39 vs. NASM 2.03.01 disassembly
      ... that you have a valid case, and the bug report gives you access to a ... and the operand is always 16-bits. ... You have also stated that "only 8-bit or 32-bit registers should ... assembly language syntax should look like, all I expect of the NASM ...
      (alt.lang.asm)
    • Re: new to assembly
      ... and Reg can be one of two processor registers R0 and R1. ... We know well the instruction form; operation' operand, ...
      (comp.lang.asm.x86)