Search found 9 matches

by junki
Thu 08 May, 2008 9:14 pm
Forum: Programming Help
Topic: cyclic rotate of 23 bits
Replies: 13
Views: 9544

It's something that some (few) radio repeater equipment require to
hear within a signal before allowing use. Stuff from previous century :)
by junki
Thu 08 May, 2008 7:34 pm
Forum: Programming Help
Topic: cyclic rotate of 23 bits
Replies: 13
Views: 9544

Not with an emulator, but "scoping" with a soundcard. It looks ok, code 525 (octal) emits the 101 010 101, sync & parity bits follow and then it repeats. Cannot tell if the parity calculation is correct or not, but that's another story. bits look distorted, haven't poked the soundcard ...
by junki
Thu 08 May, 2008 6:07 pm
Forum: Programming Help
Topic: cyclic rotate of 23 bits
Replies: 13
Views: 9544

worrying that you calculate and set constants Now I'm confused. Do you mean the bit interval add hl, bc stuff ? Those @$@^^ fractional Hz make it awkward. I must question the use of "ld (dcs_ptr), a", The table contains two equal bytes per each databit. Depending on the previous databit, ...
by junki
Thu 08 May, 2008 4:41 pm
Forum: Programming Help
Topic: cyclic rotate of 23 bits
Replies: 13
Views: 9544

You have it correct. Cannot tell if it works, some soldering yet to be done :) The background is "digital coded squelch" in VHF/UHF talkies, a subaudible addition in the transmission. In this particular case there was no real need for superoptimisation, but the method might be useful for o...
by junki
Thu 08 May, 2008 12:11 pm
Forum: Programming Help
Topic: cyclic rotate of 23 bits
Replies: 13
Views: 9544

Code: Select all

    ld hl, (dcs_ptr)    ; 16
    ld a, (hl)          ;  7
    out (DCSPIN), a     ; 11 lsbit is dcs bit
    ld (dcs_ptr), a      ; 13 and it also points to the next
It turned out to be oddly pleasing. Setup routine gets awkward though,
struggling with it now :)

Juha
by junki
Thu 08 May, 2008 8:11 am
Forum: Programming Help
Topic: [TI ASM] Optimizations
Replies: 69
Views: 76882

[quote="sigma"]If you want a 16-bit loop counter, never, ever do this:

Code: Select all

- ; Loop body
  ;   .
  ;   .
  ;   .
  ld  a, d
  or  e
  jp  nz, -
That would be useful, if each run of the loop must be in constant time.

Just nitpicking about the "never, ever" :)
Juha
by junki
Wed 07 May, 2008 6:45 pm
Forum: Programming Help
Topic: cyclic rotate of 23 bits
Replies: 13
Views: 9544

Solved. Or at least no acute urge to find tighter solutions :)
by junki
Wed 07 May, 2008 5:02 pm
Forum: Programming Help
Topic: cyclic rotate of 23 bits
Replies: 13
Views: 9544

Seeing as it is a constant Ha! 23 copies, in each possible position, and only the lsbit is needed. Boils down to 23 bytes in ringbuffer. Thanks! The problem is mostly academic, just 134.4 Hz rate. What assembler are you using? (never seen .ds before) as-z80 which comes with SDCC compiler. Juha
by junki
Wed 07 May, 2008 11:12 am
Forum: Programming Help
Topic: cyclic rotate of 23 bits
Replies: 13
Views: 9544

cyclic rotate of 23 bits

Hello, Can anyone suggest a better way ? ld hl, # dcs_bits+2 ; 8 msbits here ld a, (dcs_bits) ; 7 lsbits, leftjust rra out (DCSPIN), a ; emit old lsbit, now in A.0 rra rr (hl) ; rotate the stored bits dec l ; within a page rr (hl) dec l rr (hl) .... dcs_bits: .ds 3 ; 23 msbits rotate, lsbit is junk ...