LC-3 while loop to br at x04 character?

Tyler

I'm trying to create a while loop in the LC-3 assembly language environment that reads in characters or numbers and then breaks the loop when CTRL+D (x04) is typed. I know I can break the loop using brp, brn or brz for positive, negative or zero but how can I trigger a break using the end of stream (x04) hex character?

Jester

The idea is to apply some transformation that gives a condition code you can use to determine if the value was 4. In this case, you can simply subtract 4 (that is, add -4) and check whether that results in zero or not.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to BR with nzp=000 in LC3

From Dev

Understanding character pointers in a while loop

From Dev

Entering specific character into while loop

From Java

Java input buffer and do-while loop behavior (why does it check first character 3 times?)

From Dev

Java input buffer and do-while loop behavior (why does it check first character 3 times?)

From Dev

split() loop: if string number = x, insert <br>

From Dev

While loop not seeing or finding terminating null character

From Dev

input character inside a while loop with validation

From Dev

Is there any ASCII character for <br>?

From Dev

Python 3 nested While loop

From Dev

Python 3 - While Loop Breaking

From Dev

XSL: replacing <br><br/> with another character

From Dev

Why does program continue in while loop for any character entered?

From Dev

Script running into an infinite loop while trying to insert a character

From Dev

why getline ignoring first character of input while using in loop?

From Dev

While loop never stops when I enter a character in a place

From Dev

LC3 Bit Counter

From Dev

Error Handling in LC-3?

From Dev

Bootstrap 3 Form Modal while in loop

From Dev

Tkinter wit while loop (python 3)

From Dev

While Loop Not working only creating 3 objects

From Dev

Python while loop, coin toss 3 times

From Dev

Appending to list from while loop Python 3

From Dev

Break while loop every 3 iterations

From Dev

update parameter in while loop D3

From Dev

Skip first 3 lines of while loop

From Dev

how to prevent infinite while loop in python 3

From Dev

NSArraym was mutated while being enumerated, sqlite3 while loop?

From Dev

Issues with While Loop in Python 3 - loop breaks when it should repeat

Related Related

HotTag

Archive