Blame | Last modification | View Log | Download | RSS feed
ifndef stddefxainc ; avoid multiple inclusionstddefxainc equ 1savelisting off ; no listing over this file;****************************************************************************;* *;* AS 1.42 - Datei STDDEFXA.INC *;* *;* Sinn : Contains SFR and Bit Definitions for Philips/NXP XA Prozessors *;* *;* Last Changes : 1996-06-29 Initial Version *;* 1998-08-18 removed suffix of P_51, F0_51, and F1_51, *;* since there are no name conflicts *;* *;****************************************************************************if (MOMCPUNAME<>"XAG3")&&(MOMCPUNAME<>"XAG1")&&(MOMCPUNAME<>"XAG1")fatal "wrong target selected: only XAG1, XAG2, or XAG3 allowed"endifif MOMPASS=1message "Philips/NXP XA SFR Definitions (C) 1996 Alfred Arnold"endif;----------------------------------------------------------------------------; Prozessorkerncs port 443h ; Code Segmentds port 441h ; Data Segmentes port 442h ; Extra Segmentssel port 403h ; Select whether [R0..R6] use ES or DSr0seg bit ssel.0r1seg bit ssel.1r2seg bit ssel.2r3seg bit ssel.3r4seg bit ssel.4r5seg bit ssel.5r6seg bit ssel.6eswen bit ssel.7 ; Allow/disallow write accesses via ES (user mode)pswl port 400h ; Processor Status (L):z bit pswl.0 ; Zero Flagn bit pswl.1 ; Negative Flagv bit pswl.2 ; Overflow Flagac bit pswl.6 ; Half Carry (for DAA)c bit pswl.7 ; Carrypswh port 401h ; Processor Status (H):im0 bit pswh.0 ; Interrupt Mask Bit 0im1 bit pswh.1 ; Interrupt Mask Bit 1im2 bit pswh.2 ; Interrupt Mask Bit 2im3 bit pswh.3 ; Interrupt Mask Bit 3rs0 bit pswh.4 ; Register Bank Selection Bit 0rs1 bit pswh.5 ; Register Bank Selection Bit 1tm bit pswh.6 ; CPU in Single Step Modesm bit pswh.7 ; CPU in Supervisor Modepsw51 port 402h ; Emulated 8051 PSW:p bit psw51.0 ; Parity Bitf1 bit psw51.1 ; User Flag 1v_51 bit psw51.2 ; Overflow Flagrs0_51 bit psw51.3 ; Register Bank Selection Bit 0rs1_51 bit psw51.4 ; Register Bank Selection Bit 1f0 bit psw51.5 ; User Flag 0ac_51 bit psw51.6 ; Half Carry (for DAA)c_51 bit psw51.7 ; Carrypcon port 404h ; Control Power Modes:idl bit pcon.0 ; Enable Idle Modepd bit pcon.1 ; Enabled Power Down Mode;----------------------------------------------------------------------------; Chip Configurationscr port 440h ; System Configuration;pz bit scr.0 ; Limit Address Spaces to 64K;cm bit scr.1 ; 8051 Compatible Register Mapping;pt0 bit scr.2 ; Prescaler Setting;pt1 bit scr.3bcr port 46ah ; Bus Configuration;bc0 bit bcr.0 ; Select 12/16/20/24 Adress Lines;bc1 bit bcr.1;bc2 bit bcr.2 ; Select 8 or 16 Data Lines;busd bit bcr.3 ; Disable Bus entirely;waitd bit bcr.4 ; Ignore WAIT Pinbtrl port 468h ; Configure Bus Timing (L);dra0 bit btrl.0 ; Total Length of Read Cycle;dra1 bit btrl.1;dr0 bit btrl.2 ; Length of Read Cycle without ALE;dr1 bit btrl.3;dwa0 bit btrl.4 ; Total Length of Write Cycle;dwa1 bit btrl.5;dw0 bit btrl.6 ; Length of Write Cycle without ALE;dw1 bit btrl.7btrh port 469h ; Configure Bus Timing (H);cra0 bit btrl.0 ; Total Length of Instruction Read Cycle;cra1 bit btrl.1;cr0 bit btrl.2 ; Length of Instruction Read Cycle without ALE;cr1 bit btrl.3;alew bit btrl.5 ; Length of ALE Pulse;wm0 bit btrl.6 ; Length of WR Pulse;wm1 bit btrl.7;----------------------------------------------------------------------------; Interrupt Controliel port 426h ; Interrupt Enable (L):ex0 bit iel.0 ; External Interrupt 0et0 bit iel.1 ; Timer 0ex1 bit iel.2 ; External Interrupt 1et1 bit iel.3 ; Timer 1et2 bit iel.4 ; Timer 2ea bit iel.7 ; Global Enableieh port 427h ; Interrupt Enable (H):eri0 bit ieh.0 ; UART0 Rxeti0 bit ieh.1 ; UART0 Txeri1 bit ieh.2 ; UART1 Rxeti1 bit ieh.3 ; UART1 Txipa0 port 4a0h ; Interrupt Priorities (0):;px0 bit ipa0.0 ; External Interrupt 0 (4 Bits);pt0 bit ipa0.4 ; Timer 0 (4 Bits)ipa1 port 4a1h ; Interrupt Priorities (1):;px1 bit ipa1.0 ; External Interrupt 1 (4 Bits);pt1 bit ipa1.4 ; Timer 1 (4 Bits)ipa2 port 4a2h ; Interrupt Priorities (2):;pt2 bit ipa1.0 ; Timer 2 (4 Bits)ipa4 port 4a4h ; Interrupt Priorities (4):;pri0 bit ipa4.0 ; UART0 Rx (4 Bits);pti0 bit ipa4.4 ; UART0 Tx (4 Bits)ipa5 port 4a5h ; Interrupt Priorities (4):;pri1 bit ipa5.0 ; UART1 Rx (4 Bits);pti1 bit ipa5.4 ; UART1 Tx (4 Bits)swe port 403h ; Enable Software Interruptsswe1 bit swe.0swe2 bit swe.1swe3 bit swe.2swe4 bit swe.3swe5 bit swe.4swe6 bit swe.5swe7 bit swe.6swr port 42ah ; Trigger Software Interruptsswr1 bit swr.0swr2 bit swr.1swr3 bit swr.2swr4 bit swr.3swr5 bit swr.4swr6 bit swr.5swr7 bit swr.6;----------------------------------------------------------------------------; Portsp0 port 430h ; Data Register Port 0ad0 bit p0.0 ; Data Bit 0/Address Bit 4ad1 bit p0.1 ; Data Bit 1/Address Bit 5ad2 bit p0.2 ; Data Bit 2/Address Bit 6ad3 bit p0.3 ; Data Bit 3/Address Bit 7ad4 bit p0.4 ; Data Bit 4/Address Bit 8ad5 bit p0.5 ; Data Bit 5/Address Bit 9ad6 bit p0.6 ; Data Bit 6/Address Bit 10ad7 bit p0.7 ; Data Bit 7/Address Bit 11p1 port 431h ; Data Register Port 1a0 bit p1.0 ; Address Line 0 (8 Bit Mode)wrh bit p1.0 ; Write Pulse D8-D15 (16-Bit-Mode)a1 bit p1.1 ; Address Line 1a2 bit p1.2 ; Address Line 2a3 bit p1.3 ; Address Line 3rxd1 bit p1.4 ; UART1 Rx Linetxd1 bit p1.5 ; UART1 Tx Linet2 bit p1.6 ; Timer 2 Input/Outputt2ex bit p1.7 ; Trigger Timer 2p2 port 432h ; Data Register Port 2ad8 bit p2.0 ; Data Bit 8/Address Bit 12ad9 bit p2.1 ; Data Bit 9/Address Bit 13ad10 bit p2.2 ; Data Bit 10/Address Bit 14ad11 bit p2.3 ; Data Bit 11/Address Bit 15ad12 bit p2.4 ; Data Bit 12/Address Bit 16ad13 bit p2.5 ; Data Bit 13/Address Bit 17ad14 bit p2.6 ; Data Bit 14/Address Bit 18ad15 bit p2.7 ; Data Bit 15/Address Bit 19p3 port 433h ; Data Register Port 3rxd0 bit p3.0 ; UART0 Rx Linetxd0 bit p3.1 ; UART0 Tx Lineint0 bit p3.2 ; External Interrupt 0int1 bit p3.3 ; External Interrupt 1t0 bit p3.4 ; Timer 0 Input/Outputt1 bit p3.5 ; Timer 1 Input/Outputwr bit p3.6 ; Write Pulse D0-7rd bit p3.7 ; Read Pulse D0-15p0cfga port 470h ; Configuration Bits A Port 0p1cfga port 471h ; Configuration Bits A Port 1p2cfga port 472h ; Configuration Bits A Port 2p3cfga port 473h ; Configuration Bits A Port 3p0cfgb port 4f0h ; Configuration Bits B Port 0p1cfgb port 4f1h ; Configuration Bits B Port 1p2cfgb port 4f2h ; Configuration Bits B Port 2p3cfgb port 4f3h ; Configuration Bits B Port 3;----------------------------------------------------------------------------; Timertl0 port 450h ; Timer 0 Counter Valueth0 port 451hrtl0 port 454h ; Timer 0 Reload Valuerth0 port 455htl1 port 452h ; Timer 1 Counter Valueth1 port 453hrtl1 port 456h ; Timer 1 Reload Valuerth1 port 457htmod port 45ch ; Mode Register Timer 0/1;t0_m0 bit tmod.0 ; Operation Mode Timer 0;t0_m1 bit tmod.1;ct_t0 bit tmod.2 ; Timer 0 as Timer or Counter;t0_gate bit tmod.3 ; Enable Timer 0;t1_m0 bit tmod.4 ; Operation Mode Timer 1;t1_m1 bit tmod.5;ct_t1 bit tmod.6 ; Timer 1 as Timer oder Counter;t1_gate bit tmod.7 ; Enable Timer 1tcon port 410h ; Timer 0/1 Control Registerit0 bit tcon.0 ; Edge or Level Triggered Interrupt 0ie0 bit tcon.1 ; Edge Detector Interrupt 0it1 bit tcon.2 ; Edge or Level Triggered Interrupt 1ie1 bit tcon.3 ; Edge Detector Interrupt 1tr0 bit tcon.4 ; Start/Stop Timer 0tf0 bit tcon.5 ; Timer 0 Overflowtr1 bit tcon.6 ; Start/Stop Timer 1tf1 bit tcon.7 ; Timer 1 Overflowtstat port 411h ; Timer 0/1 Statust0oe bit tstat.0 ; Output Timer 0 Clock on T0t1oe bit tstat.1 ; Output Timer 1 Clock on T1tl2 port 458h ; Timer 2 Valueth2 port 459ht2capl port 45ah ; Timer 2 Capture Valuet2caph port 45bht2mod port 419h ; Timer 2 Modedcen bit t2mod.0 ; Timer 2 Direction up or Controlled by T2EXt2oe bit t2mod.1 ; Output Timer 2 Clock on T2tclk1 bit t2mod.4 ; UART1 uses Timer 2 instead of Timer 1 for Txrclk1 bit t2mod.5 ; UART1 uses Timer 2 instead of Timer 1 for Rxt2con port 418h ; Timer 2 Control Registercp_rl2 bit t2con.0 ; Timer 2 Capture/Reload ?ct_t2 bit t2con.1 ; Timer 2 as Timer or Countertr2 bit t2con.2 ; Start/Stop Timer 2exen2 bit t2con.3 ; Allow Capture/Reload via T2EXtclk0 bit t2con.4 ; UART0 uses Timer2 instead of Timer 1 for Txrclk0 bit t2con.5 ; UART0 uses Timer2 instead of Timer 1 for Rxexf2 bit t2con.6 ; Capture/Reload Occuredtf2 bit t2con.7 ; Timer 2 Overflow;----------------------------------------------------------------------------; Watchdogwdcon port 41fh ; Watchdog Configurationwdtof bit wdcon.1 ; Timeout occured?wdrun bit wdcon.2 ; Enable Watchdogpre0 bit wdcon.5 ; Prescalerpre1 bit wdcon.6pre2 bit wdcon.7wdl port 45fh ; Reload Valuewfeed1 port 45dh ; Reset Register 1 (a5h)wfeed2 port 45eh ; Reset Register 2 (5ah);----------------------------------------------------------------------------; Serial Portss0buf port 460h ; UART0 Data Registers0addr port 461h ; UART0 Slave Addresss0aden port 462h ; UART0 Address Masks0stat port 421h ; UART0 Statusstint0 bit s0stat.0 ; UART0 Interrupt Enableoe0 bit s0stat.1 ; UART0 Receiver Overflowbr0 bit s0stat.2 ; UART0 Break Detectedfe0 bit s0stat.3 ; UART0 Framing Errors0con port 420h ; UART0 Controlri_0 bit s0con.0 ; UART0 Character Receivedti_0 bit s0con.1 ; UART0 Character Transmittedrb8_0 bit s0con.2 ; UART0 9th Bit receivedtb8_0 bit s0con.3 ; UART0 9th Bit to be snetren_0 bit s0con.4 ; UART0 Receiver Enablesm2_0 bit s0con.5 ; UART0 Enable Multiprocessor Modesm1_0 bit s0con.6 ; UART0 Mode Selectsm0_0 bit s0con.7s1stat port 421h ; UART1 Statusstint1 bit s1stat.0 ; UART1 Interrupt Enableoe1 bit s1stat.1 ; UART1 Receiver Overflowbr1 bit s1stat.2 ; UART1 Break Detectedfe1 bit s1stat.3 ; UART1 Framing Errors1con port 424h ; UART1 Controlri_1 bit s1con.0 ; UART1 Character Receivedti_1 bit s1con.1 ; UART1 Character Transmittedrb8_1 bit s1con.2 ; UART1 9th Bit receivedtb8_1 bit s1con.3 ; UART1 9th Bit to be sentren_1 bit s1con.4 ; UART1 Receiver Enablesm2_1 bit s1con.5 ; UART1 Enable Multiprocessor Modesm1_1 bit s1con.6 ; UART1 Mode Selectsm0_1 bit s1con.7s1buf port 464h ; UART1 Data Registers1addr port 465h ; UART1 Slave Addresss1aden port 466h ; UART1 Address Mask;----------------------------------------------------------------------------; Vectorsvec_reset label 0000h ; Reset Addressvec_bkpt label 0004h ; Breakpoint Instructionvec_trace label 0008h ; Single Stepvec_stkover label 000ch ; Stack Overflowvec_divzero label 0010h ; Division by 0vec_reti label 0014h ; Privilege Violation (RETI in User Mode)vec_trap0 label 0040h ; TRAP 0vec_trap1 label 0044h ; TRAP 1vec_trap2 label 0048h ; TRAP 2vec_trap3 label 004ch ; TRAP 3vec_trap4 label 0050h ; TRAP 4vec_trap5 label 0054h ; TRAP 5vec_trap6 label 0058h ; TRAP 6vec_trap7 label 005ch ; TRAP 7vec_trap8 label 0060h ; TRAP 8vec_trap9 label 0064h ; TRAP 9vec_trap10 label 0068h ; TRAP 10vec_trap11 label 006ch ; TRAP 11vec_trap12 label 0070h ; TRAP 12vec_trap13 label 0074h ; TRAP 13vec_trap14 label 0078h ; TRAP 14vec_trap15 label 007ch ; TRAP 15vec_ie0 label 0080h ; External Interrupt 0vec_tf0 label 0084h ; Timer 0 Interruptvec_ie1 label 0088h ; External Interrupt 1vec_tf1 label 008ch ; Timer 1 Interruptvec_tf2 label 0090h ; Timer 2 Interruptvec_ri0 label 00a0h ; UART0 Receptionvec_ti0 label 00a4h ; UART0 Transmissionvec_ri1 label 00a8h ; UART1 Receptionvec_ti1 label 00ach ; UART1 Transmissionvec_swr1 label 0100h ; Software Interrupt 1vec_swr2 label 0104h ; Software Interrupt 2vec_swr3 label 0108h ; Software Interrupt 3vec_swr4 label 010ch ; Software Interrupt 4vec_swr5 label 0110h ; Software Interrupt 5vec_swr6 label 0114h ; Software Interrupt 6vec_swr7 label 0118h ; Software Interrupt 7;----------------------------------------------------------------------------; Memory Addressesirom label 0 ; Start of internal ROMswitch MOMCPUNAME ; End of internal ROMcase "XAG3"iromend label 7fffh ; XA-G3: 32K ROMcase "XAG2"iromend label 3fffh ; XA-G2: 16K ROMcase "XAG1"iromend label 1fffh ; XA-G1: 8K ROMendcaseiram equ 0,data ; Start of internal RAMiramend equ 1ffh,data ; End of internal RAM: always 512 bytesrestore ; re-allow listingendif