📄 crt0.ppc
字号:
; Field AM (bits 0-16) = 131071
; Field ATM (bits 17-19) = 000
; Field CSNT_SAM (bit 20) = 0
; Field ACS (bits 21-22) = 11
; Field BI (bit 23) = 1
; Field SCY (bits 24-27) = 0100 = 4
; Field SETA (bit 28) = 0
; Field TRLX (bit 29) = 1
; Field EHTR (bit 30) = 0
; Field Reserved (bit 31) = 0
lis r3,0xFFFF
ori r3,r3,0x8744
stw r3,OR3(r4)
; Set the value of Base Register 3 (BR3)
; Field BA (bits 0-16) = 24576
; Field AT (bits 17-19) = 0
; Field PS (bits 20-21) = 00
; Field PARE (bit 22) = 0
; Field WP (bit 23) = 0
; Field MS (bits 24-25) = 00
; Field Reserved (bits 26-30) = 00 000
; Field V (bit 31) = 1
lis r3,CS3_HI_BASE
ori r3,r3,0x0001
stw r3,BR3(r4)
; Set the value of Option Register 4 (OR4) to $00000000.
; Field AM (bits 0-16) = 0
; Field ATM (bits 17-19) = 0
; Field CSNT_SAM (bit 20) = 0
; Field ACS (bits 21-22) = 0
; Field BI (bit 23) = 0
; Field SCY (bits 24-27) = 0
; Field SETA (bit 28) = 0
; Field TRLX (bit 29) = 0
; Field EHTR (bit 30) = 0
; Field Reserved (bit 31) = 0
lis r3,0x0000 ; OR4 = 0x00000000
ori r3,r3,0x0000
stw r3,OR4(r4)
; Set the value of Base Register 4 (BR4) to $00000000.
; Field BA (bits 0-16) = 0
; Field AT (bits 17-19) = 0
; Field PS (bits 20-21) = 0
; Field PARE (bit 22) = 0
; Field WP (bit 23) = 0
; Field MS (bits 24-25) = 0
; Field Reserved (bits 26-30) = 0
; Field V (bit 31) = 0 CS4# is turned off!!!
lis r3,0x0000 ; BR4 = 0x00000000
ori r3,r3,0x0000
stw r3,BR4(r4)
; Set the value of Option Register 5 (OR5) to $00000000.
; Field AM (bits 0-16) = 0
; Field ATM (bits 17-19) = 0
; Field CSNT_SAM (bit 20) = 0
; Field ACS (bits 21-22) = 0
; Field BI (bit 23) = 0
; Field SCY (bits 24-27) = 0
; Field SETA (bit 28) = 0
; Field TRLX (bit 29) = 0
; Field EHTR (bit 30) = 0
; Field Reserved (bit 31) = 0
lis r3,0x0000 ; OR5 = 0x00000000
ori r3,r3,0x0000
stw r3,OR5(r4)
; Set the value of Base Register 5 (BR5) to $00000000.
; Field BA (bits 0-16) = 0
; Field AT (bits 17-19) = 0
; Field PS (bits 20-21) = 0
; Field PARE (bit 22) = 0
; Field WP (bit 23) = 0
; Field MS (bits 24-25) = 0
; Field Reserved (bits 26-30) = 0
; Field V (bit 31) = 0 CS5# is turned off!!!
lis r3,0x0000 ; BR5 = 0x00000000
ori r3,r3,0x0000
stw r3,BR5(r4)
; Set the value of Option Register 6 (OR6) to $00000000.
; Field AM (bits 0-16) = 0
; Field ATM (bits 17-19) = 0
; Field CSNT_SAM (bit 20) = 0
; Field ACS (bits 21-22) = 0
; Field BI (bit 23) = 0
; Field SCY (bits 24-27) = 0
; Field SETA (bit 28) = 0
; Field TRLX (bit 29) = 0
; Field EHTR (bit 30) = 0
; Field Reserved (bit 31) = 0
lis r3,0x0000 ; OR6 = 0x00000000
ori r3,r3,0x0000
stw r3,OR6(r4)
; Set the value of Base Register 6 (BR6) to $00000000.
; Field BA (bits 0-16) = 0
; Field AT (bits 17-19) = 0
; Field PS (bits 20-21) = 0
; Field PARE (bit 22) = 0
; Field WP (bit 23) = 0
; Field MS (bits 24-25) = 0
; Field Reserved (bits 26-30) = 0
; Field V (bit 31) = 0 CS6# is turned off!!!
lis r3,0x0000 ; BR6 = 0x00000000
ori r3,r3,0x0000
stw r3,BR6(r4)
; Set the value of Option Register 7 (OR7) to $00000000.
; Field AM (bits 0-16) = 0
; Field ATM (bits 17-19) = 0
; Field CSNT_SAM (bit 20) = 0
; Field ACS (bits 21-22) = 0
; Field BI (bit 23) = 0
; Field SCY (bits 24-27) = 0
; Field SETA (bit 28) = 0
; Field TRLX (bit 29) = 0
; Field EHTR (bit 30) = 0
; Field Reserved (bit 31) = 0
lis r3,0x0000 ; OR7 = 0x00000000
ori r3,r3,0x0000
stw r3,OR7(r4)
; Set the value of Base Register 7 (BR7) to $00000000.
; Field BA (bits 0-16) = 0
; Field AT (bits 17-19) = 0
; Field PS (bits 20-21) = 0
; Field PARE (bit 22) = 0
; Field WP (bit 23) = 0
; Field MS (bits 24-25) = 0
; Field Reserved (bits 26-30) = 0
; Field V (bit 31) = 0 CS7# is turned off!!!
lis r3,0x0000 ; BR7 = 0x00000000
ori r3,r3,0x0000
stw r3,BR7(r4)
; Reload OR0 and BR0 because of some strange problem with the MPC860.
; Set the value of Option Register 0 (OR0)
; Field AM (bits 0-16) =
; Field ATM (bits 17-19) = 000
; Field CSNT_SAM (bit 20) = 0
; Field ACS (bits 21-22) = 11
; Field BI (bit 23) = 1
; Field SCY (bits 24-27) = 0100 = 4
; Field SETA (bit 28) = 0
; Field TRLX (bit 29) = 1
; Field EHTR (bit 30) = 0
; Field Reserved (bit 31) = 0
lis r3,0xFFFF
ori r3,r3,0x0744
stw r3,OR0(r4)
; Set the value of Base Register 0 (BR0)
; Field BA (bits 0-16) = 131040
; Field AT (bits 17-19) = 000
; Field PS (bits 20-21) = 01
; Field PARE (bit 22) = 0
; Field WP (bit 23) = 1
; Field MS (bits 24-25) = 00
; Field Reserved (bits 26-30) = 00 000
; Field V (bit 31) = 1
lis r3,0xFFF0
ori r3,r3,0x0501
stw r3,BR0(r4)
; Set the value of Port A Pin Assignment Register (PAPAR) to $0000.
; Field DD0 (bit 0) = 0
; Field DD1 (bit 1) = 0
; Field DD2 (bit 2) = 0
; Field DD3 (bit 3) = 0
; Field DD4 (bit 4) = 0
; Field DD5 (bit 5) = 0
; Field DD6 (bit 6) = 0
; Field DD7 (bit 7) = 0
; Field DD8 (bit 8) = 0
; Field DD9 (bit 9) = 0
; Field DD10 (bit 10) = 0
; Field DD11 (bit 11) = 0
; Field DD12 (bit 12) = 0
; Field DD13 (bit 13) = 0
; Field DD14 (bit 14) = 0
; Field DD15 (bit 15) = 0
li r3,0x0000 ; PAPAR = 0x0000
sth r3,PAPAR(r4)
; Set the value of Port A Open-Drain Register (PAODR) to $0000.
; Field Reserved (bits 0-8) = 0
; Field OD9 (bit 9) = 0 ;bits 9 to 12 are actively driven both high and low
; Field OD10 (bit 10) = 0
; Field OD11 (bit 11) = 0
; Field OD12 (bit 12) = 0
; Field Reserved (bit 13) = 0
; Field OD14 (bit 14) = 0
; Field Reserved (bit 15) = 0
li r3,0x0000 ; PAODR = 0x0000
sth r3,PAODR(r4)
; Set the value of Port A Data Direction Register (PADIR) to $00FF
; Upper byte ***must*** be inputs or tri-state (not outputs!), else may fry the 3042.
; Lower byte is outputs. Bits 8 to 11 strobe into the LED.
li r3,0x00FF
sth r3,PADIR(r4)
; Set the value of Port A Data Register (PADAT) to $0000.
; Inputs:
; Field D0 (bit 0) = 0
; Field D1 (bit 1) = 0
; Field D2 (bit 2) = 0
; Field D3 (bit 3) = 0
; Field D4 (bit 4) = 0
; Field D5 (bit 5) = 0
; Field D6 (bit 6) = 0
; Field D7 (bit 7) = 0
; Outputs:
; Field D8 (bit 8) = 0 ; bits 8 to 11 strobe into the LED
; Field D9 (bit 9) = 0
; Field D10 (bit 10) = 0
; Field D11 (bit 11) = 0
; Field D12 (bit 12) = 0
; Field D13 (bit 13) = 0
; Field D14 (bit 14) = 0
; Field D15 (bit 15) = 0
li r3,0x0000 ; PADAT = 0x0000
sth r3,PADAT(r4)
/*
; Set the value of Port B Pin Assignment Register (PBPAR) to $00000000.
; Field Reserved (bits 0-13) = 0
; Field DD14 (bit 14) = 0
; Field DD15 (bit 15) = 0
; Field DD16 (bit 16) = 0
; Field DD17 (bit 17) = 0
; Field DD18 (bit 18) = 0
; Field DD19 (bit 19) = 0
; Field DD20 (bit 20) = 0
; Field DD21 (bit 21) = 0
; Field DD22 (bit 22) = 0
; Field DD23 (bit 23) = 0
; Field DD24 (bit 24) = 0
; Field DD25 (bit 25) = 0
; Field DD26 (bit 26) = 0
; Field DD27 (bit 27) = 0
; Field DD28 (bit 28) = 0
; Field DD29 (bit 29) = 0
; Field DD30 (bit 30) = 0
; Field DD31 (bit 31) = 0
lis r3,0x0000 ; PBPAR = 0x00000000
ori r3,r3,0x0000
stw r3,PBPAR(r4)
; Set the value of Port B Open-Drain Register (PBODR) to $0000.
; Field OD16 (bit 0) = 0
; Field OD17 (bit 1) = 0
; Field OD18 (bit 2) = 0
; Field OD19 (bit 3) = 0
; Field OD20 (bit 4) = 0
; Field OD21 (bit 5) = 0
; Field OD22 (bit 6) = 0
; Field OD23 (bit 7) = 0
; Field OD24 (bit 8) = 0
; Field OD25 (bit 9) = 0
; Field OD26 (bit 10) = 0
; Field OD27 (bit 11) = 0
; Field OD28 (bit 12) = 0
; Field OD29 (bit 13) = 0
; Field OD30 (bit 14) = 0
; Field OD31 (bit 15) = 0
li r3,0x0000 ; PBODR = 0x0000
sth r3,PBODR(r4)
; Set the value of Port B Data Direction Register (PBDIR) to $00000000.
; Field Reserved (bits 0-13) = 0
; Field DR14 (bit 14) = 0
; Field DR15 (bit 15) = 0
; Field DR16 (bit 16) = 0
; Field DR17 (bit 17) = 0
; Field DR18 (bit 18) = 0
; Field DR19 (bit 19) = 0
; Field DR20 (bit 20) = 0
; Field DR21 (bit 21) = 0
; Field DR22 (bit 22) = 0
; Field DR23 (bit 23) = 0
; Field DR24 (bit 24) = 0
; Field DR25 (bit 25) = 0
; Field DR26 (bit 26) = 0
; Field DR27 (bit 27) = 0
; Field DR28 (bit 28) = 0
; Field DR29 (bit 29) = 0
; Field DR30 (bit 30) = 0
; Field DR31 (bit 31) = 0
lis r3,0x0000 ; PBDIR = 0x00000000
ori r3,r3,0x0000
stw r3,PBDIR(r4)
; Set the value of Port B Data Register (PBDAT) to $00000000.
; Field Reserved (bits 0-13) = 0
; Field D14 (bit 14) = 0
; Field D15 (bit 15) = 0
; Field D16 (bit 16) = 0
; Field D17 (bit 17) = 0
; Field D18 (bit 18) = 0
; Field D19 (bit 19) = 0
; Field D20 (bit 20) = 0
; Field D21 (bit 21) = 0
; Field D22 (bit 22) = 0
; Field D23 (bit 23) = 0
; Field D24 (bit 24) = 0
; Field D25 (bit 25) = 0
; Field D26 (bit 26) = 0
; Field D27 (bit 27) = 0
; Field D28 (bit 28) = 0
; Field D29 (bit 29) = 0
; Field D30 (bit 30) = 0
; Field D31 (bit 31) = 0
lis r3,0x0000 ; PBDAT = 0x00000000
ori r3,r3,0x0000
stw r3,PBDAT(r4)
; Set the value of Port C Data Direction Register (PCDIR) to $0000.
; Field Reserved (bits 0-3) = 0
; Field DR4 (bit 4) = 0
; Field DR5 (bit 5) = 0
; Field DR6 (bit 6) = 0
; Field DR7 (bit 7) = 0
; Field DR8 (bit 8) = 0
; Field DR9 (bit 9) = 0
; Field DR10 (bit 10) = 0
; Field DR11 (bit 11) = 0
; Field DR12 (bit 12) = 0
; Field DR13 (bit 13) = 0
; Field DR14 (bit 14) = 0
; Field DR15 (bit 15) = 0
li r3,0x0000 ; PCDIR = 0x0000
sth r3,PCDIR(r4)
; Set the value of Port C Pin Assignment Register (PCPAR) to $0000.
; Field Reserved (bits 0-3) = 0
; Field DD4 (bit 4) = 0
; Field DD5 (bit 5) = 0
; Field DD6 (bit 6) = 0
; Field DD7 (bit 7) = 0
; Field DD8 (bit 8) = 0
; Field DD9 (bit 9) = 0
; Field DD10 (bit 10) = 0
; Field DD11 (bit 11) = 0
; Field DD12 (bit 12) = 0
; Field DD13 (bit 13) = 0
; Field DD14 (bit 14) = 0
; Field DD15 (bit 15) = 0
li r3,0x0000 ; PCPAR = 0x0000
sth r3,PCPAR(r4)
; Set the value of Port C Special Options Register (PCSO) to $0000.
; Field Reserved (bits 0-3) = 0
; Field CD4 (bit 4) = 0
; Field CTS4 (bit 5) = 0
; Field CD3 (bit 6) = 0
; Field CTS3 (bit 7) = 0
; Field CD2 (bit 8) = 0
; Field CTS2 (bit 9) = 0
; Field CD1 (bit 10) = 0
; Field CTS1 (bit 11) = 0
; Field Reserved (bits 12-13) = 0
; Field DREQ1 (bit 14) = 0
; Field DREQ0 (bit 15) = 0
li r3,0x0000 ; PCSO = 0x0000
sth r3,PCSO(r4)
; Set the value of Port C Interrupt Control Register (PCINT) to $0000.
; Field Reserved (bits 0-3) = 0
; Field EDM4 (bit 4) = 0
; Field EDM5 (bit 5) = 0
; Field EDM6 (bit 6) = 0
; Field EDM7 (bit 7) = 0
; Field EDM8 (bit 8) = 0
; Field EDM9 (bit 9) = 0
; Field EDM10 (bit 10) = 0
; Field EDM11 (bit 11) = 0
; Field EDM12 (bit 12) = 0
; Field EDM13 (bit 13) = 0
; Field EDM14 (bit 14) = 0
; Field EDM15 (bit 15) = 0
li r3,0x0000 ; PCINT = 0x0000
sth r3,PCINT(r4)
; Set the value of Port C Data Register (PCDAT) to $0000.
; Field Reserved (bits 0-3) = 0
; Field D4 (bit 4) = 0
; Field D5 (bit 5) = 0
; Field D6 (bit 6) = 0
; Field D7 (bit 7) = 0
; Field D8 (bit 8) = 0
; Field D9 (bit 9) = 0
; Field D10 (bit 10) = 0
; Field D11 (bit 11) = 0
; Field D12 (bit 12) = 0
; Field D13 (bit 13) = 0
; Field D14 (bit 14) = 0
; Field D15 (bit 15) = 0
li r3,0x0000 ; PCDAT = 0x0000
sth r3,PCDAT(r4)
; Set the value of Port D Pin Assignment Register (PDPAR) to $0000.
; Field Reserved (bits 0-2) = 0
; Field DD3 (bit 3) = 0
; Field DD4 (bit 4) = 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -