Few simple qs 
Author Message
 Few simple qs

Hello asm enthousiasts,

I would like to know the allowed operands for CMOVCC operand,operand
I know the CC part but I wonder if all normal MOV operandtypes are
allowed( and also if the wordsize if forced to 32b)

Mark Hopkins has started some ( or a lot) of discussion about
assemblers. One of his texts are speaking about an assembler which
could resolve ALL kind of sensible operands. So for instance

XCHG X,Y would be "compiled" by the assembler to something like

MOV CX,Y
MOV AX,X
XCHG AX,CX

My question is twofold. First of all what do you all think of this
kind of "smart" assembler ? and second I would like to know the list
of sensible operands for every mnemonic in the instruction set.

Thirdly I would like to know if there is some de{*filter*} source code
available or at least an understandable exec/debug function
example( or is this as diff as INT 13 source ?)

Rick



Wed, 01 Dec 1999 03:00:00 GMT  
 Few simple qs


Quote:

>Hello asm enthousiasts,
[snip]
>Mark Hopkins has started some ( or a lot) of discussion about
>assemblers. One of his texts are speaking about an assembler which
>could resolve ALL kind of sensible operands. So for instance

>XCHG X,Y would be "compiled" by the assembler to something like

>MOV CX,Y
>MOV AX,X
>XCHG AX,CX

   This code does NOT exchange X with Y.  Second, this "smart"
assembler is doing register allocation.  Who told it it was OK
to use AX and CX?  I believe for it to be called "assembly" or
"machine level" programming, the programmer MUST have control
over the registers used.  Here is a one line, two statement,
TERSE code idiom that WILL exchange X with Y.  The ASM
generated by the TERSE compiler is included as well.

   Note that the PROGRAMMER was the one who selected the WORK
register (ax), NOT the compiler.

C:\TERSE>terse
------- The terse (tm) Compiler, Version 2.20 -------
Copyright (C) Jim Neil 1989-1997, All Rights Reserved

        ax = X; X = ax == Y;    \ swap X with Y
^Z
        Mov     ax,X
        Xchg    ax,Y
        Mov     X,ax            ; swap X with Y
     1 Lines In.
     3 Lines Out.

[snip]

   I believe that ONLY the programmer is capable of making the BEST
decision when it comes to things like register allocation.  If you
wish to give up this level of control, perhaps machine level coding
is not for you.  If a high-level syntax WITH FULL machine level con-
trol *is* what you want, please have a look at TERSE.  Vist the
TERSE website or send me an eMail for more information on TERSE
(addresses are in the .SIG below).

         Jim Neil           ___  ___/  ____/   ___  /   ____/   ____/
      Creator of The            /     /       /    /   /       /
TERSE Programming Language     /     ___/      ___/ ____  /   ___/
   http://www.terse.com       /     /       /  \         /   /

   ISBN:  0-9652660-0-1



Thu, 02 Dec 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Newbie on tclodbc: A few Qs.

2. Simple Qs: Do I need to uninstall before install

3. Two Simple Qs:

4. Two simple (I hope) QS about grid

5. A few simple questions...

6. A few simple questions:

7. A few simple question...

8. A few simple questions....

9. Summiteers: Few new Ada sales if few new Ada hires

10. several Qs

11. Qs on CLUBMGR, Template BUG ???

12. Qs

 

 
Powered by phpBB® Forum Software