📄 main.dbg
字号:
;**************************************************************
;* This stationery serves as the framework for a *
;* user application. For a more comprehensive program that *
;* demonstrates the more advanced functionality of this *
;* processor, please see the demonstration applications *
;* located in the examples subdirectory of the *
;* Freescale CodeWarrior for the HC12 Program directory *
;**************************************************************
; export symbols
XDEF Entry, main
; we use export 'Entry' as symbol. This allows us to
; reference 'Entry' either in the linker .prm file
; or from C/C++ later on
XREF __SEG_END_SSTACK ; symbol defined by the linker for the end of the stack
; include derivative specific macros
INCLUDE 'mc9s12dg128.inc'
; Based on CPU DB MC9S12DG128_112, version 2.87.280 (RegistersPrg V2.02)
; ###################################################################
; Filename : MC9S12DG128.inc
; Processor : MC9S12DG128BCPV
; FileFormat: V2.02
; DataSheet : 9S12DT128BDGV1/D V01.05
; Compiler : CodeWarrior compiler
; Date/Time : 21.12.2005, 21:40
; Abstract :
; This header implements the mapping of I/O devices.
;
; (c) Copyright UNIS, spol. s r.o. 1997-2005
; UNIS, spol. s r.o.
; Jundrovska 33
; 624 00 Brno
; Czech Republic
; http : www.processorexpert.com
; mail : info@processorexpert.com
;
; File-Format-Revisions:
; - 14.11.2005, V2.00 :
; - Deprecated symbols added for backward compatibility (section at the end of this file)
; - 15.11.2005, V2.01 :
; - Fixed invalid instruction in macro __RESET_WATCHDOG for HCS12 family.
; - 17.12.2005, V2.02 :
; - Arrays (symbols xx_ARR) are defined as pointer to volatile, see issue #2778
;
; CPU Registers Revisions:
; - none
; ###################################################################
;*** Memory Map and Interrupt Vectors
;******************************************
RAMStart: equ $00002000
RAMEnd: equ $00003FFF
ROM_C000Start: equ $0000C000
ROM_C000End: equ $0000FEFF
ROM_4000Start: equ $00004000
ROM_4000End: equ $00007FFF
ROM_FF10Start: equ $0000FF10
ROM_FF10End: equ $0000FF7F
ROM_PAGE38Start: equ $00388000
ROM_PAGE38End: equ $0038BFFF
ROM_PAGE39Start: equ $00398000
ROM_PAGE39End: equ $0039BFFF
ROM_PAGE3AStart: equ $003A8000
ROM_PAGE3AEnd: equ $003ABFFF
ROM_PAGE3BStart: equ $003B8000
ROM_PAGE3BEnd: equ $003BBFFF
ROM_PAGE3CStart: equ $003C8000
ROM_PAGE3CEnd: equ $003CBFFF
ROM_PAGE3DStart: equ $003D8000
ROM_PAGE3DEnd: equ $003DBFFF
EEPROM_1800Start: equ $00001800
EEPROM_1800End: equ $00001FEF
INT_VECTORSStart: equ $0000FF80
INT_VECTORSEnd: equ $0000FFFF
;
VReserved63: equ $0000FF80
VReserved62: equ $0000FF82
VReserved61: equ $0000FF84
VReserved60: equ $0000FF86
VReserved59: equ $0000FF88
VReserved58: equ $0000FF8A
Vpwmesdn: equ $0000FF8C
Vportp: equ $0000FF8E
Vcan4tx: equ $0000FF90
Vcan4rx: equ $0000FF92
Vcan4err: equ $0000FF94
Vcan4wkup: equ $0000FF96
VReserved51: equ $0000FF98
VReserved50: equ $0000FF9A
VReserved49: equ $0000FF9C
VReserved48: equ $0000FF9E
VReserved47: equ $0000FFA0
VReserved46: equ $0000FFA2
VReserved45: equ $0000FFA4
VReserved44: equ $0000FFA6
VReserved43: equ $0000FFA8
VReserved42: equ $0000FFAA
VReserved41: equ $0000FFAC
VReserved40: equ $0000FFAE
Vcan0tx: equ $0000FFB0
Vcan0rx: equ $0000FFB2
Vcan0err: equ $0000FFB4
Vcan0wkup: equ $0000FFB6
Vflash: equ $0000FFB8
Veeprom: equ $0000FFBA
VReserved33: equ $0000FFBC
Vspi1: equ $0000FFBE
Viic: equ $0000FFC0
VReserved30: equ $0000FFC2
Vcrgscm: equ $0000FFC4
Vcrgplllck: equ $0000FFC6
Vtimpabovf: equ $0000FFC8
Vtimmdcu: equ $0000FFCA
Vporth: equ $0000FFCC
Vportj: equ $0000FFCE
Vatd1: equ $0000FFD0
Vatd0: equ $0000FFD2
Vsci1: equ $0000FFD4
Vsci0: equ $0000FFD6
Vspi0: equ $0000FFD8
Vtimpaie: equ $0000FFDA
Vtimpaaovf: equ $0000FFDC
Vtimovf: equ $0000FFDE
Vtimch7: equ $0000FFE0
Vtimch6: equ $0000FFE2
Vtimch5: equ $0000FFE4
Vtimch4: equ $0000FFE6
Vtimch3: equ $0000FFE8
Vtimch2: equ $0000FFEA
Vtimch1: equ $0000FFEC
Vtimch0: equ $0000FFEE
Vrti: equ $0000FFF0
Virq: equ $0000FFF2
Vxirq: equ $0000FFF4
Vswi: equ $0000FFF6
Vtrap: equ $0000FFF8
Vcop: equ $0000FFFA
Vclkmon: equ $0000FFFC
Vreset: equ $0000FFFE
;
;*** PORTAB - Port AB Register; 0x00000000 ***
PORTAB: equ $00000000 ;*** PORTAB - Port AB Register; 0x00000000 ***
; bit numbers for usage in BCLR, BSET, BRCLR and BRSET
PORTAB_BIT0: equ 0 ; Port AB Bit 0
PORTAB_BIT1: equ 1 ; Port AB Bit 1
PORTAB_BIT2: equ 2 ; Port AB Bit 2
PORTAB_BIT3: equ 3 ; Port AB Bit 3
PORTAB_BIT4: equ 4 ; Port AB Bit 4
PORTAB_BIT5: equ 5 ; Port AB Bit 5
PORTAB_BIT6: equ 6 ; Port AB Bit 6
PORTAB_BIT7: equ 7 ; Port AB Bit 7
PORTAB_BIT8: equ 8 ; Port AB Bit 8
PORTAB_BIT9: equ 9 ; Port AB Bit 9
PORTAB_BIT10: equ 10 ; Port AB Bit 10
PORTAB_BIT11: equ 11 ; Port AB Bit 11
PORTAB_BIT12: equ 12 ; Port AB Bit 12
PORTAB_BIT13: equ 13 ; Port AB Bit 13
PORTAB_BIT14: equ 14 ; Port AB Bit 14
PORTAB_BIT15: equ 15 ; Port AB Bit 15
; bit position masks
mPORTAB_BIT0: equ %00000001
mPORTAB_BIT1: equ %00000010
mPORTAB_BIT2: equ %00000100
mPORTAB_BIT3: equ %00001000
mPORTAB_BIT4: equ %00010000
mPORTAB_BIT5: equ %00100000
mPORTAB_BIT6: equ %01000000
mPORTAB_BIT7: equ %10000000
mPORTAB_BIT8: equ %100000000
mPORTAB_BIT9: equ %1000000000
mPORTAB_BIT10: equ %10000000000
mPORTAB_BIT11: equ %100000000000
mPORTAB_BIT12: equ %1000000000000
mPORTAB_BIT13: equ %10000000000000
mPORTAB_BIT14: equ %100000000000000
mPORTAB_BIT15: equ %1000000000000000
;*** PORTA - Port A Register; 0x00000000 ***
PORTA: equ $00000000 ;*** PORTA - Port A Register; 0x00000000 ***
; bit numbers for usage in BCLR, BSET, BRCLR and BRSET
PORTA_BIT0: equ 0 ; Port A Bit 0
PORTA_BIT1: equ 1 ; Port A Bit 1
PORTA_BIT2: equ 2 ; Port A Bit 2
PORTA_BIT3: equ 3 ; Port A Bit 3
PORTA_BIT4: equ 4 ; Port A Bit 4
PORTA_BIT5: equ 5 ; Port A Bit 5
PORTA_BIT6: equ 6 ; Port A Bit 6
PORTA_BIT7: equ 7 ; Port A Bit 7
; bit position masks
mPORTA_BIT0: equ %00000001
mPORTA_BIT1: equ %00000010
mPORTA_BIT2: equ %00000100
mPORTA_BIT3: equ %00001000
mPORTA_BIT4: equ %00010000
mPORTA_BIT5: equ %00100000
mPORTA_BIT6: equ %01000000
mPORTA_BIT7: equ %10000000
;*** PORTB - Port B Register; 0x00000001 ***
PORTB: equ $00000001 ;*** PORTB - Port B Register; 0x00000001 ***
; bit numbers for usage in BCLR, BSET, BRCLR and BRSET
PORTB_BIT0: equ 0 ; Port B Bit 0
PORTB_BIT1: equ 1 ; Port B Bit 1
PORTB_BIT2: equ 2 ; Port B Bit 2
PORTB_BIT3: equ 3 ; Port B Bit 3
PORTB_BIT4: equ 4 ; Port B Bit 4
PORTB_BIT5: equ 5 ; Port B Bit 5
PORTB_BIT6: equ 6 ; Port B Bit 6
PORTB_BIT7: equ 7 ; Port B Bit 7
; bit position masks
mPORTB_BIT0: equ %00000001
mPORTB_BIT1: equ %00000010
mPORTB_BIT2: equ %00000100
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -