func1.lst

来自「another 8051 core porocesssor vhdl sourc」· LST 代码 · 共 1,209 行 · 第 1/5 页

LST
1,209
字号
  Tue Oct 19 1999 11:33                                                                                                  Page    1

        func1.asm: 1 April 1997 - general instruction test module





               2500 A.D. 8051 Macro Assembler  -  Version 4.05a
               ------------------------------------------------

                       Input  Filename : func1.asm
                       Output Filename : func1.obj


    1                          		list on
    2                          		symbols
    3                          	
    4                          	;	*******************************************************
    5                          	;							
    6                          	;		  8051 FUNC1
    7                          	;							
    8                          	;	*******************************************************
    9                          	;
   10                          		title func1.asm: 1 April 1997 - general instruction test module
   11                          	;	(c) Copyright Mentor Graphics Corporation 1997.
   12                          	;	All Rights Reserved.
   13                          	;       Version 2.00 - 21.iv.97: Instruction set coverage improved
   14                          	;                                sufficiently to give complete coverage 
   15                          	;                                of MegaMacro VHDL source at statement
   16                          	;                                and branch levels.
   17                          	;
   18                          	;	NOTE WELL:
   19                          	;
   20                          	;	This assembler does NOT compile cleanly.  Most compilers will
   21                          	;	warn that references to 3Soft specific SFRs (e.g. MSIZ and the
   22                          	;	example ESFR at E8h) are references to non-existant RAM
   23                          	;	addresses.  This does not affect compilation with the AD2500
   24                          	;	software.
   25                          	;
   26                          	;	MODULE FUNCTION
   27                          	;	---------------
   28                          	;
   29                          	;	This module executes a simple test of the instruction
   30                          	;       set and peripheral functions of the M8051 MegaMacro.
   31                          	;
   32                          	;	INCLUDE FILES
   33                          	;	-------------
   34                          	;
   35                          		list	off
   36   0000                   		include ..\openloop\inc\defines.inc
   37                          	;**********************************************************************
   38                          	;
   39                          	;	Module:		defines.inc
   40                          	;
   41                          	;	Comments:	bit definitions
   42                          	;
   43                          	;	Date:		18th June 1991
   44                          	;
   45                          	;	Version: 	V1.00
   46                          	;
   47                          	;**********************************************************************
  Tue Oct 19 1999 11:33                                                                                                  Page    2

        func1.asm: 1 April 1997 - general instruction test module


   48                          	; (C) 3Soft Limited 1994
   49                          	; All rights reserved 
   50                          	
   51                          	
   52                          	;**************************
   53                          	;** SYSTEM INCLUDE FILES **
   54                          	;**************************
   55                          	
   56                          	;***************************
   57                          	;** PROGRAM INCLUDE FILES **
   58                          	;***************************
   59                          	
   60                          	;************************
   61                          	;** EXTERNAL FUNCTIONS **
   62                          	;************************
   63                          	
   64                          	;************************
   65                          	;** EXTERNAL VARIABLES **
   66                          	;************************
   67                          	
   68                          	;*********************
   69                          	;** LOCAL FUNCTIONS **
   70                          	;*********************
   71                          	
   72                          	;*********************
   73                          	;** LOCAL VARIABLES **
   74                          	;*********************
   75                          	
   76                          	;
   77                          	; bit definitions
   78                          	; ---------------
   79                          	;
   80          0001            	bit0		equ	001h
   81          0002            	bit1		equ	002h
   82          0004            	bit2		equ	004h
   83          0008            	bit3		equ	008h
   84          0010            	bit4		equ	010h
   85          0020            	bit5		equ	020h
   86          0040            	bit6		equ	040h
   87          0080            	bit7		equ	080h
   88                          	;
   89          00FF            	true		equ	0ffh
   90          0000            	false		equ	0
   91                          	;
   92          000F            	lsnibble	equ	00fh
   93          00F0            	msnibble	equ	0f0h
   94                          	;
   95                          	
   96                          	
   97   0000                   		include ..\openloop\inc\ramdata.inc
   98                          	;**********************************************************************
   99                          	;
  100                          	;	Module:		ramdata.inc
  101                          	;
  102                          	;	Comments:	m8051 ram data definitions
  103                          	;
  104                          	;	Date:		28th August 1991
  Tue Oct 19 1999 11:33                                                                                                  Page    3

        func1.asm: 1 April 1997 - general instruction test module


  105                          	;
  106                          	;	Version: 	V1.01
  107                          	;
  108                          	;**********************************************************************
  109                          	; (C) 3Soft Limited 1994
  110                          	; All rights reserved 
  111                          	
  112                          	
  113                          	;**************************
  114                          	;** SYSTEM INCLUDE FILES **
  115                          	;**************************
  116                          	
  117                          	;***************************
  118                          	;** PROGRAM INCLUDE FILES **
  119                          	;***************************
  120                          	
  121                          	;************************
  122                          	;** EXTERNAL FUNCTIONS **
  123                          	;************************
  124                          	
  125                          	;************************
  126                          	;** EXTERNAL VARIABLES **
  127                          	;************************
  128                          	
  129                          	;*********************
  130                          	;** LOCAL FUNCTIONS **
  131                          	;*********************
  132                          	
  133                          	;*********************
  134                          	;** LOCAL VARIABLES **
  135                          	;*********************
  136                          	
  137                          	;
  138                          	; **********************
  139                          	; lower 128 bytes of RAM
  140                          	; **********************
  141                          	;
  142                          	; register banks
  143                          	; ==============
  144                          	;
  145          0000            	rb0	equ	0	;reg bank 0
  146          0008            	rb1	equ	08h	;reg bank 0
  147          0010            	rb2	equ	10h	;reg bank 0
  148          0018            	rb3	equ	18h	;reg bank 0
  149                          	;
  150                          	; bit addressable space
  151                          	;
  152          0020            	bitaddrmin	equ	20h
  153          002F            	bitaddrmax	equ	2Fh
  154                          	;
  155                          	; scratch pad area
  156                          	; 
  157          0030            	scraddrmin	equ	30h
  158          007F            	scraddrmax	equ	7Fh
  159                          	; 
  160                          	; *******************************
  161                          	; upper 128 bytes of internal RAM
  Tue Oct 19 1999 11:33                                                                                                  Page    4

        func1.asm: 1 April 1997 - general instruction test module


  162                          	; *******************************
  163                          	;
  164                          	; non- existent in m8051
  165                          	;
  166                          	; ************************************************
  167                          	; special function registers (also at 80h to 127h)
  168                          	; ************************************************
  169                          	;
  170          0080            	addrport0		equ	80h
  171          0081            	addrsp			equ	81h
  172          0082            	addrdptrlow 		equ	82h
  173          0083            	addrdptrhigh		equ	83h
  174          0087            	addrpowercontrol	equ	87h
  175          0088            	addrtimercontrol	equ	88h
  176          0089            	addrtimermode		equ	89h
  177          008A            	addrtimer0low		equ	8ah
  178          008B            	addrtimer1low		equ	8bh
  179          008C            	addrtimer0high		equ	8ch
  180          008D            	addrtimer1high		equ	8dh
  181                          	
  182          0090            	addrport1		equ	90h
  183          0098            	addrserialcontrol	equ	98h
  184          0099            	addrserialbuff		equ	99h
  185                          	
  186          00A0            	addrport2		equ	a0h
  187          00A8            	addrintenable		equ	a8h
  188                          	
  189          00B0            	addrport3		equ	b0h
  190          00B8            	addrintpriority		equ	b8h
  191                          	
  192          00D0            	addrpsw		equ	0d0h
  193                          	
  194          00E0            	addracc		equ	e0h
  195                          	
  196          00F0            	addrbreg		equ	0f0h
  197                          	
  198                          	;
  199                          	; definitions for special function registers
  200                          	; 
  201                          	; PSW: processor status words. Bit addressable
  202                          	;
  203          0080            	carry		equ	bit7
  204          0040            	auxcarry	equ	bit6
  205          0020            	flag0		equ	bit5
  206          0010            	rbsel1		equ	bit4
  207          0008            	rbsel0		equ	bit3
  208          0004            	ovflow		equ	bit2
  209          0002            	reserve	equ	bit1
  210          0001            	parity		equ	bit0
  211                          	;
  212                          	; POWERCONTROL: power control register. Not bit addressable

⌨️ 快捷键说明

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