PDA

View Full Version : Calculate checksum?



jgauthier
- 21st February 2013, 00:35
First, let me be clear: I am taking a course that includes PICBASIC pro. I am not looking for answers, but I am looking for some assistance.
In our class we've done plenty with PIC Basic Pro, but we have not touched upon the melabs programmer software other than how to write to flash.

Today, we are tasked with using melabs programmer to find out several items, and quite frankly, I am stumped. I have read through the help, done google searched, and lokoed through the program. I do not know how to answer what is being asked of me.

I am looking for some guidance:

I am given this .HEX program:
:080000000528000000000000CB
:08000800EC28EC2807398207FF
:100010002034102815281C2827283A285D28233446
:1000200041080139820745345434410803398207B5
:10003000493441344E344D34410807398207533432
:1000400055345234573444344B3447344F344108D8

I have loaded it into melabs, and I am being asked:
What is the address where the first byte of data is placed in memory?
Okay, so I look at the "Memory" section, I do not see any address information. I go through each area of the program, and I'm not sure what I am looking for!
There is a follow up to this, that says:
In the last line (6), what is the address where the first byte of data in this line placed in memory?

Like I mentioned, I am not looking for answers, but I am looking to understand melabs programmer so I can retrieve this information. Please let me know where to even look.

Thanks a bunch!

Jerson
- 21st February 2013, 01:05
Look up information for HEX file format. That would be a good place to start. Then again, there are types of HEX files, Intel Hex, Motorola Hex. You need to choose the correct type to decipher the information correctly.

Demon
- 21st February 2013, 02:21
Graduated back in 83 so theory is pretty far in the past.

I would start by compiling a 1 command program and seeing what the listing gives and then go from there.

Robert

jgauthier
- 25th February 2013, 23:04
Thanks! the .HEX file was Intel encoded and I was able to find all the answers using appropriate reference.