📄 ppp.s
字号:
.module ppp.c
.area lit(rom, con, rel)
_PPP_Rom_Username::
.byte 'a,'v,'r,0
.dbfile C:\AVR\AT-Modem__PPP__UDP__IC\ppp.c
.dbsym e PPP_Rom_Username _PPP_Rom_Username A[4:4]kc
_PPP_Rom_Password::
.byte 49,50,51,52,0
.dbsym e PPP_Rom_Password _PPP_Rom_Password A[5:5]kc
_PPP_ModeStr::
.byte 10,'P,'P,'P,32,'M,'o,'d,'e,58,32,'W,'i,'n,'d,'o
.byte 'w,'s,10,0
.dbsym e PPP_ModeStr _PPP_ModeStr A[20:20]kc
_DialInit1::
.byte 0
.dbsym e DialInit1 _DialInit1 A[1:1]kc
_DialInit2::
.byte 0
.dbsym e DialInit2 _DialInit2 A[1:1]kc
_DialStr::
.byte 0
.dbsym e DialStr _DialStr A[1:1]kc
_PPP_WindowsStr::
.byte 'C,'L,'I,'E,'N,'T,'C,'L,'I,'E,'N,'T,0
.dbsym e PPP_WindowsStr _PPP_WindowsStr A[13:13]kc
_OurIP::
.byte 192,168
.byte 254,9
.dbsym e OurIP _OurIP A[4:4]kc
_Dns1IP::
.byte 0,0
.byte 0,0
.dbsym e Dns1IP _Dns1IP A[4:4]kc
_Dns2IP::
.byte 0,0
.byte 0,0
.dbsym e Dns2IP _Dns2IP A[4:4]kc
_ppp_str1::
.byte 32,32,32,32,'a,'c,'c,'e,'p,'t,'e,'d,58,0
.dbsym e ppp_str1 _ppp_str1 A[14:14]kc
_ppp_str2::
.byte 32,32,32,32,'n,45,'r,'e,'j,'e,'c,'t,'e,'d,58,0
.dbsym e ppp_str2 _ppp_str2 A[16:16]kc
_ppp_str3::
.byte 32,32,32,32,'r,'e,'j,'e,'c,'t,'e,'d,58,0
.dbsym e ppp_str3 _ppp_str3 A[14:14]kc
_LoopBackStr::
.byte 'l,'o,'o,'p,45,'b,'a,'c,'k,32,'m,'o,'d,'e,32,45
.byte 32,'d,'i,'s,'c,'o,'n,'n,'e,'c,'t,'i,'n,'g,10,0
.dbsym e LoopBackStr _LoopBackStr A[32:32]kc
_Str2::
.byte 'T,'X,58,32,'P,'P,'P,32,'I,'P,32,'R,'E,'P,'L,'Y
.byte 10,0
.dbsym e Str2 _Str2 A[18:18]kc
_UnknownProtocolStr::
.byte 32,32,32,32,'r,'e,'j,'e,'c,'t,'e,'d,32,'u,'n,'k
.byte 'n,'o,'w,'n,32,'p,'r,'o,'t,10,0
.dbsym e UnknownProtocolStr _UnknownProtocolStr A[27:27]kc
_PPPStageStr1::
.byte 10,42,42,42,32,'P,'P,'P,32,'S,'t,'a,'g,'e,58,32
.byte 0
.dbsym e PPPStageStr1 _PPPStageStr1 A[17:17]kc
_PPPStageStr2::
.byte 'N,'o,'n,'e,10,0
.dbsym e PPPStageStr2 _PPPStageStr2 A[6:6]kc
_PPPStageStr3::
.byte 'S,'t,'a,'r,'t,'i,'n,'g,10,0
.dbsym e PPPStageStr3 _PPPStageStr3 A[10:10]kc
_PPPStageStr4::
.byte 'L,'C,'P,32,'O,'p,'t,'i,'o,'n,'s,10,0
.dbsym e PPPStageStr4 _PPPStageStr4 A[13:13]kc
_PPPStageStr5::
.byte 'A,'u,'t,'h,39,'i,'n,'g,10,0
.dbsym e PPPStageStr5 _PPPStageStr5 A[10:10]kc
_PPPStageStr6::
.byte 'S,'o,'r,'t,'i,'n,'g,32,'I,'P,39,'s,10,0
.dbsym e PPPStageStr6 _PPPStageStr6 A[14:14]kc
_PPPStageStr7::
.byte 'I,'P,10,0
.dbsym e PPPStageStr7 _PPPStageStr7 A[4:4]kc
_PPPStageStr8::
.byte 'D,'i,'s,'c,'o,'n,'n,'e,'c,'t,'i,'n,'g,10,0
.dbsym e PPPStageStr8 _PPPStageStr8 A[15:15]kc
_PPPStageStr9::
.byte 'U,'n,'k,'n,'o,'w,'n,10,0
.dbsym e PPPStageStr9 _PPPStageStr9 A[9:9]kc
_CodeStr::
.byte 32,32,32,32,'C,'o,'d,'e,58,0
.dbsym e CodeStr _CodeStr A[10:10]kc
_CREQStr::
.byte 'C,'R,'E,'Q,0
.dbsym e CREQStr _CREQStr A[5:5]kc
_CACKStr::
.byte 'C,'A,'C,'K,0
.dbsym e CACKStr _CACKStr A[5:5]kc
_CREJStr::
.byte 'C,'R,'E,'J,0
.dbsym e CREJStr _CREJStr A[5:5]kc
_CNAKStr::
.byte 'C,'N,'A,'K,0
.dbsym e CNAKStr _CNAKStr A[5:5]kc
_TREQStr::
.byte 'T,'R,'E,'Q,0
.dbsym e TREQStr _TREQStr A[5:5]kc
_TACKStr::
.byte 'T,'A,'C,'K,0
.dbsym e TACKStr _TACKStr A[5:5]kc
_CodeREJStr::
.byte 'C,'o,'d,'e,'R,'E,'J,0
.dbsym e CodeREJStr _CodeREJStr A[8:8]kc
_PREJStr::
.byte 'P,'R,'E,'J,0
.dbsym e PREJStr _PREJStr A[5:5]kc
_EREQStr::
.byte 'E,'R,'E,'Q,0
.dbsym e EREQStr _EREQStr A[5:5]kc
_ERPYStr::
.byte 'E,'R,'P,'Y,0
.dbsym e ERPYStr _ERPYStr A[5:5]kc
_UnknownCodeStr::
.byte 'F,48,48,'k,'K,'n,'o,'w,'s,0
.dbsym e UnknownCodeStr _UnknownCodeStr A[10:10]kc
_LCPStr::
.byte 'P,'P,'P,95,'L,'C,'P,0
.dbsym e LCPStr _LCPStr A[8:8]kc
_IPCPStr::
.byte 'P,'P,'P,95,'I,'P,'C,'P,0
.dbsym e IPCPStr _IPCPStr A[9:9]kc
_PAPStr::
.byte 'P,'P,'P,95,'P,'A,'P,0
.dbsym e PAPStr _PAPStr A[8:8]kc
_IPStr::
.byte 'P,'P,'P,95,'I,'P,0
.dbsym e IPStr _IPStr A[7:7]kc
_AuthAcceptedStr::
.byte 10,32,32,'T,'h,'e,'y,32,'a,'c,'c,'e,'p,'t,'e,'d
.byte 32,'o,'u,'r,32,'A,'u,'t,'h,39,10,0
.dbsym e AuthAcceptedStr _AuthAcceptedStr A[28:28]kc
_AuthNoNeedStr::
.byte 10,32,32,'N,'o,32,'A,'u,'t,'h,39,32,'r,'e,'q,'u
.byte 'i,'r,'e,'d,32,'i,'t,32,'s,'e,'e,'m,'s,10,0
.dbsym e AuthNoNeedStr _AuthNoNeedStr A[31:31]kc
_AuthRejectedStr::
.byte 10,32,32,'T,'h,'e,'y,32,'r,'e,'j,'e,'c,'t,'e,'d
.byte 32,'o,'u,'r,32,'A,'u,'t,'h,39,10,0
.dbsym e AuthRejectedStr _AuthRejectedStr A[28:28]kc
_WeAreInStr::
.byte 10,32,42,42,42,32,'W,'E,39,'R,'E,32,'I,'N,32,42
.byte 42,42,10,0
.dbsym e WeAreInStr _WeAreInStr A[20:20]kc
_UnknownCodeStr2::
.byte 32,32,32,32,'r,'e,'j,'e,'c,'t,'e,'d,32,'u,'n,'k
.byte 'n,'o,'w,'n,32,'c,'o,'d,'e,10,0
.dbsym e UnknownCodeStr2 _UnknownCodeStr2 A[27:27]kc
_PPPRetryFailStr::
.byte 42,42,42,32,'P,'P,'P,32,'r,'e,'t,'r,'y,32,'f,'a
.byte 'i,'l,'u,'r,'e,10,0
.dbsym e PPPRetryFailStr _PPPRetryFailStr A[23:23]kc
_TxBytesStr::
.byte 'T,'x,45,'B,'y,'t,'e,'s,58,0
.dbsym e TxBytesStr _TxBytesStr A[10:10]kc
_RxBytesStr::
.byte 32,32,'R,'x,45,'B,'y,'t,'e,'s,58,0
.dbsym e RxBytesStr _RxBytesStr A[12:12]kc
_OurIPStr::
.byte 32,32,'O,'u,'r,32,'I,'P,58,32,0
.dbsym e OurIPStr _OurIPStr A[11:11]kc
_TheirIPStr::
.byte 10,'T,'h,'e,'i,'r,32,'I,'P,58,32,0
.dbsym e TheirIPStr _TheirIPStr A[12:12]kc
_DNS1IPStr::
.byte 10,'D,'N,'S,45,49,32,'I,'P,58,32,0
.dbsym e DNS1IPStr _DNS1IPStr A[12:12]kc
_DNS2IPStr::
.byte 10,'D,'N,'S,45,50,32,'I,'P,58,32,0
.dbsym e DNS2IPStr _DNS2IPStr A[12:12]kc
.area data(ram, con, rel)
.dbfile C:\AVR\AT-Modem__PPP__UDP__IC\ppp.c
_PPPHeader::
.blkb 2
.area idata
.word 0
.area data(ram, con, rel)
.dbfile C:\AVR\AT-Modem__PPP__UDP__IC\ppp.c
.dbstruct 0 4 TPPPHeader1
.dbfield 0 AddressField c
.dbfield 1 ControlField c
.dbfield 2 Protocol s
.dbend
.dbsym e PPPHeader _PPPHeader pS[TPPPHeader1]
_CodeHeader::
.blkb 2
.area idata
.word 0
.area data(ram, con, rel)
.dbfile C:\AVR\AT-Modem__PPP__UDP__IC\ppp.c
.dbstruct 0 4 TCodeHeader
.dbfield 0 Code c
.dbfield 1 ID c
.dbfield 2 Len s
.dbend
.dbsym e CodeHeader _CodeHeader pS[TCodeHeader]
.area text(rom, con, rel)
.dbfile C:\AVR\AT-Modem__PPP__UDP__IC\ppp.c
.dbfunc e PPP_DisplayIP _PPP_DisplayIP fc
.even
_PPP_DisplayIP::
sbiw R28,2
.dbline -1
.dbline 167
;
; // this unit assumes the cpu is big endian (MS-Byte 1st) - for now
; //
; // we don't bother with Address/Control field compression - saving 2 bytes isn't worth the extra code
; // we don't bother with Protocol field compression - saving 1 byte definately isn't worth the extra code
;
; /*
; * Copyright (C) 2003-2004 by Clive Moss All rights reserved.
; *
; * Help & Contributions from D.J.Armstrong
;
; * Redistribution and use in source and binary forms, with or without
; * modification, are permitted provided that the following conditions
; * are met:
; *
; * 1. Redistributions of source code must retain the above copyright
; * notice, this list of conditions and the following disclaimer.
; * 2. Redistributions in binary form must reproduce the above copyright
; * notice, this list of conditions and the following disclaimer in the
; * documentation and/or other materials provided with the distribution.
; * 3. Neither the name of the copyright holders nor the names of
; * contributors may be used to endorse or promote products derived
; * from this software without specific prior written permission.
; *
; * THIS SOFTWARE IS PROVIDED BY CLIVE MOSS 'AS IS' AND ANY EXPRESS OR
; * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
; * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
; * ARE DISCLAIMED.
; * IN NO EVENT SHALL CLIVE MOSS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
; * INDIRECT, INCIDENTAL,SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
; * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
; * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
; * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
; * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
; * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
; * SUCH DAMAGE.
; */
;
; //#ifdef CPU_eZ8
; // #pragma stkck // enable stack checking
; //#endif
;
; #include <string.h>
; #include <stdlib.h>
; #include <stdio.h>
;
; #include "common.h"
; #include "at.h"
; #include "fcs.h"
; #include "ppp.h"
; #include "ip.h"
;
; #ifdef IncludeTCP
; #include "tcp.h"
; #endif
;
; #ifdef WindowsPPP
; flash char PPP_Rom_Username[] = "avr";
; flash char PPP_Rom_Password[] = "1234";
; flash char PPP_ModeStr[] = "\nPPP Mode: Windows\n";
; flash char DialInit1[] = "";
; flash char DialInit2[] = "";
; flash char DialStr[] = "";
; flash char PPP_WindowsStr[] = "CLIENTCLIENT";
; flash char OurIP[4] = {192, 168, 254, 9}; // fixed ip - change this to '0, 0, 0, 0' if you want the ppp server to assign you an ip - that goes for ALL the ip's listed here
; flash char Dns1IP[4] = {0, 0, 0, 0}; // dynamic ip
; flash char Dns2IP[4] = {0, 0, 0, 0}; // dynamic ip
; #endif
;
; #ifdef ATModemPPP
; flash char PPP_Rom_Username[] = "";
; flash char PPP_Rom_Password[] = "";
; flash char PPP_ModeStr[] = "\nPPP Mode: AT Modem\n";
; flash char DialInit1[] = "ATZ\n";
; flash char DialInit2[] = "ATV1\n";
; flash char DialInit3[] = "ATE0\n";
; flash char DialStr[] = "ATD179\n";
; flash char OurIP[4] = {0, 0, 0, 0}; // dynamic ip
; flash char Dns1IP[4] = {0, 0, 0, 0}; // dynamic ip
; flash char Dns2IP[4] = {0, 0, 0, 0}; // dynamic ip
; #endif
;
; #ifdef GPRS_Orange
; flash char PPP_Rom_Username[] = "";
; flash char PPP_Rom_Password[] = "";
; flash char PPP_ModeStr[] = "\nPPP Mode: GPRS Orange\n";
; flash char DialInit1[] = "ATV1\n";
; flash char DialInit2[] = "ATE0\n";
; flash char DialInit3[] = "AT+CGDCONT=1,\"IP\",\"orangeinternet\"\n"; // oranges Access Point Name
; //flash char DialStr[] = "ATD*99#\n";
; flash char DialStr[] = "ATD*99***1#\n";
; flash char OurIP[4] = {0, 0, 0, 0}; // dynamic ip
; flash char Dns1IP[4] = {193, 35, 131, 194}; // fixed ip
; flash char Dns2IP[4] = {193, 35, 131, 195}; // fixed ip
; #endif
;
; #ifdef GPRS_VodaPhone
; flash char PPP_Rom_Username[] = "web";
; flash char PPP_Rom_Password[] = "web";
; flash char PPP_ModeStr[] = "\nPPP Mode: GPRS VodaPhone\n";
; flash char DialInit1[] = "ATV1\n";
; flash char DialInit2[] = "ATE0\n";
; flash char DialInit3[] = "AT+CGDCONT=1,\"IP\",\"pp.vodafone.co.uk\"\n"; // vodaphones Access Point Name
; //flash char DialStr[] = "ATD*99#\n";
; flash char DialStr[] = "ATD*99***1#\n";
; flash char OurIP[4] = {0, 0, 0, 0}; // dynamic ip
; flash char Dns1IP[4] = {0, 0, 0, 0}; // dynamic ip
; flash char Dns2IP[4] = {0, 0, 0, 0}; // dynamic ip
; #endif
;
; #ifdef Debug
; flash char ppp_str1[] = " accepted:";
; flash char ppp_str2[] = " n-rejected:";
; flash char ppp_str3[] = " rejected:";
;
; flash char LoopBackStr[] = "loop-back mode - disconnecting\n";
; flash char Str2[] = "TX: PPP IP REPLY\n";
; flash char UnknownProtocolStr[] = " rejected unknown prot\n";
; flash char PPPStageStr1[] = "\n*** PPP Stage: ";
; flash char PPPStageStr2[] = "None\n";
; flash char PPPStageStr3[] = "Starting\n";
; flash char PPPStageStr4[] = "LCP Options\n";
; flash char PPPStageStr5[] = "Auth'ing\n";
; flash char PPPStageStr6[] = "Sorting IP's\n";
; flash char PPPStageStr7[] = "IP\n";
; flash char PPPStageStr8[] = "Disconnecting\n";
; flash char PPPStageStr9[] = "Unknown\n";
; flash char CodeStr[] = " Code:";
; flash char CREQStr[] = "CREQ";
; flash char CACKStr[] = "CACK";
; flash char CREJStr[] = "CREJ";
; flash char CNAKStr[] = "CNAK";
; flash char TREQStr[] = "TREQ";
; flash char TACKStr[] = "TACK";
; flash char CodeREJStr[] = "CodeREJ";
; flash char PREJStr[] = "PREJ";
; flash char EREQStr[] = "EREQ";
; flash char ERPYStr[] = "ERPY";
; flash char UnknownCodeStr[] = "F00kKnows";
; flash char LCPStr[] = "PPP_LCP";
; flash char IPCPStr[] = "PPP_IPCP";
; flash char PAPStr[] = "PPP_PAP";
; flash char IPStr[] = "PPP_IP";
; flash char AuthAcceptedStr[] = "\n They accepted our Auth'\n";
; flash char AuthNoNeedStr[] = "\n No Auth' required it seems\n";
; flash char AuthRejectedStr[] = "\n They rejected our Auth'\n";
; flash char WeAreInStr[] = "\n *** WE'RE IN ***\n";
; flash char UnknownCodeStr2[] = " rejected unknown code\n";
; flash char PPPRetryFailStr[] = "*** PPP retry failure\n";
; flash char TxBytesStr[] = "Tx-Bytes:";
; flash char RxBytesStr[] = " Rx-Bytes:";
; #endif
;
; flash char OurIPStr[] = " Our IP: ";
; flash char TheirIPStr[] = "\nTheir IP: ";
; flash char DNS1IPStr[] = "\nDNS-1 IP: ";
; flash char DNS2IPStr[] = "\nDNS-2 IP: ";
;
; T_PPP PPP; // PPP link details
;
; T_PPP_Header1 *PPPHeader = NULL;
; T_CodeHeader *CodeHeader = NULL;
;
; //****************************************************************************
;
; bool PPP_DisplayIP(void)
; { // display our IP's
.dbline 168
; if (!SendConsoleRStr(OurIPStr)) return false;
ldi R16,<_OurIPStr
ldi R17,>_OurIPStr
xcall _SendConsoleRStr
tst R16
brne L2
.dbline 168
clr R16
xjmp L1
L2:
.dbline 169
; IP_Str((char*)ScratchPad, PPP.OUR_IP.ip32);
lds R4,_PPP+13+2
lds R5,_PPP+13+2+1
lds R2,_PPP+13
lds R3,_PPP+13+1
std y+0,R4
std y+1,R5
movw R18,R2
ldi R16,<_ScratchPad
ldi R17,>_ScratchPad
xcall _IP_Str
.dbline 170
; if (!SendConsoleStr((char*)ScratchPad)) return false;
ldi R16,<_ScratchPad
ldi R17,>_ScratchPad
xcall _SendConsoleStr
tst R16
brne L5
.dbline 170
clr R16
xjmp L1
L5:
.dbline 172
;
; if (!SendConsoleRStr(TheirIPStr)) return false;
ldi R16,<_TheirIPStr
ldi R17,>_TheirIPStr
xcall _SendConsoleRStr
tst R16
brne L7
.dbline 172
clr R16
xjmp L1
L7:
.dbline 173
; IP_Str((char*)ScratchPad, PPP.THEIR_IP.ip32);
lds R4,_PPP+17+2
lds R5,_PPP+17+2+1
lds R2,_PPP+17
lds R3,_PPP+17+1
std y+0,R4
std y+1,R5
movw R18,R2
ldi R16,<_ScratchPad
ldi R17,>_ScratchPad
xcall _IP_Str
.dbline 174
; if (!SendConsoleStr((char*)ScratchPad)) return false;
ldi R16,<_ScratchPad
ldi R17,>_ScratchPad
xcall _SendConsoleStr
tst R16
brne L10
.dbline 174
clr R16
xjmp L1
L10:
.dbline 176
;
; if (!SendConsoleRStr(DNS1IPStr)) return false;
ldi R16,<_DNS1IPStr
ldi R17,>_DNS1IPStr
xcall _SendConsoleRStr
tst R16
brne L12
.dbline 176
clr R16
xjmp L1
L12:
.dbline 177
; IP_Str((char*)ScratchPad, PPP.DNS1_IP.ip32);
lds R4,_PPP+21+2
lds R5,_PPP+21+2+1
lds R2,_PPP+21
lds R3,_PPP+21+1
std y+0,R4
std y+1,R5
movw R18,R2
ldi R16,<_ScratchPad
ldi R17,>_ScratchPad
xcall _IP_Str
.dbline 178
; if (!SendConsoleStr((char*)ScratchPad)) return false;
ldi R16,<_ScratchPad
ldi R17,>_ScratchPad
xcall _SendConsoleStr
tst R16
brne L15
.dbline 178
clr R16
xjmp L1
L15:
.dbline 180
;
; if (!SendConsoleRStr(DNS2IPStr)) return false;
ldi R16,<_DNS2IPStr
ldi R17,>_DNS2IPStr
xcall _SendConsoleRStr
tst R16
brne L17
.dbline 180
clr R16
xjmp L1
L17:
.dbline 181
; IP_Str((char*)ScratchPad, PPP.DNS2_IP.ip32);
lds R4,_PPP+25+2
lds R5,_PPP+25+2+1
lds R2,_PPP+25
lds R3,_PPP+25+1
std y+0,R4
std y+1,R5
movw R18,R2
ldi R16,<_ScratchPad
ldi R17,>_ScratchPad
xcall _IP_Str
.dbline 182
; if (!SendConsoleStr((char*)ScratchPad)) return false;
ldi R16,<_ScratchPad
ldi R17,>_ScratchPad
xcall _SendConsoleStr
tst R16
brne L20
.dbline 182
clr R16
xjmp L1
L20:
.dbline 184
;
; if (!SendConsoleByte('\r')) return false;
ldi R16,13
xcall _SendConsoleByte
tst R16
brne L22
.dbline 184
clr R16
xjmp L1
L22:
.dbline 185
; return SendConsoleByte('\n');
ldi R16,10
xcall _SendConsoleByte
.dbline -2
L1:
adiw R28,2
.dbline 0 ; func end
ret
.dbend
.dbfunc e PPP_WeAcceptedStr _PPP_WeAcceptedStr fc
; type -> R20
.even
_PPP_WeAcceptedStr::
xcall push_gset1
mov R20,R16
sbiw R28,2
.dbline -1
.dbline 191
; }
;
; #ifdef Debug
;
; bool PPP_WeAcceptedStr(u8 type)
; {
.dbline 192
; if (!SendDebugRStr(ppp_str1)) return false;
ldi R16,<_ppp_str1
ldi R17,>_ppp_str1
xcall _SendDebugRStr
tst R16
brne L25
.dbline 192
clr R16
xjmp L24
L25:
.dbline 193
; sprintf((char*)ScratchPad, "%u\n", type);
mov R2,R20
clr R3
std y+1,R3
std y+0,R2
ldi R18,<L27
ldi R19,>L27
ldi R16,<_ScratchPad
ldi R17,>_ScratchPad
xcall _sprintf
.dbline 194
; return SendDebugStr((char*)ScratchPad);
ldi R16,<_ScratchPad
ldi R17,>_ScratchPad
xcall _SendDebugStr
.dbline -2
L24:
adiw R28,2
xcall pop_gset1
.dbline 0 ; func end
ret
.dbsym r type 20 c
.dbend
.dbfunc e PPP_WeNRejectedStr _PPP_WeNRejectedStr fc
; type -> R20
.even
_PPP_WeNRejectedStr::
xcall push_gset1
mov R20,R16
sbiw R28,2
.dbline -1
.dbline 198
; }
;
; bool PPP_WeNRejectedStr(u8 type)
; {
.dbline 199
; if (!SendDebugRStr(ppp_str2)) return false;
ldi R16,<_ppp_str2
ldi R17,>_ppp_str2
xcall _SendDebugRStr
tst R16
brne L29
.dbline 199
clr R16
xjmp L28
L29:
.dbline 200
; sprintf((char*)ScratchPad, "%u\n", type);
mov R2,R20
clr R3
std y+1,R3
std y+0,R2
ldi R18,<L27
ldi R19,>L27
ldi R16,<_ScratchPad
ldi R17,>_ScratchPad
xcall _sprintf
.dbline 201
; return SendDebugStr((char*)ScratchPad);
ldi R16,<_ScratchPad
ldi R17,>_ScratchPad
xcall _SendDebugStr
.dbline -2
L28:
adiw R28,2
xcall pop_gset1
.dbline 0 ; func end
ret
.dbsym r type 20 c
.dbend
.dbfunc e PPP_WeRejectedStr _PPP_WeRejectedStr fc
; type -> R20
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -