Announcement

Collapse
No announcement yet.

Inline Assembler Abilities

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Inline Assembler Abilities

    Does anyone know which assembly instructions the PB/DLL 6.0 compiler supports and which ones it does not.
    i.e.
    MOV
    MOVSB
    ADD
    SUB
    POPA
    OUT
    IN
    OUTSB
    OUTSW


    Is it possible to use(In Ring 0):
    LGDT -Load Global Descriptor Table
    SGDT -Store Global Descriptor Table
    With the PB/DLL compiler.


    Thanks a bunch
    Kevin

    -------------
    mailto:[email protected][email protected]</A>
    :-)



    [This message has been edited by KevinVoell (edited March 02, 2000).]

  • #2
    Kevin,

    The compiler will handle all of the Intel mnemonics you mentioned but I
    don't think you can write ring0 access software with it. The win 95 VxD
    device drivers are in LE format while the compiler creates PE files. From
    the documentation, it says it will handle all asm instructions including
    MMX and FP. I don't know about some of the very late PII & PIII specific
    ones.

    I am not up to date on the later device drivers but they may be different
    as they are not from memory, LE format files.

    Perhaps one of the PowerBASIC technical people could help you with this
    capacity but I doubt if it can be done.

    Regards & good luck.

    [email protected]

    ------------------
    hutch at movsd dot com
    The MASM Forum

    www.masm32.com

    Comment


    • #3
      Steve is correct - unfortunately PB/DLL cannot produce LE files (VxD / Kernal mode drivers). If you have to write a Ring-0 app you'll probably need to use VC or similar.


      ------------------
      Lance
      PowerBASIC Support
      mailto:[email protected][email protected]</A>
      Lance
      mailto:[email protected]

      Comment


      • #4
        Kevin,
        The following is a list of opcodes etc. that I found PBCC1.0 recognises and a list of unimplemented standard Intel opcodes which don't work. I suspect the list is the same for PBDLL.

        This list may be incomplete but I figured them out for myself. I hope it is of some use to you.

        Paul.

        Unimplemented op-codes? These need to be verified:
        CMPXCHG8B,JCXZ (use JECXZ),LGDT,SGDT,LLDT,SLDT,LTR,STR,LIDT,SIDT,MOV (SYSTEM)?,LMSW,SMSW,
        MOV (DEBUG)?,INVD,WBINVD,INVLPG,RSM,RDMSR,WRMSR,RDTSC,XOR,RET (USE RETN & RETF),FPREMI,FCOMI,
        FUCOMI,FCOMIP,FUCOMIP

        Implemented opcodes:
        AAA,AAD,AAM,AAS,ADC,ADD,,AND,ARPL,BOUND,,BSF,BSR,BSWAP,BT,BTC,BTR,BTS,BYTE,CALL,CBW,CDQ,CH,CL,
        CLC,CLD,CLI,CMC,CMP,CMPSB,CMPSD,CMPSW,CMPXCHG,CPUID,CCWD,CWDE,,DAA,DAS,DB,DD,DEC,DIV,DW,
        DWD DWORD,,EMMS,ENTER,,F2XM1,FABS,FADD,FADDP,FAR,FBLD,FBSTP,FCHS,FCLEX,FCOM,FCOMP,FCOMPP,
        FCOS,FDECSTP,FDIV,FDIVP,FDIVR,FDIVRP,FFREE,FIADD,FICOM,FICOMP,FIDIV,FIDIVR,FILD,FIMUL,FINCSTP,
        FINIT,FIST,FISTP,FISUB,FISUBR,FLD,FLD1,FLDL2E,FLDL2T,FLDCW,FLDENV,FLDLG2,FLDLN2,FLDPI,FLDZ,
        FMUL,FMULP,FNCLEX,FNINIT,FNLDCW,FNOP,FNSAVE,FNSTCW,FNSTENV,FNSTSW,FPATAN,FPREM,FPREM1,FPTAN,
        FRNDINT,FRSTOR,FSAVE,FSCALE,FSIN,FSINCOS,FSQRT,FST,FSTCW,FSTENV,FSTP,FSTSW,FSUB,FSUBP,FSUBR,
        FSUBRP,FTST,FUCOM,FUCOMP,FUCOMPP,FUNCTION,FWAIT,FXAM,FXCH,FXTRACT,FYL2X,FYL2XP1,HLT,IDIV,
        IMUL,IN,INC,INSB,INSD,INSW,INT,INTO,IRET,IRETD,JA,JAE,JB,JBE,JC,JCXZ,JE,JECXZ,JG,JGE,JL,JLE,
        JMP,JNA,JNAE,JNB,JNBE,JNC,JNE,JNG,JNGE,JNL,JNLE,JNO,JNP,JNS,JNZ,JO,JP JPE,JPO,JS,JZ,LAHF,
        LAR,LDS,LEA,LEAVE,LES,LFS,LGS,LOCK,LODSB,LODSD,LODSW,LOOP,LOOPE,LOOPNE LOOPNZ,LOOPZ,LSL,LSS,
        MM(0),MM(1),MM(2),MM(3),MM(4),MM(5),MM(6),MM(7),MM0,MM1,MM2,MM3,MM4,MM5,MM6,MM7,MOV,MOVD,MOVQ,
        MOVSB,MOVSD,MOVSW,MOVSX,MOVZX,MUL,NEAR,NEG,NOP,NOT,OR,OUT,OUTSB,OUTSD,OUTSW,PACKSSDW,PACKSSWB,
        PACKUSWB,PADDB,PADDD,PADDSB,PADDSW,PADDUSB,PADDUSW,PADDW,PAND,PANDN,PCMPEQB,PCMPEQD,PCMPEQW,
        PCMPGTB,PCMPGTD,PCMPGTW,PMADDWD,PMULHW,PMULLW,POINTER,POP,POPA,POPAD,POPF,POPFD,POR,PSLLD,
        PSLLQ,PSLLW,PSRAD,PSRAW,PSRLD,PSRLQ,PSRLW,PSUBB,PSUBD,PSUBSB,PSUBSW,PSUBUSB,PSUBUSW,PSUBW,
        PTR,PUNPCKHBW,PUNPCKHDQ,PUNPCKHWD,PUNPCKLBW,PUNPCKLDQ,PUNPCKLWD,PUSH,PUSHA,PUSHAD,PUSHF,
        PUSHFD,PXOR,PWD PWORD,RCL,RCR,REP,REPE,REPZ,REPNE,REPNZ,RETF,RETN,ROL,ROR,SAHF,SAL,SAR,SBB,
        SCASB,SCASD,SCASW,SETA,SETAE,SETB,SETBE,SETC,SETE,SETG,SETGE,SETL,SETLE,SETNA,SETNAE,SETNB,
        SETNBE,SETNC,SETNE,SETNG,SETNGE,SETNL,SETNLE,SETNO,SETNP,SETNS,SETNZ,SETO,SETP SETPE,SETPO,
        SETS,SETZ,SHL,SHLD,SHORT,SHR,SHRD,ST(0),ST(1),ST(2),ST(3),ST(4),ST(5),ST(6),ST(7),STC,STD,
        STI,STOSB,STOSD,STOSW,SUB,TBY TBYTE,TEST,VERR,VERW,WAIT,WORD WRD,XADD,XCHG,XLAT XLATB


        ------------------

        Comment


        • #5
          Thanks Paul that is exactly what I was looking for.

          Kevin

          ------------------
          mailto:[email protected][email protected]</A>
          :-)

          Comment


          • #6
            Kevin,

            The problem with giving a complete listing of Intel mnemonics is one
            of duplication, the Intel PIII manuals are exhaustive in the instruction
            set definitions and as Intel are the processor manufacturer, these are
            the correct manuals to use as reference for the mnemonics.
            http://support.intel.com/design/pentiumiii/manuals/

            The range is in the PBDLL60 manual under ASM with the following,

            ========================================================================
            Identify an assembly-language statement. PowerBASIC's Inline Assembler
            supports 8086/8088, 80286, 80386, 80486, Pentium, Floating-Point and MMX
            opcodes.
            ========================================================================

            This in fact says it all and answers both your question and Paul's.

            Most of the instructions that are not available are those that require
            lower than ring3 access privileges. About 2 years ago, Greg Turgeon
            demonstrated a technique using,

            ! db <hex_opcode>

            that allows the compiler to assemble an unsupported opcode. The hex
            opcodes can be got from the Intel manuals.

            To build the device drivers you appear to be interested in, Microsoft have
            the various DDK's avaliable which are designed to do exactly what you
            need.

            Best of luck, its a really fun area.

            [email protected]

            ------------------
            hutch at movsd dot com
            The MASM Forum

            www.masm32.com

            Comment

            Working...
            X