×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Can MOVSB work in 32bit mode?

Can MOVSB work in 32bit mode?

Can MOVSB work in 32bit mode?

(OP)
How do you tell the processor to use 32bit when using the MOVSB opcode? It must be something really simple that i am overlooking, or MOVSB is only a 16bit opcode and the book of words is wrong.

The opcode for MOVSB is 0A4h.

I am tring to write from DS:ESI to ES:EDI but the previous opcode will only operate using DS:SI to ES:DI.

The book of words says i can do it but my assembler is only generating 0A4h

I have even tried inserting 'db 066h' before the MOVSB command to involk 32bit addressing with no affect.

I have also tried using the following directives
.386p
.model flat
code segment para 'CODE' use32

This works
    mov ds,?
    mov si,?
    mov ax,0B000h
    mov es,ax
    mov di,08000h
    movsb

This does not
    xor ax,ax
    mov es,ax
    mov ds,ax
    mov esi,?
    mov edi,0B8000h
    movsb

RE: Can MOVSB work in 32bit mode?

(OP)
Ok, who ever posted this is a real muppet!

the opcode 066h tells the processor to use 16bit processing for the following opcode.

all my commands with 066h were losing the extra bits when i was programming in 32bit mode. I have removed them.

i have now successfully used MOVSB in 32bit mode.

jmp far ptr CrawlsBackIntoHole

t'tar

0000:0000:0000:0000h
The people who have nothing to say and say it too loud have little knowledge, It's the quiet ones you need to worry about!

RE: Can MOVSB work in 32bit mode?

(OP)
OK, Im starting to get the hang off this now,

066h opcode is the bit size override for operands
067h opcode is the bit size override for addresses

ie if the default address size is 16bit the following command after the opcode will be 32bit and visa.

the default address size is set in the D/B bit22 in the segment descriptor in the GDT pointed to by the segment selector(cs,ds,es,etc)

0000:0000:0000:0000h
The people who have nothing to say and say it too loud have little knowledge, It's the quiet ones you need to worry about!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close