GNU "as" Question

Hello, I’ve got a question for you on how to make “as” give me a specific
instruction. I’m trying to get the following Intel equivalent to work: “rep
movsd”. wasm on QNX4 comes up with 0xF3 0xA5. “rep:movsl” in “as” comes up
with just 0xA5 (which of course doesn’t work). Am I specifying the instruction
wrong or is there a different problem? I have consulted the available
documentation from the GNU web site, and it wasn’t any help for this specific
instruction. I’ve got the .bytes in there now, but I’d rather know the correct
way to do this. Thanks in advance.

-Warren

Warren Peece <warren@nospam.com> wrote:

Hello, I’ve got a question for you on how to make “as” give me a specific
instruction. I’m trying to get the following Intel equivalent to work: “rep
movsd”. wasm on QNX4 comes up with 0xF3 0xA5. “rep:movsl” in “as” comes up
^

make that “rep;movsl”


cburgess@qnx.com

<cburgess@qnx.com> wrote in message news:8vkufj$rtj$4@nntp.qnx.com
| Warren Peece <warren@nospam.com> wrote:
| > Hello, I’ve got a question for you on how to make “as” give me a specific
| > instruction. I’m trying to get the following Intel equivalent to work:
“rep
| > movsd”. wasm on QNX4 comes up with 0xF3 0xA5. “rep:movsl” in “as” comes
up
| ^
| make that “rep;movsl”

“And there was much rejoicing”- M.P. They oughta supply you with coupons for
discounts on aspirin when you get that AT&T syntax assembler. It’s pure hell
for someone who’s been immersed in the Intel syntax since the birth of the
8088. I know what I want it to do, I just don’t know how to tell it to do it.
Fire up that WYTIWYG shell on this sucker, too. :slight_smile:

-Warren “much more slowly than Shirley” Peece

While we’re in assembley land, is there any reason why (in my IPL code) I can’t
reference the two-entry (plus NUL) GDT directly from ROM instead of copying it
to RAM? I have the absolute 32-bit address of it, so I would assume I could
just load GDTR and away I go. However Intel may have had other ideas. Anyone
know for sure?

-Warren

“Warren Peece” <warren@nospam.com> wrote in message
news:8vm6q8$f9s$1@inn.qnx.com
| While we’re in assembley land, is there any reason why (in my IPL code) I
can’t
| reference the two-entry (plus NUL) GDT directly from ROM instead of copying
it
| to RAM? I have the absolute 32-bit address of it, so I would assume I could
| just load GDTR and away I go. However Intel may have had other ideas.
Anyone
| know for sure?
|
| -Warren

I think I’ve answered my own question. It took a bunch of reading and a few
dozen blowouts on the embedded thingie, but I now believe I know definitively.
The GDT can reside in ROM. You won’t see the ACCESSED bit change, but if you
don’t care neither does the CPU. The gotcha is that the 32-bit linear address
loaded into GDTR with LGDT is not actually 32-bits, it’s 24-bits with the
last byte (which would be the high-order byte) being ignored. Since my boot
ROM is at 0xFFF80000 all I could shove into GDTR was 0x00F8#### and of course
ka-boom! I was almost saved by the 26-bit address decoding used on the
SC400, but 0x03F80000 is still two bits too many. :frowning:

So now I know, and now you know, even if you didn’t want to.

-Warren

IANAAP (I am not an assmebly programmer) but thought I might play

I know GNU binutils is supposed to have MMX (but from assembly,
no compiler outputs). Do you have P MMX or better? Have you tried it?

What would be a first project? devg-svga.so bitblit routines? Has QNX
thought about MMX (or better) detection? and how to decide to run
devg-svga-mmx.so?

Warren Peece <warren@nospam.com> wrote in message
news:8vm5eh$e63$1@inn.qnx.com

cburgess@qnx.com> > wrote in message news:8vkufj$rtj$> 4@nntp.qnx.com> …
| Warren Peece <> warren@nospam.com> > wrote:
| > Hello, I’ve got a question for you on how to make “as” give me a
specific
| > instruction. I’m trying to get the following Intel equivalent to
work:
“rep
| > movsd”. wasm on QNX4 comes up with 0xF3 0xA5. “rep:movsl” in “as”
comes
up
| ^
| make that “rep;movsl”

“And there was much rejoicing”- M.P. They oughta supply you with coupons
for
discounts on aspirin when you get that AT&T syntax assembler. It’s pure
hell
for someone who’s been immersed in the Intel syntax since the birth of the
8088. I know what I want it to do, I just don’t know how to tell it to do
it.
Fire up that WYTIWYG shell on this sucker, too. > :slight_smile:

-Warren “much more slowly than Shirley” Peece

Michael J. Ferrador <n2kra@orn.com> wrote:

IANAAP (I am not an assmebly programmer) but thought I might play

I know GNU binutils is supposed to have MMX (but from assembly,
no compiler outputs). Do you have P MMX or better? Have you tried it?

The 2.9.1 assembler supports the following mmx instructions…

emms
movd
movq
packssdw
packsswb
packuswb
paddb
paddd
paddsb
paddsw
paddusb
paddusw
paddw
pand
pandn
pcmpeqb
pcmpeqd
pcmpeqw
pcmpgtb
pcmpgtd
pcmpgtw
pmaddwd
pmulhw
pmullw
por
pslld
psllq
psllw
psrad
psraw
psrld
psrlq
psrlw
psubb
psubd
psubsw
psubusb
psubusw
psubw
punpckhbw
punpckhdq
punpckhwd
punpcklbw
punpckldq
punpcklwd
pxor

and the MMX registers mm0 → mm7

What would be a first project? devg-svga.so bitblit routines? Has QNX
thought about MMX (or better) detection? and how to decide to run
devg-svga-mmx.so?

Warren Peece <> warren@nospam.com> > wrote in message
news:8vm5eh$e63$> 1@inn.qnx.com> …
cburgess@qnx.com> > wrote in message news:8vkufj$rtj$> 4@nntp.qnx.com> …
| Warren Peece <> warren@nospam.com> > wrote:
| > Hello, I’ve got a question for you on how to make “as” give me a
specific
| > instruction. I’m trying to get the following Intel equivalent to
work:
“rep
| > movsd”. wasm on QNX4 comes up with 0xF3 0xA5. “rep:movsl” in “as”
comes
up
| ^
| make that “rep;movsl”

“And there was much rejoicing”- M.P. They oughta supply you with coupons
for
discounts on aspirin when you get that AT&T syntax assembler. It’s pure
hell
for someone who’s been immersed in the Intel syntax since the birth of the
8088. I know what I want it to do, I just don’t know how to tell it to do
it.
Fire up that WYTIWYG shell on this sucker, too. > :slight_smile:

-Warren “much more slowly than Shirley” Peece
\


cburgess@qnx.com