Can someone help me out by coding this c into HLA(High Level Assembly)language. I am having so difficulty writting in HLA. That would be appreciated.
program crazy_8s;
#include ("stdlib.hhf");

static
num1: int16;
num2: int16;
num3: int16;
tens: int16;
eight_found: boolean;

begin crazy_8s;

eight_found := false;

while (1)
{
stdout.put("Gimme a number: ");
stdin.get(num1);

tens := num1 / 10 * 10;

if (tens == 8)
{
stdout.put("One of them ends in eight!");
eight_found := true;
break;
}

stdout.put("Gimme a number: ");
stdin.get(num2);

tens := num2 / 10 * 10;

if (tens == 8)
{
stdout.put("One of them ends in eight!");
eight_found := true;
break;
}

stdout.put("Gimme a number: ");
stdin.get(num3);

tens := num3 / 10 * 10;

if (tens == 8)
{
stdout.put("One of them ends in eight!");
eight_found := true;
break;
}

if (!eight_found)
{
stdout.put("Sorry Charlie! You lose the game!");
break;
}
}

end crazy_8s;

Answers

Answer 1

Below is the provided C code translated into HLA (High Level Assembly) language:

program crazy_8s;

#include ("stdlib.hhf")

static

num1: int16;

num2: int16;

num3: int16;

tens: int16;

eight_found: boolean;

begin crazy_8s;

   eight_found := false;

   while (1) {

       stdout.put("Gimme a number: ");

       stdin.gets(num1);

       tens := num1 div 10 * 10;

       if (tens = 8) then

           stdout.put("One of them ends in eight!")

           eight_found := true;

           break;

       endif

       stdout.put("Gimme a number: ");

       stdin.gets(num2);

       tens := num2 div 10 * 10;

       if (tens = 8) then

           stdout.put("One of them ends in eight!")

           eight_found := true;

           break;

       endif

       stdout.put("Gimme a number: ");

       stdin.gets(num3);

       tens := num3 div 10 * 10;

       if (tens = 8) then

           stdout.put("One of them ends in eight!")

           eight_found := true;

           break;

       endif

Thus, this can be the code asked.

For more details regarding HLA, visit:

https://brainly.com/question/13034479

#SPJ1


Related Questions

Your organization sometimes needs to securely share information with three clients organizations. What will you use so your clients get partial access to resources on your organization’s network?

Answers

Answer:

Personnellement j'utiliserai un logiciel qui permet de paramétrer la limite d'accès aux organisations sur des ressources partagées.

Explanation:

21
Select the correct answer.
Which task occurs just before the maintenance phase?
O A reviewing prerequisites
B.
final reviewing and deploying the product
C. training end users to operate the product
D.
site surveying
O E reviewing all manuals and plans
Edmentum/Plato

Answers

The task, final reviewing and deploying the product occurs just before the maintenance phase. The correct option is B.

The task that takes place just before the maintenance phase is the last review and deployment of the product.

At this step, the software or product is thoroughly examined to make sure it complies with all the prerequisites and quality standards. Before the product is deployed or made available to end users, any outstanding problems or faults are addressed and fixed.

Final testing, user acceptability testing, and preparing the product for deployment in the production environment are additional tasks included in this phase.

The product can be made available for usage by the intended end users after the final review is finished and it is determined that it is ready.

Thus, the correct option is B.

For more details regarding testing, visit:

https://brainly.com/question/31941684

#SPJ1

Select the correct answer from each drop-down menu.
Which two components help input data in a computer and select options from the screen, respectively?
✓inputs data into computers in the form of text, numbers, and commands. However, a
commands from the screen.
A
Reset
Next
✓selects options and

Answers

Which two components help input data in a computer and select options from the screen, respectively?

✓ Keyboard inputs data into computers in the form of text, numbers, and commands. However, a

✓ Mouse selects options and commands from the screen.

A

Reset

Next

To know more about input data refer here

https://brainly.com/question/30256586#

#SPJ11

Design two classes named Employee and PaySheet to represent employee and PaySheet data as follows: For the Employee class, the data fields are: int empNo; String name; double payRate PerHour, PaySheet[] PaySheet for four weeks (1 month), and Two other data fields of your choice. For the PaySheet class, the data fields are: String weekEndingDate; integer Array of size=5 for the five working days. Entries in this array will be integers from 0-8 where 0 means that the employee did not work that day and a value from 1 to 480 means the number of hours the employee worked in that day. All data fields should be declared as private, and associated getters and setters should be declared in each class. Create a driver class called Main, whose main method instantiates array of Employee objects and write the following methods: 1. A Method called printInfo that receives an array of Employees and prints all information about working days that looks like the following: Emp NO. Week Total Days/hours weekly Payment 1 1 1 2 2 1 2312 2 4/32 5/37 3/12 1/8 3/15 400 500 300 150 450 2. Method called print WarnedEmployees that receives an array of Employees and prints the name of the employee who has a warning. An employee is warned if he is absent for two or more days in two consecutive weeks. 3. A method that receives an array of Objects and sorts unwarned Employees based on TotalPayment (in all weeks) method header must be: public static void sortEmps (Object[] o)​

Answers

A class serves as a model for generating objects through code. Objects are characterized by their member variables and their corresponding behavior.  The code is given below.

What is the class code?

The term "class" in Python is generated using the keyword "class". A new instance is generated through the usage of the class's constructor.

The function that is named "printWarnedEmployees" is one that often accepts an array containing objects of type "Employee" and show forth the name of any employee who has received a warning. If an employee is absent for two or more days in two consecutive weeks, they will be given a warning.

Learn more about class code from

https://brainly.com/question/17544466

#SPJ1

The layer that represent information as Binary numbers 0s and 1s

information
communication
programming
Hardware

Answers

The layer that represent information as Binary numbers 0s and 1s "Hardware" (Option D)

Why is binary important to computing?

Binary numbers and binary math are used by computers because they considerably simplify their work. It is easier to store or modify the numbers since there are just two choices (0 and 1) for each digit rather than ten.

Hardware components of a computer system, such as transistors, logic gates, and memory circuits, process and store information using binary digits (bits), which can have a value of 0 or 1.

Learn more about Binary Numbers:
https://brainly.com/question/31662989
#SPJ1

package Unit3_Mod2;


public class ImageExample3 {

public static void main (String[] argv)
{
int[][][] A = {
{
{255,200,0,0}, {255,150,0,0}, {255,100,0,0}, {255,50,0,0},
},
{
{255,0,200,0}, {255,0,150,0}, {255,0,100,0}, {255,50,0,0},
},
{
{255,0,0,200}, {255,0,0,150}, {255,0,0,100}, {255,0,0,50},
},
};

// Add one pixel on each side to give it a "frame"
int[][][] B = frameIt (A);

ImageTool im = new ImageTool ();
im.showImage (B, "test yellow frame");
}

public static int[][][] frameIt (int[][][] A)
{
static int[][][] copy(int[][][] A)
{
int i, j, x;
//declaring a new array with size of original array A
int[][][] ArrayCopy = new int[A.length][][];
//iterate through rows original array
for (i = 0; i < A.length; i++) {
ArrayCopy[i] = new int[A[i].length][];
//Iterate through columns in the array
for (j = 0; j < A[i].length; j++) {
ArrayCopy[i][j] = new int[A[i][j].length];
//iterate through third dimension
for (x = 0; x < A[i][j].length; x++) {
ArrayCopy[i][j][x] = A[i][j][x];
}
}
}
//return the copy of the original array
return ArrayCopy;
}

}


In java, change black frame border to yellow colored frame

Answers

Note that to change the black frame border to a yellow-colored frame in the given Java code, you can modify the frameIt method as follows.

What is the modified code?

public static int[][][] frameIt(int[][][] A) {

   int[][][] ArrayCopy = copy(A); // Create a copy of the original array

   

   // Iterate   over the first and lastrows

   for (int j = 0; j <   A[0].length;j++) {

       ArrayCopy[0][j][0] =255; //   Set red value to 255

       ArrayCopy[0][j][1] = 255; // Set green value to 255

       ArrayCopy[0][j][2] = 0;   // Set blue value to 0

       

       ArrayCopy[A.length - 1][j][0] = 255; // Set red value to 255

       ArrayCopy[A.length - 1][j][1] = 255; // Set green value to 255

       ArrayCopy[A.length - 1][j][2] = 0;   // Set blue value to 0

   }

   

   // Iterate over thefirst and last   columns

   for(int i = 0; i < A.length; i+  +) {

       ArrayCopy[i][0][0] = 255; //Set red value to   255

       ArrayCopy[i][0][1] = 255;   // Set green value to255

       ArrayCopy[i][0][2] = 0;   // Set blue value to 0

       

       ArrayCopy[i][A[i].length -   1][0] = 255;// Set red value to 255

       ArrayCopy[i][A[i].length -   1][1] =255; // Set green value to 255

       ArrayCopy[i][A[i].length - 1][2] = 0;   // Set blue value to 0

   }

   

   return ArrayCopy;

}

Learn more about Java:
https://brainly.com/question/26789430
#SPJ1

Other Questions
the philosophy of confucius is pragmatic; its principle concern is the stono rebellion proved that eighteenth-century slaves Heights are measured, in inches, for a sample of undergraduate students, and the five-number summary for this data set is given in the table below. From this five-number summary, what can we conclude?minimum=59Q1=64median=67Q3=69maximum= 741. 50% of the heights are between 59 inches and 74 inches.2. 75% of the heights are below 64 inches.3. 25% of the heights are above 69 inches.4. 25% of the heights are between 67 and 74 inches.5. 50% of the heights are between 59 and 69 inches. berg's use of harmony in wozzeck is strictly atonal. true or false a left tailed z test found a test statistic of z = -1.99 at a 5% level of significance, what would the correct decision be? use logic and reason on how monetary and fiscal policy combatcurrent Inflation in the U.S. Support your ideas withreferences. parts of dna are converted to protein, while other parts are interspersed, but do not correlate to the final protein sequence. the portions of the dna that code for final amino acid sequence are called . When schaal gains are attened under the conditions that lead to folation solid state flows are one of the possible mechanism by which that happens Another possible ways breaking them up prolution none of these QUESTION 15 Nauw metamorphic concede on Earth where you can have both incredible high amounts of pressure and at the same time, demperatures that are done to the freezing polet THU OT A function f is given, and the indicated transformations are applied to its graph. Write an equation for thefinal transformed graph.(4.1) f(x) = |x|; shrink vertically by a factor of (3)12, shift to the left 1 unit, and shift upward 3 units.(4.2) f(x) = (2) x; reflect in the xaxis, shift 1 units upwards(4.3) f(x) = (2) x; reflect in the yaxis, shift 2 units downw Create a food chain with any type of organism you would like. Make sure to include a producer, primary consumer, secondary consumer, and decomposer. In the encounter stage of the organizational socialization process, _____ involve the expectations placed on newcomers in an organization.Group of answer choicesintrapersonal demandsinterpersonal demandsrole demandstask demands 1. (a) Distinguish between the concepts of economic growth nd economic development. which of the following must be considered in long run planning?a. production choicesb. fixed costsc. investment choicesd. declining marginal physical product A 20. 0-m tall hollow aluminum flagpole is equivalent in strength to a solid cylinder 4. 00 cm in diameter. A strong wind bends the pole much as a horizontal force of 1100 n exerted at the top would president carters ""zero-base budgeting"" mandated that The "ashes" left from the cremation processes area. 20 to 30 pounds in weightb. like coarse coral sandc. different shades according to the person's ethnicityd. as fine as dust Worker compensation laws do which of the following?A. Ensure that employees will be taken care of when they retireB. Set safety standards for all workplacesC. Require employers to pay employees a fair wage for the hours and work completedD. Require employers to insure employees in case they are injured at work the adirondack mountains of new england are comprised of precambrian rocks. what is the age and nature of these precambrian rocks? to which precambrian province do they belong? Complete the following sentences based on your knowledge of the samurai. in each of the problems 1 through 4 a.draw a direction field b.find a general solution of the given system of equations and describe the behavior of the solution of the system as [infinity]c.plot a few trajectories of the system.2.x!=(1 -2)=(3 -4) x