Mail Archives: djgpp/1998/09/18/20:37:20
Mthimkhulu Molekwa wrote:
> Correct me if I'm wrong. Should the above code be:
>
> asm("movw $0x0003, %%ax\n\t"
> "int $0x10\n\t"
> : : "%eax");
>
> ===> replaced "0x0003" by "$0x0003"
Yes. The previous code would have fetched the word from address 0x3 in
memory, and loaded it into ax.
>and ";" by "\n\t"
Not necessary. `as' will accept either as instruction separators.
(\n\t looks better if you ever need to look at the asm code, however.)
>
> MK
> ========================================================
> Mthimkhulu Molekwa
> Reutech Systems - Stellenbosch
> Tel: +27 21 880 1150
> Fax: +27 21 880 1153
> Cell: +27 83 454 1230
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -