ASM Mnemonics

Sharky Forums


Results 1 to 3 of 3

Thread: ASM Mnemonics

  1. #1
    Catfish
    Join Date
    Aug 2001
    Posts
    177

    Post ASM Mnemonics

    les di, video_buffer
    mov al, byte ptr color
    mov ah, al
    mov cx, 320*200/2
    rep stosw

    That's code to fill the screen, video buffer is a pointer to 0xa000. It works, but I don't understand what les, rep, and stosw do.

    ------------------
    Specs:
    Computer 1
    ------------
    PII 450mHz
    128 MB SDRAM
    14.4 and 75.5 GB 7200 RPM Hard Drives
    Riva TNT w/ 16 MB Video RAM
    Windows 98/Windows 2000

    Computer 2
    ------------
    PI 200mHz
    32 MB SDRAM
    3 GB 2400 RPM Hard Drive
    Matrox Something or Other
    Debian 2.2r4, Kernel 2.4.16
    EPoX 8KHA+
    Athlon XP 1900+
    512 MB DDR-SDRAM
    PNY GeForce3 TI 200

  2. #2
    Sushi
    Join Date
    Dec 2001
    Posts
    1

    Post

    Let's see if I remember correctly...

    les = Load ES and DI registers with 32 bit
    pointer to video memory (given in video_buffer)

    rep stosw = stores the 16-bit word contained in AX register CX times, incrementing the pointer (ES I) it uses each time it stores a value.

    I think that's it....


  3. #3
    Catfish
    Join Date
    Aug 2001
    Posts
    177

    Post

    Ah, thanks a lot.

    ------------------
    EPoX 8KHA+
    Athlon XP 1900+
    512 MB DDR-SDRAM
    PNY GeForce3 TI 200
    EPoX 8KHA+
    Athlon XP 1900+
    512 MB DDR-SDRAM
    PNY GeForce3 TI 200

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •