

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The third problem of the embedded systems exam held in fall 2006 by macdonald. Students are required to analyze the given subroutine code, fill in the memory and register table, and write an equivalent c code segment. Additionally, they need to answer short questions about reverse polish notation (rpn) and a freescale (motorola) for loop enhancement.
Typology: Exams
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Location Prior to JSR After LEAS After SUBA AFTER RTS a 10 b 1 x 1000 y 3000 sp 2002 mem 1ff9 0 mem 1ffa 0 mem 1ffb 0 mem 1ffc 0 mem 1ffd 0 mem 1ffe 0 mem 1fff 0 mem 2000 0 mem 2001 0
ldab PORTB GREENS: cmpb #GREEN bne YELLOWS inc count asl PORTB bra FINISH YELLOWS: cmpb #YELLOW bne REDS inc count asl PORTB bra FINISH REDS: cmpb #RED bne default inc count asl PORTB bra FINISH ELSE: movb #GREEN, PORTB FINISH: