4.5 The following routine is designed to do nothing other than defer execution of the main routine by 1282 ^s in a PIC MCU which is being clocked using a 4 MHz crystal. Taking into account pipelining, verify this figure.
4.6 Can you devise an algorithm and task list to subtract two packed BCD numbers located as in Example 4.4. The outcome packed byte is to be in File 23h and File 22h is to hold the overflow carry – that is the negative indicator. This overflow is to be zero if there was a full borrow out, otherwise one. For example 45h – 29h = (01)16h (that is 45 – 29 = +16) and 29h – 45h = (00)84h (29 – 45 = -84) where 84 is the ten’s complement of 16.
Do'stlaringiz bilan baham: |