The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 313 Weeks Ago, 6 Days Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
I am needing help writing LC-3 Assembly code for these psuedo code I have provided. Also I have included the instructions in the file and the temlate asm files for writing the code.
if (u < 0) { answer = -u; }
else { answer = u; }
2. Is multiple
while(a < b)
{ a = a - b; }
if (a == b)
{ return 1; }
else { return 0; }
3. timeline program
n--;
if (n == 0)
{ puts(“Nothing happened before “);
puts(YEAR_ARR[n]); putc('n'); }
else { puts(“In the years before “);
puts(YEAR_ARR[n]); puts(“...”);
putc('n');
var i = n;
while (i > 0) { i--; puts(EVENT_ARR[i]); } }
if (n == max) { puts(“And nothing happened after “);
puts(YEAR_ARR[n]);
putc('n'); }
else { puts(“And in the years after “);
puts(YEAR_ARR[n]); puts(“...”);
putc('n'); var i = n;
while (i < max)
{ i++;
puts(EVENT_ARR[i]); } }
Attachments:
----------- ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly