Jump to content

Dúvidas em erros Assembly


Scania_13

Recommended Posts

3 horas atrás, Scania_13 disse:

Estou tentando descobrir os problemas de alguns códigos em assemble, porém não estou conseguindo resolver alguns que são: mov ax, [si][di];mov ds, cs; e mov ax, [si+di+0].

Os erros que aparecem são:

illegal index mode (mov ax, [si][di]) illegal use of segment register (mov ds, cs | mov ax, [si+di+0])

Ao usar um endereço efetivo com "registradores" de 16 bits você tem que seguir as regras do 8086. O endereço "base" é sempre BX ou BP, nenhum outro e o índice é sempre SI ou DI, nenhum outro.

Assim: mov ax,[si][di] não existe, nem mesmo mov ax,[si+di+0].

  • Curtir 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...