Balain
2013-09-24, 07:20 PM
I have run into a problem in the first step of my assignment.
I am going to try and ask this and not break any codes of misconduct, so sorry if it is too vague.
I am currently trying to figure out the value of some function based on x. That is y=a*x+b
I get no errors or warnings when I compile. all the values in my registries seem to be correct, but when I run my program nothing is displayed. So I figure it has to be a problem with how I am using printf
out1: .asciz "x=%d y=%d"
.align 4
.global main
main: All my calculations for y
set out1, %o0 !out1 string
mov %l1, %o1 !value for x
mov %l2, %o2 !value for y
call printf
nop
mov 1, %g1
ta 0
I am going to try and ask this and not break any codes of misconduct, so sorry if it is too vague.
I am currently trying to figure out the value of some function based on x. That is y=a*x+b
I get no errors or warnings when I compile. all the values in my registries seem to be correct, but when I run my program nothing is displayed. So I figure it has to be a problem with how I am using printf
out1: .asciz "x=%d y=%d"
.align 4
.global main
main: All my calculations for y
set out1, %o0 !out1 string
mov %l1, %o1 !value for x
mov %l2, %o2 !value for y
call printf
nop
mov 1, %g1
ta 0