Mail Archives: djgpp/1997/02/20/03:01:19
On Wed, 19 Feb 97 13:58:43 GMT, johne AT parallax DOT co DOT uk (John Eccleston) wrote:
>Hi All,
>
>I am trying to write some inline assembler to get the address of the
>bios fonts, and I was trying to use MOV instructions like so:
>
> asm("movw %edx, %bh\n\t");
>
>I use edx as in the extended syntax it is used to pass in a value,
>but the BIOS call requires that the value be in bh.
>
Since you appear to be moving from a large register to a small one you can do
asm ("mov %dl, %bh\n\t\t");
unless you are moving from the esi or edi registers in which case you can do
asm ("mov %si, %bx\n\t\tmov %bl, %bh\n\t\t");
Bill Lanam
- Raw text -