W + X =
Y + Z =
(W + X) + (Y + Z) =
I can do the calculations perfectly, but I cant seem to out put them on the same line, they always space down a line after I input a variable.
Here is my code so far:
BR main
sum1: .BLOCK 2
sum2: .BLOCK 2
sum3: .BLOCK 2
num1: .BLOCK 2
num2: .BLOCK 2
num3: .BLOCK 2
num4: .BLOCK 2
main: CHARO '(',i
LDA sum1,d
DECI num1,d
ADDA num1,d
CHARO '-',i
DECI num2,d
SUBA num2,d
CHARO ')',i
STA sum1,d
CHARO '+',i
CHARO '(',i
LDA sum2,d
DECI num3,d
ADDA num3,d
CHARO '-',i
DECI num4,d
SUBA num4,d
CHARO ')',i
STA sum2,d
CHARO '=',i
LDA sum3,d
ADDA sum1,d
ADDA sum2,d
STA sum3,d
DECO sum3,d
STOP
.END
I also have to output our first and last name, but I dont know how to fit my name into one block. all and any help is greatly appreciated. thank you

New Topic/Question
Reply




MultiQuote


|