Questions tagged [lc3-trap]

19 questions
0
votes
1 answer

LC-3 Read whole string, output when enter pressed

I am new to messing around with LC-3 and am stuck on a problem. I want to be able to input an entire string, such as "Hello, my name is Connor" and when I press enter, THEN it is echoed in the console. I have done a problem prior where I read a…
connor moore
  • 611
  • 1
  • 8
  • 18
0
votes
1 answer

Using a custom LC-3 trap routine

I wrote a subroutine to be used as a Trap call via Trap x26. My code for my subroutine is at address x3300. I cannot figure out how to jump from x26 to my actual instructions for the subroutine at x3300, since the gap is greater than JSR's PC offset…
Logan
  • 1,575
  • 1
  • 17
  • 26
-1
votes
1 answer

How Do I Use User Input To Make An Array Of 8 With Ranges 0-100?

I need to make a bubble sort program in LC3 that takes user input (8 numbers with ranges 0-100)and sorts them in ascending order. This is what I have so far (asking the user for input) but I keep getting an error that says:; "immediate field is out…
rue02
  • 1
  • 1
-1
votes
1 answer

LC3 Subroutine - Custom Trap Routine

I am working on a question which the goal is to create a subroutine that imitates the trap (PUTS) and it will write a string to console, this strings addres can be assumed to be in r0 this is what I have so far, it works for the first character 's'…
rahulchawla
  • 170
  • 1
  • 3
  • 20
1
2