📄 main.lss
字号:
100480: 6023 str r3, [r4, #0] 100482: e004 b 10048e <undelay+0x32> 100484: 1f3a sub r2, r7, #4 100486: 1f3b sub r3, r7, #4 100488: 681b ldr r3, [r3, #0] 10048a: 3b01 sub r3, #1 10048c: 6013 str r3, [r2, #0] 10048e: 1f3b sub r3, r7, #4 100490: 681b ldr r3, [r3, #0] 100492: 2b00 cmp r3, #0 100494: d1f6 bne 100484 <undelay+0x28>};
100496: 46bd mov sp, r7 100498: bc90 pop {r4, r7} 10049a: bc01 pop {r0} 10049c: 4700 bx r0 10049e: 0000 lsl r0, r0, #0 1004a0: 0b09 lsr r1, r1, #12 ...001004a4 <Delay_mS>:AT91PS_PIO l_pPio = AT91C_BASE_PIOA;
unsigned long data;
void Delay_mS (unsigned long a) { while (--a!=0); }
1004a4: b580 push {r7, lr} 1004a6: 466f mov r7, sp 1004a8: b081 sub sp, #4 1004aa: 1f3b sub r3, r7, #4 1004ac: 6018 str r0, [r3, #0] 1004ae: 1f3a sub r2, r7, #4 1004b0: 1f3b sub r3, r7, #4 1004b2: 681b ldr r3, [r3, #0] 1004b4: 3b01 sub r3, #1 1004b6: 6013 str r3, [r2, #0] 1004b8: 1f3b sub r3, r7, #4 1004ba: 681b ldr r3, [r3, #0] 1004bc: 2b00 cmp r3, #0 1004be: d1f6 bne 1004ae <Delay_mS+0xa> 1004c0: 46bd mov sp, r7 1004c2: bc80 pop {r7} 1004c4: bc01 pop {r0} 1004c6: 4700 bx r0001004c8 <SetPinsOnly>:
unsigned long codr = 0x0;
unsigned long sodr = 0x0;
unsigned long oer = 0x0;
unsigned long per = 0x0;
void SetPinsOnly(unsigned long pin) {
1004c8: b580 push {r7, lr} 1004ca: 466f mov r7, sp 1004cc: b081 sub sp, #4 1004ce: 1f3b sub r3, r7, #4 1004d0: 6018 str r0, [r3, #0] l_pPio->PIO_SODR = l_pPio->PIO_ODSR | pin;
1004d2: 4b06 ldr r3, [pc, #24] (1004ec <.text+0x4ec>) 1004d4: 6819 ldr r1, [r3, #0] 1004d6: 4b05 ldr r3, [pc, #20] (1004ec <.text+0x4ec>) 1004d8: 681b ldr r3, [r3, #0] 1004da: 6b9a ldr r2, [r3, #56] 1004dc: 1f3b sub r3, r7, #4 1004de: 681b ldr r3, [r3, #0] 1004e0: 4313 orr r3, r2 1004e2: 630b str r3, [r1, #48]}
1004e4: 46bd mov sp, r7 1004e6: bc80 pop {r7} 1004e8: bc01 pop {r0} 1004ea: 4700 bx r0 1004ec: 0000 lsl r0, r0, #0 1004ee: 0020 lsl r0, r4, #0001004f0 <ClearPinsOnly>:
void ClearPinsOnly(unsigned long pin) {
1004f0: b580 push {r7, lr} 1004f2: 466f mov r7, sp 1004f4: b081 sub sp, #4 1004f6: 1f3b sub r3, r7, #4 1004f8: 6018 str r0, [r3, #0] l_pPio->PIO_CODR = (~l_pPio->PIO_ODSR) | pin;
1004fa: 4b07 ldr r3, [pc, #28] (100518 <.text+0x518>) 1004fc: 6819 ldr r1, [r3, #0] 1004fe: 4b06 ldr r3, [pc, #24] (100518 <.text+0x518>) 100500: 681b ldr r3, [r3, #0] 100502: 6b9b ldr r3, [r3, #56] 100504: 43da mvn r2, r3 100506: 1f3b sub r3, r7, #4 100508: 681b ldr r3, [r3, #0] 10050a: 4313 orr r3, r2 10050c: 634b str r3, [r1, #52]}
10050e: 46bd mov sp, r7 100510: bc80 pop {r7} 100512: bc01 pop {r0} 100514: 4700 bx r0 100516: 0000 lsl r0, r0, #0 100518: 0000 lsl r0, r0, #0 10051a: 0020 lsl r0, r4, #00010051c <E_Pulse>:
void E_Pulse()
{
10051c: b580 push {r7, lr} 10051e: 466f mov r7, sp l_pPio->PIO_SODR = E; //set E to high
100520: 4b08 ldr r3, [pc, #32] (100544 <.text+0x544>) 100522: 681a ldr r2, [r3, #0] 100524: 2380 mov r3, #128 100526: 039b lsl r3, r3, #14 100528: 6313 str r3, [r2, #48] Delay_mS(10); //delay //it was 100
10052a: 200a mov r0, #10 10052c: ffbaf7ff bl 1004a4 <Delay_mS> l_pPio->PIO_CODR = E; //set E to low
100530: 4b04 ldr r3, [pc, #16] (100544 <.text+0x544>) 100532: 681a ldr r2, [r3, #0] 100534: 2380 mov r3, #128 100536: 039b lsl r3, r3, #14 100538: 6353 str r3, [r2, #52]}
10053a: 46bd mov sp, r7 10053c: bc80 pop {r7} 10053e: bc01 pop {r0} 100540: 4700 bx r0 100542: 0000 lsl r0, r0, #0 100544: 0000 lsl r0, r0, #0 100546: 0020 lsl r0, r4, #000100548 <LCDInit>:
void LCDInit()
{
100548: b580 push {r7, lr} 10054a: 466f mov r7, sp // First set D4, D5, D6, D7, RS, RW, E to output ports + BIT23 (light)
l_pPio->PIO_OER = (BIT16|BIT17|BIT18|BIT19|BIT20|E|BIT22|LCD_LIGHT);
10054c: 4b29 ldr r3, [pc, #164] (1005f4 <.text+0x5f4>) 10054e: 681a ldr r2, [r3, #0] 100550: 23ff mov r3, #255 100552: 041b lsl r3, r3, #16 100554: 6113 str r3, [r2, #16]
// Enable D4, D5, D6, D7, RS, RW, E ports + BIT23 (light)
l_pPio->PIO_PER = (BIT16|BIT17|BIT18|BIT19|BIT20|E|BIT22|LCD_LIGHT);
100556: 4b27 ldr r3, [pc, #156] (1005f4 <.text+0x5f4>) 100558: 681a ldr r2, [r3, #0] 10055a: 23ff mov r3, #255 10055c: 041b lsl r3, r3, #16 10055e: 6013 str r3, [r2, #0]
l_pPio->PIO_CODR = BIT20|E|BIT22; //clear RS, E, RW
100560: 4b24 ldr r3, [pc, #144] (1005f4 <.text+0x5f4>) 100562: 681a ldr r2, [r3, #0] 100564: 23e0 mov r3, #224 100566: 03db lsl r3, r3, #15 100568: 6353 str r3, [r2, #52] Delay_mS(1100000); //delay ~110ms
10056a: 4b23 ldr r3, [pc, #140] (1005f8 <.text+0x5f8>) 10056c: 1c18 mov r0, r3 (add r0, r3, #0) 10056e: ff99f7ff bl 1004a4 <Delay_mS>
l_pPio->PIO_SODR = BIT16|BIT17; //set D4 and D5 port to 1
100572: 4b20 ldr r3, [pc, #128] (1005f4 <.text+0x5f4>) 100574: 681a ldr r2, [r3, #0] 100576: 23c0 mov r3, #192 100578: 029b lsl r3, r3, #10 10057a: 6313 str r3, [r2, #48] E_Pulse(); //high->low to E port (pulse)
10057c: ffcef7ff bl 10051c <E_Pulse>
//Delay_mS(100000); //delay ~10ms
Delay_mS(50000); //delay ~5ms
100580: 4b1e ldr r3, [pc, #120] (1005fc <.text+0x5fc>) 100582: 1c18 mov r0, r3 (add r0, r3, #0) 100584: ff8ef7ff bl 1004a4 <Delay_mS>
l_pPio->PIO_SODR = BIT16|BIT17; //set D4 and D5 port to 1
100588: 4b1a ldr r3, [pc, #104] (1005f4 <.text+0x5f4>) 10058a: 681a ldr r2, [r3, #0] 10058c: 23c0 mov r3, #192 10058e: 029b lsl r3, r3, #10 100590: 6313 str r3, [r2, #48] E_Pulse(); //high->low to E port (pulse)
100592: ffc3f7ff bl 10051c <E_Pulse>
//Delay_mS(100000); //delay ~10ms
Delay_mS(50000); //delay ~5ms
100596: 4b19 ldr r3, [pc, #100] (1005fc <.text+0x5fc>) 100598: 1c18 mov r0, r3 (add r0, r3, #0) 10059a: ff83f7ff bl 1004a4 <Delay_mS>
l_pPio->PIO_SODR = BIT16|BIT17; //set D4 and D5 port to 1
10059e: 4b15 ldr r3, [pc, #84] (1005f4 <.text+0x5f4>) 1005a0: 681a ldr r2, [r3, #0] 1005a2: 23c0 mov r3, #192 1005a4: 029b lsl r3, r3, #10 1005a6: 6313 str r3, [r2, #48] E_Pulse(); //high->low to E port (pulse)
1005a8: ffb8f7ff bl 10051c <E_Pulse>
Delay_mS(100000); //delay ~10ms
1005ac: 4b14 ldr r3, [pc, #80] (100600 <.text+0x600>) 1005ae: 1c18 mov r0, r3 (add r0, r3, #0) 1005b0: ff78f7ff bl 1004a4 <Delay_mS>
l_pPio->PIO_CODR = BIT16; //set D4 port to 0
1005b4: 4b0f ldr r3, [pc, #60] (1005f4 <.text+0x5f4>) 1005b6: 681a ldr r2, [r3, #0] 1005b8: 2380 mov r3, #128 1005ba: 025b lsl r3, r3, #9 1005bc: 6353 str r3, [r2, #52] l_pPio->PIO_SODR = BIT17; //set D5 port to 1
1005be: 4b0d ldr r3, [pc, #52] (1005f4 <.text+0x5f4>) 1005c0: 681a ldr r2, [r3, #0] 1005c2: 2380 mov r3, #128 1005c4: 029b lsl r3, r3, #10 1005c6: 6313 str r3, [r2, #48] E_Pulse(); //high->low to E port (pulse)
1005c8: ffa8f7ff bl 10051c <E_Pulse>
//Delay_mS(100000); //delay ~10ms
Delay_mS(50000); //delay ~5ms
1005cc: 4b0b ldr r3, [pc, #44] (1005fc <.text+0x5fc>) 1005ce: 1c18 mov r0, r3 (add r0, r3, #0) 1005d0: ff68f7ff bl 1004a4 <Delay_mS>
LCDSendCommand(DISP_ON); //LCD on
1005d4: 200c mov r0, #12 1005d6: f815f000 bl 100604 <LCDSendCommand> LCDSendCommand(CLR_DISP); //LCD clear
1005da: 2001 mov r0, #1 1005dc: f812f000 bl 100604 <LCDSendCommand> LCDSendCommand(DD_RAM_ADDR); //LCD set first row
1005e0: 2080 mov r0, #128 1005e2: f80ff000 bl 100604 <LCDSendCommand> LCDSendCommand(CUR_ON_UNDER);
1005e6: 200e mov r0, #14 1005e8: f80cf000 bl 100604 <LCDSendCommand>}
1005ec: 46bd mov sp, r7 1005ee: bc80 pop {r7} 1005f0: bc01 pop {r0} 1005f2: 4700 bx r0 1005f4: 0000 lsl r0, r0, #0 1005f6: 0020 lsl r0, r4, #0 1005f8: c8e0 ldmia r0!,{r5, r6, r7} 1005fa: 0010 lsl r0, r2, #0 1005fc: c350 stmia r3!,{r4, r6} 1005fe: 0000 lsl r0, r0, #0 100600: 86a0 strh r0, [r4, #52] 100602: 0001 lsl r1, r0, #000100604 <LCDSendCommand>:
void LCDSendCommand(unsigned long a)
{
100604: b580 push {r7, lr} 100606: 466f mov r7, sp 100608: b081 sub sp, #4 10060a: 1f3b sub r3, r7, #4 10060c: 6018 str r0, [r3, #0]
l_pPio->PIO_CODR = BIT22; //set RW port to 0
10060e: 4b2c ldr r3, [pc, #176] (1006c0 <.text+0x6c0>) 100610: 681a ldr r2, [r3, #0] 100612: 2380 mov r3, #128 100614: 03db lsl r3, r3, #15 100616: 6353 str r3, [r2, #52]
Delay_mS(20000); //delay for LCD char ~2ms
100618: 4b2a ldr r3, [pc, #168] (1006c4 <.text+0x6c4>) 10061a: 1c18 mov r0, r3 (add r0, r3, #0) 10061c: ff42f7ff bl 1004a4 <Delay_mS>
data = 0x0; //clear data
100620: 4a29 ldr r2, [pc, #164] (1006c8 <.text+0x6c8>) 100622: 2300 mov r3, #0 100624: 6013 str r3, [r2, #0]
data = 0xffffff0f | a; //get high 4 bits
100626: 1f3b sub r3, r7, #4 100628: 681a ldr r2, [r3, #0] 10062a: 23f1 mov r3, #241 10062c: 425b neg r3, r3 10062e: 431a orr r2, r3 100630: 4b25 ldr r3, [pc, #148] (1006c8 <.text+0x6c8>) 100632: 601a str r2, [r3, #0]
l_pPio->PIO_CODR = BIT16|BIT17|BIT18|BIT19; //clear D4-D7
100634: 4b22 ldr r3, [pc, #136] (1006c0 <.text+0x6c0>) 100636: 681a ldr r2, [r3, #0] 100638: 23f0 mov r3, #240 10063a: 031b lsl r3, r3, #12 10063c: 6353 str r3, [r2, #52]
data = data << 12; //shift data
10063e: 4b22 ldr r3, [pc, #136] (1006c8 <.text+0x6c8>) 100640: 681b ldr r3, [r3, #0] 100642: 031a lsl r2, r3, #12 100644: 4b20 ldr r3, [pc, #128] (1006c8 <.text+0x6c8>) 100646: 601a str r2, [r3, #0]
l_pPio->PIO_SODR = 0x000f0000 & data; //set data
100648: 4b1d ldr r3, [pc, #116] (1006c0 <.text+0x6c0>) 10064a: 6819 ldr r1, [r3, #0] 10064c: 4b1e ldr r3, [pc, #120] (1006c8 <.text+0x6c8>) 10064e: 681a ldr r2, [r3, #0] 100650: 23f0 mov r3, #240 100652: 031b lsl r3, r3, #12 100654: 4013 and r3, r2 100656: 630b str r3, [r1, #48]
l_pPio->PIO_CODR = BIT20; //set RS port to 0 -> display set to comand mode
100658: 4b19 ldr r3, [pc, #100] (1006c0 <.text+0x6c0>) 10065a: 681a ldr r2, [r3, #0] 10065c: 2380 mov r3, #128 10065e: 035b lsl r3, r3, #13 100660: 6353 str r3, [r2, #52]
E_Pulse(); //pulse to set d4-d7 bits
100662: ff5bf7ff bl 10051c <E_Pulse>
data = 0x0; //clear data
100666: 4a18 ldr r2, [pc, #96] (1006c8 <.text+0x6c8>) 100668: 2300 mov r3, #0 10066a: 6013 str r3, [r2, #0]
a = a<<4; //shift to get low 4 bits
10066c: 1f3a sub r2, r7, #4 10066e: 1f3b sub r3, r7, #4 100670: 681b ldr r3, [r3, #0] 100672: 011b lsl r3, r3, #4 100674: 6013 str r3, [r2, #0]
data = 0xffffff0f | a; //get low 4 bits
100676: 1f3b sub r3, r7, #4 100678: 681a ldr r2, [r3, #0] 10067a: 23f1 mov r3, #241 10067c: 425b neg r3, r3 10067e: 431a orr r2, r3 100680: 4b11 ldr r3, [pc, #68] (1006c8 <.text+0x6c8>) 100682: 601a str r2, [r3, #0]
l_pPio->PIO_CODR = BIT16|BIT17|BIT18|BIT19; //clear D4-D7
100684: 4b0e ldr r3, [pc, #56] (1006c0 <.text+0x6c0>) 100686: 681a ldr r2, [r3, #0] 100688: 23f0 mov r3, #240 10068a: 031b lsl r3, r3, #12 10068c: 6353 str r3, [r2, #52]
data = data << 12; //shift data
10068e: 4b0e ldr r3, [pc, #56] (1006c8 <.text+0x6c8>) 100690: 681b ldr r3, [r3, #0] 100692: 031a lsl r2, r3, #12 100694: 4b0c ldr r3, [pc, #48] (1006c8 <.text+0x6c8>) 100696: 601a str r2, [r3, #0]
l_pPio->PIO_SODR = 0x000f0000 & data; //set D4-D7
100698: 4b09 ldr r3, [pc, #36] (1006c0 <.text+0x6c0>) 10069a: 6819 ldr r1, [r3, #0] 10069c: 4b0a ldr r3, [pc, #40] (1006c8 <.text+0x6c8>) 10069e: 681a ldr r2, [r3, #0] 1006a0: 23f0 mov r3, #240 1006a2: 031b lsl r3, r3, #12 1006a4: 4013 and r3, r2 1006a6: 630b str r3, [r1, #48]
l_pPio->PIO_CODR = BIT20; //set RS port to 0 -> display set to comand mode
1006a8: 4b05 ldr r3, [pc, #20] (1006c0 <.text+0x6c0>) 1006aa: 681a ldr r2, [r3, #0] 1006ac: 2380 mov r3, #128 1006ae: 035b lsl r3, r3, #13 1006b0: 6353 str r3, [r2, #52]
E_Pulse(); //pulse to set d4-d7 bits
1006b2: ff33f7ff bl 10051c <E_Pulse>
}
1006b6: 46bd mov sp, r7 1006b8: bc80 pop {r7} 1006ba: bc01 pop {r0} 1006bc: 4700 bx r0 1006be: 0000 lsl r0, r0, #0 1006c0: 0000 lsl r0, r0, #0 1006c2: 0020 lsl r0, r4, #0 1006c4: 4e20 ldr r6, [pc, #128] (100748 <LCDSendChar+0x7c>) 1006c6: 0000 lsl r0, r0, #0 1006c8: 0014 lsl r4, r2, #0 1006ca: 0020 lsl r0, r4, #0001006cc <LCDSendChar>:
void LCDSendChar(unsigned long a)
{
1006cc: b580 push {r7, lr} 1006ce: 466f mov r7, sp 1006d0: b081 sub sp, #4 1006d2: 1f3b sub r3, r7, #4 1006d4: 6018 str r0, [r3, #0]
//腻豚弪 忸珈铈眍
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -