Code:
Assembly Source File Fragment_INIT_MBUS:;_READ_TEMPERATURE: CLR.B MBSR(A5) ;CLEAR STATUS REGISTER MOVEQ #$13,D0 ;DIVIDE 40MHz BY 480 = 83K33 ;DIVIDE 54MHz BY 480 = 112K5 MOVE.B D0,MFDR(A5) CLR.B MBCR(A5) ;RESET AND DISABLED MOVEQ #$80,D0 MOVE.B D0,MBCR(A5) ;ENABLE M-BUS MOVEQ #$A5,D0 ;ARBITRARY MASTER ADDRESS MOVE.B D0,MADR(A5) ;SET ADDRESS BSR.W _TX_A_W ;TRANSMIT ADDRESS:WRITE BNE.W NO_ACK ;ERROR 'Standard' Assembly Listing File 00000000 03 51 _INIT_MBUS: 00000000 03 52 ;_READ_TEMPERATURE: 00000000 03 422d 01ec 53 CLR.B MBSR(A5) ;CLEAR STATUS REGISTER 00000004 03 7013 54 MOVEQ #$13,D0 ;DIVIDE 40MHz BY 480 = 83K33 00000006 03 55 ;DIVIDE 54MHz BY 480 = 112K5 00000006 03 1b40 01e4 56 MOVE.B D0,MFDR(A5) 0000000a 03 422d 01e8 57 CLR.B MBCR(A5) ;RESET AND DISABLED 0000000e 03 7080 58 MOVEQ #$80,D0 00000010 03 1b40 01e8 59 MOVE.B D0,MBCR(A5) ;ENABLE M-BUS 00000014 03 70a5 60 MOVEQ #$A5,D0 ;ARBITRARY MASTER ADDRESS 00000016 03 1b40 01e0 61 MOVE.B D0,MADR(A5) ;SET ADDRESS 0000001a 03 6100 00ca 62 BSR.W _TX_A_W ;TRANSMIT ADDRESS:WRITE 0000001e 03 6600 00b6 63 BNE.W NO_ACK ;ERROR CodeWarrior's Dis-assembly FileAddress ObjectCode Label Opcode Operands Comment0x00000000 _INIT_MBUS:; INIT_MBUS:0x00000000 __start:; _start:0x00000000 _start:; start:0x00000000 0x422D01EC clr.b 492(a5)0x00000004 0x7013 moveq #19,d00x00000006 0x1B4001E4 move.b d0,484(a5)0x0000000A 0x422D01E8 clr.b 488(a5)0x0000000E 0x7080 moveq #-128,d00x00000010 0x1B4001E8 move.b d0,488(a5)0x00000014 0x70A5 moveq #-91,d00x00000016 0x1B4001E0 move.b d0,480(a5)0x0000001A 0x610000CA bsr.w *+204 ; 0x000000e60x0000001E 0x660000B6 bne.w *+184 ; 0x000000d6
The above is an example of assembly code, listing file and disassembly. Note that the disassembly loses the source comments and operand labeling, making it less than useful.
I gather that not too many of your users have as much legacy code written in assembler as I have. I need to carry this old code up into an environment supporting the c, c++, ethernet stacks, etc. I'm sure I'll be porting this legacy code over time as needed, but for now, if it ain't broke....
Thanks anyways,
Scott