Taken a look, but assembler isn't the best descriptive code, you often can't see the wood for the trees.
This assembler syntax has confused me:
Code: Select all
lea pc_ipcwr,a5
lea pc_ipcrd-pc_ipcwr(a5),a4 ; hardware addresses
Which addresses are these? Obviously two of the registers' addresses are being loaded into a4 and a5 but which ones?
I'm guessing that this is moving the value in bit 7 to bit 0
Code: Select all
move.b (a4),d0 ; rx bit in msb
add.b d0,d0 ; ... in X
roxl.w #1,d1 ; ... in bit 0
And I'm not exactly sure what this code is doing...
Code: Select all
qlhc_wloop
move.b #pc.ipcwr>>2,d0 ; IPC write bits
rol.w #1,d0
add.b d0,d0 ; bit to send in bit 1
move.b d0,(a5)
I'm guessing that "add.b d0,d0" is a quick way of doubling rather than than using a shift left? By why not just rotate 2 rather than one in the previous instruction?
The problem is that this is showing the mechanism and not the intention, i.e. describes what it's doing but not why it's doing it.