Tagged Questions

2
votes
0answers
29 views

Converting from decimal ascii to binary in visual studio macro assembler

I have been given a project that requires me to add two one or two digit numbers and return the result. I'm given most of the code, but I am supposed to fill in the part where we convert the decimal ...
2
votes
1answer
35 views

Assembly MIPS evaluate difference with only BEQ

Hi have to code this loop: for($6=10;$6!=0;$6--){ $7=$6; } but with some conditions. I can only use BEQ and must assume that the initial value of each register is the number of the register. ...
-2
votes
0answers
93 views

How to draw a stack diagram given c assembly code

I'm trying to draw a stack diagram for the following c Assembly code could anyone please help me i have been stuck on this for days. This is what i have so far i have no idea if its right or wrong ...
-2
votes
1answer
29 views

MIPS help (convert from c++) - Initializing an array of integers and computing the max

I need help converting this c++ code into MIPS assembly language. int arr[10]; int min = 10000; int max = -10000; for (int i=0; i<10; i++) cin >> arr[i]; for (int i=0; i<10; i++) { ...
-1
votes
0answers
24 views

Prompt user for input in Assembly and show different responses based on value

I have an assembly program that prompts the user to enter a number between 1-10. Then when the user enters a number: if it is less than 5 display message1 if it is 5 display message2 if it is from ...
-1
votes
2answers
93 views

Looking to increase the efficiency of this inline assembly, can someone offer advice? [closed]

Thank you everyone for being patient with me. I just had to wrap my head around what I was looking at. Apologies for the slowness, just trying to learn and understand. After re-reading everyone's ...
-1
votes
1answer
34 views

assembly heap…trying to study for a test

I have an exam coming up where we have to study heaps and stacks. The stacks part I understand, but the heap is giving me trouble. Our book gives us both in C and in Assembly. But I am having ...
0
votes
2answers
108 views

MIPS (assembly) - how to round a float number?

Let's say I have a float number 123.4567... in $f0 register. How can I round that to 123,46 and store it to $f1 register? I need a solution that also works with negative numbers: -123.4567... --> ...
1
vote
4answers
115 views

shifts in 2 32-bit registers

void rotate( unsigned long mask[], int rotateCnt ); This function rotates the current 64-bit mask (mask[]) by rotateCnt places. If the rotateCnt is positive, rotate left; if the rotateCnt is ...
3
votes
2answers
124 views

previous stack variables

I have this problem, I am recursively calling a function in C and C is lexically scoped, so I can only access the current stack frame. I want to extract the arguments and the local variables from the ...
-1
votes
0answers
33 views

how to get a signed value in nasm [closed]

this is a homework question. I am trying to write an assembly program with nasm under linux, which would calculate http://mathworld.wolfram.com/PolygonArea.html. The point is, I can't manage to ...
3
votes
1answer
196 views

Writing a function in MIPS with global variables?

frogger: jal teechar jal update_frog lw $t0,game_indicator li $t0, 0 Okay, this is the function. I have teechar and update_frog functions completely written and working. I understand ...
0
votes
1answer
55 views

MIPS Assembly - Instruction String to Hex

I'm working on something in Assembly where it takes a string for an instruction, such as add $t1, $t0, $t1 and prints out the instruction in hex. I scan the string piece by piece, with add being ...
0
votes
0answers
44 views

How do I output the user's input in Assembly?

I am very new to Assembly and I'm having trouble understanding how to get the user's input. I'm looking for an example program which simply returns the user's input. For example, if the user enters ...
-3
votes
0answers
107 views

hacking a binary bomb [closed]

I was given an assignment and we are to step through assembly code using gdb to find out what password for each phase will diffuse the bomb and this is what the gdb gives me: 0x00000000004011fd ...

1 2 3 4 5 20
15 30 50 per page