RAM:F860 ; RAM:F860 ; +-------------------------------------------------------------------------+ RAM:F860 ; | This file has been generated by The Interactive Disassembler (IDA) | RAM:F860 ; | Copyright (c) 2015 Hex-Rays, | RAM:F860 ; | License info: 48-B21B-71B4-E8 | RAM:F860 ; | Pierre Vandevenne | RAM:F860 ; +-------------------------------------------------------------------------+ RAM:F860 ; RAM:F860 ; Input MD5 : D03C8D645024D2F9AE5831D753B85438 RAM:F860 ; Input CRC32 : D2CE5D9E RAM:F860 RAM:F860 ; File Name : C:\Users\admin\Desktop\LibreData\temperature-experiment\15minsin.hex RAM:F860 ; Format : Binary file RAM:F860 ; Base Address: 0000h Range: F860h - 10000h Loaded length: 07A0h RAM:F860 RAM:F860 RAM:F860 ; =========================================================================== RAM:F860 RAM:F860 ; Segment type: Regular RAM:F860 crc .short 7598h RAM:F862 .byte 0F8h ; ° RAM:F863 .byte 10h RAM:F864 status .byte 3 ; DATA XREF: sub_FC08+E r RAM:F864 ; sub_FC08+14 w ... RAM:F865 .byte 0 RAM:F866 .byte 0 RAM:F867 .byte 0 RAM:F868 .byte 0 RAM:F869 .byte 0 RAM:F86A .byte 0 RAM:F86B .byte 0 RAM:F86C .byte 0 RAM:F86D .byte 0 RAM:F86E .byte 0 RAM:F86F .byte 0 RAM:F870 .byte 0 RAM:F871 .byte 0 RAM:F872 .byte 0 RAM:F873 .byte 0 RAM:F874 .byte 0 RAM:F875 .byte 0 RAM:F876 .byte 0 RAM:F877 .byte 0 RAM:F878 .short 0A400h RAM:F87A sloopcounter .byte 8 RAM:F87B hloopcounter .byte 1Bh RAM:F87C stable svalue <3Fh, 0FEC0h, 823Fh> RAM:F882 svalue <3Eh, 0FEC0h, 823Fh> RAM:F888 svalue <41h, 0FEC0h, 827Fh> RAM:F88E svalue <41h, 0FEC0h, 823Fh> RAM:F894 svalue <44h, 0FEC0h, 823Fh> RAM:F894 svalue <44h, 0FEC0h, 823Fh> RAM:F894 svalue <45h, 0FEC0h, 823Fh> RAM:F894 svalue <45h, 0FEC0h, 823Fh> RAM:F8AC svalue <1Bh, 0FEC8h, 823Fh> RAM:F8AC svalue <31h, 0FEC0h, 827Fh> RAM:F8AC svalue <35h, 0FEC0h, 82BFh> RAM:F8AC svalue <37h, 0FEC0h, 827Fh> RAM:F8C4 svalue <39h, 0FEC0h, 823Fh> RAM:F8C4 svalue <3Ch, 0FEC0h, 827Fh> RAM:F8C4 svalue <3Eh, 0FEC0h, 827Fh> RAM:F8C4 svalue <3Eh, 0FEC0h, 823Fh> RAM:F8DC htable .byte 0C7h ; Ã ; DATA XREF: Command_E2+12 w RAM:F8DC ; Command_E2+3A w RAM:F8DD .byte 0C1h ; - RAM:F8DE unk_F8DE .byte 0F2h ; = ; DATA XREF: Command_E2+4C w RAM:F8DF .byte 0F0h ; ­ RAM:F8E0 .byte 5Ah ; Z RAM:F8E1 .byte 0 RAM:F8E2 .byte 0FBh ; ¹ RAM:F8E3 .byte 41h ; A RAM:F8E4 .byte 0F4h ; ¶ RAM:F8E5 .byte 54h ; T RAM:F8E6 .byte 9Ah ; Ü RAM:F8E7 .byte 0 RAM:F8E8 .byte 0FEh ; ¦ RAM:F8E9 .byte 2 RAM:F8EA .byte 0F1h ; ± RAM:F8EB .byte 64h ; d RAM:F8EC .byte 1Bh RAM:F8ED .byte 80h ; Ç RAM:F8EE .byte 79h ; y RAM:F8EF .byte 43h ; C RAM:F8F0 .byte 7 RAM:F8F1 .byte 81h ; ü RAM:F8F2 .byte 93h ; ô RAM:F8F3 .byte 1 RAM:F8F4 .byte 69h ; i RAM:F8F5 .byte 83h ; â RAM:F8F6 .byte 0F7h ; ¸ RAM:F8F7 .byte 0B0h ; ¦ RAM:F8F8 .byte 0D7h ; Î RAM:F8F9 .byte 0 RAM:F8FA .byte 4Eh ; N RAM:F8FB .byte 83h ; â RAM:F8FC .byte 0F1h ; ± RAM:F8FD .byte 58h ; X RAM:F8FE .byte 5Bh ; [ RAM:F8FF .byte 0 RAM:F900 .byte 3Bh ; ; RAM:F901 .byte 84h ; ä RAM:F902 .byte 0F0h ; ­ RAM:F903 .byte 54h ; T RAM:F904 .byte 1Ch RAM:F905 .byte 80h ; Ç RAM:F906 .byte 0E6h ; µ RAM:F907 .byte 84h ; ä RAM:F908 .byte 0EFh ; ´ RAM:F909 .byte 3Ch ; < RAM:F90A .byte 5Ch ; \ RAM:F90B .byte 0 RAM:F90C .byte 0EBh ; Ù RAM:F90D .byte 84h ; ä RAM:F90E .byte 0F0h ; ­ RAM:F90F .byte 0Ch RAM:F910 .byte 5Ch ; \ RAM:F911 .byte 0 RAM:F912 .byte 82h ; é RAM:F913 .byte 44h ; D RAM:F914 .byte 0F1h ; ± RAM:F915 .byte 0BCh ; + RAM:F916 .byte 5Bh ; [ RAM:F917 .byte 0 RAM:F918 .byte 0D6h ; Í RAM:F919 .byte 43h ; C RAM:F91A .byte 0F5h ; § RAM:F91B .byte 48h ; H RAM:F91C .byte 9Ah ; Ü RAM:F91D .byte 0 RAM:F91E .byte 75h ; u RAM:F91F .byte 43h ; C RAM:F920 .byte 0F2h ; = RAM:F921 .byte 18h RAM:F922 .byte 5Bh ; [ RAM:F923 .byte 0 RAM:F924 .byte 0F3h ; ¾ RAM:F925 .byte 42h ; B RAM:F926 .byte 0F2h ; = RAM:F927 .byte 4 RAM:F928 .byte 5Bh ; [ RAM:F929 .byte 0 RAM:F92A .byte 8Fh ; Å RAM:F92B .byte 82h ; é RAM:F92C .byte 0F3h ; ¾ RAM:F92D .byte 84h ; ä RAM:F92E .byte 9Ah ; Ü RAM:F92F .byte 0 RAM:F930 .byte 56h ; V RAM:F931 .byte 42h ; B RAM:F932 .byte 0F5h ; § RAM:F933 .byte 0CCh ; ¦ RAM:F934 .byte 99h ; Ö RAM:F935 .byte 0 RAM:F936 .byte 47h ; G RAM:F937 .byte 2 RAM:F938 .byte 0F5h ; § RAM:F939 .byte 88h ; ê RAM:F93A .byte 99h ; Ö RAM:F93B .byte 0 RAM:F93C .byte 1Ch RAM:F93D .byte 42h ; B RAM:F93E .byte 0F4h ; ¶ RAM:F93F .byte 8 RAM:F940 .byte 9Ah ; Ü RAM:F941 .byte 0 RAM:F942 .byte 0E6h ; µ RAM:F943 .byte 81h ; ü RAM:F944 .byte 0F3h ; ¾ RAM:F945 .byte 8Ch ; î RAM:F946 .byte 5Ah ; Z RAM:F947 .byte 0 RAM:F948 .byte 0A8h ; ¿ RAM:F949 .byte 40h ; @ RAM:F94A .byte 0C4h ; - RAM:F94B .byte 0FCh ; ³ RAM:F94C .byte 7Fh ; RAM:F94D .byte 82h ; é RAM:F94E .byte 0 RAM:F94F .byte 0 RAM:F950 .byte 0C8h ; + RAM:F951 .byte 0FEh ; ¦ RAM:F952 .byte 0FFh RAM:F953 .byte 82h ; é RAM:F954 .byte 0 RAM:F955 .byte 0 RAM:F956 .byte 0C0h ; + RAM:F957 .byte 0FEh ; ¦ RAM:F958 .byte 3Fh ; ? RAM:F959 .byte 83h ; â RAM:F95A .byte 0 RAM:F95B .byte 0 RAM:F95C .byte 0C0h ; + RAM:F95D .byte 0FEh ; ¦ RAM:F95E .byte 0FFh RAM:F95F .byte 82h ; é RAM:F960 .byte 0 RAM:F961 .byte 0 RAM:F962 .byte 0C0h ; + RAM:F963 .byte 0FEh ; ¦ RAM:F964 .byte 7Fh ; RAM:F965 .byte 83h ; â RAM:F966 .byte 0 RAM:F967 .byte 0 RAM:F968 .byte 0C0h ; + RAM:F969 .byte 0FEh ; ¦ RAM:F96A .byte 7Fh ; RAM:F96B .byte 83h ; â RAM:F96C .byte 0 RAM:F96D .byte 0 RAM:F96E .byte 0C0h ; + RAM:F96F .byte 0FEh ; ¦ RAM:F970 .byte 3Fh ; ? RAM:F971 .byte 83h ; â RAM:F972 .byte 0 RAM:F973 .byte 0 RAM:F974 .byte 0C0h ; + RAM:F975 .byte 0FEh ; ¦ RAM:F976 .byte 7Fh ; RAM:F977 .byte 83h ; â RAM:F978 .byte 0 RAM:F979 .byte 0 RAM:F97A .byte 0C0h ; + RAM:F97B .byte 0FEh ; ¦ RAM:F97C .byte 3Fh ; ? RAM:F97D .byte 82h ; é RAM:F97E .byte 97h ; ù RAM:F97F .byte 81h ; ü RAM:F980 .byte 0F3h ; ¾ RAM:F981 .byte 9Ch ; £ RAM:F982 .byte 9Ah ; Ü RAM:F983 .byte 0 RAM:F984 .byte 0A1h ; í RAM:F985 .byte 81h ; ü RAM:F986 .byte 0F4h ; ¶ RAM:F987 .byte 70h ; p RAM:F988 .byte 5Ah ; Z RAM:F989 .byte 0 RAM:F98A .byte 8Eh ; Ä RAM:F98B .byte 41h ; A RAM:F98C .byte 0F3h ; ¾ RAM:F98D .byte 0C8h ; + RAM:F98E .byte 5Ah ; Z RAM:F98F .byte 0 RAM:F990 .byte 77h ; w RAM:F991 .byte 81h ; ü RAM:F992 .byte 0F4h ; ¶ RAM:F993 .byte 74h ; t RAM:F994 .byte 9Ah ; Ü RAM:F995 .byte 0 RAM:F996 .byte 74h ; t RAM:F997 .byte 1 RAM:F998 .byte 0F2h ; = RAM:F999 .byte 44h ; D RAM:F99A .byte 5Bh ; [ RAM:F99B .byte 0 RAM:F99C .byte 79h ; y RAM:F99D .byte 4Eh ; N RAM:F99E .byte 0 RAM:F99F .byte 0 RAM:F9A0 .byte 5Dh ; ] RAM:F9A1 .byte 0B1h ; ¦ RAM:F9A2 byte_F9A2 .byte 0 ; DATA XREF: RAM:F9D2 r RAM:F9A3 byte_F9A3 .byte 0 ; DATA XREF: RAM:F9D8 r RAM:F9A4 .byte 76h ; v RAM:F9A5 .byte 2 RAM:F9A6 .byte 92h ; Æ RAM:F9A7 .byte 50h ; P RAM:F9A8 .byte 14h RAM:F9A9 flagsFRCTL_00000111 .byte 7 ; DATA XREF: sub_FC08+8 r RAM:F9AA .byte 96h ; û ; could be FRCTL PASSWORD (page 144 of TI doc) RAM:F9AB GCCTL0? .byte 80h ; Ç RAM:F9AC .byte 5Ah ; Z RAM:F9AD GCCTL1? .byte 0 RAM:F9AE .byte 0EDh ; Ý RAM:F9AF .byte 0A6h ; ª RAM:F9B0 movedintor8 .short 4914h ; DATA XREF: RAM:FA66 o RAM:F9B2 .byte 0DAh ; + RAM:F9B3 .byte 0DFh ; ¯ RAM:F9B4 .byte 4 RAM:F9B5 .byte 0DAh ; + RAM:F9B6 ; --------------------------------------------------------------------------- RAM:F9B6 addc.b @R5, 9FFBh(R10) RAM:F9BA RAM:F9BA Command_A1: ; DATA XREF: RAM:FFC6 o RAM:F9BA decd.w SP RAM:F9BC cmp.b #7, &806h ; 806 first parameter of the NFC command RAM:F9C2 jz parm_equal7 RAM:F9C4 clr.w R12 RAM:F9C6 jmp loc_F9F6 RAM:F9C8 ; --------------------------------------------------------------------------- RAM:F9C8 RAM:F9C8 parm_equal7: ; CODE XREF: RAM:F9C2 j RAM:F9C8 clr.b &808h RAM:F9CC mov.w #0DEh, &808h RAM:F9D2 mov.b &byte_F9A2, &808h ; second parameter RAM:F9D8 mov.b &byte_F9A3, &808h RAM:F9DE mov.w SP, R12 RAM:F9E0 add.w #0, R12 RAM:F9E2 call &1C90h RAM:F9E6 cmp.b #1, R12 RAM:F9E8 jnz loc_F9F0 RAM:F9EA mov.w @SP, &808h RAM:F9EE jmp loc_F9F4 ; probably sensor_sampled=1 or any other positive result RAM:F9F0 ; --------------------------------------------------------------------------- RAM:F9F0 RAM:F9F0 loc_F9F0: ; CODE XREF: RAM:F9E8 j RAM:F9F0 mov.w #0FFFFh, &808h RAM:F9F4 RAM:F9F4 loc_F9F4: ; CODE XREF: RAM:F9EE j RAM:F9F4 mov.w #1, R12 ; probably sensor_sampled=1 or any other positive result RAM:F9F6 RAM:F9F6 loc_F9F6: ; CODE XREF: RAM:F9C6 j RAM:F9F6 incd.w SP RAM:F9F8 ret RAM:F9FA ; --------------------------------------------------------------------------- RAM:F9FA RAM:F9FA nextcode?: ; DATA XREF: RAM:FA58 o RAM:F9FA push.w R10 RAM:F9FC mov.b R12, R10 RAM:F9FE tst.b R12 RAM:FA00 jnz loc_FA18 RAM:FA02 mov.w #0CC50h, &702h RAM:FA08 bis.w #1, &700h ; enter lpm mode RAM:FA0C bic.w #200h, &700h ; exit LPM mode RAM:FA12 bis.w #4, &700h ; enter lpm mode RAM:FA16 jmp loc_FA1C ; enter lpm mode RAM:FA18 ; --------------------------------------------------------------------------- RAM:FA18 RAM:FA18 loc_FA18: ; CODE XREF: RAM:FA00 j RAM:FA18 call &1C82h RAM:FA1C RAM:FA1C loc_FA1C: ; CODE XREF: RAM:FA16 j RAM:FA1C bis.w #0D8h, SR ; enter lpm mode RAM:FA20 bit.b #2, &1CC3h RAM:FA24 jnc loc_FA38 RAM:FA26 bic.b #2, &1CC3h ; exit lpm mode RAM:FA2A tst.b R10 RAM:FA2C jz loc_FA38 RAM:FA2E clrc RAM:FA30 rrc.w &1CA4h ; carry msb of address RAM:FA34 rra.w &1CA4h ; rotate right arithmetically (divide by 2) RAM:FA38 RAM:FA38 loc_FA38: ; CODE XREF: RAM:FA24 j RAM:FA38 ; RAM:FA2C j RAM:FA38 pop R10 RAM:FA3A ret RAM:FA3C ; --------------------------------------------------------------------------- RAM:FA3C RAM:FA3C Command_E1: ; DATA XREF: RAM:FFB2 o RAM:FA3C push.w R10 RAM:FA3E push.w R11 RAM:FA40 push.w R8 RAM:FA42 push.w R9 RAM:FA44 push.w R6 RAM:FA46 cmp.b #7, &806h ; first param RAM:FA4C jnz loc_FB06 RAM:FA4E call #sub_FB22 RAM:FA52 jnz loc_FAFE RAM:FA54 call &1C78h RAM:FA58 mov.w #nextcode?, R10 ; mov source to destination RAM:FA5C clr.b R12 RAM:FA5E call R10 ; call nextcode RAM:FA60 mov.w #1C84h, R11 RAM:FA64 mov.w @R11, R6 ; move word at offset in r6 RAM:FA66 mov.w #movedintor8, R8 RAM:FA6A mov.w #1CA4h, R9 RAM:FA6E cmp.w #2000h, &1CA4h RAM:FA74 jc loc_FA88 RAM:FA76 mov.w #1, R15 RAM:FA78 call #sub_FB18 ; could this be the loop table restart RAM:FA78 ; RAM:FA7C mov.w #2000h, R15 RAM:FA80 sub.w @R9, R15 RAM:FA82 mov.w R15, &1CA4h RAM:FA86 jmp loc_FA94 ; rotate left arithmetically (multiply by 2) RAM:FA88 ; --------------------------------------------------------------------------- RAM:FA88 RAM:FA88 loc_FA88: ; CODE XREF: RAM:FA74 j RAM:FA88 clr.w R15 RAM:FA8A call #sub_FB18 ; could this be the loop table restart RAM:FA8A ; RAM:FA8E add.w #0E000h, &1CA4h RAM:FA94 RAM:FA94 loc_FA94: ; CODE XREF: RAM:FA86 j RAM:FA94 rla.w &1CA4h ; rotate left arithmetically (multiply by 2) RAM:FA9A mov.w @R9, R15 RAM:FA9C mov.b #8, R14 RAM:FA9E clr.w R13 RAM:FAA0 mov.w R8, R12 RAM:FAA2 call @R11 ; call 1c84 RAM:FAA4 mov.w #1, R15 RAM:FAA6 mov.b #1, R14 RAM:FAA8 mov.w #22h, R13 RAM:FAAC mov.w R8, R12 RAM:FAAE call @R11 ; call 1c84 RAM:FAB0 mov.b #4, R12 RAM:FAB2 call R10 RAM:FAB4 mov.w @R9, R15 RAM:FAB6 and.w #7FFh, R15 RAM:FABA mov.w R15, &1CA6h ; ram address RAM:FABE mov.w &1CA6h, R15 ; ram address RAM:FAC2 mov.b #0Bh, R14 RAM:FAC6 mov.w #16h, R13 RAM:FACA mov.w R8, R12 RAM:FACC call @R11 ; call 1c84 RAM:FACE mov.b #5, R12 RAM:FAD2 call R10 ; call nextcode RAM:FAD4 mov.w @R9, R15 RAM:FAD6 mov.b #0Ch, R14 RAM:FADA mov.w #28h, R13 RAM:FADE mov.w R8, R12 RAM:FAE0 call @R11 ; call 1c84 RAM:FAE2 mov.b #6, R12 RAM:FAE6 call R10 ; call nextcode RAM:FAE8 mov.w @R9, R15 RAM:FAEA mov.b #0Ch, R14 RAM:FAEE mov.w #34h, R13 RAM:FAF2 mov.w R8, R12 RAM:FAF4 call @R11 ; call 1c84 RAM:FAF6 bit.w #10h, &122h RAM:FAFC jc loc_FB0A ; clear bit 4 RAM:FAFE RAM:FAFE loc_FAFE: ; CODE XREF: RAM:FA52 j RAM:FAFE mov.b #28h, R12 RAM:FB02 call &1C8Ch RAM:FB06 RAM:FB06 loc_FB06: ; CODE XREF: RAM:FA4C j RAM:FB06 clr.w R12 RAM:FB08 jmp loc_FB14 ; branch to absolute address RAM:FB0A ; --------------------------------------------------------------------------- RAM:FB0A RAM:FB0A loc_FB0A: ; CODE XREF: RAM:FAFC j RAM:FB0A bic.b #4, &1CC3h ; clear bit 4 RAM:FB0E call &1C94h RAM:FB12 mov.w #1, R12 ; probably sensor_sampled=1 RAM:FB14 RAM:FB14 loc_FB14: ; CODE XREF: RAM:FB08 j RAM:FB14 br #5F6Ch ; branch to absolute address RAM:FB18 RAM:FB18 ; =============== S U B R O U T I N E ======================================= RAM:FB18 RAM:FB18 ; could this be the loop table restart RAM:FB18 ; RAM:FB18 RAM:FB18 sub_FB18: ; CODE XREF: RAM:FA78 p RAM:FB18 ; RAM:FA8A p RAM:FB18 ; DATA XREF: ... RAM:FB18 mov.b #1, R14 RAM:FB1A mov.w #21h, R13 RAM:FB1E mov.w R8, R12 RAM:FB20 br R6 ; branch to r6 RAM:FB20 ; End of function sub_FB18 RAM:FB20 RAM:FB22 RAM:FB22 ; =============== S U B R O U T I N E ======================================= RAM:FB22 RAM:FB22 RAM:FB22 sub_FB22: ; CODE XREF: RAM:FA4E p RAM:FB22 ; Command_E2:loc_FB3E p RAM:FB22 ; DATA XREF: ... RAM:FB22 clr.b &808h RAM:FB26 bis.b #4, &1CC3h ; set bit 3 RAM:FB2A call &1C98h ; ram address RAM:FB2E tst.b R12 RAM:FB30 ret RAM:FB30 ; End of function sub_FB22 RAM:FB30 RAM:FB32 RAM:FB32 ; =============== S U B R O U T I N E ======================================= RAM:FB32 RAM:FB32 RAM:FB32 Command_E2: ; DATA XREF: RAM:FFAE o RAM:FB32 cmp.b #7, &806h RAM:FB38 jz loc_FB3E RAM:FB3A clr.w R12 RAM:FB3C ret RAM:FB3E ; --------------------------------------------------------------------------- RAM:FB3E RAM:FB3E loc_FB3E: ; CODE XREF: Command_E2+6 j RAM:FB3E call #sub_FB22 RAM:FB42 jz loc_FB54 RAM:FB44 mov.w #2, &htable RAM:FB48 mov.b #28h, R12 RAM:FB4C call &1C8Ch ; ram RAM:FB50 clr.w R12 ; clear destination RAM:FB52 ret RAM:FB54 ; --------------------------------------------------------------------------- RAM:FB54 RAM:FB54 loc_FB54: ; CODE XREF: Command_E2+10 j RAM:FB54 call &1C78h RAM:FB58 bis.w #1, &700h RAM:FB5C mov.w #0D84Bh, &702h RAM:FB62 bic.w #200h, &700h ; bit clear RAM:FB68 bis.w #4, &700h ; bit set RAM:FB6C mov.w #1, &htable RAM:FB70 bis.w #0D8h, SR ; bit set status register RAM:FB74 bit.b #2, &1CC3h RAM:FB78 jnc loc_FB84 RAM:FB7A bic.b #2, &1CC3h ; bit clear RAM:FB7E mov.w &1CA4h, &unk_F8DE RAM:FB84 RAM:FB84 loc_FB84: ; CODE XREF: Command_E2+46 j RAM:FB84 mov.b #1, R12 RAM:FB86 call &1C86h RAM:FB8A bic.b #4, &1CC3h ; clear bit RAM:FB8E call &1C94h RAM:FB92 mov.w #1, R12 ; probably sensor_sampled=1 RAM:FB94 ret RAM:FB94 ; End of function Command_E2 RAM:FB94 RAM:FB96 RAM:FB96 ; =============== S U B R O U T I N E ======================================= RAM:FB96 RAM:FB96 RAM:FB96 Command_E0: ; DATA XREF: RAM:FFB6 o RAM:FB96 cmp.b #7, &806h RAM:FB9C jz loc_FBA2 RAM:FB9E clr.w R12 RAM:FBA0 ret RAM:FBA2 ; --------------------------------------------------------------------------- RAM:FBA2 RAM:FBA2 loc_FBA2: ; CODE XREF: Command_E0+6 j RAM:FBA2 clr.b &808h RAM:FBA6 bis.b #4, &1CC3h ; bit set RAM:FBAA call &1C72h RAM:FBAE mov.w #1, R12 RAM:FBB0 ret RAM:FBB0 ; End of function Command_E0 RAM:FBB0 RAM:FBB2 RAM:FBB2 ; =============== S U B R O U T I N E ======================================= RAM:FBB2 RAM:FBB2 RAM:FBB2 Command_A3: ; DATA XREF: RAM:FFBE o RAM:FBB2 push.w R10 RAM:FBB4 call &1C20h RAM:FBB8 tst.b R12 RAM:FBBA jz loc_FBE4 RAM:FBBC cmp.b #5, &80Ch RAM:FBC2 jnz loc_FBE4 ; possible s table size RAM:FBC4 mov.w &806h, R13 RAM:FBC8 mov.b &806h, R15 RAM:FBCC tst.w R13 ; is r13 0? RAM:FBCE jnz loc_FBDE RAM:FBD0 cmp.b #0FFh, R15 RAM:FBD2 jnz loc_FBDE RAM:FBD4 call &1C94h RAM:FBD8 clr.b &808h RAM:FBDC jmp loc_FC02 RAM:FBDE ; --------------------------------------------------------------------------- RAM:FBDE RAM:FBDE loc_FBDE: ; CODE XREF: Command_A3+1C j RAM:FBDE ; Command_A3+20 j RAM:FBDE cmp.b #10h, R15 RAM:FBE2 jnc loc_FBE8 RAM:FBE4 RAM:FBE4 loc_FBE4: ; CODE XREF: Command_A3+8 j RAM:FBE4 ; Command_A3+10 j RAM:FBE4 clr.w R12 RAM:FBE6 jmp loc_FC04 RAM:FBE8 ; --------------------------------------------------------------------------- RAM:FBE8 RAM:FBE8 loc_FBE8: ; CODE XREF: Command_A3+30 j RAM:FBE8 clr.b &808h RAM:FBEC clr.w R12 RAM:FBEE jmp loc_FBFE RAM:FBF0 ; --------------------------------------------------------------------------- RAM:FBF0 RAM:FBF0 loc_FBF0: ; CODE XREF: Command_A3+4E j RAM:FBF0 mov.w R12, R14 RAM:FBF2 rla.w R14 ; multiply by 2 RAM:FBF4 mov.w R13, R10 RAM:FBF6 add.w R14, R10 RAM:FBF8 mov.w @R10, &808h RAM:FBFC inc.w R12 RAM:FBFE RAM:FBFE loc_FBFE: ; CODE XREF: Command_A3+3C j RAM:FBFE cmp.w R15, R12 RAM:FC00 jnc loc_FBF0 RAM:FC02 RAM:FC02 loc_FC02: ; CODE XREF: Command_A3+2A j RAM:FC02 mov.w #1, R12 RAM:FC04 RAM:FC04 loc_FC04: ; CODE XREF: Command_A3+34 j RAM:FC04 pop R10 RAM:FC06 ret RAM:FC06 ; End of function Command_A3 RAM:FC06 RAM:FC08 RAM:FC08 ; =============== S U B R O U T I N E ======================================= RAM:FC08 RAM:FC08 RAM:FC08 sub_FC08: RAM:FC08 push.w R10 RAM:FC0A push.w R11 RAM:FC0C push.w R8 RAM:FC0E push.w R9 RAM:FC10 mov.b &flagsFRCTL_00000111, R11 ; move 00000111 into register R11 RAM:FC14 clr.b R8 ; clear R8 RAM:FC16 tst.b &status ; is address content 0? RAM:FC1A jge loc_FC2E ; jgreater or equal RAM:FC1C bic.b #80h, &status ; clear bit RAM:FC22 bit.b #4, R11 ; bit 3 of r11 set? RAM:FC24 jnc loc_FC28 ; yes, branch RAM:FC26 mov.b #1, R8 RAM:FC28 RAM:FC28 loc_FC28: ; CODE XREF: sub_FC08+1C j RAM:FC28 clr.b R12 RAM:FC2A call &1C86h RAM:FC2E RAM:FC2E loc_FC2E: ; CODE XREF: sub_FC08+12 j RAM:FC2E mov.b &status, R9 RAM:FC32 jmp bit_notset ; word in r10 RAM:FC34 ; --------------------------------------------------------------------------- RAM:FC34 RAM:FC34 loc_FC34: ; CODE XREF: sub_FC08+7E j RAM:FC34 cmp.b #2, R10 ; is r10 2? RAM:FC36 jnz r10_not2 ; no, jump RAM:FC38 bit.w #200h, &800h ; is bit 10 set at address? RAM:FC3E jnc bit_notset ; word in r10 RAM:FC40 RAM:FC40 r10_not2: ; CODE XREF: sub_FC08+2E j RAM:FC40 ; sub_FC08+84 j RAM:FC40 mov.b #6, R12 ; 6 to r12 RAM:FC44 call &1C88h RAM:FC48 RAM:FC48 bit_notset: ; CODE XREF: sub_FC08+2A j RAM:FC48 ; sub_FC08+36 j ... RAM:FC48 mov.w &19Eh, R10 ; word in r10 RAM:FC4C tst.b R10 ; test if zero RAM:FC4E jz loc_FC8E RAM:FC50 mov.b R9, R14 RAM:FC52 decd.b R14 RAM:FC54 cmp.b #3, R14 RAM:FC58 jc bit_notset ; word in r10 RAM:FC5A cmp.b #10h, R10 RAM:FC5E jnz loc_FC64 RAM:FC60 bit.b #1, R8 ; is bit 1 set RAM:FC62 jc loc_FC88 RAM:FC64 RAM:FC64 loc_FC64: ; CODE XREF: sub_FC08+56 j RAM:FC64 mov.b R10, R12 RAM:FC66 add.b #11h, R12 ; add 11h to r12 RAM:FC6A call &1C60h RAM:FC6E bit.b #1, R11 ; is bit 1 set RAM:FC70 jnc loc_FC78 ; is bit 2 set in r11 RAM:FC72 cmp.b #6, R10 ; is word in r10 6 RAM:FC76 jz bit_notset ; word in r10 RAM:FC78 RAM:FC78 loc_FC78: ; CODE XREF: sub_FC08+68 j RAM:FC78 bit.b #2, R11 ; is bit 2 set in r11 RAM:FC7A jnc loc_FC82 ; is r10 10h RAM:FC7C cmp.b #0Eh, R10 ; is r10 0e RAM:FC80 jz bit_notset ; word in r10 RAM:FC82 RAM:FC82 loc_FC82: ; CODE XREF: sub_FC08+72 j RAM:FC82 cmp.b #10h, R10 ; is r10 10h RAM:FC86 jnz loc_FC34 ; is r10 2? RAM:FC88 RAM:FC88 loc_FC88: ; CODE XREF: sub_FC08+5A j RAM:FC88 bit.b #1, R8 RAM:FC8A jc bit_notset ; word in r10 RAM:FC8C jmp r10_not2 ; 6 to r12 RAM:FC8E ; --------------------------------------------------------------------------- RAM:FC8E RAM:FC8E loc_FC8E: ; CODE XREF: sub_FC08+46 j RAM:FC8E mov.b &status, R14 RAM:FC92 decd.b R14 RAM:FC94 cmp.b #3, R14 RAM:FC98 jc loc_FCE4 RAM:FC9A call &1C96h RAM:FC9E call &1C9Ah RAM:FCA2 jmp loc_FCA4 RAM:FCA4 ; --------------------------------------------------------------------------- RAM:FCA4 RAM:FCA4 loc_FCA4: ; CODE XREF: sub_FC08+9A j RAM:FCA4 mov.w #533h, R15 RAM:FCA8 RAM:FCA8 loc_FCA8: ; CODE XREF: sub_FC08+A2 j RAM:FCA8 add.w #0FFFFh, R15 RAM:FCAA jc loc_FCA8 RAM:FCAC bit.w #2, &122h RAM:FCB0 jnc loc_FCDC RAM:FCB2 mov.w #0C34Eh, R15 RAM:FCB6 nop RAM:FCB8 clr.w R11 RAM:FCBA RAM:FCBA loc_FCBA: ; CODE XREF: sub_FC08+B6 j RAM:FCBA add.w #0FFFFh, R15 RAM:FCBC addc.w #0FFFFh, R11 RAM:FCBE jc loc_FCBA RAM:FCC0 bit.w #10h, &122h RAM:FCC6 jnc loc_FCD6 RAM:FCC8 bit.w #200h, &800h RAM:FCCE jc loc_FCD6 RAM:FCD0 call &1C70h RAM:FCD4 jmp loc_FCE4 RAM:FCD6 ; --------------------------------------------------------------------------- RAM:FCD6 RAM:FCD6 loc_FCD6: ; CODE XREF: sub_FC08+BE j RAM:FCD6 ; sub_FC08+C6 j RAM:FCD6 mov.b #0Ah, R12 RAM:FCDA jmp loc_FCE0 RAM:FCDC ; --------------------------------------------------------------------------- RAM:FCDC RAM:FCDC loc_FCDC: ; CODE XREF: sub_FC08+A8 j RAM:FCDC mov.b #0Bh, R12 RAM:FCE0 RAM:FCE0 loc_FCE0: ; CODE XREF: sub_FC08+D2 j RAM:FCE0 call &1C8Ch RAM:FCE4 RAM:FCE4 loc_FCE4: ; CODE XREF: sub_FC08+90 j RAM:FCE4 ; sub_FC08+CC j RAM:FCE4 call &1C58h RAM:FCE8 eint ; enable general interrupts (typically disabled so the data can be transferred) RAM:FCEA br #5F6Eh RAM:FCEA ; End of function sub_FC08 RAM:FCEA RAM:FCEE ; --------------------------------------------------------------------------- RAM:FCEE ret RAM:FCEE ; --------------------------------------------------------------------------- RAM:FCF0 .byte 0, 0, 0, 0, 0, 0, 0 RAM:FCF0 .byte 0, 0, 0, 0, 0, 0, 0 RAM:FCF0 .byte 0, 0, 0, 0, 0, 0, 0 RAM:FCF0 .byte 0, 0, 0, 0, 0, 0, 0 RAM:FCF0 .byte 0, 0, 0, 0, 0, 0, 0 RAM:FCF0 .byte 0, 0, 0, 0, 0, 0, 0 RAM:FCF0 .byte 0, 0, 0, 0, 0, 0,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:FFA5 .byte 0 RAM:FFA6 .byte 0 RAM:FFA7 .byte 0 RAM:FFA8 .byte 0 RAM:FFA9 .byte 0 RAM:FFAA .byte 0 RAM:FFAB .byte 0 RAM:FFAC startkey .short 0ABABh ; start command table RAM:FFAE .short Command_E2 ; in FRAM RAM:FFB0 .short 0E2h RAM:FFB2 .short Command_E1 ; in FRAM RAM:FFB4 .short 0E1h RAM:FFB6 .short Command_E0 ; in FRAM RAM:FFB8 .short 0E0h RAM:FFBA .short 5A2Ch ; E4 in SRAM ? RAM:FFBC .short 0A4h RAM:FFBE .short Command_A3 ; in FRAM RAM:FFC0 .short 0A3h RAM:FFC2 .short 5A56h ; A2 in SRAM? SD_14_ROM_ISR area in FRL RAM:FFC4 .short 0A2h RAM:FFC6 .short Command_A1 ; in FRAM Initialization sequence RAM:FFC8 .short 0A1h RAM:FFCA .short 5724h ; A0 in SRAM? RAM:FFCC .short 0A0h RAM:FFCE endkey .short 0ABABh ; en command table RAM:FFD0 .short 0 ; jtag signature RAM:FFD2 .short 0 ; jtag signature RAM:FFD4 .short 0FFFFh ; loader signature RAM:FFD6 .short 0FFFFh ; loader signature RAM:FFD8 .short 20h ; CRC Length RAM:FFDA .short 6271h ; CRC Value RAM:FFDC .byte 0, 0, 0, 0, 0, 0, 0 ; reserved area RAM:FFDC .byte 0, 0, 0, 0, 0, 0, 0 RAM:FFEA .short 5CAEh ; RFPMM RFPMMIFGV2X, RFPMMIFGVH, RFPMMIFGVR, RFPMMIFGVB, RFPMMIFGVF, RFPMMIV RAM:FFEC .short 0 ; IO PORT P1 (in FRL) RAM:FFEE .short 57A8h ; sigma delta ADC (in FRL) RAM:FFF0 .short 0 ; eUSCIB RAM:FFF0 ; RAM:FFF0 ; (SPI mode) RAM:FFF0 ; UCB0RXIFG, UCB0TXIFG RAM:FFF0 ; (I2C mode) RAM:FFF0 ; UCB0ALIFG, UCB0NACKIFG, UCB0STTIFG, UCB0STPIFG, UCB0RXIFG3, UCB0TXIFG3, UCB0RXIFG2, UCB0TXIFG2, UCB0RXIFG1, UCB0TXIFG1, UCB0RXIFG0, UCB0TXIFG0, UCB0CNTIFG, UCB0CLTOIFG, UCB0BIT9IFG RAM:FFF0 ; RAM:FFF0 ; (SD14IV)(1)(3) RAM:FFF2 .short 4E28h ; RF13M Module RF13MRXIFG, RF13MTXIFG, RF13MRXWMIFG, RF13MTXWMIFG, RF13MSLIFG, RF13MOUFLIFG, RF13MRXEIFG, RF13MIVx(1)(3) RAM:FFF4 .short 4568h ; watchdog_interval_timer_mode (in FRL) WDTIFG RAM:FFF6 .short 0 RAM:FFF8 .short 5FDCh ; device specific (timer?) RAM:FFFA .short 5AAEh ; user nmi RAM:FFFC .short 5A7Ah ; should be nmi RAM:FFFE .short 50DAh ; should be power up