Re: [請益] Atmel的AT89C51RB2的.asm該如何組譯?

看板ASM (組合語言)作者 (呆呆小狼)時間15年前 (2009/09/18 22:14), 編輯推噓3(305)
留言8則, 4人參與, 最新討論串2/2 (看更多)
//懶吧? 那就....繼續懶吧 :P /***************************************************************************** FILE:AT89C51RB2.H SFR Description for AT89C51RB2 ON KEIL C by Wolflord *****************************************************************************/ /* BYTE Register */ sfr P0=0x80; sfr SP=0x81; sfr DPL=0x82; sfr DPH=0x83; sfr PCON=0x87; sfr TCON=0x88; sfr TMOD=0x89; sfr TL0=0x8A; sfr TL1=0x8B; sfr TH0=0x8C; sfr TH1=0x8D; Sfr AUXR=0x8E; sfr CKCON0=0x8F; sfr P1=0x90; sfr CKRL=0x97; sfr SCON=0x98; sfr SBUF=0x99; sfr BRL=0x9A; sfr BDRCON=0x9B; sfr KBLS=0x9C; sfr KBE=0x9D; sfr KBF=0x9E; sfr P2=0xA0; sfr AUXR1=0xA2; sfr WDTRST=0xA6; sfr WDTPRG=0xA7; sfr IEN0=0xA8; sfr SADDR=0xA9; sfr CKCON1=0xAF; sfr P3=0xB0; sfr IEN1=0xB1; sfr IPL1=0xB2; sfr IPH1=0xB3; sfr IPH0=0xB7; sfr IPL0=0xB8; sfr SADEN=0xB9; sfr T2CON=0xC8; sfr T2MOD=0xC9; sfr RCAP2L=0xCA; sfr RCAP2H=0xCB; sfr TL2=0xCC; sfr TH2=0xCD; sfr PSW=0xD0; sfr FCON=0xD1; sfr CCON=0xD8; sfr CMOD=0xD9; sfr CCAPM0=0xDA; sfr CCAPM1=0xDB; sfr CCAPM2=0xDC; sfr CCAPM3=0xDD; sfr CCAPM4=0xDE; sfr ACC=0xE0; sfr CL=0xE9; sfr CCAP0L=0xEA; sfr CCAP1L=0xEB; sfr CCAP2L=0xEC; sfr CCAP3L=0xED; sfr CCAP4L=0xEE; sfr B=0xF0; sfr CH=0xF9; sfr CCAP0H=0xFA; sfr CCAP1H=0xFB; sfr CCAP2H=0xFC; sfr CCAP3H=0xFD; sfr CCAP4H=0xFE; /* BIT Define */ sbit P0_0=0x80^0; sbit P0_1=0x80^1; sbit P0_2=0x80^2; sbit P0_3=0x80^3; sbit P0_4=0x80^4; sbit P0_5=0x80^5; sbit P0_6=0x80^6; sbit P0_7=0x80^7; sbit IT0=0x88^0; sbit IE0=0x88^1; sbit IT1=0x88^2; sbit IE1=0x88^3; sbit TR0=0x88^4; sbit TF0=0x88^5; sbit TR1=0x88^6; sbit TF1=0x88^7; sbit P1_0=0x90^0; sbit P1_1=0x90^1; sbit P1_2=0x90^2; sbit P1_3=0x90^3; sbit P1_4=0x90^4; sbit P1_5=0x90^5; sbit P1_6=0x90^6; sbit P1_7=0x90^7; sbit RI=0x98^0; sbit TI=0x98^1; sbit RB8=0x98^2; sbit TB8=0x98^3; sbit REN=0x98^4; sbit SM2=0x98^5; sbit SM1=0x98^6; sbit FE=0x98^7; sbit SM0=0x98^7; sbit P2_0=0xA0^0; sbit P2_1=0xA0^1; sbit P2_2=0xA0^2; sbit P2_3=0xA0^3; sbit P2_4=0xA0^4; sbit P2_5=0xA0^5; sbit P2_6=0xA0^6; sbit P2_7=0xA0^7; sbit EX0=0xA8^0; sbit ET0=0xA8^1; sbit EX1=0xA8^2; sbit ET1=0xA8^3; sbit ES=0xA8^4; sbit ET2=0xA8^5; sbit EC=0xA8^6; sbit EA=0xA8^7; sbit P3_0=0xB0^0; sbit RXD=0xB0^0; sbit P3_1=0xB0^1; sbit TXD=0xB0^1; sbit INT0=0xB0^2; sbit P3_2=0xB0^2; sbit P3_3=0xB0^3; sbit INT1=0xB0^3; sbit T0=0xB0^4; sbit P3_4=0xB0^4; sbit P3_5=0xB0^5; sbit T1=0xB0^5; sbit WR=0xB0^6; sbit P3_6=0xB0^6; sbit RD=0xB0^7; sbit P3_7=0xB0^7; sbit CP_RL2=0xC8^0; sbit C_T2=0xC8^1; sbit TR2=0xC8^2; sbit EXEN2=0xC8^3; sbit TCLK=0xC8^4; sbit RCLK=0xC8^5; sbit EXF2=0xC8^6; sbit TF2=0xC8^7; sbit P=0xD0^0; sbit UD=0xD0^1; sbit OV=0xD0^2; sbit RS0=0xD0^3; sbit RS1=0xD0^4; sbit F0=0xD0^5; sbit AC=0xD0^6; sbit CY=0xD0^7; sbit CCF0=0xD8^0; sbit CCF1=0xD8^1; sbit CCF2=0xD8^2; sbit CCF3=0xD8^3; sbit CCF4=0xD8^4; sbit CR=0xD8^6; sbit CF=0xD8^7; ----------------------------------------------------------------------------- ;********************************************************************* ; FILE:AT89C51RB2.inc ; SFR Description for AT89C51RB2 ON KEIL ASM by Wolflord ;********************************************************************* AUXR DATA 08EH AUXR DATA 08EH CKCON0 DATA 08Fh CKRL DATA 096H BRL DATA 09AH BDRCON DATA 09BH KBLS DATA 09CH KBE DATA 09DH KBF DATA 09EH P2 DATA 0A0H AUXR1 DATA 0A2H AUXR1 DATA 0A2H WDTRST DATA 0A6H WDTPRG DATA 0A7H IEN0 DATA 0A8H SADDR DATA 0A9H CKCON1 DATA 0AFH P3 DATA 0B0H IEN1 DATA 0B1H IPL1 DATA 0B2H IPH1 DATA 0B3H IPH0 DATA 0B7H IPL0 DATA 0B8H SADEN DATA 0B9H SPCON DATA 0C3H SPSTA DATA 0C4H SPDAT DATA 0C5H T2CON DATA 0C8H T2MOD DATA 0C9H RCAP2L DATA 0CAH RCAP2H DATA 0CBH TL2 DATA 0CCH TH2 DATA 0CDH PSW DATA 0D0H FCON DATA 0D1H CCON DATA 0D8H CCF0 DATA 0D8H CMOD DATA 0D9H CCF1 DATA 0D9H CCF2 DATA 0DAH CCAPM0 DATA 0DAH CCF3 DATA 0DBH CCAPM1 DATA 0DBH CCAPM2 DATA 0DCH CCF4 DATA 0DCH CCAPM3 DATA 0DDH CR DATA 0DEH CCAPM4 DATA 0DEH CF DATA 0DFH ACC DATA 0E0H CL DATA 0E9H CCAP0L DATA 0EAH CCAP1L DATA 0EBH CCAP2L DATA 0ECH CCAP3L DATA 0EDH CCAP4L DATA 0EEH B DATA 0F0H CH DATA 0F9H CCAP0H DATA 0FAH CCAP1H DATA 0FBH CCAP2H DATA 0FCH CCAP3H DATA 0FDH CCAP4H DATA 0FEH P0 DATA 80H SP DATA 81H DPL DATA 82H DPH DATA 83H PCON DATA 87H TCON DATA 88H TMOD DATA 89H TL0 DATA 8AH TL1 DATA 8BH TH0 DATA 8CH TH1 DATA 8DH P1 DATA 90H SCON DATA 98H SBUF DATA 99H EX0 BIT 0A8H ET0 BIT 0A9H EX1 BIT 0AAH ET1 BIT 0ABH ES BIT 0ACH ET2 BIT 0ADH EC BIT 0AEH EA BIT 0AFH RXD BIT 0B0H TXD BIT 0B1H INT0 BIT 0B2H INT1 BIT 0B3H T0 BIT 0B4H T1 BIT 0B5H WR BIT 0B6H RD BIT 0B7H PX0L BIT 0B8H PT0L BIT 0B9H PX1L BIT 0BAH PT1L BIT 0BBH PSL BIT 0BCH PT2L BIT 0BDH PPCL BIT 0BEH CP_RL2 BIT 0C8H C_T2 BIT 0C9H TR2 BIT 0CAH EXEN2 BIT 0CBH TCLK BIT 0CCH RCLK BIT 0CDH EXF2 BIT 0CEH TF2 BIT 0CFH P BIT 0D0H OV BIT 0D2H RS0 BIT 0D3H RS1 BIT 0D4H F0 BIT 0D5H AC BIT 0D6H CY BIT 0D7H IT0 BIT 88H IE0 BIT 89H IT1 BIT 8AH IE1 BIT 8BH TR0 BIT 8CH TF0 BIT 8DH TR1 BIT 8EH TF1 BIT 8FH RI BIT 98H TI BIT 99H RB8 BIT 9AH TB8 BIT 9BH REN BIT 9CH SM2 BIT 9DH SM1 BIT 9EH SM0 BIT 9FH --------------------------------------------------------------------------- ;********************************************************************* ; FILE:AT89C51RB2.ASM ; SFR Description for AT89C51RB2 ON AD2500 XASM by Wolflord ;********************************************************************* ;REGS AUXR EQU 08EH AUXR EQU 08EH CKCON0 EQU 08Fh CKRL EQU 096H BRL EQU 09AH BDRCON EQU 09BH KBLS EQU 09CH KBE EQU 09DH KBF EQU 09EH P2 EQU 0A0H AUXR1 EQU 0A2H AUXR1 EQU 0A2H WDTRST EQU 0A6H WDTPRG EQU 0A7H IEN0 EQU 0A8H SADDR EQU 0A9H CKCON1 EQU 0AFH P3 EQU 0B0H IEN1 EQU 0B1H IPL1 EQU 0B2H IPH1 EQU 0B3H IPH0 EQU 0B7H IPL0 EQU 0B8H SADEN EQU 0B9H SPCON EQU 0C3H SPSTA EQU 0C4H SPDAT EQU 0C5H T2CON EQU 0C8H T2MOD EQU 0C9H RCAP2L EQU 0CAH RCAP2H EQU 0CBH TL2 EQU 0CCH TH2 EQU 0CDH PSW EQU 0D0H FCON EQU 0D1H CCON EQU 0D8H CCF0 EQU 0D8H CMOD EQU 0D9H CCF1 EQU 0D9H CCF2 EQU 0DAH CCAPM0 EQU 0DAH CCF3 EQU 0DBH CCAPM1 EQU 0DBH CCAPM2 EQU 0DCH CCF4 EQU 0DCH CCAPM3 EQU 0DDH CR EQU 0DEH CCAPM4 EQU 0DEH CF EQU 0DFH ACC EQU 0E0H CL EQU 0E9H CCAP0L EQU 0EAH CCAP1L EQU 0EBH CCAP2L EQU 0ECH CCAP3L EQU 0EDH CCAP4L EQU 0EEH B EQU 0F0H CH EQU 0F9H CCAP0H EQU 0FAH CCAP1H EQU 0FBH CCAP2H EQU 0FCH CCAP3H EQU 0FDH CCAP4H EQU 0FEH P0 EQU 80H SP EQU 81H DPL EQU 82H DPH EQU 83H PCON EQU 87H TCON EQU 88H TMOD EQU 89H TL0 EQU 8AH TL1 EQU 8BH TH0 EQU 8CH TH1 EQU 8DH P1 EQU 90H SCON EQU 98H SBUF EQU 99H ;BITS EX0 EQU 0A8H ET0 EQU 0A9H EX1 EQU 0AAH ET1 EQU 0ABH ES EQU 0ACH ET2 EQU 0ADH EC EQU 0AEH EA EQU 0AFH RXD EQU 0B0H TXD EQU 0B1H INT0 EQU 0B2H INT1 EQU 0B3H T0 EQU 0B4H T1 EQU 0B5H WR EQU 0B6H RD EQU 0B7H PX0L EQU 0B8H PT0L EQU 0B9H PX1L EQU 0BAH PT1L EQU 0BBH PSL EQU 0BCH PT2L EQU 0BDH PPCL EQU 0BEH CP_RL2 EQU 0C8H C_T2 EQU 0C9H TR2 EQU 0CAH EXEN2 EQU 0CBH TCLK EQU 0CCH RCLK EQU 0CDH EXF2 EQU 0CEH TF2 EQU 0CFH P EQU 0D0H OV EQU 0D2H RS0 EQU 0D3H RS1 EQU 0D4H F0 EQU 0D5H AC EQU 0D6H CY EQU 0D7H IT0 EQU 88H IE0 EQU 89H IT1 EQU 8AH IE1 EQU 8BH TR0 EQU 8CH TF0 EQU 8DH TR1 EQU 8EH TF1 EQU 8FH RI EQU 98H TI EQU 99H RB8 EQU 9AH TB8 EQU 9BH REN EQU 9CH SM2 EQU 9DH SM1 EQU 9EH SM0 EQU 9FH -- 好,我承認我瘋了..... XDD -- 劍兮,劍兮,食無魚,行無車,無以家養,不如歸去不如歸去~~ ▁▁ -= A23203 =- ▕武羅▏ BM4GRM Harlock WolfLord ▕夫得▏  ̄ ̄ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.46.200.173

09/18 23:04, , 1F
有幾個是打錯嗎?像 sfr AUXR1, 0xA2;
09/18 23:04, 1F
Oh...趕工之後又因為睡眠被不斷侵擾而抓狂的狀態下,打字發生神秘的靈異現象^^;; 已經改好了 XDDD ※ 編輯: WolfLord 來自: 114.46.200.173 (09/19 00:21)

09/19 06:25, , 2F
辛苦了,這種事情本來應該自己做的,讓你花這麼多時間
09/19 06:25, 2F

09/19 06:25, , 3F
真是抱歉。
09/19 06:25, 3F

09/21 01:57, , 4F
W大是好人!!
09/21 01:57, 4F

09/21 13:55, , 5F
本來想騙些p幣的,可是忘記ptt用貼的不算數 XDD
09/21 13:55, 5F

09/21 13:56, , 6F
應該直接在bbsedit上打,不該用uedit打的 XDDDDDDD
09/21 13:56, 6F

09/21 15:46, , 7F
小程式版有人寫一個叫「p幣可以吃嗎」的貼版程式,多少可
09/21 15:46, 7F

09/21 15:47, , 8F
以騙到p幣
09/21 15:47, 8F
文章代碼(AID): #1AivMoQL (ASM)
文章代碼(AID): #1AivMoQL (ASM)