Need help with assembly x86 using C language
-
Well after finishing logical gates and making the Computer.hdl (Nand2tetris) We started learning about assembly this is only the second lesson and we learnt so far a bit about offset lea and signed and unsigned i need help solving this exercise and on the way the explenation why and how because iv been searching tyhe web for 2 days now and i got no luck so far ; Print '15', using ONLY 'mov' and 'lea'. ; Do NOT use arithmetic instrutions (add, inc, mul, etc.) PRINTN "Part (C) - should print 15" mov ax,10 mov bx,4 mov cx, lea [ax + bx+1] mov ax,cx call print_num PRINTN
-
Well after finishing logical gates and making the Computer.hdl (Nand2tetris) We started learning about assembly this is only the second lesson and we learnt so far a bit about offset lea and signed and unsigned i need help solving this exercise and on the way the explenation why and how because iv been searching tyhe web for 2 days now and i got no luck so far ; Print '15', using ONLY 'mov' and 'lea'. ; Do NOT use arithmetic instrutions (add, inc, mul, etc.) PRINTN "Part (C) - should print 15" mov ax,10 mov bx,4 mov cx, lea [ax + bx+1] mov ax,cx call print_num PRINTN
a random user wrote:
i need help solving this exercise...
Just curious, but isn't that what the instructor (or the TA) is for? Are instructors these days just off limits to questions?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
a random user wrote:
i need help solving this exercise...
Just curious, but isn't that what the instructor (or the TA) is for? Are instructors these days just off limits to questions?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
the instructers are not allowed to help us
-
the instructers are not allowed to help us
-
Who are you calling strange, Richard? :suss:
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
indeed
-
Well after finishing logical gates and making the Computer.hdl (Nand2tetris) We started learning about assembly this is only the second lesson and we learnt so far a bit about offset lea and signed and unsigned i need help solving this exercise and on the way the explenation why and how because iv been searching tyhe web for 2 days now and i got no luck so far ; Print '15', using ONLY 'mov' and 'lea'. ; Do NOT use arithmetic instrutions (add, inc, mul, etc.) PRINTN "Part (C) - should print 15" mov ax,10 mov bx,4 mov cx, lea [ax + bx+1] mov ax,cx call print_num PRINTN
As a rule, we don't help with homework. That said, I'll give you a hint; the solution is related to loading ASCII codes for characters into AX.
-
As a rule, we don't help with homework. That said, I'll give you a hint; the solution is related to loading ASCII codes for characters into AX.
well thank you...