⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.txt

📁 mas for 8086 microprocessor
💻 TXT
📖 第 1 页 / 共 3 页
字号:
        FRAME_TSS   2

        The C compiler only generates entries with FRAME_FPO. The other two 
        types are used inside the Windows NT kernel to all stack traces 
        across trap and tss frames that can appear in ring 0 code.

        Example Usages:

        1) 
        aproc proc
            .FPO ( 0, 0, 0, 0, 0, 0 )       ; all params are zero. 
            ret
        aproc endp

        2)                      
        .code
            push  +000000001h             
            call  aproc
            add   esp, 04h
            ret             

        aproc proc
            push  ebp
            mov   ebp, esp

            .FPO ( 0, 1, 3, 1, 1, 0 )   ; 0 = no locals
                                        ; 1 = 4 byte param \ 4
                                        ; 3 = bytes in procedure prologue
                                        ; 1 = one register saved in prologue
                                        ; 1 = if EBP was allocated
                                        ; 0 = frame type of FPO

            mov   eax, dword ptr [ebp+8]  ; move the passed param to EAX.

            leave   
            ret   00h
        aproc endp


        See ERRMSG.TXT for a list of possible error messages that could 
        be encountered when using the .FPO directive.   

======================< Part 5: Known Assembler Bugs >=====================

     Expression Order in High-Level Conditionals
     -------------------------------------------
     Comparisons in high-level conditionals cannot begin with a literal.
     For instance, this comparison causes an error:

	  .IF 1 == AX

     but this works properly:

	  .IF AX == 1


     Hexadecimal Constants
     ---------------------
     In some instances, ML might not generate the appropriate error
     message if it encounters a hexadecimal constant that does not have
     an appending "h". The following will help to ensure that hexadecimal 
     constants are properly represented:

     - Make sure that all hexadecimal constants have an appending "h".
     - Begin all hexadecimal constants with the numeral 0. This ensures
       that the compiler will generate the appropriate error message
       if it encounters a hexadecimal constant that does not end in "h".

     
     Initializing Nested Structures ? 
     ------------------------------
     If one structure is nested within another, the inner structure's
     initializer list must either be empty or include a comma between
     every field.  For example, the structure INFO declared on page 123 
     of the Programmer's Guide contains a structure of type DISKDRIVES,
     which in turn contains three BYTE fields.  An object of type INFO
     could be initialized as:

	  Info1 INFO { , , , , { }}      ; Inner initializer list is blank

     or as:

	  Info1 INFO { , , , , {1, 2, }} ; Commas for all three fields

     but not as:

	  Info1 INFO { , , , , {1, 2 }}  ; Error: missing last comma
     
	  
     Span-Dependent Expressions used in Macros
     -----------------------------------------
     MASM 6.1x evaluates macro expressions only on the first pass of 
     assembly, but code and data are reevaluated on subsequent passes.
     Because of this, macro expressions which depend on the span between
     two addresses may not evaluate correctly. For instance, the
     following code will not evaluate correctly:

	  Label1:
	       JMP Label2
	  Label2:

	  REPEAT Label2 - Label1  ; Evaluates incorrectly
	       INC AX
	  END

     View the listing file to determine if a questionable macro expression
     was evaluated as desired.


     Span-Dependent Equates in Macros and EXTERNDEF ABS
     --------------------------------------------------
     The ABS operator causes an identifier to be exported as a relocatable
     unsized constant (see Programmer's Guide page 220).  If ABS is used
     with EXTERNDEF within a macro, and the constant being exported
     depends on the difference between two addresses, the constant may not
     be exported correctly.  In some cases, the listing file will show the
     correct value, but the value in the resulting .obj will be incorrect.
     For instance, the following code will not evaluate correctly:

	  EXTERNDEF TableSize:ABS  ; Will not be exported correctly

	  MAKETABLE MACRO
	  Table1 LABEL BYTE
	       DB 0, 1, 2
	  TableSize EQU $-Table1
	  ENDM

	  SEG1 SEGMENT
	  MAKETABLE
	  SEG1 ENDS

     To avoid this problem, either use the 'PUBLIC' directive in place of 
     'EXTERNDEF', or put a label before the equate, within the macro.


     Span-Dependent Text Equates
     ---------------------------
     The TEXTEQU operator is evaluated on the first assembly pass.  If
     TEXTEQU is used with an expression that depends on the difference
     between two addresses, the resulting constant may be incorrect.
     For instance, the following code will not evaluate correctly:

	  Label1:
	       JMP Label2
	  Label2:
	  WrongNum TEXTEQU %Label2-Label1 ; WrongNum will be incorrect


     STRUCT and RECORD Initialization
     --------------------------------
     If a STRUCT containing a UNION is initialized incorrectly, it is
     possible that the compiler might not generate an appropriate error.
     If the UNION contains a RECORD, the STRUCT is initialized to the
     default value for the original UNION.
     

     EQU Redefinition
     ----------------

     EQU can be redefined when a text macro is used, the following example
     illustrates this known bug.

     a EQU <T>
     a EQU <U>   ; This second occurence should generate an error "A2005: 
		 ; symbol redefinition" because once "a" is defined as a 
		 ; text macro it cannot be redefined to be a different kind 
		 ; of symbol.

     y EQU y     ; This statement is syntactically correct, but any attempt  
		 ; to use "y" and you'll receive "error A2123: text macro 
		 ; nesting level too deep".


=================< Part 6: What Has Been Fixed in 6.11d? >=================

     - The opcode generated for the FSETPM instruction has been 
       corrected.

     - Errors when using the ALIAS directive and creating COFF object 
       files have been fixed. 

     - Errors when using the ORG directive to back patch the code being 
       generated in a COFF object file have been fixed.

     - The extra byte in the listing file for instructions using 32-bit
       addressing modes has been removed.

     - Unresolved externals that could occur when a symbol appeared more
       than once in EXTERNDEF directives have been fixed.

     - You can now step through code in include files when building COFF
       object files.

     - Various Access Violations when generating COFF object files (/coff)
       have been fixed.


================< Part 7: What Has Been Fixed in 6.12? >===================

     - Various Access Violations when generating CodeView debug information 
       (/Zi) have been fixed.

     - Errors when specifying an entry point with the END directive and 
       creating COFF object files have been fixed. 

     - Various structure packing inconsistencies when compared to the 
       Microsoft C/C++ compilers have been corrected. MASM 6.12 should now 
       pack structures the same as the Microsoft C/C++ compiler when using 
       the same packing options.


================< Part 8: What Has Been Added up to 6.13? >================

  .586 and .586P Directives in MASM 6.11
  --------------------------------------
  The .586 directive enables assembly of non-privileged instructions 
  available for the Pentium processor. The .586P directive enables 
  privileged instructions in addition to the non-privileged instructions
  for the Pentium.

  The following example demonstrates implementation of the .586 directive.
     
  .586
  .model flat, C

  .data
  ; .586  gives 110100111111y = 0D3Fh
  ; .586p gives 110110111111y = 0DBFh
  var1 dw @cpu

  IF  @Cpu AND 0100000y
      %echo Pentium instructions enabled.
  ELSE
      %echo Pentium instructions Not enabled.
  ENDIF

  end

  .686 and .686P Directives in MASM 6.12
  --------------------------------------
  The .686 directive enables assembly of non-privileged instructions 
  available for the Pentium Pro processor. The .686P directive enables 
  privileged instructions in addition to the non-privileged instructions
  for the Pentium Pro.

  The following example demonstrates implementation of the .686 directive.
     
  .686
  .model flat, C

  .data
  ; .686  gives 110101111111y = 0D7Fh
  ; .686p gives 110111111111y = 0DFFh
  var1 dw @cpu

  IF  @Cpu AND 1000000y
      %echo Pentium Pro instructions enabled.
  ELSE
      %echo Pentium Pro instructions Not enabled.
  ENDIF

  end

  .MMX Directive in MASM 6.12
  ---------------------------------------------------------------------
  The .MMX directive enables assembly of MMX instructions.  Users can
  check to see that @Version is 612 or higher to tell if the version
  of MASM being used supports the .MMX directive and MMX instructions.

  The following example demonstrates the use of the .MMX directive.
     
  .586
  .MMX
  .model flat, C

  .code
      ;; MMX opcodes can be assembled

  end

  .K3D Directive in MASM 6.13
  ---------------------------------------------------------------------
  The .K3D directive enables assembly of K3D instructions.  Users can
  check to see that @Version is 613 or higher to tell if the version
  of MASM being used supports the .K3D directive and K3D instructions.

  The following example demonstrates the use of the .K3D directive.
     
  .586
  .K3D
  .model flat, C

  .code
      ;; K3D opcodes can be assembled

  end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -