Page 370 - Introduction to Microcontrollers Architecture, Programming, and Interfacing of The Motorola 68HC12
P. 370
PROBLEMS 347
SUBB 0,SP ;j-k-i
BEQ LOOP 4
BLO LOOP 5
CMPB HI ?j>hi?
BLS LOOP4
STAB HI ;hi=j
BRA LOOP4
if((k < i) && (( j = ( i - k) ) > lo )) lo - j;
LOOPS: NEGB ;j=i-k
CMPB LO
BLS LOOP4 ;j>lo?
STAB LO
for(i = 0; i != Oxff; i++){
LOOP4: PULA
INCA ;i++
CMPA #$FF ;j!=0x
BNE LOOP 2
LOOP6-. BRA LOOP6 ;do-while(l)
Figure 11.19. Another Program with Disassembly

