Add rayman2 source files
This commit is contained in:
280
Rayman_X/cpa/masm/CREF.DOC
Normal file
280
Rayman_X/cpa/masm/CREF.DOC
Normal file
@@ -0,0 +1,280 @@
|
||||
|
||||
CREF.DOC
|
||||
|
||||
(C) Copyright Microsoft Corporation, 1992
|
||||
|
||||
This file contains information on the purpose and use of the
|
||||
Microsoft(R) Cross-Reference Utility (CREF) Version 6.00.
|
||||
|
||||
|
||||
================================< Contents >================================
|
||||
|
||||
This file has 4 parts:
|
||||
|
||||
Part Contents
|
||||
---- --------
|
||||
1 Introduction
|
||||
|
||||
2 Using CREF
|
||||
|
||||
3 Reading Cross-Reference Listings
|
||||
|
||||
4 Difference from Previous Releases
|
||||
|
||||
|
||||
|
||||
==========================< Part 1: Introduction >==========================
|
||||
|
||||
The Microsoft Cross-Reference Utility (CREF) creates a cross-reference
|
||||
listing of all symbols in an assembly-language program. A cross-reference
|
||||
listing is an alphabetical list of symbols followed by references to
|
||||
where a symbol appears in the source code.
|
||||
|
||||
CREF is intended for use as a debugging aid to speed up the search for
|
||||
symbols encountered during a debugging session. The cross-reference
|
||||
listing, together with the symbol table created by the assembler, can make
|
||||
debugging and correcting a program easier.
|
||||
|
||||
|
||||
============================< Part 2: Using CREF >==========================
|
||||
|
||||
CREF creates a cross-reference listing for a program by converting PWB
|
||||
Source Browser database files (those ending with a BSC or an SBR
|
||||
extension) into a readable ASCII file.
|
||||
|
||||
Command-Line Syntax
|
||||
-------------------
|
||||
|
||||
CREF crossreferencefile [, crossreferencelisting] [;]
|
||||
|
||||
crossreferencefile Source Browser database file. Default
|
||||
filename extension is BSC.
|
||||
|
||||
crossreferencelisting Readable ASCII cross-reference listing.
|
||||
Default filename extension is REF. If
|
||||
this filename is not supplied on the
|
||||
command line, the base filename of the
|
||||
database file is used and the REF
|
||||
extension is added.
|
||||
|
||||
Using Prompts to Create a Cross-Reference Listing
|
||||
-------------------------------------------------
|
||||
You can direct CREF to prompt you for the files it needs by starting
|
||||
CREF with just the command name (CREF). CREF prompts you for the
|
||||
input it needs by displaying the following lines, one at a time:
|
||||
|
||||
Cross-Reference [.BSC]:
|
||||
Listing [filename.REF]:
|
||||
|
||||
The prompts correspond to the fields of the CREF command lines. CREF
|
||||
waits for you to respond to each prompt before printing the next one.
|
||||
You must type a cross-reference filename (extension is optional) at
|
||||
the first prompt. For the second prompt, you can either type a
|
||||
filename or press the ENTER key to accept the default displayed in
|
||||
brackets after the prompt.
|
||||
|
||||
|
||||
Use of PWBRMAKE with CREF
|
||||
-------------------------
|
||||
Note that the CREF utility can create reports only from the final form
|
||||
of the Source Browser database files. These files end in BSC (Browser
|
||||
Source Cache), and are created by the utility PWBRMAKE. Because ML
|
||||
creates an intermediate Source Browser file (with the filename extension
|
||||
SBR), CREF will invoke PWBRMAKE to create a BSC file from a single SBR
|
||||
file input. PWBRMAKE takes as input the SBR files created by ML,
|
||||
merges them with other SBR files created from other assembly-language
|
||||
source modules (if any exist), and creates a BSC file as the result.
|
||||
The BSC file contains all of the information (across multiple modules,
|
||||
if necessary) to provide a comprehensive cross-listing file for an entire
|
||||
project.
|
||||
|
||||
CREF will invoke PWBRMAKE only when a single SBR file is given as input
|
||||
to the utility; therefore, you must create a BSC database file from
|
||||
the assembler-generated SBR files before invoking CREF. An example
|
||||
of running PWBRMAKE is:
|
||||
|
||||
PWBRMAKE FILENAME.SBR FILE2.SBR FILE3.SBR ... FILEN.SBR
|
||||
|
||||
This example creates a BSC file using the base name of the first SBR
|
||||
file on the command line. In this case, the resultant file would be
|
||||
named FILENAME.BSC.
|
||||
|
||||
By using the BSC Source Browser database files, CREF is able to provide
|
||||
cross-reference files for either a single assembly-language module or
|
||||
for an entire multimodule assembly-language project. Below are the
|
||||
steps necessary for both scenarios.
|
||||
|
||||
For more information on PWBRMAKE and its available switches, see the
|
||||
"Tools" section of the Macro Assembler Reference manual, or type PWBRMAKE /?
|
||||
at the command line to get a quick-reference screen.
|
||||
|
||||
|
||||
Creating Single-Module Cross-Reference Listings
|
||||
-----------------------------------------------
|
||||
- Using ML with the /FR switch, create an SBR file for the
|
||||
assembly-language module. An example is:
|
||||
|
||||
ML /c /FR filename.ASM
|
||||
|
||||
This creates a file FILENAME.SBR (as well as FILENAME.OBJ).
|
||||
|
||||
- Invoke CREF using the database file created above (FILENAME.SBR)
|
||||
as the input cross-reference file. An example of this is:
|
||||
|
||||
CREF FILENAME.SBR, FILENAME.REF
|
||||
|
||||
This creates the cross-reference listing FILENAME.REF.
|
||||
|
||||
Note that because CREF is capable only of reading Source Browser BSC
|
||||
database files, the PWBRMAKE utility is automatically invoked to
|
||||
convert the SBR on the command line into a BSC file.
|
||||
|
||||
|
||||
Creating Multimodule Cross-Reference Listings
|
||||
----------------------------------------------
|
||||
- Using ML with the /FR switch, create an SBR file for each of the
|
||||
assembly-language modules. An example is:
|
||||
|
||||
ML /c /FR *.ASM
|
||||
|
||||
This creates a file FILENAME.SBR (as well as FILENAME.OBJ).
|
||||
|
||||
- Invoke CREF using the database file created above (FILENAME.BSC)
|
||||
as the input cross-reference file. An example of this is:
|
||||
|
||||
CREF FILENAME.BSC, FILENAME.REF
|
||||
|
||||
The cross-reference listing FILENAME.REF is created. This
|
||||
particular example will have all of the symbols from all
|
||||
of the modules in one cross-reference listing file.
|
||||
|
||||
|
||||
=================< Part 3: Reading Cross-Reference Listings >==============
|
||||
|
||||
The cross-reference listing contains the name of each symbol defined in
|
||||
your program. Each name is followed by a list of source filenames in
|
||||
which the symbol appears. Each source name is then followed by a list of
|
||||
line numbers representing the line or lines in the source file in which a
|
||||
symbol is referenced.
|
||||
|
||||
Line numbers in which a symbol is defined are marked with the number sign (#).
|
||||
|
||||
Example
|
||||
-------
|
||||
Below is a sample assembly-language source-code module, followed by
|
||||
the resulting cross-reference listing file.
|
||||
|
||||
.DOSSEG
|
||||
.MODEL small, os_dos, pascal
|
||||
|
||||
.STACK 100h
|
||||
|
||||
.DATA
|
||||
PUBLIC message, lmessage
|
||||
|
||||
message BYTE "Hello World!!!!"
|
||||
lmessage EQU $-message
|
||||
|
||||
.CODE
|
||||
|
||||
.STARTUP
|
||||
|
||||
EXTERN display:NEAR
|
||||
call display
|
||||
mov ax, 4C00h
|
||||
int 21h
|
||||
|
||||
.EXIT
|
||||
END
|
||||
|
||||
|
||||
Example Reference Listing (Created from above source-code module)
|
||||
-----------------------------------------------------------------
|
||||
|
||||
Microsoft Cross-Reference Version 6.00 Mon Nov 18 15:47:26 1991
|
||||
|
||||
|
||||
Symbol Cross-Reference (# definition) Cref-1
|
||||
|
||||
@code
|
||||
..\hello.asm . . . . . . . . 2#
|
||||
|
||||
@CodeSize
|
||||
..\hello.asm . . . . . . . . 2#
|
||||
|
||||
@data
|
||||
..\hello.asm . . . . . . . . 2#
|
||||
|
||||
@DataSize
|
||||
..\hello.asm . . . . . . . . 2#
|
||||
|
||||
@fardata
|
||||
..\hello.asm . . . . . . . . 2#
|
||||
|
||||
@fardata?
|
||||
..\hello.asm . . . . . . . . 2#
|
||||
|
||||
@Interface
|
||||
..\hello.asm . . . . . . . . 2#
|
||||
|
||||
@Model
|
||||
..\hello.asm . . . . . . . . 2#
|
||||
|
||||
@stack
|
||||
..\hello.asm . . . . . . . . 2#
|
||||
|
||||
@Startup
|
||||
..\hello.asm . . . . . . . . 14#
|
||||
|
||||
_DATA
|
||||
..\hello.asm . . . . . . . . 2#
|
||||
|
||||
_TEXT
|
||||
..\hello.asm . . . . . . . . 2# 12
|
||||
|
||||
DGROUP
|
||||
..\hello.asm . . . . . . . . 2# 2 14
|
||||
|
||||
display
|
||||
..\hello.asm . . . . . . . . 16 17
|
||||
<Unknown>. . . . . . . . . . 1#
|
||||
|
||||
hello.asm
|
||||
..\hello.asm . . . . . . . . 1#
|
||||
|
||||
lmessage
|
||||
..\hello.asm . . . . . . . . 10# 7
|
||||
|
||||
message
|
||||
..\hello.asm . . . . . . . . 9# 10 7
|
||||
|
||||
STACK
|
||||
..\hello.asm . . . . . . . . 4#
|
||||
|
||||
|
||||
=================< Part 4: Difference from Previous Releases >==============
|
||||
|
||||
|
||||
Use Differences
|
||||
---------------
|
||||
|
||||
- ML/MASM no longer generates a CRF assembler-specific binary file.
|
||||
Instead, CREF 6.0 uses the generic Source Browser database file (BSC).
|
||||
|
||||
Because of this, CREF can actually be used with any source-code module
|
||||
or project that is compiled/assembled by a Microsoft product that
|
||||
creates SBR files.
|
||||
|
||||
Creating multimodule cross-reference listing files is another advantage
|
||||
of using BSC Browser database files. Previous releases of CREF were
|
||||
limited to single modules.
|
||||
|
||||
|
||||
Listing Differences
|
||||
-------------------
|
||||
|
||||
- All line numbers that are reported are relative to the actual source-
|
||||
code module, not the assembler-generated listing file. This is a
|
||||
direct result of using the Source Browser database files (BSC). These
|
||||
files are not directly related to MASM listings and are generic
|
||||
across Microsoft language products.
|
554
Rayman_X/cpa/masm/ML.ERR
Normal file
554
Rayman_X/cpa/masm/ML.ERR
Normal file
@@ -0,0 +1,554 @@
|
||||
FATAL
|
||||
|
||||
cannot open file
|
||||
|
||||
I/O error closing file
|
||||
|
||||
I/O error writing file
|
||||
|
||||
I/O error reading file
|
||||
|
||||
out of memory
|
||||
|
||||
assembler limit : macro parameter name table full
|
||||
|
||||
invalid command-line option
|
||||
|
||||
nesting level too deep
|
||||
|
||||
unmatched macro nesting
|
||||
|
||||
line too long
|
||||
|
||||
unmatched block nesting
|
||||
|
||||
directive must be in control block
|
||||
|
||||
error count exceeds 100; stopping assembly
|
||||
|
||||
invalid numerical command-line argument
|
||||
|
||||
too many arguments
|
||||
|
||||
statement too complex
|
||||
|
||||
N/A
|
||||
|
||||
missing source filename
|
||||
|
||||
COFF error writing file
|
||||
|
||||
invalid debug and browser data; file exceeds line limit
|
||||
|
||||
cannot find link.exe
|
||||
|
||||
cannot find cvpack.exe
|
||||
|
||||
SEVERE
|
||||
|
||||
memory operand not allowed in context
|
||||
|
||||
immediate operand not allowed
|
||||
|
||||
cannot have more than one ELSE clause per IF block
|
||||
|
||||
extra characters after statement
|
||||
|
||||
symbol type conflict
|
||||
|
||||
symbol redefinition
|
||||
|
||||
undefined symbol
|
||||
|
||||
non-benign record redefinition
|
||||
|
||||
syntax error
|
||||
|
||||
syntax error in expression
|
||||
|
||||
invalid type expression
|
||||
|
||||
distance invalid for word size of current segment
|
||||
|
||||
PROC, MACRO, or macro repeat directive must precede LOCAL
|
||||
|
||||
.MODEL must precede this directive
|
||||
|
||||
cannot define as public or external
|
||||
|
||||
segment attributes cannot change
|
||||
|
||||
expression expected
|
||||
|
||||
operator expected
|
||||
|
||||
invalid use of external symbol
|
||||
|
||||
operand must be RECORD type or field
|
||||
|
||||
identifier not a record
|
||||
|
||||
record constants may not span line breaks
|
||||
|
||||
instruction operands must be the same size
|
||||
|
||||
instruction operand must have size
|
||||
|
||||
invalid operand size for instruction
|
||||
|
||||
operands must be in same segment
|
||||
|
||||
constant expected
|
||||
|
||||
operand must be a memory expression
|
||||
|
||||
expression must be a code address
|
||||
|
||||
multiple base registers not allowed
|
||||
|
||||
multiple index registers not allowed
|
||||
|
||||
must be index or base register
|
||||
|
||||
invalid use of register
|
||||
|
||||
invalid INVOKE argument
|
||||
|
||||
must be in segment block
|
||||
|
||||
DUP too complex
|
||||
|
||||
too many initial values for structure
|
||||
|
||||
statement not allowed inside structure definition
|
||||
|
||||
missing operand for macro operator
|
||||
|
||||
line too long
|
||||
|
||||
segment register not allowed in context
|
||||
|
||||
string or text literal too long
|
||||
|
||||
statement too complex
|
||||
|
||||
identifier too long
|
||||
|
||||
invalid character in file
|
||||
|
||||
missing angle bracket or brace in literal
|
||||
|
||||
missing single or double quotation mark in string
|
||||
|
||||
empty (null) string
|
||||
|
||||
nondigit in number
|
||||
|
||||
syntax error in floating-point constant
|
||||
|
||||
real or BCD number not allowed
|
||||
|
||||
text item required
|
||||
|
||||
forced error
|
||||
|
||||
forced error : value equal to 0
|
||||
|
||||
forced error : value not equal to 0
|
||||
|
||||
forced error : symbol not defined
|
||||
|
||||
forced error : symbol defined
|
||||
|
||||
forced error : string blank
|
||||
|
||||
forced error : string not blank
|
||||
|
||||
forced error : strings equal
|
||||
|
||||
forced error : strings not equal
|
||||
|
||||
[ELSE]IF2/.ERR2 not allowed : single-pass assembler
|
||||
|
||||
expression too complex for .UNTILCXZ
|
||||
|
||||
can ALIGN only to power of 2
|
||||
|
||||
structure alignment must be 1, 2, or 4
|
||||
|
||||
expected
|
||||
|
||||
incompatible CPU mode and segment size
|
||||
|
||||
LOCK must be followed by a memory operation
|
||||
|
||||
instruction prefix not allowed
|
||||
|
||||
no operands allowed for this instruction
|
||||
|
||||
invalid instruction operands
|
||||
|
||||
initializer magnitude too large for specified size
|
||||
|
||||
cannot access symbol in given segment or group
|
||||
|
||||
operands have different frames
|
||||
|
||||
cannot access label through segment registers
|
||||
|
||||
jump destination too far
|
||||
|
||||
jump destination must specify a label
|
||||
|
||||
instruction does not allow NEAR indirect addressing
|
||||
|
||||
instruction does not allow FAR indirect addressing
|
||||
|
||||
instruction does not allow FAR direct addressing
|
||||
|
||||
jump distance not possible in current CPU mode
|
||||
|
||||
missing operand after unary operator
|
||||
|
||||
cannot mix 16- and 32-bit registers
|
||||
|
||||
invalid scale value
|
||||
|
||||
constant value too large
|
||||
|
||||
instruction or register not accepted in current CPU mode
|
||||
|
||||
reserved word expected
|
||||
|
||||
instruction form requires 80386/486
|
||||
|
||||
END directive required at end of file
|
||||
|
||||
too many bits in RECORD
|
||||
|
||||
positive value expected
|
||||
|
||||
index value past end of string
|
||||
|
||||
count must be positive or zero
|
||||
|
||||
count value too large
|
||||
|
||||
operand must be relocatable
|
||||
|
||||
constant or relocatable label expected
|
||||
|
||||
segment, group, or segment register expected
|
||||
|
||||
segment expected
|
||||
|
||||
invalid operand for OFFSET
|
||||
|
||||
invalid use of external absolute
|
||||
|
||||
segment or group not allowed
|
||||
|
||||
cannot add two relocatable labels
|
||||
|
||||
cannot add memory expression and code label
|
||||
|
||||
segment exceeds 64K limit
|
||||
|
||||
invalid type for a data declaration
|
||||
|
||||
HIGH and LOW require immediate operands
|
||||
|
||||
N/A
|
||||
|
||||
cannot have implicit far jump or call to near label
|
||||
|
||||
use of register assumed to ERROR
|
||||
|
||||
only white space or comment can follow backslash
|
||||
|
||||
COMMENT delimiter expected
|
||||
|
||||
conflicting parameter definition
|
||||
|
||||
PROC and prototype calling conventions conflict
|
||||
|
||||
invalid radix tag
|
||||
|
||||
INVOKE argument type mismatch : argument
|
||||
|
||||
invalid coprocessor register
|
||||
|
||||
instructions and initialized data not allowed in AT segments
|
||||
|
||||
/AT switch requires the TINY memory model
|
||||
|
||||
cannot have segment address references with TINY model
|
||||
|
||||
language type must be specified
|
||||
|
||||
PROLOGUE must be macro function
|
||||
|
||||
EPILOGUE must be macro procedure
|
||||
|
||||
alternate identifier not allowed with EXTERNDEF
|
||||
|
||||
text macro nesting level too deep
|
||||
|
||||
N/A
|
||||
|
||||
missing macro argument
|
||||
|
||||
EXITM used inconsistently
|
||||
|
||||
macro function argument list too long
|
||||
|
||||
N/A
|
||||
|
||||
VARARG parameter must be last parameter
|
||||
|
||||
VARARG parameter not allowed with LOCAL
|
||||
|
||||
VARARG parameter requires C calling convention
|
||||
|
||||
ORG needs a constant or local offset
|
||||
|
||||
register value overwritten by INVOKE
|
||||
|
||||
structure too large to pass with INVOKE : argument
|
||||
|
||||
not overriding private proc as public
|
||||
|
||||
too many arguments to INVOKE
|
||||
|
||||
too few arguments to INVOKE
|
||||
|
||||
invalid data initializer
|
||||
|
||||
N/A
|
||||
|
||||
RET operand too large
|
||||
|
||||
too many operands to instruction
|
||||
|
||||
cannot have more than one .ELSE clause per .IF block
|
||||
|
||||
expected data label
|
||||
|
||||
cannot nest procedures
|
||||
|
||||
EXPORT must be FAR
|
||||
|
||||
procedure declared with two visibility attributes
|
||||
|
||||
macro label not defined
|
||||
|
||||
invalid symbol type in expression
|
||||
|
||||
byte register cannot be first operand
|
||||
|
||||
word register cannot be first operand
|
||||
|
||||
special register cannot be first operand
|
||||
|
||||
coprocessor register cannot be first operand
|
||||
|
||||
cannot change size of expression computations
|
||||
|
||||
syntax error in control-flow directive
|
||||
|
||||
cannot use 16-bit register with a 32-bit address
|
||||
|
||||
constant value out of range
|
||||
|
||||
missing right parenthesis
|
||||
|
||||
type is wrong size for register
|
||||
|
||||
structure cannot be instanced
|
||||
|
||||
non-benign structure redefinition: label incorrect
|
||||
|
||||
non-benign structure redefinition: too few labels
|
||||
|
||||
OLDSTRUCTS/NOOLDSTRUCTS state cannot be changed
|
||||
|
||||
non-benign structure redefinition: incorrect initializers
|
||||
|
||||
non-benign structure redefinition: too few initializers
|
||||
|
||||
non-benign structure redefinition: label has incorrect offset
|
||||
|
||||
structure field expected
|
||||
|
||||
unexpected literal found in expression
|
||||
|
||||
N/A
|
||||
|
||||
divide by zero in expression
|
||||
|
||||
directive must appear inside a macro
|
||||
|
||||
cannot expand macro function
|
||||
|
||||
too few bits in RECORD
|
||||
|
||||
macro function cannot redefine itself
|
||||
|
||||
N/A
|
||||
|
||||
invalid qualified type
|
||||
|
||||
floating-point initializer on an integer variable
|
||||
|
||||
nested structure improperly initialized
|
||||
|
||||
invalid use of FLAT
|
||||
|
||||
structure improperly initialized
|
||||
|
||||
improper list initialization
|
||||
|
||||
initializer must be a string or single item
|
||||
|
||||
initializer must be a single item
|
||||
|
||||
initializer must be a single byte
|
||||
|
||||
improper use of list initializer
|
||||
|
||||
improper literal initialization
|
||||
|
||||
extra characters in literal initialization
|
||||
|
||||
must use floating-point initializer
|
||||
|
||||
cannot use .EXIT for OS_OS2 with .8086
|
||||
|
||||
invalid combination with segment alignment
|
||||
|
||||
INVOKE requires prototype for procedure
|
||||
|
||||
cannot include structure in self
|
||||
|
||||
symbol language attribute conflict
|
||||
|
||||
non-benign COMM redefinition
|
||||
|
||||
COMM variable exceeds 64K
|
||||
|
||||
parameter or local cannot have void type
|
||||
|
||||
cannot use TINY model with OS_OS2
|
||||
|
||||
expression size must be 32 bits
|
||||
|
||||
.EXIT does not work with 32-bit segments
|
||||
|
||||
.STARTUP does not work with 32-bit segments
|
||||
|
||||
ORG directive not allowed in unions
|
||||
|
||||
D/T
|
||||
|
||||
illegal use of segment register
|
||||
|
||||
cannot declare scoped code label as PUBLIC
|
||||
|
||||
.MSFLOAT directive is obsolete : .MSFLOAT ignored
|
||||
|
||||
ESC instruction is obsolete : ESC ignored
|
||||
|
||||
missing operator in expression
|
||||
|
||||
missing right parenthesis in expression
|
||||
|
||||
missing left parenthesis in expression
|
||||
|
||||
reference to forward macro definition
|
||||
|
||||
16 bit segments not allowed with /coff option
|
||||
|
||||
FAR not allowed in flat model comm variables
|
||||
|
||||
invalid .model parameter for flat model
|
||||
|
||||
ALIAS name is empty
|
||||
|
||||
GROUP directive not allowed with /coff option
|
||||
|
||||
.FPO is not compatible with nested procedures
|
||||
|
||||
LEVEL 1
|
||||
|
||||
cannot modify READONLY segment
|
||||
|
||||
N/A
|
||||
|
||||
non-unique STRUCT/UNION field used without qualification
|
||||
|
||||
start address on END directive ignored with .STARTUP
|
||||
|
||||
cannot ASSUME CS
|
||||
|
||||
unknown default prologue argument
|
||||
|
||||
too many arguments in macro call
|
||||
|
||||
option untranslated, directive required
|
||||
|
||||
invalid command-line option value, default is used
|
||||
|
||||
insufficent memory for /EP : /EP ignored
|
||||
|
||||
expected '>' on text literal
|
||||
|
||||
multiple .MODEL directives found : .MODEL ignored
|
||||
|
||||
line number information for segment without class 'CODE'
|
||||
|
||||
instructions and initialized data not supported in AT segments
|
||||
|
||||
directive ignored with /coff switch
|
||||
|
||||
/Gc switch incompatible with flat model
|
||||
|
||||
/AT switch incompatible with flat model
|
||||
|
||||
invalid command-line option
|
||||
|
||||
directive ignored without /coff switch
|
||||
|
||||
directive ignored outside a procedure
|
||||
|
||||
LOADDS ignored in flat model
|
||||
|
||||
LEVEL 2
|
||||
|
||||
@@: label defined but not referenced
|
||||
|
||||
expression expected, assume value 0
|
||||
|
||||
EXTERNDEF previously assumed to be external
|
||||
|
||||
length of symbol previously assumed to be different
|
||||
|
||||
symbol previously assumed to not be in a group
|
||||
|
||||
types are different
|
||||
|
||||
calling convention not supported in flat model
|
||||
|
||||
LEVEL 3
|
||||
|
||||
N/A
|
||||
|
||||
no return from procedure
|
||||
|
||||
N/A
|
||||
|
||||
conditional jump lengthened
|
||||
|
||||
procedure argument or local not referenced
|
||||
|
||||
expression may be pass-dependent
|
||||
|
121
Rayman_X/cpa/masm/VDPMMX16.ASM
Normal file
121
Rayman_X/cpa/masm/VDPMMX16.ASM
Normal file
@@ -0,0 +1,121 @@
|
||||
TITLE vprod_mmx
|
||||
;***************************************************************************/
|
||||
;*
|
||||
;* INTEL Corporation Proprietary Information
|
||||
;*
|
||||
;* This listing is supplied under the terms of a CNDA agreement
|
||||
;* with INTEL Corporation and may not be disclosed except
|
||||
;* in accordance with the terms of that agreement.
|
||||
;*
|
||||
;* Copyright (c) 1995 Intel Corporation.
|
||||
;* All rights reserved.
|
||||
;*
|
||||
;***************************************************************************/
|
||||
;
|
||||
;
|
||||
;
|
||||
;****************************************************************************
|
||||
; prevent listing of iammx.inc file
|
||||
.nolist
|
||||
INCLUDE iammx.inc ; IAMMX Emulator Macros
|
||||
.list
|
||||
|
||||
.586
|
||||
.model FLAT
|
||||
|
||||
;****************************************************************************
|
||||
; Data Segment Declarations
|
||||
;****************************************************************************
|
||||
.data
|
||||
|
||||
;****************************************************************************
|
||||
; Constant Segment Declarations
|
||||
;****************************************************************************
|
||||
.const
|
||||
|
||||
|
||||
;****************************************************************************
|
||||
; Code Segment Declarations
|
||||
;****************************************************************************
|
||||
.code
|
||||
COMMENT ^
|
||||
void vprod_mmx (
|
||||
int16 *src1,
|
||||
int16 *src2,
|
||||
int prdsize,
|
||||
int16 *result ) ;
|
||||
^
|
||||
|
||||
vprod_mmx PROC NEAR C USES edi esi ebx,
|
||||
s1Ptr:PTR SWORD, s2Ptr:PTR SWORD,
|
||||
prdsize:SDWORD, resPtr:PTR SWORD
|
||||
; LOCAL src:PTR SWORD, num:PTR SDWORD
|
||||
; above (commented) line is an example of declaring local parameters
|
||||
|
||||
; int 3
|
||||
|
||||
pxor mm4, mm4
|
||||
pxor mm6, mm6
|
||||
mov eax, s1Ptr ; src1 pointer
|
||||
mov ebx, s2Ptr ; src2 pointer
|
||||
mov ecx, prdsize ; size of src1 and src2 arrays
|
||||
mov edx, resPtr ; pointer to the result
|
||||
pxor mm7, mm7 ; Initialize accumulator
|
||||
|
||||
|
||||
vdp16:
|
||||
movq mm0, [eax] ; First 4 source1 elements
|
||||
|
||||
movq mm1, [ebx] ; First 4 source2 elements
|
||||
|
||||
movq mm2, [eax+8] ; Next 4 source1 elements
|
||||
pmaddwd mm0, mm1 ; s1[0]*s2[0] + s1[1]*s2[1]::s1[2]*s2[2] + s1[3]*s2[3]
|
||||
|
||||
paddd mm7, mm0 ; Accumulate
|
||||
|
||||
movq mm3, [ebx+8] ; Next 4 source2 elements
|
||||
|
||||
movq mm0, [eax+16] ; Next 4 source1 elements
|
||||
pmaddwd mm2, mm3 ; s1[4]*s2[4] + s1[5]*s2[5]::s1[6]*s2[6] + s1[7]*s2[7]
|
||||
|
||||
paddd mm7, mm2 ; Accumulate
|
||||
|
||||
movq mm1, [ebx+16] ; Next 4 source2 elements
|
||||
|
||||
movq mm2, [eax+24] ; Last 4 source1 elements
|
||||
pmaddwd mm0, mm1 ; s1[8]*s2[8] + s1[9]*s2[9]::s1[10]*s2[10] + s1[11]*s2[11]
|
||||
|
||||
paddd mm7,mm0 ; Accumulate
|
||||
|
||||
pmaddwd mm2, [ebx+24] ; s1[12]*s2[12] + s1[13]*s2[13]::s1[14]*s2[14] + s1[15]*s2[15]
|
||||
paddd mm7, mm2 ; Accumulate
|
||||
|
||||
add eax, 32 ; increment source1 index
|
||||
add ebx, 32 ; increment source2 index
|
||||
|
||||
sub ecx, 16
|
||||
jnz vdp16
|
||||
|
||||
store:
|
||||
movq mm0, mm7 ; Copy accumulator
|
||||
; V-pipe empty (data dependency)
|
||||
|
||||
psrlq mm7,32 ; Shift high order 32 bits of accumulation
|
||||
; V-pipe empty (data dependency)
|
||||
|
||||
paddd mm7,mm0 ; Add hIgh and low order 32 bits of accumulation
|
||||
; V-pipe empty (data dependency)
|
||||
|
||||
packssdw mm7,mm4 ; Pack the result back to 16 bits, w/ signed saturation
|
||||
; V-pipe empty (data dependency)
|
||||
|
||||
; One cycle stall - Op-Store dependency
|
||||
movdf [edx], mm7 ; Store result
|
||||
; V-pipe empty (integer inst. does not pair w/ MM memory reference)
|
||||
|
||||
; int 3
|
||||
|
||||
ret
|
||||
|
||||
vprod_mmx ENDP
|
||||
END
|
Reference in New Issue
Block a user