Program from MUC

Discussion in 'Embedded Systems and Microcontrollers' started by rabhishek91, Apr 1, 2013.

Can we know get to know the program if a MUC is given ?

Poll closed May 1, 2013.
  1. Yes

    0 vote(s)
    0.0%
  2. It's a No you foolish

    0 vote(s)
    0.0%
  3. May be

    0 vote(s)
    0.0%
Multiple votes are allowed.
  1. rabhishek91

    Thread Starter Member

    Feb 14, 2013
    51
    1
    Hi. I have some weird doubt.
    Usually we burn/transfer the program to Micro-controller.

    Can this be done the other way ?

    I mean can we get to know the program from Micro-controller by any means ? :confused:
     
  2. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    You can go to a job office and ask: Do you have any actual jobs.
     
  3. rabhishek91

    Thread Starter Member

    Feb 14, 2013
    51
    1
    Bro i know it's a silly question. I shouldn't have asked but just wanted to clear my doubt.
    I thought like " May be who knows! Such technology may exists " :rolleyes:
     
  4. nerdegutta

    Moderator

    Dec 15, 2009
    2,517
    785
    rabhishek91 likes this.
  5. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    It is not a totally useless question.

    Sometimes the program is programmed at the Factory, nowadays, even for FLASH parts. It is not expensive.

    While other chips are even able to read a program from external chips, from punched tape, from a keyboard and who knows what.
     
  6. rabhishek91

    Thread Starter Member

    Feb 14, 2013
    51
    1
    "Compiled code is incomprehensible to most programmers, but there are ways to convert machine code back to a more human-friendly format, including a software tool called a decompiler".
    Got my answer. I am glad that i found this forum.
    Thanks a lot nerdegutta.
     
  7. nerdegutta

    Moderator

    Dec 15, 2009
    2,517
    785
    You are welcome.

    All I did was this.

    :D
     
  8. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    With commercial chips it's usually not possible for the hobbyist. Most of them will be read protected which means there's no easy way of getting the code from the chip.
     
  9. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    Many older PCBs used mask programmed controllers.
    Total ewaste now.

    New PCBs often use leadless packages, they are not really an option for home assembly.

    Not to speak, many controllers used are of unknown making.

    Digital cameras normally include a discrete FLASH, and a discrete RAM.
    Still with leads.

    You can read out with any decent FLASH writer.

    Since the codes contained are hudge, it makes next to no sense to disassemble them.
     
  10. rabhishek91

    Thread Starter Member

    Feb 14, 2013
    51
    1
    Got it bro. So I believe there is some method to do so :)but it's not accessible to everyone.
     
  11. rabhishek91

    Thread Starter Member

    Feb 14, 2013
    51
    1
    Sir what about micro-controllers like AVR 's or 8051 ?
     
  12. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    Many FLASH chips nowadays are SMD.

    You need at least an adapter. And the software for the FLASH writer needs to support it.

    It is possible to take off leaded SMD chip, and for instance just push on adapter PCB. It is good enough to read out.

    Don't use my info to break the DVD region EEPROM lock :)

    But for yourself, if you can not watch even your own DVDs, it is totally OK.

    For EEPROM you need a 50 dollar FLASH writer. Or you can build it yourself with a PIC, Arduino, etc.
     
  13. rabhishek91

    Thread Starter Member

    Feb 14, 2013
    51
    1
    Bro probably these stuffs are too much for me. So i won't be doing it.
    Was just curious about these things. That's it :)
     
  14. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    OK got it bro.

    Really even if it is possible, it will often be of limited use.
    More than never, you'd encounter copy protection bits set as well.
     
  15. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    This is an example of a decompiled program for Microchip PIC:
    Quite hard to figure out, there are no variable names, labels for the gotos or comments.
    It is possible, especially if you know what it is supposed to do, but not an easy job.
    Code ( (Unknown Language)):
    1. 000000:  283b  goto    0x3b
    2. 000004:  00fe  movwf    0x7e
    3. 000005:  0803  movf    0x3, w
    4. 000006:  00ff  movwf    0x7f
    5. 000007:  1283  bcf    0x3, 0x5
    6. 000008:  1303  bcf    0x3, 0x6
    7. 000009:  15b3  bsf    0x33, 0x3
    8. 00000a:  084c  movf    0x4c, w
    9. 00000b:  0782  addwf    0x2, f
    10. 00000c:  2810  goto    0x10
    11. 00000d:  2816  goto    0x16
    12. 00000e:  281c  goto    0x1c
    13. 00000f:  2822  goto    0x22
    14. 000010:  13b3  bcf    0x33, 0x7
    15. 000011:  1533  bsf    0x33, 0x2
    16. 000012:  0839  movf    0x39, w
    17. 000013:  0086  movwf    0x6
    18. 000014:  0acc  incf    0x4c, f
    19. 000015:  2827  goto    0x27
    20. 000016:  1133  bcf    0x33, 0x2
    21. 000017:  14b3  bsf    0x33, 0x1
    22. 000018:  083a  movf    0x3a, w
    23. 000019:  0086  movwf    0x6
    24. 00001a:  0acc  incf    0x4c, f
    25. 00001b:  2827  goto    0x27
    26. 00001c:  10b3  bcf    0x33, 0x1
    27. 00001d:  1733  bsf    0x33, 0x6
    28. 00001e:  083b  movf    0x3b, w
    29. 00001f:  0086  movwf    0x6
    30. 000020:  0acc  incf    0x4c, f
    31. 000021:  2827  goto    0x27
    32. 000022:  1333  bcf    0x33, 0x6
    33. 000023:  17b3  bsf    0x33, 0x7
    34. 000024:  083c  movf    0x3c, w
    35. 000025:  0086  movwf    0x6
    36. 000026:  01cc  clrf    0x4c
    37. 000027:  0833  movf    0x33, w
    38. 000028:  0085  movwf    0x5
    39. 000029:  110b  bcf    0xb, 0x2
    40. 00002a:  087f  movf    0x7f, w
    41. 00002b:  0083  movwf    0x3
    42. 00002c:  0efe  swapf    0x7e, f
    43. 00002d:  0e7e  swapf    0x7e, w
    44. 00002e:  0009  retfie
    45. 00002f:  0782  addwf    0x2, f
    46. 000030:  34eb  retlw    0xeb
    47. 000031:  3421  retlw    0x21
    48. 000032:  34ba  retlw    0xba
    49. 000033:  34b3  retlw    0xb3
    50. 000034:  3471  retlw    0x71
    51. 000035:  34d3  retlw    0xd3
    52. 000036:  34db  retlw    0xdb
    53. 000037:  34a1  retlw    0xa1
    54. 000038:  34fb  retlw    0xfb
    55. 000039:  34f3  retlw    0xf3
    56. 00003a:  0008  return
    57. 00003b:  3020  movlw    0x20
    58. 00003c:  0084  movwf    0x4
    59. 00003d:  0180  clrf    0
    60. 00003e:  0a84  incf    0x4, f
    61. 00003f:  1f84  btfss    0x4, 0x7
    62. 000040:  283d  goto    0x3d
    63. 000041:  303f  movlw    0x3f
    64. 000042:  00b1  movwf    0x31
    65. 000043:  0103  clrw
    66. 000044:  1283  bcf    0x3, 0x5
    67. 000045:  1703  bsf    0x3, 0x6
    68. 000046:  008d  movwf    0xd
    69. 000047:  1683  bsf    0x3, 0x5
    70. 000048:  1703  bsf    0x3, 0x6
    71. 000049:  138c  bcf    0xc, 0x7
    72. 00004a:  140c  bsf    0xc, 0
    73. 00004b:  1283  bcf    0x3, 0x5
    74. 00004c:  1703  bsf    0x3, 0x6
    75. 00004d:  080c  movf    0xc, w
    76. 00004e:  1283  bcf    0x3, 0x5
    77. 00004f:  1303  bcf    0x3, 0x6
    78. 000050:  00ac  movwf    0x2c
    79. 000051:  3001  movlw    0x1
    80. 000052:  1283  bcf    0x3, 0x5
    81. 000053:  1703  bsf    0x3, 0x6
    82. 000054:  008d  movwf    0xd
    83. 000055:  1683  bsf    0x3, 0x5
    84. 000056:  1703  bsf    0x3, 0x6
    85. 000057:  138c  bcf    0xc, 0x7
    86. 000058:  140c  bsf    0xc, 0
    87. 000059:  1283  bcf    0x3, 0x5
    88. 00005a:  1703  bsf    0x3, 0x6
    89. 00005b:  080c  movf    0xc, w
    90. 00005c:  1283  bcf    0x3, 0x5
    91. 00005d:  1303  bcf    0x3, 0x6
    92. 00005e:  00ad  movwf    0x2d
    93. 00005f:  0064  clrwdt
    94. 000060:  1683  bsf    0x3, 0x5
    95. 000061:  1303  bcf    0x3, 0x6
    96. 000062:  30c2  movlw    0xc2
    97. 000063:  0081  movwf    0x1
    98. 000064:  1283  bcf    0x3, 0x5
    99. 000065:  1303  bcf    0x3, 0x6
    100. 000066:  30a0  movlw    0xa0
    101. 000067:  008b  movwf    0xb
    102. 000068:  0190  clrf    0x10
    103. 000069:  0192  clrf    0x12
    104. 00006a:  3081  movlw    0x81
    105. 00006b:  009f  movwf    0x1f
    106. 00006c:  1683  bsf    0x3, 0x5
    107. 00006d:  3070  movlw    0x70
    108. 00006e:  008f  movwf    0xf
    109. 00006f:  3011  movlw    0x11
    110. 000070:  0085  movwf    0x5
    111. 000071:  0186  clrf    0x6
    112. 000072:  308e  movlw    0x8e
    113. 000073:  009f  movwf    0x1f
    114. 000074:  1283  bcf    0x3, 0x5
    115. 000075:  20f4  call    0xf4
    116. 000076:  20f4  call    0xf4
    117. 000077:  20f4  call    0xf4
    118. 000078:  20f4  call    0xf4
    119. 000079:  20f4  call    0xf4
    120. 00007a:  20f4  call    0xf4
    121. 00007b:  20f4  call    0xf4
    122. 00007c:  20f4  call    0xf4
    123. 00007d:  20ea  call    0xea
    124. 00007e:  0835  movf    0x35, w
    125. 00007f:  00b9  movwf    0x39
    126. 000080:  0836  movf    0x36, w
    127. 000081:  00ba  movwf    0x3a
    128. 000082:  0837  movf    0x37, w
    129. 000083:  00bb  movwf    0x3b
    130. 000084:  0838  movf    0x38, w
    131. 000085:  00bc  movwf    0x3c
    132. 000086:  01b0  clrf    0x30
    133. 000087:  0848  movf    0x48, w
    134. 000088:  07ab  addwf    0x2b, f
    135. 000089:  0847  movf    0x47, w
    136. 00008a:  1803  btfsc    0x3, 0
    137. 00008b:  0f47  incfsz    0x47, w
    138. 00008c:  07aa  addwf    0x2a, f
    139. 00008d:  0830  movf    0x30, w
    140. 00008e:  1803  btfsc    0x3, 0
    141. 00008f:  0f30  incfsz    0x30, w
    142. 000090:  07a9  addwf    0x29, f
    143. 000091:  0bb2  decfsz    0x32, f
    144. 000092:  287d  goto    0x7d
    145. 000093:  0831  movf    0x31, w
    146. 000094:  1903  btfsc    0x3, 0x2
    147. 000095:  2898  goto    0x98
    148. 000096:  03b1  decf    0x31, f
    149. 000097:  287d  goto    0x7d
    150. 000098:  01a0  clrf    0x20
    151. 000099:  082c  movf    0x2c, w
    152. 00009a:  00a1  movwf    0x21
    153. 00009b:  082d  movf    0x2d, w
    154. 00009c:  00a2  movwf    0x22
    155. 00009d:  20ff  call    0xff
    156. 00009e:  0821  movf    0x21, w
    157. 00009f:  00bd  movwf    0x3d
    158. 0000a0:  0822  movf    0x22, w
    159. 0000a1:  00be  movwf    0x3e
    160. 0000a2:  20b8  call    0xb8
    161. 0000a3:  303f  movlw    0x3f
    162. 0000a4:  00b1  movwf    0x31
    163. 0000a5:  01b2  clrf    0x32
    164. 0000a6:  01a9  clrf    0x29
    165. 0000a7:  01aa  clrf    0x2a
    166. 0000a8:  01ab  clrf    0x2b
    167. 0000a9:  20ab  call    0xab
    168. 0000aa:  287d  goto    0x7d
    169. 0000ab:  083f  movf    0x3f, w
    170. 0000ac:  202f  call    0x2f
    171. 0000ad:  00b5  movwf    0x35
    172. 0000ae:  0840  movf    0x40, w
    173. 0000af:  202f  call    0x2f
    174. 0000b0:  00b6  movwf    0x36
    175. 0000b1:  0841  movf    0x41, w
    176. 0000b2:  202f  call    0x2f
    177. 0000b3:  00b7  movwf    0x37
    178. 0000b4:  0842  movf    0x42, w
    179. 0000b5:  202f  call    0x2f
    180. 0000b6:  00b8  movwf    0x38
    181. 0000b7:  0008  return
    182. 0000b8:  0e3d  swapf    0x3d, w
    183. 0000b9:  390f  andlw    0xf
    184. 0000ba:  3ef0  addlw    0xf0
    185. 0000bb:  00c0  movwf    0x40
    186. 0000bc:  07c0  addwf    0x40, f
    187. 0000bd:  3ee2  addlw    0xe2
    188. 0000be:  00c1  movwf    0x41
    189. 0000bf:  3e32  addlw    0x32
    190. 0000c0:  00c3  movwf    0x43
    191. 0000c1:  083d  movf    0x3d, w
    192. 0000c2:  390f  andlw    0xf
    193. 0000c3:  07c1  addwf    0x41, f
    194. 0000c4:  07c1  addwf    0x41, f
    195. 0000c5:  07c3  addwf    0x43, f
    196. 0000c6:  3ee9  addlw    0xe9
    197. 0000c7:  00c2  movwf    0x42
    198. 0000c8:  07c2  addwf    0x42, f
    199. 0000c9:  07c2  addwf    0x42, f
    200. 0000ca:  0e3e  swapf    0x3e, w
    201. 0000cb:  390f  andlw    0xf
    202. 0000cc:  07c2  addwf    0x42, f
    203. 0000cd:  07c3  addwf    0x43, f
    204. 0000ce:  0dc2  rlf    0x42, f
    205. 0000cf:  0dc3  rlf    0x43, f
    206. 0000d0:  09c3  comf    0x43, f
    207. 0000d1:  0dc3  rlf    0x43, f
    208. 0000d2:  083e  movf    0x3e, w
    209. 0000d3:  390f  andlw    0xf
    210. 0000d4:  07c3  addwf    0x43, f
    211. 0000d5:  0dc0  rlf    0x40, f
    212. 0000d6:  3007  movlw    0x7
    213. 0000d7:  00bf  movwf    0x3f
    214. 0000d8:  300a  movlw    0xa
    215. 0000d9:  07c3  addwf    0x43, f
    216. 0000da:  03c2  decf    0x42, f
    217. 0000db:  1c03  btfss    0x3, 0
    218. 0000dc:  28d9  goto    0xd9
    219. 0000dd:  07c2  addwf    0x42, f
    220. 0000de:  03c1  decf    0x41, f
    221. 0000df:  1c03  btfss    0x3, 0
    222. 0000e0:  28dd  goto    0xdd
    223. 0000e1:  07c1  addwf    0x41, f
    224. 0000e2:  03c0  decf    0x40, f
    225. 0000e3:  1c03  btfss    0x3, 0
    226. 0000e4:  28e1  goto    0xe1
    227. 0000e5:  07c0  addwf    0x40, f
    228. 0000e6:  03bf  decf    0x3f, f
    229. 0000e7:  1c03  btfss    0x3, 0
    230. 0000e8:  28e5  goto    0xe5
    231. 0000e9:  3400  retlw    0
    232. 0000ea:  151f  bsf    0x1f, 0x2
    233. 0000eb:  191f  btfsc    0x1f, 0x2
    234. 0000ec:  28eb  goto    0xeb
    235. 0000ed:  081e  movf    0x1e, w
    236. 0000ee:  00c7  movwf    0x47
    237. 0000ef:  1683  bsf    0x3, 0x5
    238. 0000f0:  081e  movf    0x1e, w
    239. 0000f1:  1283  bcf    0x3, 0x5
    240. 0000f2:  00c8  movwf    0x48
    241. 0000f3:  0008  return
    242. 0000f4:  309e  movlw    0x9e
    243. 0000f5:  00cd  movwf    0x4d
    244. 0000f6:  3010  movlw    0x10
    245. 0000f7:  00ce  movwf    0x4e
    246. 0000f8:  0bcd  decfsz    0x4d, f
    247. 0000f9:  28fb  goto    0xfb
    248. 0000fa:  0bce  decfsz    0x4e, f
    249. 0000fb:  28f8  goto    0xf8
    250. 0000fc:  28fd  goto    0xfd
    251. 0000fd:  0000  nop
    252. 0000fe:  0008  return
    253. 0000ff:  01a3  clrf    0x23
    254. 000100:  01a4  clrf    0x24
    255. 000101:  01a5  clrf    0x25
    256. 000102:  0820  movf    0x20, w
    257. 000103:  00a8  movwf    0x28
    258. 000104:  0821  movf    0x21, w
    259. 000105:  00a7  movwf    0x27
    260. 000106:  0822  movf    0x22, w
    261. 000107:  00a6  movwf    0x26
    262. 000108:  3008  movlw    0x8
    263. 000109:  00ca  movwf    0x4a
    264. 00010a:  0cab  rrf    0x2b, f
    265. 00010b:  1803  btfsc    0x3, 0
    266. 00010c:  2923  goto    0x123
    267. 00010d:  0bca  decfsz    0x4a, f
    268. 00010e:  290a  goto    0x10a
    269. 00010f:  00ca  movwf    0x4a
    270. 000110:  0caa  rrf    0x2a, f
    271. 000111:  1803  btfsc    0x3, 0
    272. 000112:  2921  goto    0x121
    273. 000113:  0bca  decfsz    0x4a, f
    274. 000114:  2910  goto    0x110
    275. 000115:  00ca  movwf    0x4a
    276. 000116:  0ca9  rrf    0x29, f
    277. 000117:  1803  btfsc    0x3, 0
    278. 000118:  291f  goto    0x11f
    279. 000119:  0bca  decfsz    0x4a, f
    280. 00011a:  2916  goto    0x116
    281. 00011b:  01a0  clrf    0x20
    282. 00011c:  01a1  clrf    0x21
    283. 00011d:  01a2  clrf    0x22
    284. 00011e:  3400  retlw    0
    285. 00011f:  1003  bcf    0x3, 0
    286. 000120:  295d  goto    0x15d
    287. 000121:  1003  bcf    0x3, 0
    288. 000122:  2947  goto    0x147
    289. 000123:  1003  bcf    0x3, 0
    290. 000124:  2932  goto    0x132
    291. 000125:  0cab  rrf    0x2b, f
    292. 000126:  1c03  btfss    0x3, 0
    293. 000127:  2932  goto    0x132
    294. 000128:  0826  movf    0x26, w
    295. 000129:  07a2  addwf    0x22, f
    296. 00012a:  0827  movf    0x27, w
    297. 00012b:  1803  btfsc    0x3, 0
    298. 00012c:  0f27  incfsz    0x27, w
    299. 00012d:  07a1  addwf    0x21, f
    300. 00012e:  0828  movf    0x28, w
    301. 00012f:  1803  btfsc    0x3, 0
    302. 000130:  0f28  incfsz    0x28, w
    303. 000131:  07a0  addwf    0x20, f
    304. 000132:  0ca0  rrf    0x20, f
    305. 000133:  0ca1  rrf    0x21, f
    306. 000134:  0ca2  rrf    0x22, f
    307. 000135:  0ca3  rrf    0x23, f
    308. 000136:  0bca  decfsz    0x4a, f
    309. 000137:  2925  goto    0x125
    310. 000138:  3008  movlw    0x8
    311. 000139:  00ca  movwf    0x4a
    312. 00013a:  0caa  rrf    0x2a, f
    313. 00013b:  1c03  btfss    0x3, 0
    314. 00013c:  2947  goto    0x147
    315. 00013d:  0826  movf    0x26, w
    316. 00013e:  07a2  addwf    0x22, f
    317. 00013f:  0827  movf    0x27, w
    318. 000140:  1803  btfsc    0x3, 0
    319. 000141:  0f27  incfsz    0x27, w
    320. 000142:  07a1  addwf    0x21, f
    321. 000143:  0828  movf    0x28, w
    322. #Some code removed here to make it small enough to post
    323.  
     
  16. rabhishek91

    Thread Starter Member

    Feb 14, 2013
    51
    1
    Thank you sir. I got an idea about these stuff.
     
Loading...