Author Topic: Converting HC11 assembly to C  (Read 928 times)

0 Members and 1 Guest are viewing this topic.

Offline metertech58761Topic starter

  • Regular Contributor
  • *
  • Posts: 154
  • Country: us
Converting HC11 assembly to C
« on: August 01, 2022, 05:50:19 am »
OK, as mentioned in my (failed?) HC11 project thread, here's the firmware for that project.

The file "config term dump" was generated by feeding the EPROM dumps through f9dasm and annotating as needed.

The file "config term source" was after I'd taken the time to study the code.

I removed some functionality I knew I would not need (one set of tests was basically for a bespoke line of equipment and not of interest) and reworked the rest for clarity and consistency.

I'll let those interested parties have a look to see if I was on the right track in cleaning up the assembly code, then i'll get to the parts I was having trouble porting to C.
 

Offline metertech58761Topic starter

  • Regular Contributor
  • *
  • Posts: 154
  • Country: us
Re: Converting HC11 assembly to C
« Reply #1 on: August 03, 2022, 08:04:55 am »
I remember now. I'd posted my nearly finished attempt at rewriting the interrupt code only to get picked on for too many goto statements in the code.

Unless I am convinced otherwise, I think I've reached the washed-out bridge.
 

Offline metertech58761Topic starter

  • Regular Contributor
  • *
  • Posts: 154
  • Country: us
Re: Converting HC11 assembly to C
« Reply #2 on: August 06, 2022, 04:23:58 am »
Here's the code that I had for the interrupt section - again, this is after I tried to minimize the number of goto statements and still have six opcodes (ROL / ROR) to figure out how to translate.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf