Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Converting asm to hex

Status
Not open for further replies.
Hi G,
Like you I did a lot with Z80s. I built a copy of a Nascom 2 computer and wrote a disk operating system for it. (First using an 8" floppy disk drive but then moved to 5.25" and 3.5" drives.) I also started with the Tait programmer for programming PIC16C84s when people used them for decoding the encrypted D2Mac satellite channels. (I think that was in the mid 1990s) I still have a Tait programmer and the DOS programs to use it.

Les.
 
Members have put a lot of effort into trying to help him in this thread even though I think none of us believe useing the device will do any good. (Other than possibly the placebo effect.)
Les.

Hi Les,
I agree with your frustration at getting accurate information and timely followups from the TS.

For the record, however, I do not believe the absence of benefit is evidence of no harm. I believe strongly that any evaluation must be "two-tailed" unless there is overwhelming reason to know that analysis can be single tailed. That is particularly true if it is related to medicine. Unfortunately, many people involved in health matters forget or intentionally ignore the importance of that. Pre-existing bias and/or competition for funding is usually cited as the cause.

Medical quackery as exemplified by the device the TS wants to duplicate is not harmless. Moreover, if the device did act as it is claimed to act, the risk of harm from the rapid killing of parasites (meaning all forms from viruses to worms) is well established.

John
 
Hi Les Jones ... well strange , I built a nascom and the 8k mem expansion ! for a mate ( I could not afford my own.. on 16 quid a week wages ! ) I built an RCA 1802 system as an intro to 8 bit silicon etched my own board ...also wrote a 8" floppy then 5.25 and then 3.25 and my own dos system in 2K of ram... using Z80 and floppy controller 2797 ? chip
I still have Tait FPP sw and still works on XP .... Z80 = fun times.. by the way my first name is Leslie... too :woot: and well past my three score years and ten :(:)
Strange how these old circuits pop up now and then... I had to bin a lot of old paperwork last week :( I put code on reams fan-fold and had a hex pad to enter it ...masses of 74TTL and +- backed up cmos ram (6116)... scrounge a 30 column matrix printer and 10" green crt and wrote a monitor program...... you can keep your Arduino :joyful:
G Les.
ERGOYE Sorry to go off piste ...
 
Here is a version of the version 1 zapper hex file created using MPASM to assemble it. PLEASE tell us what programmer you are using, what programming software and what version of windows you are using. Also are you using a PIC16F84 or a PIV16F84A ? If it fails to work give us an accurate description of how it does not work as expected.

Edit. For the benifit of the other members trying to help this was created by first using the EPE TK3 toolkit to disassemble the original zapper version 1 hex file to an MPASM compatible source file, comparing the listing with the original zapper version 1 source file and then assembling this file with MPASM. I have added most of the labels and comments from the origin source file to the one from the disassembly. I will post the file if anyone is interested. (Someone may spot a difference that I have missed.)

Les.
 

Attachments

  • HEXDECODE.HEX
    930 bytes · Views: 309
Last edited:
I have noticed that there is no config line in the source code. I have added thei line "__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC" and reassembled it. I have attached the resulting hex file. It could be the default config may have prevented the crystal oscillator working correctly.

Les.
 

Attachments

  • HEXDECODE2.HEX
    947 bytes · Views: 278
I hope he is he is using a PIC16F84 or PIC16F84A. but the way he was mixing up versions of code for different circuits who knows. Looking at the code its should work with small changes on most of the old PICs, All the timing is done just counting instruction cycles.

Les.
 
ERGOYE, Use the PIC16F84 (Or the A version.) You can't just put the code into a different processor without checking for differences. CAN YOU EXPLAIN HOW YOU WAVE GOT AROUND THE FACT THAT YOU COULD NOT PROGRAM THE PIC16F84 and now it seems that you can ?

Ian, I have just had a look at the hex file from post #89 and the first 4 locations contain 3FFF The first few locations from location 0x05 and the last location 0x9F match the assembly listing for the hex file I posted in post #106 (I have not made a full comparison but I think the files from location 0x05 will be identical.) I don't think the file in post #89 will work as it will not get to the start of the program at location 0x05.

Les.
 
ERGOYE, Use the PIC16F84 (Or the A version.) You can't just put the code into a different processor without checking for differences. CAN YOU EXPLAIN HOW YOU WAVE GOT AROUND THE FACT THAT YOU COULD NOT PROGRAM THE PIC16F84 and now it seems that you can ?

Ian, I have just had a look at the hex file from post #89 and the first 4 locations contain 3FFF The first few locations from location 0x05 and the last location 0x9F match the assembly listing for the hex file I posted in post #106 (I have not made a full comparison but I think the files from location 0x05 will be identical.) I don't think the file in post #89 will work as it will not get to the start of the program at location 0x05.

Les.
Huh...

Code:
:020000040000FA
:06000A008501860183164A
:10001000F1308500C73086008312FF308500203024
:10002000860022203F202220552022207B202220D3
:100030003F202220552022207B2022203F202220EA
:1000400055209120051108308C00FA308D000830C1
:1000500086068515061C851124309000900B2E28ED
:10006000000000008D0B3A28FA308D008C0B3E28E2
:1000700005150800000000000000000027283C30A3
:100080008C00043085064F308D00193090005330BD
:100090009100910B4928900B47288D0B4528851519
:1000A000061C85118C0B41280800051130308C008E
:1000B000AF308D00FA309000303086068515061C72
:1000C000851160309200920B63280000900B72281B
:1000D000FA3090008D0B7628AF308D008C0B7A288B
:1000E00005150800000000000000000000000000EE
:1000F000000000005C28851038309200E5308C004C
:10010000C8308D00D9309000900B84288D0B822848
:100110008C0B80288515061C8511920B7E28851472
:1001200008008510222059308C00FA308D00DB3019
:100130009000900B99288D0B97288C0B952892286E
:02400E00F93F78
:00000001FF
That is the file in question..
 

Attachments

  • 117-361x325.jpg
    117-361x325.jpg
    10.5 KB · Views: 262
Ergoye... Can you post a picture of your setup... ( Target .. programmer ... power supply... cables ) to show how you flash the PIC with the .hex ...
 
Hi Ian,
I found it easier to load the hex file into the PICKIT2 software and look at the file in that display. I have forgotten the exact structure for hex file and was too lazy to find documentation on their structure.
Les.
 
Easier with a PK2? Not familiar enough with the PK2 to know whether it operates identically to the PK3. They are certainly different.
upload_2018-1-27_6-19-5.png


I used a PICStart Plus last time I programmed a 16F84/84A.

As for messing with .hex files, I found this crutch particularly easy to use: https://www.fischl.de/hex_checksum_calculator/

There are certainly others out there. That one was just quick and simple. Enter an incorrect checksum and it will give you the correct one.
 
Last edited:
Lets start over!!! When you load the hex file... What!! Any LED's come on? You keep saying
But it is still not working properly.
But we don't know if the program is working but not as you expect, or it just doesn't run!!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top