subject

For the following code sequence, fill in the instructions or operands that are missing from the code sequence and marked with '(number)' - there are 5 blanks; label your answer 1, 2, 3, 4, 5.
; ; counts the number of times a character occurs in a string
; ; and store value on "result"
; ; character -- stored at x6000
; ; string -- stored at x7000
; ; result -- stored at x8000
.orig x3000
nmchr and r0,r0,#0
ld r1,afile ; ; r1 has address of the string (file in memory)
ldi 1 ; ; r2 has the value of the character
not r2,r2
2 r2,r2,#1 ; ; 2's complement of character
aloop ldr r3,r1,#0
3 stop ; ; leave loop on zero word
add r3,r3,r2
brnp nocount
add 4
nocount add r1,r1,#1
5 aloop
stop sti r0,acount ; ; count is stored
halt
achar .fill x6000
afile .fill x7000
acount .fill x8000
.end

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 04:10
2pointswho was mikhail gorbachev? oa. a russian leader who opposed a coupob. a polish leader who founded the labor union "solidarityoc. a soviet leader who called for a closer relationship with the unitedstates, economic reform, and a more open societyd. a soviet leader who called for more oppression in the soviet union
Answers: 3
question
Computers and Technology, 23.06.2019 12:00
From excel to powerpoint, you can copy and paste a. cell ranges and charts, one at a time. b. cell ranges and charts, simultaneously. c. charts only. d. cell ranges only.
Answers: 3
question
Computers and Technology, 23.06.2019 18:00
File account.java (see previous exercise) contains a definition for a simple bank account class with methods to withdraw, deposit, get the balance and account number, and return a string representation. note that the constructor for this class creates a random account number. save this class to your directory and study it to see how it works. then write the following additional code: 1. suppose the bank wants to keep track of how many accounts exist. a. declare a private static integer variable numaccounts to hold this value. like all instance and static variables, it will be initialized (to 0, since it’s an int) automatically. b. add code to the constructor to increment this variable every time an account is created. c. add a static method getnumaccounts that returns the total number of accounts. think about why this method should be static - its information is not related to any particular account. d. file testaccounts1.java contains a simple program that creates the specified number of bank accounts then uses the getnumaccounts method to find how many accounts were created. save it to your directory, then use it to test your modified account class.
Answers: 3
question
Computers and Technology, 23.06.2019 18:30
This program should be a short piece of code that prints all of the positive integers from 1 to 100 as described more fully below. the program may contain multiple methods, and if using an oo language, should be contained within a single class or object. the program should be designed so that it begins execution when invoked through whichever mechanism is most common for the implementation language. â–ş print out all positive integers from 1 to 100, inclusive and in order. â–ş print messages to standard output, matching the sample output below. â–ş in the output, state whether the each integer is 'odd' or 'even' in the output. â–ş if the number is divisible by three, instead of stating that the number is odd or even, state that the number is 'divisible by three'. â–ş if the number is divisible by both two and three, instead of saying that the number is odd, even or divisible by three; state that the number is 'divisible by two and three'. â–ş design the logic of the loop to be as efficient as possible, using the minimal number of operations to perform the required logic. sample output the number '1' is odd. the number '2' is even. the number '3' is divisible by three. the number '6' is divisible by two and three.
Answers: 1
You know the right answer?
For the following code sequence, fill in the instructions or operands that are missing from the code...
Questions
question
Mathematics, 21.03.2021 03:00
question
Mathematics, 21.03.2021 03:00
question
Mathematics, 21.03.2021 03:00
question
Biology, 21.03.2021 03:00
question
English, 21.03.2021 03:00
question
Physics, 21.03.2021 03:00
Questions on the website: 13722367