.file "main.java" __SREG__ = 0x3f __SP_H__ = 0x3e __SP_L__ = 0x3d __tmp_reg__ = 0 __zero_reg__ = 1 .global __do_copy_data .global __do_clear_bss .text .global main .type main, @function main: push r29 push r28 in r28,__SP_L__ in r29,__SP_H__ /* prologue: function */ call _Z18MeggyJrSimpleSetupv /* Need to call this so that the meggy library gets set up */ # NewExp ldi r24, lo8(0) ldi r25, hi8(0) # push object address # push two byte expression onto stack push r25 push r24 # Load constant int 2 ldi r24,lo8(2) ldi r25,hi8(2) # push two byte expression onto stack push r25 push r24 # Casting int to byte by popping # 2 bytes off stack and only pushing low order bits # back on. Low order bits are on top of stack. pop r24 pop r25 push r24 # Load constant int 6 ldi r24,lo8(6) ldi r25,hi8(6) # push two byte expression onto stack push r25 push r24 # Casting int to byte by popping # 2 bytes off stack and only pushing low order bits # back on. Low order bits are on top of stack. pop r24 pop r25 push r24 #### function call # put parameter values into appropriate registers # load a one byte expression off stack pop r20 # load a one byte expression off stack pop r22 # receiver will be passed as first param # load a two byte expression off stack pop r24 pop r25 call C1setP # NewExp ldi r24, lo8(0) ldi r25, hi8(0) # push object address # push two byte expression onto stack push r25 push r24 # Load constant int 1 ldi r24,lo8(1) ldi r25,hi8(1) # push two byte expression onto stack push r25 push r24 # Casting int to byte by popping # 2 bytes off stack and only pushing low order bits # back on. Low order bits are on top of stack. pop r24 pop r25 push r24 # Load constant int 5 ldi r24,lo8(5) ldi r25,hi8(5) # push two byte expression onto stack push r25 push r24 # Casting int to byte by popping # 2 bytes off stack and only pushing low order bits # back on. Low order bits are on top of stack. pop r24 pop r25 push r24 # Color expression Meggy.Color.ORANGE ldi r22,2 # push one byte expression onto stack push r22 #### function call # put parameter values into appropriate registers # load a one byte expression off stack pop r18 # load a one byte expression off stack pop r20 # load a one byte expression off stack pop r22 # receiver will be passed as first param # load a two byte expression off stack pop r24 pop r25 call C2setP /* epilogue start */ endLabel: jmp endLabel ret .size main, .-main .text .global C1setP .type C1setP, @function C1setP: push r29 push r28 # make space for locals and params ldi r30, 0 push r30 push r30 push r30 push r30 # Copy stack pointer to frame pointer in r28,__SP_L__ in r29,__SP_H__ # save off parameters std Y + 2, r25 std Y + 1, r24 std Y + 3, r22 std Y + 4, r20 /* done with function C1setP prologue */ # IdExp # load value for variable x # variable is a local or param variable # load a one byte variable from base+offset ldd r24, Y + 3 # push one byte expression onto stack push r24 # IdExp # load value for variable y # variable is a local or param variable # load a one byte variable from base+offset ldd r24, Y + 4 # push one byte expression onto stack push r24 # Color expression Meggy.Color.BLUE ldi r22,5 # push one byte expression onto stack push r22 ### Meggy.setPixel(x,y,color) call # load a one byte expression off stack pop r20 # load a one byte expression off stack pop r22 # load a one byte expression off stack pop r24 call _Z6DrawPxhhh call _Z12DisplaySlatev /* epilogue start for C1setP */ # no return value # pop space off stack for parameters and locals pop r30 pop r30 pop r30 pop r30 # restoring the frame pointer pop r28 pop r29 ret .size C1setP, .-C1setP .text .global C2setP .type C2setP, @function C2setP: push r29 push r28 # make space for locals and params ldi r30, 0 push r30 push r30 push r30 push r30 push r30 # Copy stack pointer to frame pointer in r28,__SP_L__ in r29,__SP_H__ # save off parameters std Y + 2, r25 std Y + 1, r24 std Y + 3, r22 std Y + 4, r20 std Y + 5, r18 /* done with function C2setP prologue */ # IdExp # load value for variable x # variable is a local or param variable # load a one byte variable from base+offset ldd r24, Y + 3 # push one byte expression onto stack push r24 # IdExp # load value for variable y # variable is a local or param variable # load a one byte variable from base+offset ldd r24, Y + 4 # push one byte expression onto stack push r24 # IdExp # load value for variable c # variable is a local or param variable # load a one byte variable from base+offset ldd r24, Y + 5 # push one byte expression onto stack push r24 ### Meggy.setPixel(x,y,color) call # load a one byte expression off stack pop r20 # load a one byte expression off stack pop r22 # load a one byte expression off stack pop r24 call _Z6DrawPxhhh call _Z12DisplaySlatev /* epilogue start for C2setP */ # no return value # pop space off stack for parameters and locals pop r30 pop r30 pop r30 pop r30 pop r30 # restoring the frame pointer pop r28 pop r29 ret .size C2setP, .-C2setP