Welcome, Guest. Please login or register.
Amiga Kit Amiga Store Iridium Banner AMIStore App Store A1200/A600 4xIDE Interface

AuthorTopic: 6811 assembly help needed  (Read 1373 times)

0 Members and 1 Guest are viewing this topic.

Offline Louis Dias

6811 assembly help needed
« on: April 23, 2012, 08:46:22 PM »
Here is the relevant code:
Code: [Select]

A0CF  ldaa L8057    ;IP PULSE DIVISOR
A0D2  staa *L00C0
A0D4  jsr LF0EB
     'this much is obvious so far...then:
-------------------------------------------------------------------------
F0EB LF0EB:ldx #0x4002
F0EE  bclr 0x00,x,#0x80
F0F1  ldaa *L00C0
F0F3  jsr LFD85
F0F6  bset 0x00,x,#0x80
F0F9  ldx #0x86C0
F0FC  brclr 0x00,x,#0x80,LF108
F100  anda #0x7F
F102  brclr *L0030,#0x04,LF108
F106  oraa #0x80
F108 LF108:staa *L00BF
F10A  rts

------------------------------------------------------------

  ;-------------------------------------------------------
  ; THINK THIS IS TRANSMIT ROUTINE - COMMANDS ARE DIFFERENT THAN $8D,
  ;      BUT ROUTINE USED IN SIMILAR WAY
  ; XMIT ON SERIAL SHIFT REG, (SSR)
  ;---------------------------------------------------------
FD85 LFD85:pshx
FD86  staa L4000
FD89  ldx #0x4001
FD8C  bclr 0x00,x,#0x80
FD8F  ldaa #0x16
FD91  clc
FD92 LFD92:brset 0x00,x,#0x80,LFD9C
FD96  deca
FD97  bne LFD92
FD99  sec
FD9A  bra LFD9F
FD9C LFD9C:ldaa L4000
FD9F LFD9F:pulx
FDA0  rts

Now for some background.  This is the code that controls the pulses sent to my car's speedometer.  Originally it had a transmission that sent a roughly 24000 pulses per mile signal and there was a value here that converted it to a roughly 4000 ppm signal.  The location at L8057 gets a byte that sort of acts as a divisor.  "Sort of" is the key phrase.  My new transmission sends a roughly 60,000ppm signal.  I would like to understand the logic of these routines so that I can burn in the correct value to run my speedometer again.