SFR.asm 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. ;; 8051/8052 Special-Function Registers...
  2. NOLIST
  3. ;; Register Address Reset Notes
  4. ACC EQU 0xE0 ; 0x00 Bit addressable
  5. B EQU 0xF0 ; 0x00 Bit addressable
  6. DPH EQU 0x83 ; 0x00
  7. DPL EQU 0x82 ; 0x00
  8. IE EQU 0xA8 ; 0x00 Bit addressable
  9. IE_EA ALIAS "IE.7" ; All interrupts
  10. IE_ET2 ALIAS "IE.5" ; Timer 2 (8052)
  11. IE_ES ALIAS "IE.4" ; Serial port
  12. IE_ET1 ALIAS "IE.3" ; Timer 1
  13. IE_EX1 ALIAS "IE.2" ; External interrupt 1
  14. IE_ET0 ALIAS "IE.1" ; Timer 0
  15. IE_EX0 ALIAS "IE.0" ; External interrupt 0
  16. IP EQU 0xB8 ; 0x00 Bit addressable
  17. P0 EQU 0x80 ; 0xFF Bit addressable
  18. P1 EQU 0x90 ; 0xFF Bit addressable
  19. P2 EQU 0xA0 ; 0xFF Bit addressable
  20. P3 EQU 0xB0 ; 0xFF Bit addressable
  21. PCON EQU 0x87 ; ??
  22. PSW EQU 0xD0 ; 0x00 Bit addressable
  23. PSW_CY ALIAS "PSW.7" ; Carry
  24. PSW_AC ALIAS "PSW.6" ; Auxiliary carry
  25. PSW_F0 ALIAS "PSW.5" ; General purpose flag
  26. PSW_RS1 ALIAS "PSW.4" ; Register bank
  27. PSW_RS0 ALIAS "PSW.3" ; Register bank
  28. PSW_OV ALIAS "PSW.2" ; Overflow
  29. PSW_UDF ALIAS "PSW.1" ; User definable flag
  30. PSW_P ALIAS "PSW.0" ; Parity
  31. RCAP2H EQU 0xCB ; 0x00 8052
  32. RCAP2L EQU 0xCA ; 0x00 8052
  33. SBUF EQU 0x99 ; ??
  34. SCON EQU 0x98 ; 0x00 Bit addressable
  35. SCON_SM0 ALIAS "SCON.7" ; Serial port mode
  36. SCON_SM1 ALIAS "SCON.6" ; Serial port mode
  37. SCON_SM2 ALIAS "SCON.5" ; Serial port mode
  38. SCON_REN ALIAS "SCON.4" ; Receiver enable
  39. SCON_TB8 ALIAS "SCON.3" ; 9th data bit to transmit
  40. SCON_RB8 ALIAS "SCON.2" ; 9th data bit received
  41. SCON_TI ALIAS "SCON.1" ; Transmit interrupt flag
  42. SCON_RI ALIAS "SCON.0" ; Receive interrupt flag
  43. SP EQU 0x81 ; 0x07
  44. T2CON EQU 0xC8 ; 0x00 Bit addressable, 8052
  45. TCON EQU 0x88 ; 0x00 Bit addressable
  46. TCON_TF1 ALIAS "TCON.7" ; Timer 1 overflow flag
  47. TCON_TR1 ALIAS "TCON.6" ; Timer 1 run control bit
  48. TCON_TF0 ALIAS "TCON.5" ; Timer 0 overflow flag
  49. TCON_TR0 ALIAS "TCON.4" ; Timer 0 run control bit
  50. TCON_IE1 ALIAS "TCON.3" ; External int 1 edge flag
  51. TCON_IT1 ALIAS "TCON.2" ; Int 1 type control bit
  52. TCON_IE0 ALIAS "TCON.1" ; External int 0 edge flag
  53. TCON_IT0 ALIAS "TCON.0" ; Int 0 type control bit
  54. TH0 EQU 0x8C ; 0x00
  55. TL0 EQU 0x8A ; 0x00
  56. TH1 EQU 0x8D ; 0x00
  57. TL1 EQU 0x8B ; 0x00
  58. TH2 EQU 0xCD ; 0x00 8052
  59. TL2 EQU 0xCC ; 0x00 8052
  60. TMOD EQU 0x89 ; 0x00
  61. LIST
  62. ;; ...8051/8052 Special-Function Registers